/* ============================================================
   Personal Website — Minimalist Photography
   Tabbed / view-switching layout
   Light / Dark themes via CSS variables + [data-theme]
   Responsive (mobile-first) + bilingual ready
   ============================================================ */

/* ---------- Theme tokens (neutral + blue, ref: Justin Sun) ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f4f4f5;
  --surface: #ffffff;
  --text: #09090b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #2d76f6;          /* fallback blue; normally derived from hero image */
  --accent-soft: rgba(45, 118, 246, 0.10);
  --heading: #09090b;         /* typography color; normally derived from hero image */
  --overlay: rgba(9, 9, 11, 0.55);
  --shadow: 0 20px 50px -30px rgba(9, 9, 11, 0.25);
  --shadow-soft: 0 10px 30px -22px rgba(9, 9, 11, 0.20);
  --pill: #f4f4f5;            /* scrolled nav capsule — clearly distinct from the page */
  --pill-border: #d4d4d8;
  /* activity heatmap: 4 grey steps (none / 1 / 2 / 3) */
  --act-0: #ececef;
  --act-1: #cbcbd2;
  --act-2: #9a9aa3;
  --act-3: #4a4a53;
  --radius: 14px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-alt: #18181b;
  --surface: #18181b;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --line: #27272a;
  --line-strong: #3f3f46;
  --accent: #93c5fd;
  --accent-soft: rgba(147, 197, 253, 0.14);
  --heading: #fafafa;
  --overlay: rgba(9, 9, 11, 0.60);
  --shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 10px 30px -22px rgba(0, 0, 0, 0.6);
  --pill: #202024;            /* clearly lighter than the #09090b page */
  --pill-border: #3f3f46;
  /* activity heatmap: 4 grey steps (none / 1 / 2 / 3) */
  --act-0: #1c1c20;
  --act-1: #34343b;
  --act-2: #5e5e68;
  --act-3: #b4b4be;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

figure { margin: 0; }   /* browsers give <figure> a 1em/40px default margin */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Cabin", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

h1, h2, h3, h4 {
  font-family: "Cabin", "Noto Sans SC", -apple-system, "Segoe UI", "PingFang SC", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--heading);
  transition: color 0.9s ease;
}

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1 0 auto; }

/* ---------- Utility ---------- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* ---------- Views (tab switching) ---------- */
.view { display: none; padding: clamp(48px, 8vw, 88px) 0; }
.view.active { display: block; animation: viewIn 0.4s ease; }
#view-home { padding-top: clamp(24px, 4vw, 44px); }   /* half the usual gap above the hero */
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Navigation (Dynamic-Island style on scroll) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.site-header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  padding: 12px 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  transition: max-width 0.45s cubic-bezier(0.2, 0.6, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.6, 0.2, 1),
    border-radius 0.45s, padding 0.45s, background 0.45s, border-color 0.45s, box-shadow 0.45s, height 0.45s;
}
/* header bar is wider than the content column, so the toggles sit near the right edge.
   NOTE: a numeric max-width is required — `none` cannot be transitioned, which made
   the capsule snap to its smaller size instead of animating. */
.site-header .nav {
  max-width: 1600px;
  padding-left: clamp(20px, 3.5vw, 48px);
  padding-right: clamp(20px, 3.5vw, 48px);
}
.site-header.scrolled .nav {
  max-width: 940px;                    /* capsule stays centred and shrinks smoothly */
  margin: 0 auto;
  height: 52px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill);
  box-shadow: var(--shadow);
}
.site-header.scrolled .nav-links a { padding: 5px 10px; }
.nav-links a { transition: color 0.2s, background 0.2s, padding 0.45s cubic-bezier(0.2, 0.6, 0.2, 1); }
.site-header.scrolled .toggle-btn,
.site-header.scrolled .lang-btn { background: transparent; border-color: var(--line-strong); }
.site-header.scrolled .toggle-btn:hover,
.site-header.scrolled .lang-btn:hover { background: var(--bg-alt); }

.nav-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.nav-brand img {
  height: 32px;
  width: 32px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
  transition: transform 0.25s ease;
}
.nav-brand:hover { opacity: 1; }
.nav-brand:hover img { transform: scale(1.08); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;          /* take the free space... */
  justify-content: center; /* ...and keep the links centred */
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); opacity: 1; }
.nav-links a.active { color: var(--text); background: var(--bg-alt); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  /* pinned to the header's right edge, so the toggles never move with the capsule */
  position: absolute;
  right: clamp(20px, 3.5vw, 48px);
  top: 50%;
  transform: translateY(-50%);
}
/* on narrower screens there is no room to float them: put them back in the flow */
@media (max-width: 1100px) {
  .nav-actions {
    position: static;
    transform: none;
    margin-left: auto;
  }
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-btn:hover { border-color: var(--line-strong); background: var(--bg-alt); }
.toggle-btn svg { width: 18px; height: 18px; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: background 0.2s, border-color 0.2s;
}
.lang-btn:hover { border-color: var(--line-strong); background: var(--bg-alt); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile slide menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 20px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text);
  font-size: 1.05rem;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--accent); font-weight: 600; }

/* ---------- Language switch fade (masks layout shift) ---------- */
main, .site-header, .site-footer { transition: opacity 0.18s ease; }
body.lang-fade main,
body.lang-fade .site-header,
body.lang-fade .site-footer { opacity: 0; }

/* ---------- Home / About (hero) ---------- */
.hero {
  position: relative;
  height: clamp(440px, 82vh, 800px);   /* fits the viewport, not oversized */
  overflow: hidden;                   /* keep the blurred backdrop inside */
  display: flex;
  flex-direction: column;
  --hero-accent: #a5673e;
  --hero-accent-contrast: #fff;
  --hero-overlay-tint: rgba(20, 18, 15, 0.24);
}
/* 高斯模糊背景层（已停用：需要恢复时取消注释）
.hero-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.1) brightness(0.9);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}
*/
/* hero photo: fills the whole hero, no blur and no gradient fade */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s ease;   /* only fades when you switch the photo */
}
.hero-bg-alt { opacity: 0; }
.hero-overlay { display: none; }   /* no mask over the photo at all */
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: clamp(72px, 13vw, 132px) 24px;
  width: 100%;
}
.hero .section-eyebrow,
.hero .home-headline,
.hero .home-name-line {
  /* 紧贴的黑边 + 柔和暗晕：亮背景上也分得开 */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.90),
    0 2px 6px rgba(0, 0, 0, 0.70),
    0 8px 28px rgba(0, 0, 0, 0.55);
}
.hero .section-eyebrow { color: var(--accent); transition: color 0.9s ease; }
.hero .home-headline { color: #fff; }
.hero .home-name-line { color: rgba(255, 255, 255, 0.95); }
.hero .home-bio { color: rgba(255, 255, 255, 0.9); }

.home-headline {
  /* 英文 33 字符：按英文长度定字号 */
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  line-height: 1.35;
  margin: 0 0 14px;
  color: #fff;
  text-wrap: balance;
}
/* 中文只有 5 个字，可以放得很大 */
html[lang="zh-CN"] .home-headline { font-size: clamp(2.4rem, 7.6vw, 4.8rem); }
.home-name-line {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.home-alias {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin: 0 0 30px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

/* Background switcher (collapsible, low-key) */
.bg-switch {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 5;
}
.bg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.bg-toggle::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2.5px);
}
.bg-toggle:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.65); }
.bg-panel {
  position: absolute;
  right: 0;
  bottom: 54px;
  width: min(430px, 82vw);
  padding: 14px;
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.96);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bg-switch.open .bg-panel { opacity: 1; transform: none; pointer-events: auto; }
.picker-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.picker-thumb {
  width: 64px; height: 44px;
  padding: 0;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.10);
  opacity: 0.7;
  transition: opacity 0.25s, border-color 0.25s, transform 0.25s;
}
.picker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-thumb:hover { opacity: 1; transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.6); }
.picker-thumb.active { opacity: 1; border-color: #fff; }
.hero .home-social a { background: rgba(255, 255, 255, 0.10); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.hero .home-social a:hover { color: #fff; border-color: #fff; }

.home-about {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 84px) 24px;
  text-align: center;
}
.home-bio { color: var(--text-muted); max-width: 640px; margin: 0 auto 26px; }
.home-interests { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.interest-chip {
  font-size: 0.88rem;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--text);
  letter-spacing: 0.03em;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}
.interest-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Home highlights (milestone-style cards) ---------- */
.home-highlights { padding: clamp(40px, 7vw, 76px) 0 clamp(56px, 8vw, 96px); }
.highlights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hl-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.hl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); color: var(--text); opacity: 1; }
.hl-card h3 { font-size: 1.06rem; margin-bottom: 8px; color: var(--heading); }
.hl-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 16px; flex: 1; }
.hl-card .hl-more { color: var(--accent); font-size: 0.85rem; font-weight: 600; }

.fact { display: flex; gap: 14px; align-items: baseline; }
.fact-label { color: var(--text-faint); font-size: 0.85rem; min-width: 5.5em; letter-spacing: 0.03em; }
.fact-value { color: var(--text); font-size: 0.96rem; }
.fact-value a { color: var(--text); }

.home-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 30px; }

/* 液态玻璃：三个按钮统一材质（毛玻璃 + 高光内描边 + 投影） */
.cta-btn,
.hero .cta-btn,
.cta-btn.primary,
.hero .cta-btn.primary,
.cta-btn.strategy,
.hero .cta-btn.strategy {
  padding: 12px 24px;
  border: 1px solid transparent;   /* 不要描边圈了 */
  border-radius: 999px;
  /* 上亮下暗的玻璃渐变，透出背景 */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.07) 100%);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 2px 10px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  transition: background 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s, color 0.25s;
}
.cta-btn:hover,
.hero .cta-btn:hover,
.cta-btn.primary:hover,
.hero .cta-btn.primary:hover,
.cta-btn.strategy:hover,
.hero .cta-btn.strategy:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.16) 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.home-social, .hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-social a, .hero-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--surface);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.home-social a:hover, .hero-social a:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); opacity: 1; }
.home-social svg, .hero-social svg { width: 16px; height: 16px; }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: clamp(32px, 5vw, 48px); }
.section-eyebrow {
  color: var(--accent);
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 12px;
  transition: color 0.9s ease;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; }
.section-desc { color: var(--text-muted); max-width: 640px; font-size: 1.02rem; }

/* ---------- Photo gallery ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 0.5vw, 7px);   /* half the old 14px, scales down on small screens */
}
.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  background: var(--bg-alt);
  aspect-ratio: 3 / 2;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.4s;
}
.photo-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.photo-item.wide { aspect-ratio: 16 / 9; grid-column: span 2; }
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.4s;
}
.photo-item:hover img { transform: scale(1.04); }
.photo-caption {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 2;
  color: #fff;
  font-size: 0.86rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.photo-item:hover .photo-caption { opacity: 1; transform: translateY(0); }

/* ---------- Lightbox (gallery layout: photo left, editorial column right) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.97);   /* near-opaque: the photo needs a clean stage */
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vh, 56px) 0;
}
.lightbox.open { display: flex; }

.lb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vw, 64px);
  width: min(94vw, 1320px);
  padding: 0 clamp(56px, 7vw, 96px);   /* keeps clear of the prev/next arrows */
}
.lb-figure {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.lb-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.lightbox-caption {
  flex: 0 0 clamp(250px, 24vw, 330px);
  text-align: left;
  color: #fff;
  align-self: center;
}
.lb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.lb-sep { width: 1px; height: 9px; background: rgba(255, 255, 255, 0.24); }
.lb-count { font-variant-numeric: tabular-nums; margin-left: auto; }
.lb-title {
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #fff;
}
.lb-desc {
  margin: 0;
  font-size: 0.87rem;
  line-height: 2;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.62);
}
.lb-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,0.12); }

/* ---------- Cards (projects) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  border-color: var(--line-strong);
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.card .tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }
.card .card-link { display: inline-block; margin-top: 12px; font-size: 0.9rem; }

/* ---------- Research list ---------- */
.research-list { display: flex; flex-direction: column; gap: 0; }
.research-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.research-item:last-child { border-bottom: none; }
.research-item .r-date { color: var(--text-faint); font-size: 0.86rem; padding-top: 4px; }
.research-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.research-item p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.research-item .r-cat {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- News timeline ---------- */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  position: relative;
  padding: 22px 0 22px 34px;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-item::before {
  content: "";
  position: absolute;
  left: 8px; top: 30px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.news-item::after {
  content: "";
  position: absolute;
  left: 11px; top: 38px; bottom: -2px;
  width: 1px;
  background: var(--line);
}
.news-item:last-child::after { display: none; }
.news-date { color: var(--text-faint); font-size: 0.84rem; margin-bottom: 4px; }
.news-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.news-item p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- Resume gate ---------- */
.resume-wrap { max-width: 720px; }
.lock-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
}
.lock-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.lock-icon svg { width: 26px; height: 26px; }
.lock-panel h3 { font-size: 1.3rem; margin-bottom: 8px; }
.lock-panel p { color: var(--text-muted); max-width: 380px; margin: 0 auto 22px; }

.key-form { display: flex; gap: 10px; max-width: 380px; margin: 0 auto; }
.key-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.key-form input:focus { border-color: var(--accent); }
.key-form button {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.key-form button:hover { opacity: 0.85; }
.key-msg { margin-top: 14px; font-size: 0.88rem; min-height: 1.2em; }
.key-msg.error { color: #c0392b; }

/* Unlocked resume */
.resume {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
}
.resume.open { display: block; }
.resume-head { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.resume-head h3 { font-size: 1.7rem; margin: 0 0 6px; }
.resume-head p { color: var(--text-muted); margin: 0; }
.resume-section { margin-bottom: 30px; }
.resume-section > h4 {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.resume-entry { margin-bottom: 20px; }
.resume-entry:last-child { margin-bottom: 0; }
.resume-entry .re-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.resume-entry .re-role { font-size: 1.05rem; font-weight: 600; }
.resume-entry .re-org { color: var(--text-muted); font-size: 0.92rem; }
.resume-entry .re-period { color: var(--text-faint); font-size: 0.84rem; white-space: nowrap; }
.resume-entry p { color: var(--text-muted); font-size: 0.93rem; margin: 6px 0 0; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span {
  font-size: 0.85rem;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--text);
}
.resume-section ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.93rem; }
.resume-section ul li { margin-bottom: 6px; }
.resume-section ul li::marker { color: var(--accent); }

/* ---------- Social chips (footer): click to expand detail to the right ---------- */
.contact-wrap { max-width: 760px; }
.contact-social-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 16.5px;          /* centers a 21px glyph in a 54px pill */
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, color 0.25s, opacity 0.25s;
}
.social-glyph { display: inline-flex; flex: 0 0 auto; }
.social-icon svg { width: 21px; height: 21px; }
/* Xiaohongshu's official mark is the word itself — needs more size to read */
.social-icon-xiaohongshu svg { width: 30px; height: 30px; }
.social-icon-xiaohongshu { padding: 0 12px; }
.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--line-strong);
  color: var(--accent);
  opacity: 1;
}
.social-icon.is-empty { opacity: 0.55; }   /* url 未填写 */
.social-icon.is-empty:hover { color: var(--text); }

/* 展开的详情：宽度 0 → 内容宽度，把后面的图标推开 */
.social-detail {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  transition: max-width 0.38s cubic-bezier(0.2, 0.6, 0.2, 1), margin-left 0.38s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.22s;
}
.social-detail b { font-size: 0.84rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.social-detail i { font-style: normal; font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; }
.social-icon.open {
  padding-right: 20px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  color: var(--accent);
  opacity: 1;
}
.social-icon.open .social-detail { max-width: 240px; margin-left: 12px; opacity: 1; }

/* ---------- Thinking (essays + reviews, two groups) ---------- */
.thinking-list { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 52px); }
.think-group-title {
  font-size: 1.04rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.think-empty { color: var(--text-faint); font-size: 0.98rem; margin: 4px 0 0; }
.thinking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.thinking-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
}
.thinking-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.thinking-item h3 { font-size: 1.24rem; margin: 0 0 12px; }
.thinking-item p { color: var(--text-muted); font-size: 1.04rem; line-height: 1.8; margin: 0 0 16px; }
.thinking-more { font-size: 0.9rem; color: var(--accent); letter-spacing: 0.02em; }

/* ---------- Essay reader (full-screen) ---------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(9, 9, 11, 0.975);
  display: none;
}
.reader.open { display: block; }
.reader-scroll {
  height: 100%;
  overflow-y: auto;
  padding: clamp(72px, 11vh, 130px) 24px clamp(72px, 11vh, 130px);
  -webkit-overflow-scrolling: touch;
}
.reader-body { max-width: 680px; margin: 0 auto; }
.reader-title {
  font-size: clamp(1.45rem, 2.9vw, 2.1rem);
  line-height: 1.3;
  color: #fff;
  margin: 0 0 10px;
}
.reader-subtitle {
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}
.reader-text p {
  text-indent: 2em;      /* 首行缩进两字 */
  margin: 0;             /* 段距 = 行距，分段靠缩进 */
  font-size: 1.02rem;
  line-height: 2.05;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.78);
}
.reader-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.reader-close:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Downloads ---------- */
.download-list { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.download-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  color: var(--text);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.download-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); color: var(--text); opacity: 1; }
.download-item .dl-body { flex: 1; min-width: 0; }
.download-item .dl-name { font-weight: 600; font-size: 1.02rem; }
.download-item p { color: var(--text-muted); font-size: 0.88rem; margin: 4px 0 0; }
.download-item .dl-meta { color: var(--text-faint); font-size: 0.8rem; white-space: nowrap; }
.download-item .dl-btn { color: var(--accent); font-size: 0.88rem; font-weight: 500; white-space: nowrap; }

/* ---------- About site ---------- */
.about-wrap { max-width: 720px; }
.about-text { color: var(--text-muted); font-size: 1.02rem; line-height: 1.9; margin-bottom: 34px; }
.about-devlog-title {
  font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.about-devlog { border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- Activity heatmap (GitHub-contribution style) ---------- */
.activity-wrap { position: relative; margin-bottom: 26px; }
.activity-chart {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 9px);
  gap: 2px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.activity-cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--act-0);
  display: block;
}
/* 主题色 + 递进透明度：0 无 / 1 / 2 / 3 最多 */
.activity-cell[data-level="1"] { background: var(--accent); opacity: 0.24; }
.activity-cell[data-level="2"] { background: var(--accent); opacity: 0.50; }
.activity-cell[data-level="3"] { background: var(--accent); opacity: 0.88; }
.activity-cell.is-future { visibility: hidden; }
.activity-cell.is-milestone { outline: 1.5px solid var(--line-strong); outline-offset: 1px; }
.activity-cell.has-data { cursor: pointer; }
.activity-cell.has-data:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; }
.activity-cell.is-active { outline: 2px solid var(--text); outline-offset: 1px; }

/* hover 提示：贴在被指的格子上方 */
.activity-tip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -100%);
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.activity-tip.show { opacity: 1; }

/* 筛选提示条 */
.devlog-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.devlog-filter:hover { border-color: var(--text-muted); }
.devlog-filter b { color: var(--accent); font-weight: 600; }
.activity-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 10px;
}
.activity-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--act-0);
  display: block;
}
.activity-legend i[data-level="1"] { background: var(--accent); opacity: 0.24; }
.activity-legend i[data-level="2"] { background: var(--accent); opacity: 0.50; }
.activity-legend i[data-level="3"] { background: var(--accent); opacity: 0.88; }

/* ---------- Milestones ---------- */
.about-milestones {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.milestone-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.milestone-item:last-child { border-bottom: none; }
.ms-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}
.ms-date { color: var(--text-faint); font-size: 0.8rem; white-space: nowrap; }
.milestone-item p { color: var(--text); font-size: 0.94rem; margin: 0; }
.devlog-item { display: flex; gap: 18px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.devlog-item:last-child { border-bottom: none; }
.devlog-item .dl-date { color: var(--text-faint); font-size: 0.8rem; white-space: nowrap; }
.devlog-item p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}
.site-footer .contact-social-list { justify-content: center; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}
.footer-brand { font-weight: 700; font-size: 1.2rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-social a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-size: 0.9rem;
}
.footer-social a:hover { color: var(--text); opacity: 1; }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Friendly links ---------- */
.footer-links { padding-bottom: 30px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.footer-links-title {
  color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 16px;
}
.friendly-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.friendly-links a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.25s; }
.friendly-links a:hover { color: var(--accent); opacity: 1; }

/* ---------- Scroll reveal (high-end entrance) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* staggered children for card grids */
.cards > *, .thinking-grid > *, .highlights-grid > *,
.contact-social-list > *, .download-list > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.cards.in > *, .thinking-list.in .thinking-grid > *, .highlights-grid.in > *,
.contact-social-list.in > *, .download-list.in > * { opacity: 1; transform: none; }
.cards.in > *:nth-child(2), .thinking-list.in .thinking-grid > *:nth-child(2), .highlights-grid.in > *:nth-child(2),
.contact-social-list.in > *:nth-child(2), .download-list.in > *:nth-child(2) { transition-delay: 0.07s; }
.cards.in > *:nth-child(3), .thinking-list.in .thinking-grid > *:nth-child(3), .highlights-grid.in > *:nth-child(3),
.contact-social-list.in > *:nth-child(3), .download-list.in > *:nth-child(3) { transition-delay: 0.14s; }
.cards.in > *:nth-child(4), .thinking-list.in .thinking-grid > *:nth-child(4), .highlights-grid.in > *:nth-child(4),
.contact-social-list.in > *:nth-child(4) { transition-delay: 0.21s; }
.cards.in > *:nth-child(5), .highlights-grid.in > *:nth-child(5) { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal > *, .cards > *, .thinking-grid > *, .highlights-grid > *,
  .contact-social-list > *, .download-list > * {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { height: 78vh; }   /* a touch shorter on tablets */
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thinking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-item.wide { grid-column: span 2; }
}

@media (max-width: 680px) {
  .container { padding: 0 18px; }        /* more room for content / photos */
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }   /* keep the toggles on the right */
  .menu-toggle { display: flex; }
  .hero { height: 76vh; }   /* phones: tall hero, image cover-cropped */
  .hero-content { padding: clamp(56px, 16vw, 96px) 18px; }
  .home-headline { font-size: clamp(1.5rem, 6.6vw, 2rem); }
  html[lang="zh-CN"] .home-headline { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .home-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .home-cta > * { width: 100%; justify-content: center; text-align: center; }
  .home-facts { gap: 12px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-item { border-radius: 12px; }
  .photo-item.wide { grid-column: span 2; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .thinking-grid { grid-template-columns: minmax(0, 1fr); }
  .highlights-grid { grid-template-columns: minmax(0, 1fr); }
  .download-item { flex-wrap: wrap; gap: 8px; }
  .research-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .research-item .r-cat { justify-self: start; }
  .key-form { flex-direction: column; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  /* lightbox: stack the photo above the text on phones */
  .lightbox { padding: 56px 0 28px; }
  .lb-inner { flex-direction: column; align-items: stretch; gap: 18px; padding: 0 18px; }
  .lb-figure { justify-content: center; }
  .lb-figure img { max-height: 54vh; }
  .lightbox-caption { flex: 0 0 auto; }
  .lb-meta { margin-bottom: 12px; padding-bottom: 10px; }
  .lb-title { margin-bottom: 10px; }
  .footer-grid { flex-direction: column; }
  /* lighter motion on phones: shorter travel, quicker, no long stagger */
  .reveal { transform: translateY(14px); transition-duration: 0.45s; }
  .cards > *, .thinking-grid > *, .highlights-grid > * { transition-duration: 0.45s !important; }
  .cards.in > *, .thinking-grid.in > *, .highlights-grid.in > * { transition-delay: 0s !important; }
}

/* ---------- Phones: no capsule on the nav — keep a plain sticky bar ----------
   (the nav-links are hidden here, so a 940px capsule was mostly empty space) */
@media (max-width: 680px) {
  .site-header.scrolled { background: var(--bg); border-color: var(--line); padding: 0; }
  .site-header.scrolled .nav {
    max-width: none;
    height: 64px;
    padding: 0 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}
