/* ==========================================================================
   Wang Yang · Personal Website — Boundless Editorial & Dual-Theme System
   Themes: Night (deep-space interferometry) & Day (pearl alabaster)
   ========================================================================== */
:root {
  --bg: #050811;
  --bg-2: #090e1c;
  --bg-alt: rgba(12, 18, 36, 0.36);
  --surface: rgba(16, 24, 46, 0.44);
  --surface-hover: rgba(24, 36, 68, 0.62);
  --surface-strong: rgba(10, 15, 30, 0.64);
  --glass-band: rgba(8, 13, 28, 0.48);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --hairline: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #eff3fb;
  --text-2: #b9c3d8;
  --text-3: #8391ad;
  --cyan: #38e1ff;
  --blue: #5b8cff;
  --violet: #9b6bff;
  --magenta: #ff4fd8;
  --amber: #ffb547;
  --green: #45f0a0;
  --phase: linear-gradient(90deg, #38e1ff 0%, #5b8cff 25%, #9b6bff 50%, #ff4fd8 75%, #ffb547 100%);
  --hero-grad: linear-gradient(105deg, #ffffff 0%, #ffffff 34%, #a8c4ff 58%, #d7b6ff 78%, #ffc8f0 100%);
  --cta-text: #080c18;
  --cta-bg: linear-gradient(100deg, #7ff0ff, #a9b8ff 45%, #e3a8ff);
  --nav-glass: rgba(5, 8, 17, 0.66);
  --nav-pill: rgba(12, 18, 36, 0.44);
  --nav-active: rgba(255, 255, 255, 0.11);
  --chip-bg: rgba(255, 255, 255, 0.055);
  --clone-bg: rgba(4, 7, 16, 0.56);
  --stage-bg: rgba(255, 255, 255, 0.96);
  --stage-blend: normal;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 28px 72px -24px rgba(0, 0, 0, 0.68);
  --shadow-sm: 0 12px 32px -16px rgba(0, 0, 0, 0.45);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
  --maxw: 1340px;
}

html[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-2: #ebf0fa;
  --bg-alt: rgba(232, 238, 252, 0.42);
  --surface: rgba(255, 255, 255, 0.66);
  --surface-hover: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --glass-band: rgba(255, 255, 255, 0.58);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --hairline: rgba(15, 23, 46, 0.09);
  --border: rgba(15, 23, 46, 0.11);
  --border-strong: rgba(15, 23, 46, 0.2);
  --text: #0c1222;
  --text-2: #3b4761;
  --text-3: #687591;
  --cyan: #0084bd;
  --blue: #2f54eb;
  --violet: #6b38e6;
  --magenta: #c42282;
  --amber: #c96a00;
  --green: #099268;
  --phase: linear-gradient(90deg, #0082bc 0%, #2f54eb 28%, #6b38e6 56%, #c42282 82%, #d46b08 100%);
  --hero-grad: linear-gradient(108deg, #0b1020 0%, #0b1020 35%, #2343a8 65%, #6b38e6 88%, #b6247b 100%);
  --cta-text: #ffffff;
  --cta-bg: linear-gradient(100deg, #0e172e, #253b82 55%, #5b2fd1);
  --nav-glass: rgba(245, 247, 252, 0.72);
  --nav-pill: rgba(255, 255, 255, 0.62);
  --nav-active: rgba(15, 23, 46, 0.08);
  --chip-bg: rgba(15, 23, 46, 0.045);
  --clone-bg: rgba(15, 23, 46, 0.05);
  --stage-bg: transparent;
  --stage-blend: multiply;
  --shadow: 0 28px 72px -26px rgba(15, 28, 64, 0.16);
  --shadow-sm: 0 12px 32px -16px rgba(15, 28, 64, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .45s ease, color .35s ease;
}
body::before { /* architectural micro-grid fading gently across the whole canvas */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .35;
  mask-image: radial-gradient(ellipse at 50% 10%, #000 0%, transparent 72%);
}
body::after { /* expansive multi-point aurora for glassmorphism refraction */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle 680px at 8% 22%, rgba(56, 225, 255, 0.08), transparent 72%),
    radial-gradient(circle 760px at 90% 48%, rgba(155, 107, 255, 0.09), transparent 72%),
    radial-gradient(circle 640px at 20% 84%, rgba(255, 79, 216, 0.06), transparent 72%);
}
html[data-theme="light"] body::after {
  background:
    radial-gradient(circle 700px at 10% 24%, rgba(0, 140, 210, 0.07), transparent 72%),
    radial-gradient(circle 780px at 88% 50%, rgba(107, 56, 230, 0.07), transparent 72%),
    radial-gradient(circle 640px at 22% 85%, rgba(196, 34, 130, 0.05), transparent 72%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.gh { fill: currentColor; stroke: none; }
::selection { background: rgba(155, 107, 255, 0.35); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); position: relative; z-index: 1; }
.center { text-align: center; margin-top: 48px; }
.grad-text { background: var(--phase); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Navigation ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.nav.scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--hairline);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16.5px; letter-spacing: .01em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 0deg, #38e1ff, #5b8cff, #9b6bff, #ff4fd8, #ffb547, #38e1ff); position: relative; box-shadow: 0 0 22px rgba(155,107,255,.45); }
.brand-mark::after { content: ""; position: absolute; inset: 7.5px; border-radius: 50%; background: var(--bg); transition: background-color .4s; }
.nav-links {
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--nav-pill); border: 1px solid var(--hairline);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--glass-hi);
}
.nav-links a { padding: 7px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text-2); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--nav-active); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn, .lang-btn {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--nav-pill);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-hi);
  transition: border-color .2s, background .2s, transform .2s;
}
.theme-btn { width: 38px; display: grid; place-items: center; font-size: 17px; color: var(--text); }
.theme-btn:hover, .lang-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: translateY(-1px); }
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
html[data-theme="light"] .theme-btn .icon-sun { display: block; }
html[data-theme="light"] .theme-btn .icon-moon { display: none; }

.lang-btn { padding: 0 16px; font-size: 14px; font-weight: 600; letter-spacing: .04em; display: inline-flex; align-items: center; }
.lang-btn .lang-sep { margin: 0 6px; color: var(--text-3); }
.lang-btn .lang-en, html[lang="en"] .lang-btn .lang-zh { color: var(--text-3); }
html[lang="en"] .lang-btn .lang-en { color: var(--text); }
.menu-btn { display: none; width: 42px; height: 42px; position: relative; border-radius: 12px; background: var(--nav-pill); border: 1px solid var(--border); backdrop-filter: blur(12px); }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, top .3s; }
.menu-btn span:first-child { top: 16px; } .menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
#fringeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none; transition: background .45s ease;
  background:
    radial-gradient(ellipse 68% 60% at 24% 48%, rgba(5,8,17,.74) 0%, rgba(5,8,17,.38) 48%, transparent 100%),
    linear-gradient(180deg, rgba(5,8,17,.26) 0%, transparent 28%, transparent 66%, var(--bg) 100%); }
html[data-theme="light"] .hero-vignette {
  background:
    radial-gradient(ellipse 68% 60% at 24% 48%, rgba(245,247,252,.82) 0%, rgba(245,247,252,.42) 52%, transparent 100%),
    linear-gradient(180deg, rgba(245,247,252,.28) 0%, transparent 28%, transparent 66%, var(--bg) 100%);
}
.hero-content { padding-top: 104px; padding-bottom: 130px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--glass-hi), var(--shadow-sm);
  font-size: 14.5px; color: var(--text); letter-spacing: .04em;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(69,240,160,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(69,240,160,.6); } 70% { box-shadow: 0 0 0 10px rgba(69,240,160,0); } 100% { box-shadow: 0 0 0 0 rgba(69,240,160,0); } }
.hero-name { font-size: clamp(64px, 11vw, 146px); font-weight: 800; line-height: 1.0; letter-spacing: -.025em; margin: 28px 0 20px;
  background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="en"] .hero-name { letter-spacing: -.04em; }
.hero-title { font-size: clamp(17px, 1.9vw, 22px); color: var(--text-2); font-weight: 500; }
.dot-sep { margin: 0 10px; color: var(--text-3); }
.hero-tagline { max-width: 700px; margin-top: 22px; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.65; color: var(--text); font-weight: 400; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 42px; }
.hero-hint {
  display: inline-flex; align-items: center;
  margin-top: 44px; padding: 8px 18px; border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-hi);
  font-size: 14px; color: var(--text-2); letter-spacing: .03em;
}
.scroll-cue {
  position: absolute; bottom: 132px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 44px; border: 1.5px solid var(--border-strong); border-radius: 15px; z-index: 3;
  background: var(--surface-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text); animation: scrollcue 1.8s infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 999px; font-size: 15.5px; font-weight: 600; transition: transform .25s, box-shadow .25s, background .25s, border-color .25s; white-space: nowrap; }
.btn svg { font-size: 18px; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { color: var(--cta-text); background: var(--cta-bg); box-shadow: 0 12px 34px -10px rgba(107, 56, 230, 0.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(107, 56, 230, 0.72); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--glass-hi);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--text-3); transform: translateY(-2px); }
.btn-sm { padding: 10px 22px; font-size: 14.5px; }

/* ---------- Boundless Edge-to-Edge Stats Horizon ---------- */
.stats-band {
  position: relative; z-index: 2; margin-top: -104px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--glass-band);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--glass-hi);
}
.stats { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { position: relative; padding: 34px 18px; text-align: center; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}
.stat-num { font-size: clamp(40px, 4.6vw, 58px); font-weight: 800; line-height: 1; background: var(--phase); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-label { margin-top: 10px; font-size: 15px; color: var(--text-2); font-weight: 500; }

/* ---------- Sections ---------- */
.section { position: relative; padding: 140px 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-alt) 14%, var(--bg-alt) 86%, transparent); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 74px; }
.section-eyebrow { display: inline-block; font-family: var(--mono); font-size: 13.5px; letter-spacing: .24em; text-transform: uppercase; background: var(--phase); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; font-weight: 600; }
.section-title { font-size: clamp(36px, 4.8vw, 56px); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; }
.section-sub { margin-top: 18px; color: var(--text-2); font-size: 18.5px; }

/* ---------- Glass Surfaces (Reserved for focal workstations & cards) ---------- */
.repo, .lab, .book-card, .contact-card, .service-item {
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glass-hi), var(--shadow-sm);
}

/* ---------- About (Open Architectural Layout) ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 84px; align-items: start; }
.about-bio { margin-top: 26px; font-size: 17.5px; color: var(--text-2); line-height: 1.95; }
.skills { margin-top: 38px; display: grid; gap: 16px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.skill-row { display: flex; gap: 18px; align-items: baseline; }
.skill-k { flex: 0 0 108px; font-size: 14px; color: var(--text-3); font-family: var(--mono); letter-spacing: .05em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; padding: 5px 13px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--hairline); color: var(--text-2); }

.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet), var(--magenta), transparent); border-radius: 2px; }
.tl-item { position: relative; padding: 20px 22px; border-bottom: 1px solid var(--hairline); border-radius: var(--radius-sm); transition: background .3s, transform .3s; }
.tl-item:last-child { border-bottom: 0; }
.tl-item:hover { background: var(--surface); transform: translateX(6px); }
.tl-item::before { content: ""; position: absolute; left: -34px; top: 27px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--violet); box-shadow: 0 0 14px rgba(155,107,255,.55); transition: background-color .35s; }
.tl-time { font-family: var(--mono); font-size: 13.5px; color: var(--cyan); letter-spacing: .04em; font-weight: 600; }
.tl-title { margin-top: 5px; font-size: 19px; font-weight: 700; }
.tl-title .deg { display: inline-block; margin-left: 10px; font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: rgba(155,107,255,.16); color: var(--violet); vertical-align: 2px; }
html:not([data-theme="light"]) .tl-title .deg { color: #d6c3ff; }
.tl-sub { margin-top: 5px; font-size: 15px; color: var(--text-2); }

.research-cards { margin-top: 108px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); }
.rc { position: relative; padding: 44px 34px 28px; transition: background .35s; border-radius: 0; }
.rc + .rc { border-left: 1px solid var(--hairline); }
.rc::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--phase); opacity: 0; transition: opacity .35s; }
.rc:hover { background: var(--surface); }
.rc:hover::before { opacity: 1; }
.rc-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; color: var(--text); background: var(--chip-bg); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.rc h3 { margin-top: 24px; font-size: 22px; font-weight: 750; }
.rc p { margin-top: 12px; font-size: 15.5px; color: var(--text-2); line-height: 1.85; }
.rc .chips { margin-top: 22px; }

/* ---------- Pipeline (Floating Hairline Ribbon) ---------- */
.pipeline {
  display: flex; align-items: stretch; justify-content: center; gap: 0; margin: 0 auto 96px; max-width: 1120px;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  background: var(--glass-band); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; padding: 8px 18px;
}
.pipe-step { flex: 1; text-align: center; padding: 14px 12px; border-radius: 999px; cursor: pointer; transition: background .3s, transform .3s; }
.pipe-step:hover { background: var(--surface-hover); transform: translateY(-2px); }
.pipe-step .ps-n { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); letter-spacing: .16em; }
.pipe-step .ps-t { margin-top: 3px; font-weight: 700; font-size: 16.5px; }
.pipe-step .ps-m { margin-top: 2px; font-size: 13.5px; background: var(--phase); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.pipe-arrow { flex: 0 0 30px; display: grid; place-items: center; color: var(--text-3); font-size: 18px; }

/* ---------- Featured (Gallery Plinth / Seamless Light Blend) ---------- */
.feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 68px; align-items: center; margin-bottom: 150px; }
.feat:nth-child(even) .feat-media { order: 2; }
.feat-media { position: relative; }
.feat-stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--stage-bg);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: background-color .35s, box-shadow .35s;
}
html[data-theme="light"] .feat-stage { box-shadow: none; border-radius: 0; }
.feat-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px;
  opacity: 0; transform: scale(1.015); transition: opacity .18s ease, transform .7s ease;
  pointer-events: none; mix-blend-mode: var(--stage-blend);
}
.feat-stage img.on { opacity: 1; transform: scale(1); transition: opacity .35s ease .08s, transform .7s ease; }
.feat-stage::after { content: "⤢"; position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(6,9,18,.68); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 17px; opacity: .78; transition: opacity .3s, transform .25s; pointer-events: none; }
.feat-stage:hover::after { opacity: 1; transform: scale(1.06); }
.feat-glow { position: absolute; inset: 8% -6% -8% -6%; z-index: -1; background: radial-gradient(closest-side, rgba(155,107,255,.28), transparent); filter: blur(48px); }
html[data-theme="light"] .feat-glow { background: radial-gradient(closest-side, rgba(107,56,230,.12), transparent); }
.feat-cap { margin-top: 14px; font-size: 14.5px; color: var(--text-2); min-height: 24px; text-align: center; transition: opacity .3s; }
.feat-thumbs { display: flex; gap: 10px; margin-top: 14px; justify-content: center; flex-wrap: wrap; }
.feat-thumbs button { width: 80px; height: 56px; border-radius: 10px; overflow: hidden; background: #fff; border: 2px solid var(--hairline); opacity: .55; transition: opacity .25s, border-color .25s, transform .25s; }
.feat-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.feat-thumbs button:hover { opacity: .9; transform: translateY(-2px); }
.feat-thumbs button.on { opacity: 1; border-color: var(--violet); box-shadow: 0 0 18px rgba(155,107,255,.4); }
.feat-tag { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13.5px; color: var(--text-3); letter-spacing: .04em; }
.feat-tag .num { font-size: 14px; padding: 3px 11px; border-radius: 8px; background: var(--chip-bg); border: 1px solid var(--hairline); color: var(--text); }
.feat-name { margin-top: 14px; font-size: clamp(38px, 4.4vw, 54px); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; background: var(--phase); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feat-subtitle { margin-top: 10px; font-size: 20px; font-weight: 600; color: var(--text); }
.feat-venue { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.badge { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--chip-bg); color: var(--text-2); white-space: nowrap; }
.badge.q1 { color: #7ff0c5; border-color: rgba(69,240,160,.38); background: rgba(69,240,160,.1); }
.badge.top { color: #ffd38a; border-color: rgba(255,181,71,.4); background: rgba(255,181,71,.1); }
.badge.if { color: #c4d1ff; border-color: rgba(91,140,255,.42); background: rgba(91,140,255,.1); }
.badge.corr { color: #ffb4ec; border-color: rgba(255,79,216,.4); background: rgba(255,79,216,.1); }
html[data-theme="light"] .badge.q1 { color: #087f5b; border-color: rgba(9,146,104,.35); background: rgba(9,146,104,.1); }
html[data-theme="light"] .badge.top { color: #b85d00; border-color: rgba(201,106,0,.35); background: rgba(201,106,0,.1); }
html[data-theme="light"] .badge.if { color: #2b4acb; border-color: rgba(47,84,235,.32); background: rgba(47,84,235,.09); }
html[data-theme="light"] .badge.corr { color: #a61e69; border-color: rgba(196,34,130,.32); background: rgba(196,34,130,.09); }

.feat-paper-title { margin-top: 18px; font-size: 15.5px; color: var(--text-3); font-style: italic; line-height: 1.65; }
.feat-summary { margin-top: 16px; font-size: 16.5px; color: var(--text-2); line-height: 1.9; }
.feat-highlights { margin-top: 22px; display: grid; gap: 11px; list-style: none; }
.feat-highlights li { position: relative; padding-left: 28px; font-size: 15.5px; color: var(--text); }
.feat-highlights li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(#38e1ff, #9b6bff, #ff4fd8, #ffb547, #38e1ff); -webkit-mask: radial-gradient(circle, transparent 3.5px, #000 4px); mask: radial-gradient(circle, transparent 3.5px, #000 4px); }
.feat-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.more-works-head h3 { font-size: 28px; font-weight: 750; margin-bottom: 32px; }
.more-works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mw { border-radius: var(--radius-sm); overflow: hidden; transition: transform .35s, background .35s; display: flex; flex-direction: column; padding-bottom: 12px; }
.mw:hover { transform: translateY(-6px); background: var(--surface); }
.mw-img { aspect-ratio: 16 / 9; background: var(--stage-bg); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; }
.mw-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .6s; mix-blend-mode: var(--stage-blend); }
.mw:hover .mw-img img { transform: scale(1.04); }
.mw-body { padding: 22px 14px 10px; display: flex; flex-direction: column; flex: 1; }
.mw-venue { font-family: var(--mono); font-size: 13px; color: var(--cyan); font-weight: 600; }
.mw h4 { margin-top: 8px; font-size: 19px; font-weight: 700; }
.mw p { margin-top: 9px; font-size: 15px; color: var(--text-2); line-height: 1.75; flex: 1; }
.mw a.link { margin-top: 16px; font-size: 14.5px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; opacity: .88; font-weight: 600; }
.mw a.link:hover { opacity: 1; }

/* ---------- Phase Lab (Unified Frosted Workstation) ---------- */
.lab {
  display: grid; grid-template-columns: 350px 1fr; gap: 38px; padding: 38px; border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.lab-controls { display: flex; flex-direction: column; gap: 22px; }
.lab-group label { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--text-2); margin-bottom: 10px; font-weight: 500; }
.lab-group output { font-family: var(--mono); color: var(--text); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  padding: 10px 10px; border-radius: 12px; font-size: 14px;
  border: 1px solid var(--hairline); background: var(--chip-bg); color: var(--text-2);
  backdrop-filter: blur(10px); transition: all .2s;
}
.seg button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.seg button.on { color: var(--cta-text); background: var(--cta-bg); border-color: transparent; font-weight: 600; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 6px; background: var(--phase); outline: none; opacity: .92; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); box-shadow: 0 2px 10px rgba(0,0,0,.35); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid var(--violet); border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); cursor: pointer; }
.lab-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lab-metrics div { padding: 13px 8px; border-radius: 14px; background: var(--clone-bg); border: 1px solid var(--hairline); text-align: center; }
.lab-metrics span { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.lab-metrics b { display: block; margin-top: 6px; font-family: var(--mono); font-size: 17.5px; }
.lab-panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lab-panels figure { position: relative; }
.lab-panels canvas { width: 100%; aspect-ratio: 1; border-radius: 14px; image-rendering: auto; background: #000; display: block; box-shadow: var(--shadow-sm); }
.lab-panels figcaption { margin-top: 10px; font-size: 14.5px; color: var(--text-2); text-align: center; font-weight: 500; }
.lab-note { grid-column: 1 / -1; font-size: 14.5px; color: var(--text-3); padding-top: 18px; border-top: 1px dashed var(--hairline); }

/* ---------- Publications (Open Editorial Ledger) ---------- */
.pub-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 44px; }
.pub-filters button {
  padding: 9px 20px; border-radius: 999px; font-size: 15px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--text-2);
  backdrop-filter: blur(12px); transition: all .2s;
}
.pub-filters button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.pub-filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.pub-list { list-style: none; display: grid; max-width: 1080px; margin: 0 auto; border-top: 1px solid var(--hairline); counter-reset: pub; }
.pub { display: grid; grid-template-columns: 92px 1fr; gap: 28px; padding: 28px 20px; border-bottom: 1px solid var(--hairline); border-radius: 14px; transition: background .3s, transform .3s; }
.pub:hover { background: var(--surface); transform: translateX(6px); }
.pub.hide { display: none; }
.pub-year { font-family: var(--mono); font-size: 16.5px; font-weight: 700; color: var(--text); padding-top: 2px; }
.pub-year small { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 500; margin-top: 5px; }
.pub-title { font-size: 18px; font-weight: 650; line-height: 1.55; color: var(--text); }
.pub-authors { margin-top: 7px; font-size: 15px; color: var(--text-2); }
.pub-authors b { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--violet); text-underline-offset: 3px; }
.pub-venue { margin-top: 5px; font-size: 15px; color: var(--text-3); }
.pub-venue i { color: var(--blue); font-style: italic; }
html:not([data-theme="light"]) .pub-venue i { color: #b9c8ff; }
.pub-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.pub-links { margin-left: auto; display: flex; gap: 8px; }
.pub-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--chip-bg); color: var(--text); backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.pub-link:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.pub-link.code { border-color: rgba(69,240,160,.45); color: #9bf5cf; }
html[data-theme="light"] .pub-link.code { border-color: rgba(9,146,104,.4); color: #087f5b; }

/* ---------- Repos (Glass Workstations) ---------- */
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.repo { position: relative; display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .35s, border-color .35s, background .35s; }
.repo::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: repeating-radial-gradient(circle, rgba(155,107,255,.18) 0 2px, transparent 2px 12px); opacity: .5; transition: transform .8s, opacity .4s; pointer-events: none; }
.repo:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-hover); }
.repo:hover::after { transform: scale(1.3) rotate(20deg); opacity: .9; }
.repo-head { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14.5px; font-family: var(--mono); }
.repo-head svg { font-size: 19px; }
.repo-name { margin-top: 14px; font-size: 24px; font-weight: 800; font-family: var(--mono); letter-spacing: -.01em; word-break: break-all; }
.repo-desc { margin-top: 10px; font-size: 15.5px; color: var(--text-2); line-height: 1.75; flex: 1; }
.repo-topics { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.repo-topics span { font-size: 13px; padding: 4px 11px; border-radius: 999px; background: rgba(56,225,255,.12); border: 1px solid rgba(56,225,255,.24); color: #8ceeff; }
html[data-theme="light"] .repo-topics span { background: rgba(0,130,188,.1); border-color: rgba(0,130,188,.25); color: #006b9e; }
.repo-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 18px; font-size: 14.5px; color: var(--text-2); }
.repo-foot .lang::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #3572A5; margin-right: 7px; vertical-align: -1px; }
.repo-foot span { display: inline-flex; align-items: center; gap: 5px; }
.repo-foot .go { margin-left: auto; color: var(--text); font-weight: 600; }
.clone { margin-top: 16px; display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; border-radius: 12px; background: var(--clone-bg); border: 1px solid var(--hairline); font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.clone code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clone button { padding: 5px 10px; border-radius: 8px; font-size: 13px; color: var(--text); background: var(--chip-bg); position: relative; z-index: 2; }
.clone button:hover { background: var(--surface-hover); }

/* ---------- Projects & Patents (Open Ledger + Frosted Monograph) ---------- */
.proj-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
.proj-list { display: grid; border-top: 1px solid var(--hairline); }
.proj { position: relative; padding: 24px 20px; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; border-radius: 12px; transition: background .3s; }
.proj:hover { background: var(--surface); }
.proj.lead::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--phase); }
.proj.lead { padding-left: 24px; }
.proj-title { font-weight: 650; font-size: 16.5px; line-height: 1.55; }
.proj-role { align-self: start; font-size: 13px; font-weight: 700; padding: 4px 13px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--hairline); color: var(--text-2); white-space: nowrap; }
.proj.lead .proj-role { background: var(--cta-bg); color: var(--cta-text); border-color: transparent; }
.proj-src { font-size: 14.5px; color: var(--text-3); }
.proj-time { font-family: var(--mono); font-size: 13.5px; color: var(--cyan); text-align: right; font-weight: 600; }
.proj-side { display: grid; gap: 28px; }
.book-card { position: relative; display: grid; grid-template-columns: 124px 1fr; gap: 22px; padding: 28px; border-radius: var(--radius); background: linear-gradient(140deg, rgba(255,181,71,.14), rgba(255,79,216,.09) 50%, rgba(91,140,255,.1)); border: 1px solid rgba(255,181,71,.34); overflow: hidden; }
.book-cover { aspect-ratio: 3 / 4.2; border-radius: 4px 10px 10px 4px; background: linear-gradient(160deg, #1b2a52, #0b1124); position: relative; box-shadow: 8px 12px 30px rgba(0,0,0,.45), inset 4px 0 0 rgba(255,255,255,.12); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 11px; }
.book-cover::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 70% 30%, rgba(56,225,255,.5) 0 1.5px, rgba(155,107,255,.35) 2px 5px, rgba(255,79,216,.25) 5.5px 8px, transparent 8.5px 11px); opacity: .55; }
.book-cover span { position: relative; font-size: 11px; font-weight: 700; line-height: 1.35; color: #fff; }
.book-eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .15em; color: var(--amber); text-transform: uppercase; font-weight: 600; }
html:not([data-theme="light"]) .book-eyebrow { color: #ffd38a; }
.book-title { margin-top: 8px; font-size: 18.5px; font-weight: 750; line-height: 1.5; }
.book-meta { margin-top: 8px; font-size: 14.5px; color: var(--text-2); line-height: 1.75; }
.patents { padding: 8px 4px; }
.patents h4 { font-size: 18px; font-weight: 750; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.patent { padding: 16px 0; border-top: 1px solid var(--hairline); }
.patent-title { font-size: 15.5px; font-weight: 600; line-height: 1.55; }
.patent-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; color: var(--text-3); }
.patent-meta code { font-family: var(--mono); color: var(--blue); }
html:not([data-theme="light"]) .patent-meta code { color: #b9c8ff; }
.patent-meta .ok { color: var(--green); font-weight: 600; }

/* ---------- Honors (Open 2-Column Editorial Roll) ---------- */
.honors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; border-top: 1px solid var(--hairline); }
.honor { position: relative; padding: 24px 16px; border-bottom: 1px solid var(--hairline); border-radius: 12px; transition: background .3s, transform .3s; }
.honor:hover { background: var(--surface); transform: translateX(4px); }
.honor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.honor-year { font-family: var(--mono); font-size: 13.5px; color: var(--text-3); font-weight: 600; }
.honor-lv { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; }
.honor-lv.national { background: rgba(255,181,71,.18); color: #ffd38a; }
.honor-lv.province { background: rgba(155,107,255,.18); color: #d6c3ff; }
.honor-lv.school { background: rgba(56,225,255,.14); color: #8ceeff; }
html[data-theme="light"] .honor-lv.national { background: rgba(201,106,0,.12); color: #b85d00; }
html[data-theme="light"] .honor-lv.province { background: rgba(107,56,230,.12); color: #5b2fd1; }
html[data-theme="light"] .honor-lv.school { background: rgba(0,130,188,.12); color: #006b9e; }
.honor-title { margin-top: 10px; font-size: 17px; font-weight: 650; line-height: 1.5; }
.honor-org { margin-top: 4px; font-size: 14px; color: var(--text-3); }
.honor .medal { position: absolute; right: 14px; bottom: 10px; font-size: 42px; opacity: .06; color: var(--text); pointer-events: none; }
.service { margin-top: 38px; display: flex; justify-content: center; }
.service-item { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 15.5px; color: var(--text-2); }
.service-item b { color: var(--text); }

/* ---------- Contact (Monumental Boundless Ripples) ---------- */
.contact { padding: 156px 0 136px; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 50%; top: 42%; width: 1200px; height: 1200px; transform: translate(-50%, -50%); background: repeating-radial-gradient(circle, rgba(56,225,255,.075) 0 2px, transparent 2px 30px), radial-gradient(closest-side, rgba(155,107,255,.18), transparent); border-radius: 50%; mask-image: radial-gradient(closest-side, #000 25%, transparent); pointer-events: none; }
html[data-theme="light"] .contact::before { background: repeating-radial-gradient(circle, rgba(47,84,235,.065) 0 2px, transparent 2px 30px), radial-gradient(closest-side, rgba(107,56,230,.11), transparent); }
.contact-inner { text-align: center; max-width: 920px; }
.contact-title { font-size: clamp(38px, 5.4vw, 64px); font-weight: 800; line-height: 1.12; background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-cards { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .3s, border-color .3s, background .3s; }
a.contact-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-hover); }
.contact-card svg { font-size: 28px; color: var(--cyan); margin-bottom: 6px; }
.cc-label { font-size: 13px; font-family: var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--text-3); }
.cc-val { font-size: 16px; font-weight: 600; word-break: break-all; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 32px 0; font-size: 14.5px; color: var(--text-2); position: relative; z-index: 1; background: var(--glass-band); backdrop-filter: blur(14px); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-muted { color: var(--text-3); }

/* ---------- Lightbox / Toast ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(3,5,10,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; padding: 40px 80px; }
html[data-theme="light"] .lightbox { background: rgba(240, 244, 252, 0.9); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { max-width: 1400px; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 140px); width: auto; border-radius: 12px; background: #fff; padding: 12px; transform: scale(.96); transition: transform .35s; box-shadow: var(--shadow); }
.lightbox.open img { transform: scale(1); }
.lightbox figcaption { margin-top: 14px; color: var(--text); font-size: 15.5px; text-align: center; }
.lb-close { position: absolute; top: 20px; right: 24px; width: 46px; height: 46px; border-radius: 50%; font-size: 32px; color: var(--text); line-height: 1; opacity: .85; background: var(--surface-strong); border: 1px solid var(--border-strong); backdrop-filter: blur(12px); display: grid; place-items: center; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; font-size: 32px; color: var(--text); background: var(--surface-strong); border: 1px solid var(--border-strong); backdrop-filter: blur(12px); }
.lb-close:hover, .lb-nav:hover { opacity: 1; background: var(--surface-hover); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 11px 22px; border-radius: 999px; background: var(--text); color: var(--bg); backdrop-filter: blur(12px); font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .3s; z-index: 300; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: 1.1s; }
.hero .reveal:nth-child(2) { transition-delay: .08s; } .hero .reveal:nth-child(3) { transition-delay: .16s; }
.hero .reveal:nth-child(4) { transition-delay: .24s; } .hero .reveal:nth-child(5) { transition-delay: .32s; } .hero .reveal:nth-child(6) { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links a { padding: 7px 11px; font-size: 14px; }
  .lab { grid-template-columns: 1fr; }
  .lab-panels { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav-links { position: fixed; top: 74px; left: 0; right: 0; flex-direction: column; border-radius: 0; padding: 14px 20px 22px; background: var(--nav-glass); backdrop-filter: blur(22px) saturate(160%); border: 0; border-bottom: 1px solid var(--hairline); transform: translateY(-130%); transition: transform .4s; }
  .menu-open .nav-links { transform: none; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .stats-band { margin-top: 0; }
  .scroll-cue { bottom: 32px; }
  .hero-content { padding-bottom: 90px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat + .stat::before { display: none; }
  .about-grid, .feat, .proj-grid { grid-template-columns: 1fr; gap: 44px; }
  .feat:nth-child(even) .feat-media { order: 0; }
  .research-cards { grid-template-columns: 1fr; }
  .rc + .rc { border-left: 0; border-top: 1px solid var(--hairline); }
  .more-works, .repos, .honors { grid-template-columns: 1fr 1fr; }
  .pipeline { flex-wrap: wrap; gap: 8px; border-radius: 20px; padding: 12px; }
  .pipe-arrow { display: none; }
  .pipe-step { flex: 1 1 40%; }
  .lab-panels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container, .nav-inner { padding: 0 16px; }
  .brand { font-size: 14.5px; gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-mark::after { inset: 6px; }
  .nav-actions { gap: 6px; }
  .theme-btn { width: 34px; height: 34px; font-size: 15px; }
  .lang-btn { height: 34px; padding: 0 11px; font-size: 13px; }
  .menu-btn { width: 36px; height: 36px; }
  .menu-btn span { left: 8px; right: 8px; }
  .menu-btn span:first-child { top: 13px; } .menu-btn span:last-child { top: 21px; }
  .menu-open .menu-btn span:first-child { top: 17px; } .menu-open .menu-btn span:last-child { top: 17px; }
  .section { padding: 88px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: span 2; }
  .more-works, .repos, .contact-cards, .honors { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 8px; padding: 20px 12px; }
  .pub-links { margin-left: 0; width: 100%; }
  .lab { padding: 20px; }
  .book-card { grid-template-columns: 96px 1fr; }
  .lightbox { padding: 20px 10px; }
  .lb-nav { display: none; }
  .feat { margin-bottom: 96px; }
}
