/* ===== 小赵官网 v3 · 星空杂志风（左侧竖导航 + 宣言体 + 编号行） ===== */
:root {
  --bg: #050816;
  --bg-deep: #030512;
  --text: #e8ecff;
  --text-dim: #9aa3c7;
  --primary: #7c8cff;
  --accent: #b78cff;
  --accent2: #6ee7ff;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.09);
  --rail-bg: rgba(5, 8, 22, 0.55);
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --grad: linear-gradient(100deg, var(--primary), var(--accent));

  /* 主题相关（暗色默认值） */
  --page-grad: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 55%, #0a0f2e 100%);
  --nav-bg: rgba(5, 8, 22, 0.65);
  --nav-bg-solid: rgba(5, 8, 22, 0.92);
  --shadow: 0 18px 50px rgba(2, 4, 16, 0.5);
  --aurora-opacity: 1;
}

/* 亮色主题 */
:root[data-theme="light"] {
  --bg: #f4f6ff;
  --bg-deep: #e9edff;
  --text: #1b2140;
  --text-dim: #5a6388;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-border: rgba(27, 33, 64, 0.12);
  --rail-bg: rgba(244, 246, 255, 0.7);
  --page-grad: linear-gradient(180deg, #e9edff 0%, #f4f6ff 55%, #dbe4ff 100%);
  --nav-bg: rgba(244, 246, 255, 0.72);
  --nav-bg-solid: rgba(244, 246, 255, 0.96);
  --shadow: 0 18px 44px rgba(35, 42, 77, 0.16);
  --aurora-opacity: 0.45;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; } /* clip 兜底 iOS 对 fixed 负偏移的横向滚动怪癖，且不破坏 sticky */

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}

::selection { background: rgba(124, 140, 255, 0.35); }

a:focus-visible, button:focus-visible { outline: 2px dashed var(--primary); outline-offset: 3px; border-radius: 4px; }

/* ===== 星空画布 ===== */
#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--page-grad);
  transition: background 0.45s ease;
}

/* 极光光晕 */
.aurora {
  position: fixed;
  inset: -20% -20% auto;
  height: 70vh;
  z-index: -1;
  background:
    radial-gradient(40% 55% at 20% 30%, rgba(124, 140, 255, 0.16), transparent 70%),
    radial-gradient(35% 50% at 80% 25%, rgba(183, 140, 255, 0.14), transparent 70%),
    radial-gradient(30% 45% at 60% 60%, rgba(110, 231, 255, 0.10), transparent 70%);
  opacity: var(--aurora-opacity);
  transition: opacity 0.45s ease;
  pointer-events: none;
}

/* ============================================================
   左侧竖导航（桌面）
   ============================================================ */
.rail {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 88px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  border-right: 1px solid var(--glass-border);
  background: var(--rail-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rail-logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
  text-decoration: none;
}
.rail-logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.rail-nav { display: flex; flex-direction: column; gap: 30px; }

.rail-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.rail-nav a i { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; }
.rail-nav a em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}
.rail-nav a:hover, .rail-nav a.active { color: var(--text); }
.rail-nav a.active i { color: var(--primary); text-shadow: 0 0 12px rgba(124, 140, 255, 0.8); }
.rail-nav a:hover em, .rail-nav a.active em { opacity: 1; transform: translateY(0); }
/* 当前区指示条 */
.rail-nav a::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 3px;
  background: var(--grad);
  transform: translateY(-50%);
  transition: height 0.25s;
}
.rail-nav a.active::before { height: 26px; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.06); box-shadow: 0 0 18px rgba(124, 140, 255, 0.35); }

/* ============================================================
   移动端顶栏
   ============================================================ */
.topbar { display: none; }

/* ============================================================
   页面主区
   ============================================================ */
.page {
  padding: 0 min(6vw, 76px) 0 calc(88px + min(6vw, 76px));
  max-width: 1480px;
}

.sec { padding: 108px 0 30px; }
.sec[id] { scroll-margin-top: 12px; }

/* 区块头：编辑杂志式分隔 */
.sec-head {
  border-top: 1px solid var(--glass-border);
  padding-top: 26px;
  margin-bottom: 46px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-no { font-family: var(--mono); font-size: 13px; letter-spacing: 4px; color: var(--primary); }
.sec-head h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: 1px; }
.sec-head p { color: var(--text-dim); font-size: 14.5px; letter-spacing: 1px; }

/* ============================================================
   01 · 宣言体 Hero
   ============================================================ */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 44px;
  align-items: center;
  width: 100%;
  padding: 90px 0 70px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--primary);
  margin-bottom: 26px;
}

.creed {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: 0.5px;
}
/* balance：窄屏换行时均分两行，避免「代 / 码。」单字成行 */
.creed .line { display: block; text-wrap: balance; }
.creed b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.creed-note { margin: 20px 0 30px; color: var(--text-dim); font-size: 15px; letter-spacing: 3px; }

.type-line { font-size: 18px; margin-bottom: 30px; }
.type-line #typewriter {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cursor { animation: blink 1s steps(1) infinite; color: var(--primary); font-weight: 400; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(124, 140, 255, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124, 140, 255, 0.45); }
.btn-ghost { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(124, 140, 255, 0.5); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 46px; list-style: none; }
.hero-stats li strong {
  display: block;
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats li span { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; }

/* 首屏入场：逐行点亮（纯 CSS，逐个 delay） */
@keyframes riseIn { to { opacity: 1; transform: none; } }
@keyframes lineUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

.js .manifesto > *:not(.creed) { opacity: 0; animation: riseIn 0.8s cubic-bezier(0.22, 0.8, 0.32, 1) forwards; }
.js .manifesto > .eyebrow { animation-delay: 0.05s; }
.js .manifesto > .creed-note { animation-delay: 0.85s; }
.js .manifesto > .type-line { animation-delay: 1s; }
.js .manifesto > .hero-actions { animation-delay: 1.15s; }
.js .manifesto > .hero-stats { animation-delay: 1.3s; }

.js .creed .line { opacity: 0; animation: lineUp 0.7s cubic-bezier(0.22, 0.8, 0.32, 1) forwards; }
.js .creed .line:nth-child(1) { animation-delay: 0.15s; }
.js .creed .line:nth-child(2) { animation-delay: 0.3s; }
.js .creed .line:nth-child(3) { animation-delay: 0.45s; }
.js .creed .line:nth-child(4) { animation-delay: 0.6s; }

.js .orbit-wrap { opacity: 0; animation: riseIn 1s ease 1.05s forwards; }

/* 星轨头像 */
.orbit-wrap {
  position: relative;
  width: min(400px, 100%);
  aspect-ratio: 1;
  margin-left: auto;
  justify-self: center;
}
.orbit {
  position: absolute;
  border: 1px dashed var(--glass-border);
  border-radius: 50%;
  animation: spin 60s linear infinite;
}
.orbit.o1 { inset: 0; }
.orbit.o2 { inset: 48px; animation-duration: 42s; animation-direction: reverse; }
.orbit.o3 { inset: 100px; animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }

.planet {
  position: absolute;
  top: -5px; left: calc(50% - 5px);
  width: 10px; height: 10px;
  border-radius: 50%;
}
.planet.p1 { background: var(--grad); box-shadow: 0 0 14px rgba(124, 140, 255, 0.9); }
.planet.p2 { background: var(--accent2); box-shadow: 0 0 12px rgba(110, 231, 255, 0.9); width: 8px; height: 8px; top: -4px; left: calc(50% - 4px); }
.planet.p3 { background: #ffd76e; box-shadow: 0 0 10px rgba(255, 215, 110, 0.9); width: 7px; height: 7px; top: -3.5px; left: calc(50% - 3.5px); }

.orbit-avatar {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(148px, 38%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 2px solid rgba(232, 236, 255, 0.2);
  box-shadow: 0 0 0 8px var(--glass), 0 0 52px rgba(124, 140, 255, 0.4);
}
:root[data-theme="light"] .orbit-avatar { border-color: rgba(27, 33, 64, 0.15); }

.scroll-hint {
  position: absolute;
  bottom: 22px; left: 0;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-dim);
  animation: hintFloat 2.2s ease-in-out infinite;
}
@keyframes hintFloat { 50% { transform: translateY(6px); } }

/* ============================================================
   02 · 技能面板
   ============================================================ */
.skills-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: start;
}

/* 角色卡 */
.char-card {
  position: sticky;
  top: 30px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 30px 28px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.char-photo {
  width: 92px; height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), var(--grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  margin-bottom: 14px;
}
.char-card h3 { font-size: 19px; letter-spacing: 2px; margin-bottom: 18px; }

.char-attrs { text-align: left; }
.char-attrs > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--glass-border);
  font-size: 13.5px;
}
.char-attrs > div:last-child { border-bottom: none; }
.char-attrs dt { color: var(--text-dim); letter-spacing: 2px; }
.char-attrs dd { font-weight: 600; }

/* 技能组 */
.skill-group { margin-bottom: 34px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group h3 {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 6px;
}
.skill-row {
  display: grid;
  grid-template-columns: 200px 110px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--glass-border);
}
.skill-name { font-weight: 600; font-size: 15px; }
.skill-icon { margin-right: 8px; }

.meter { display: inline-flex; gap: 5px; }
.meter i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: transform 0.2s;
}
.meter i.on {
  background: var(--grad);
  box-shadow: 0 0 8px rgba(124, 140, 255, 0.6);
}
.skill-row:hover .meter i.on { transform: scale(1.25); }
.skill-row p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* ============================================================
   03 · 项目（编号杂志行 + 公网实拍）
   ============================================================ */
.proj-row {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 44px;
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--glass-border);
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
}
.proj-row:first-of-type { border-top: 1px solid var(--glass-border); }

/* 鼠标聚光灯 */
.proj-row::before {
  content: '';
  position: absolute;
  inset: -10px -26px;
  border-radius: 18px;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 140, 255, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.proj-row:hover::before { opacity: 1; }

.proj-row.flip .proj-info { order: 2; }
.proj-row.flip .shot { order: 1; }

.proj-no {
  font-family: var(--mono);
  font-size: clamp(56px, 6vw, 84px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124, 140, 255, 0.5);
  display: block;
  margin-bottom: 10px;
}
:root[data-theme="light"] .proj-no { -webkit-text-stroke: 1px rgba(74, 92, 240, 0.55); }

.proj-info h3 { font-size: clamp(21px, 2.4vw, 27px); font-weight: 800; letter-spacing: 0.5px; margin-bottom: 12px; }
.proj-info > p { color: var(--text-dim); font-size: 14.5px; line-height: 1.8; }

.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.proj-tags span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 3px 12px;
  transition: color 0.2s, border-color 0.2s;
}
.proj-row:hover .proj-tags span { color: var(--primary); border-color: rgba(124, 140, 255, 0.45); }

.proj-link {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 1px;
  color: var(--primary);
  transition: letter-spacing 0.25s;
}
.proj-row:hover .proj-link { letter-spacing: 2px; }

/* 浏览器窗口实拍 */
.shot {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--glass);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.32, 1), box-shadow 0.35s;
}
.proj-row:hover .shot { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 26px 60px rgba(2, 4, 16, 0.55); }
.proj-row.flip:hover .shot { transform: translateY(-6px) rotate(0.6deg); }

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.shot-bar i:nth-child(1) { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin-left: 8px;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shot img { display: block; width: 100%; }

/* ============================================================
   04 · 足迹（竖向时间线）
   ============================================================ */
.trail { list-style: none; position: relative; max-width: 880px; }
.trail::before {
  content: '';
  position: absolute;
  left: 109px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--glass-border) 10% 90%, transparent);
}

.trail li {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 26px;
  padding: 26px 0 26px 34px;
}
.trail li::before {
  content: '';
  position: absolute;
  left: 105px;
  top: 40px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(124, 140, 255, 0.8);
}

.trail-year {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: right;
  padding-top: 8px;
}
.trail-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; letter-spacing: 0.5px; }
.trail-body p { color: var(--text-dim); font-size: 14px; line-height: 1.8; }

/* ============================================================
   05 · 联系（大字链接行）
   ============================================================ */
.link-rows { border-top: 1px solid var(--glass-border); }

.link-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: baseline;
  width: 100%;
  padding: 26px 10px;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s;
}
.link-row:hover { transform: translateX(10px); background: linear-gradient(90deg, var(--glass), transparent 70%); }

.lr-label { font-size: 12.5px; letter-spacing: 4px; color: var(--text-dim); }
.lr-value {
  font-size: clamp(19px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0.5px;
  word-break: break-all;
  transition: color 0.25s;
}
.link-row:hover .lr-value {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lr-go { font-size: 13px; letter-spacing: 2px; color: var(--text-dim); white-space: nowrap; transition: color 0.25s; }
.link-row:hover .lr-go { color: var(--primary); }

/* 复制提示 toast */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 18px);
  z-index: 200;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--nav-bg-solid);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  padding: 64px min(6vw, 76px) 44px calc(88px + min(6vw, 76px));
  font-size: 13.5px;
  color: var(--text-dim);
}
.footer a { color: var(--text-dim); transition: color 0.2s; }
.footer a:hover { color: var(--primary); }
.footer .icp { font-size: 12px; margin-top: 6px; }
.footer .icp img { vertical-align: -1.75px; margin-right: 4px; }

/* ============================================================
   滚动入场（仅 JS 可用时隐藏待入场）
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.8, 0.32, 1), transform 0.75s cubic-bezier(0.22, 0.8, 0.32, 1);
}
html.js .reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .rail { display: none; }
  .page { padding-left: min(6vw, 76px); padding-top: 64px; }
  .hero { min-height: calc(100vh - 64px); }
  .footer { padding-left: min(6vw, 76px); }

  .topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 min(6vw, 76px);
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
  }
  .topbar-logo { font-size: 19px; font-weight: 800; color: var(--text); text-decoration: none; }
  .topbar-logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

  .topbar-toggle {
    width: 40px; height: 40px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 5px;
    background: none; border: none; cursor: pointer;
  }
  .topbar-toggle span {
    width: 20px; height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s, opacity 0.25s;
  }
  .topbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar-toggle.open span:nth-child(2) { opacity: 0; }
  .topbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .topbar-menu {
    position: fixed;
    top: 64px; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    background: var(--nav-bg-solid);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px min(6vw, 76px) 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }
  .topbar-menu.open { transform: none; opacity: 1; visibility: visible; }
  .topbar-menu a { color: var(--text); text-decoration: none; padding: 13px 0; border-bottom: 1px dashed var(--glass-border); letter-spacing: 2px; }
  .topbar-theme { margin-top: 18px; justify-self: start; }
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; padding: 56px 0 60px; }
  .orbit-wrap { width: min(300px, 78vw); order: -1; margin: 0 auto; }

  .skills-wrap { grid-template-columns: 1fr; }
  .char-card { position: static; display: grid; grid-template-columns: 92px 1fr; gap: 8px 20px; text-align: left; align-items: center; }
  .char-card .char-photo { margin-bottom: 0; }
  .char-card h3 { grid-column: 2; margin-bottom: 0; align-self: center; }
  .char-attrs { grid-column: 1 / -1; }
  .char-attrs > div { flex-wrap: wrap; }

  .proj-row { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .proj-row.flip .proj-info { order: 1; }
  .proj-row.flip .shot { order: 2; }

  .trail li { grid-template-columns: 64px 1fr; gap: 16px; padding-left: 24px; }
  .trail::before { left: 77px; }
  .trail li::before { left: 73px; }
  .trail-year { font-size: 16px; }
}

@media (max-width: 640px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .footer { padding-left: 20px; padding-right: 20px; }
  .topbar { padding: 0 20px; }
  .topbar-menu { padding: 10px 20px 18px; }

  .hero { min-height: auto; } /* 小屏内容自然流，不撑整屏 */
  .hero-grid { padding: 28px 0 48px; } /* 头像区上移，宣言更早进首屏 */
  .hero-stats { gap: 12px 26px; }
  .skill-row { grid-template-columns: 1fr auto; }
  .skill-row p { grid-column: 1 / -1; }
  .link-row { grid-template-columns: 1fr auto; }
  .lr-label { grid-column: 1 / -1; margin-bottom: -12px; }
  .sec { padding-top: 84px; }
}
