* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #1A7A7F;
  --bg-deep: #1b2838;
  --bg-light: #eef7f8;
  --bg: var(--bg-light);
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #5f7d8b;
  --river-light: #b3e0e5;
  --river: #1A7A7F;
  --river-deep: #15595e;
  --blue-btn: #87CEEB;
  --blue-btn-hover: #6BB5D9;
  --border-radius: 18px;
  --transition: 0.25s cubic-bezier(0.2, 0.0, 0, 1.0);
  --gold: #d4af37;
}

.dark-mode {
  --bg: var(--bg-deep);
  --card-bg: #252540;
  --text: #e0e0e0;
  --text-light: #b0b0c0;
  --river-light: #2a4a4f;
  --river: #4db8c7;
  --river-deep: #3aa3b0;
  --blue-btn: #3a7ca5;
  --blue-btn-hover: #2f6b8f;
  --accent: var(--river);
  --gold: #f0c45a;
}

.light-mode {
  --bg: var(--bg-light);
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #5f7d8b;
  --river-light: #b3e0e5;
  --river: #1A7A7F;
  --river-deep: #15595e;
  --blue-btn: #87CEEB;
  --blue-btn-hover: #6BB5D9;
  --accent: var(--river);
  --gold: #d4af37;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  transition: background-color 0.4s, color 0.4s;
}

.page {
  max-width: 950px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0.5rem 0;
}

.logo-btn {
  background: var(--card-bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.5rem;
  padding: 0.5rem 1.4rem;
  border-radius: 40px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.25s, border-color 0.3s, color 0.3s, background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-btn.fade-in { opacity: 1; transform: translateY(0); }
.logo-btn:hover {
  background: var(--card-bg);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px) scale(1.02);
}

.logo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.nav-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 2px solid var(--river-light);
  border-radius: 40px;
  padding: 0.3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease, background-color 0.3s, border-color 0.3s;
}

.nav-container.fade-in { opacity: 1; transform: translateX(-50%) translateY(0); }

.nav-item {
  position: relative;
  padding: 0.6rem 1.8rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 30px;
  transition: color 0.2s, background-color 0.3s;
  white-space: nowrap;
  user-select: none;
  z-index: 1;
}
.nav-item.active { color: var(--text); font-weight: 600; }

.nav-highlight {
  position: absolute;
  top: 0.3rem; bottom: 0.3rem; left: 0; width: 80px;
  background: var(--accent);
  border-radius: 30px;
  z-index: 0;
  transition: left 0.35s cubic-bezier(0.2, 0.9, 0.4, 1), width 0.35s cubic-bezier(0.2, 0.9, 0.4, 1), background-color 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.nav-highlight.scale-anim { animation: pulseScale 0.3s ease-out; }
@keyframes pulseScale {
  0% { transform: scale(1); }
  40% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.header-actions.fade-in { opacity: 1; transform: translateY(0); }

.icon-btn {
  background: var(--card-bg);
  border: 2px solid var(--river-light);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-light);
  flex-shrink: 0;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.icon-svg { width: 20px; height: 20px; stroke: currentColor; }

.color-panel {
  position: absolute;
  top: 70px;
  right: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--river-light);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 100;
  backdrop-filter: blur(10px);
  min-width: 200px;
}
.color-panel.visible { display: flex; }

.picker-container { display: flex; align-items: center; gap: 1rem; }
.color-picker {
  width: 48px; height: 48px;
  border: none; border-radius: 50%; cursor: pointer; padding: 0; background: none;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: 2px solid var(--river-light); border-radius: 50%; }

.color-preview { display: flex; align-items: center; gap: 0.5rem; }
.preview-swatch {
  width: 24px; height: 24px; border-radius: 50%;
  background-color: var(--accent); border: 1px solid var(--river-light);
}
.preview-value { font-family: monospace; font-size: 0.9rem; color: var(--text); }

.color-input-row { width: 100%; }
.color-input {
  width: 100%; padding: 0.4rem 0.6rem;
  border: 1px solid var(--river-light); border-radius: 8px;
  font-family: monospace; background: var(--bg); color: var(--text);
  text-align: center; outline: none;
}

.color-buttons { display: flex; gap: 0.5rem; }
.btn-small {
  padding: 0.4rem 1rem; border-radius: 20px;
  border: 2px solid var(--river-light); background: var(--card-bg);
  color: var(--text); cursor: pointer; font-size: 0.9rem; transition: all 0.2s;
}
.btn-small:hover { background: var(--accent); color: white; border-color: var(--accent); }

.content-grid {
  display: flex; gap: 2rem; align-items: stretch; margin-top: 1rem;
}

/* 主页左侧面板 */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0.5rem;
}

/* 主页右侧面板（板块框） */
.right-panel {
  flex: 1;
  background: var(--card-bg);
  border-radius: 28px;
  padding: 2rem 1.8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  border: 2px solid var(--river-light);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.right-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.time-greeting {
  font-size: 1rem; font-weight: 500; color: var(--text);
  margin-bottom: 0.4rem; letter-spacing: 0.5px;
}

.greeting {
  font-size: 2rem; font-weight: 700; margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #15595e 0%, #2c3e50 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #15595e;
}
.greeting span { display: inline-block; }

.subtitle { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 2rem; }

.typewriter {
  font-size: 1.1rem; line-height: 1.8; color: var(--river-deep);
  min-height: 3.5rem; margin-bottom: 2.5rem; font-weight: 450;
}

.cursor {
  display: inline-block; width: 2px; height: 1.2em;
  background: var(--accent); vertical-align: text-bottom;
  margin-left: 2px; animation: blink 1s infinite ease-in-out;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.pinyin-preview { color: #b0a9a0; font-style: italic; margin-right: 2px; }

.button-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem; font-size: 0.95rem; font-weight: 500;
  border-radius: 40px; border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap; background: var(--card-bg);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.btn-github { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn-github:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.2); }
.btn-email { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-email:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.right-title { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 0.8rem; }
.divider {
  height: 2px;
  background: linear-gradient(90deg, var(--river-light) 0%, rgba(179,224,229,0.2) 80%);
  margin: 0 0 1.5rem 0; border-radius: 2px;
}

.project-list { display: flex; flex-direction: column; gap: 1.2rem; }
.project-item { padding-bottom: 1.2rem; border-bottom: 1px solid var(--river-light); }
.project-item:last-child { border-bottom: none; padding-bottom: 0; }

.project-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.4rem; flex-wrap: nowrap; gap: 0.5rem;
}

.project-name { font-size: 1.05rem; font-weight: 700; color: var(--text); flex-shrink: 0; }

.status-group { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }

.project-status {
  font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.8rem;
  border-radius: 20px; white-space: nowrap; letter-spacing: 0.5px; flex-shrink: 0;
}

.status-dev { background: rgba(255,165,0,0.15); border: 1px solid rgba(255,140,0,0.6); color: #e67e00; }
.status-done { background: rgba(0,200,100,0.12); border: 1px solid rgba(0,180,80,0.6); color: #2e8b57; }
.status-paused { background: rgba(255,0,0,0.12); border: 1px solid rgba(200,0,0,0.6); color: #d32f2f; }
.status-slow { background: rgba(255,100,0,0.12); border: 1px solid rgba(200,80,0,0.6); color: #cc5500; }

.project-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }

.gold-text { color: var(--gold) !important; }
.project-gold { border-bottom: 1px solid var(--gold) !important; }

.exam-grid { display: flex; gap: 1.2rem; margin-top: 1rem; flex-wrap: wrap; }
.day-column { flex: 1 1 0; min-width: 120px; display: flex; flex-direction: column; gap: 0.5rem; }
.day-header {
  font-weight: 700; font-size: 0.95rem;
  border-bottom: 2px solid var(--gold); padding-bottom: 0.2rem; margin-bottom: 0.2rem;
}
.exam-item {
  display: flex; flex-direction: column; gap: 0.15rem; padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(212,175,55,0.2);
}
.exam-time { font-size: 0.8rem; font-weight: 500; }
.exam-subject { font-size: 0.9rem; font-weight: 600; }

/* ========== 关于页面样式 ========== */
.about-left { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; padding: 1rem 0.5rem; }
.about-right { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; padding: 1rem 0.5rem; }

/* 板块框（关于页面卡片） */
.card-box {
  background: var(--card-bg); border-radius: 20px; padding: 1.5rem 1.5rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05); border: 2px solid var(--river-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.about-section { margin-bottom: 1.2rem; }
.about-section:last-child { margin-bottom: 0; }

.about-heading {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem;
}
.about-heading .heading-icon { width: 20px; height: 20px; stroke: var(--accent); }
.about-text { font-size: 0.95rem; color: var(--text-light); line-height: 1.7; margin-bottom: 0.5rem; }

.contact-list { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-item { display: flex; align-items: center; gap: 0.8rem; }
.contact-icon {
  font-size: 1.5rem;
  color: var(--accent);
  width: auto;
  height: auto;
  stroke: none;
}
.contact-info { display: flex; flex-direction: column; gap: 0.1rem; }
.contact-label { font-size: 0.8rem; font-weight: 600; color: var(--text-light); }
.contact-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.contact-value.link { text-decoration: none; color: var(--accent); }
.contact-value.link:hover { text-decoration: underline; }

.dev-section { margin-bottom: 1.2rem; }
.dev-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.dev-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dev-vertical { flex-direction: column; flex-wrap: nowrap; }
.dev-item {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: white; padding: 0.4rem 0.8rem;
  border-radius: 20px; font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); width: fit-content;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dev-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.dev-name { flex-shrink: 0; }
.dev-percent { font-weight: 700; opacity: 0.9; }

.env-list { display: flex; flex-direction: column; gap: 0.5rem; }
.env-horizontal { flex-direction: row; flex-wrap: wrap; gap: 0.6rem; }
.env-item {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--accent); color: white; padding: 0.35rem 0.6rem;
  border-radius: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); font-size: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.env-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.env-horizontal .env-item { flex: 0 0 auto; }
.env-icon { width: 16px; height: 16px; stroke: white; flex-shrink: 0; }
.env-info { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.3; }
.env-name { font-size: 0.65rem; font-weight: 600; opacity: 0.9; }
.env-desc { font-size: 0.7rem; font-weight: 500; }

.friend-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.friend-card {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem;
  background: var(--card-bg); border: 1px solid var(--river-light);
  border-radius: 16px; padding: 0.8rem; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.friend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.friend-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}
.friend-avatar.placeholder {
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.friend-info { display: flex; flex-direction: column; gap: 0.2rem; }
.friend-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.friend-bio { font-size: 0.8rem; color: var(--text-light); line-height: 1.4; }

/* 头像查看器模态框 */
.avatar-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.avatar-large {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  cursor: default;
}
.avatar-close {
  position: absolute;
  top: 20px; right: 30px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  transition: background 0.2s;
}
.avatar-close:hover { background: rgba(255,255,255,0.3); }

/* 底部信息栏 */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--river-light);
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
.footer-info { margin-bottom: 0.8rem; }
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  align-items: center;
}
.social-icon-link {
  color: var(--text-light);
  font-size: 1.6rem;
  transition: color 0.2s, transform 0.2s;
  text-decoration: none;
}
.social-icon-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.social-icon-link.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.social-icon-link.disabled:hover {
  color: var(--text-light);
  transform: none;
}

@media (max-width: 750px) {
  .about-right { gap: 1.5rem; }
}

@media (max-width: 650px) {
  .content-grid { flex-direction: column; }
  .header { flex-direction: column; gap: 1rem; align-items: center; }
  .nav-container { position: static; transform: none; margin: 0 auto; }
}