/* Wenqi Wang — personal homepage.
 * Palette and type follow the Aurai Sensing tokens (styles/tokens.css); the
 * HUD layer (mono labels, dot grid, glow borders) is specific to this page.
 * The page is dark by design, so it does not follow prefers-color-scheme. */

:root {
  color-scheme: dark;
  --bg: #0a1a0f;
  --bg-deep: #060f07;
  --bg-soft: #0d1a10;
  --card: #0f1f13;
  --card-2: #132616;
  --line: #1e3320;
  --line-soft: rgba(182, 244, 208, 0.08);
  --line-mid: rgba(182, 244, 208, 0.16);
  --line-strong: rgba(182, 244, 208, 0.28);
  --ink: #faf9f5;
  --body: #c4cec6;
  --muted: #8a9e90;
  --soft: #6a8a72;
  --teal: #5db8a6;
  --mint: #b6f4d0;
  --amber: #e8a55a;
  --forest: #1a472a;

  --f-display: "Cormorant Garamond", "Noto Serif SC", Garamond, "Times New Roman", serif;
  --f-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--body);
  font: 400 16px/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(182, 244, 208, 0.25); color: var(--ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; border-radius: 4px; }

/* Language switching: both languages live in the markup, CSS hides one. */
html[data-lang="en"] [lang="zh-CN"],
html[data-lang="zh"] [lang="en"] { display: none !important; }
:lang(zh-CN) { letter-spacing: 0; }

.mono { font-family: var(--f-mono); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--mint); color: #0a1a0f; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Page-wide atmosphere: dot grid + slow glow + cursor spotlight. */
.atmos { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.atmos::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(182, 244, 208, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.35;
}
.atmos::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px circle at var(--mx, 70%) var(--my, 20%), rgba(93, 184, 166, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(26, 71, 42, 0.55), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(26, 71, 42, 0.35), transparent 70%);
}

/* ---------- typography ---------- */
.display-xl, .display-lg, .display-md {
  font-family: var(--f-display); font-weight: 400; color: var(--ink); margin: 0;
}
.display-xl { font-size: clamp(52px, 6.3vw, 100px); line-height: 0.98; letter-spacing: -0.025em; }
.display-lg { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.02em; }
.display-md { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
.display-xl em, .display-lg em, .display-md em { font-style: italic; color: var(--mint); }
:lang(zh-CN).display-xl, :lang(zh-CN).display-lg, :lang(zh-CN).display-md,
.display-xl :lang(zh-CN), .display-lg :lang(zh-CN), .display-md :lang(zh-CN) { letter-spacing: 0.01em; font-weight: 500; }
.display-xl :lang(zh-CN) { font-size: 0.64em; line-height: 1.24; }
.display-xl :lang(zh-CN) em, .display-lg :lang(zh-CN) em { font-size: 1.15em; }
.display-lg :lang(zh-CN) { font-size: 0.78em; line-height: 1.28; }
.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.7; color: var(--body); max-width: 560px; }
.eyebrow {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mint); display: inline-flex; align-items: center; gap: 10px; margin: 0;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); flex: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: livePulse 2s ease-out infinite; flex: none; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 184, 166, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(93, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 184, 166, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px; height: 50px; padding: 0 22px;
  border-radius: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.3s;
}
.btn .arr { font-family: var(--f-mono); transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translate(2px, -2px); }
.btn-primary { background: var(--mint); color: #0b2216; box-shadow: 0 0 0 0 rgba(182, 244, 208, 0); }
.btn-primary:hover { background: #d8ffe6; transform: translateY(-2px); box-shadow: 0 10px 40px -10px rgba(182, 244, 208, 0.55); }
.btn-ghost { border-color: var(--line-mid); color: var(--ink); background: rgba(250, 249, 245, 0.02); }
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(182, 244, 208, 0.06); transform: translateY(-2px); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13px; gap: 10px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled { background: rgba(6, 15, 7, 0.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--line); }
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; flex: none; }
.brand-mark { font: 800 30px/1 var(--f-sans); letter-spacing: -0.14em; padding-right: 4px; }
.brand-mark span { color: var(--mint); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--mint); background: rgba(182, 244, 208, 0.06); }
.nav a .n { color: var(--soft); margin-right: 6px; }
.bar-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.clock { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.clock b { color: var(--ink); font-weight: 500; }
.lang {
  display: inline-flex; border: 1px solid var(--line-mid); border-radius: 999px; padding: 3px; gap: 2px;
}
.lang button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px; padding: 4px 10px;
  font: 500 11px/1.4 var(--f-mono); color: var(--muted); letter-spacing: 0.06em;
}
.lang button[aria-pressed="true"] { background: var(--mint); color: #0b2216; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line-mid); background: transparent; border-radius: 8px; cursor: pointer; position: relative; }
.menu-btn i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 0.25s, top 0.25s, opacity 0.2s; }
.menu-btn i:nth-child(1) { top: 14px; } .menu-btn i:nth-child(2) { top: 19px; } .menu-btn i:nth-child(3) { top: 24px; }
.topbar.menu-open .menu-btn i:nth-child(1) { top: 19px; transform: rotate(45deg); }
.topbar.menu-open .menu-btn i:nth-child(2) { opacity: 0; }
.topbar.menu-open .menu-btn i:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding-top: var(--nav-h); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.hero > .wrap { width: 100%; }
.mesh { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.85; }
.hero-body {
  flex: 1; display: grid; grid-template-columns: 1.02fr 0.98fr; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding-top: clamp(24px, 4vh, 56px); padding-bottom: 24px; width: 100%;
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy .eyebrow { margin-bottom: 30px; }
.hero-copy h1 { margin-bottom: 30px; }
.hero-copy .lede { margin: 0 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 10px 18px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.hero-meta span + span::before { content: "/"; margin-right: 18px; color: var(--soft); }
.hero-status { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 11px; color: var(--soft); letter-spacing: 0.08em; }

/* Entrance: staggered rise once the page is ready (JS adds .is-loaded). */
.js .rise { opacity: 0; transform: translateY(18px); }
.js.is-loaded .rise { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }

.hero-bottom {
  border-top: 1px solid var(--line); min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.hero-bottom a { color: var(--ink); font-size: 12px; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 12px; }
.hero-bottom a span { display: inline-block; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(4px); } }
.hero-bottom .tail { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- 3D bust (DOM contract required by viewer.js: .lab-hero__stage/status/controls) ---------- */
.bust { position: relative; height: clamp(460px, 72vh, 680px); min-width: 0; }
.bust__halo { position: absolute; inset: 6% 4% 14%; background: radial-gradient(ellipse at 50% 46%, rgba(93, 184, 166, 0.16), transparent 64%); pointer-events: none; }
.bust__orbit { position: absolute; left: 50%; top: 44%; width: min(460px, 88%); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.bust__orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-mid); }
.bust__orbit i:nth-child(2) { inset: -26px; border-color: var(--line-soft); border-style: dashed; animation: spin 90s linear infinite; }
.bust__orbit i:nth-child(3) { inset: 34px; border-color: rgba(182, 244, 208, 0.1); transform: rotate(-25deg) scaleX(0.55); }
.bust__orbit i:nth-child(4) { inset: -26px; border: 0; animation: spin 24s linear infinite reverse; }
.bust__orbit i:nth-child(4)::before { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px 2px rgba(182, 244, 208, 0.7); }
@keyframes spin { to { transform: rotate(360deg); } }
.bust__frame { position: absolute; inset: 22px 0 86px; pointer-events: none; }
.bust__frame b { position: absolute; width: 18px; height: 18px; border: 0 solid var(--line-strong); }
.bust__frame b:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.bust__frame b:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.bust__frame b:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.bust__frame b:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.bust__coord { position: absolute; top: 34px; left: 16px; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); z-index: 2; }
.bust__telemetry {
  position: absolute; top: 34px; right: 16px; z-index: 2; margin: 0; display: grid; grid-template-columns: auto auto; gap: 3px 12px;
  font-size: 10px; letter-spacing: 0.1em; color: var(--soft); text-align: right;
}
.bust__telemetry dt { color: var(--soft); }
.bust__telemetry dd { margin: 0; color: var(--mint); min-width: 7ch; font-variant-numeric: tabular-nums; }
.lab-hero__stage { position: absolute; inset: 30px 0 92px; z-index: 1; }
.lab-hero__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.lab-hero__stage canvas:active { cursor: grabbing; }
.lab-hero__stage canvas:focus-visible { outline: 1px dashed var(--line-strong); outline-offset: -8px; }
.lab-hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.5s; }
.lab-hero.is-ready .lab-hero__poster { opacity: 0; pointer-events: none; }
.bust__scan { position: absolute; inset: 30px 0 92px; z-index: 2; pointer-events: none; overflow: hidden; opacity: 0; }
.bust__scan::before {
  content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
  box-shadow: 0 0 18px 4px rgba(182, 244, 208, 0.45);
}
.bust__scan::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0; background: linear-gradient(180deg, rgba(182, 244, 208, 0.07), transparent); }
.lab-hero.is-scanning .lab-hero__stage canvas { animation: scanReveal 1.6s var(--ease) both; }
.lab-hero.is-scanning .bust__scan { opacity: 1; }
.lab-hero.is-scanning .bust__scan::before { animation: scanLine 1.6s var(--ease) both; }
@keyframes scanReveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes scanLine { from { top: 0; opacity: 1; } 85% { opacity: 1; } to { top: 100%; opacity: 0; } }
.bust__caption {
  position: absolute; left: 16px; right: 16px; bottom: 74px; z-index: 2; display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.16em; color: var(--ink); pointer-events: none;
}
.bust__caption .ver { margin-left: auto; color: var(--muted); }
.lab-hero__controls { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.lab-hero__controls[hidden], .lab-hero__load[hidden] { display: none; }
.lab-hero__controls button, .lab-hero__load {
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--body);
  border: 1px solid var(--line-mid); background: rgba(15, 31, 19, 0.85); border-radius: 6px; padding: 9px 13px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lab-hero__controls button:hover, .lab-hero__load:hover { background: #1c3524; color: var(--ink); border-color: var(--line-strong); }
.lab-hero__load { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
.lab-hero__status { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; color: var(--soft); font: 400 10.5px/1.5 var(--f-mono); letter-spacing: 0.06em; margin: 0; }

/* ---------- ticker ---------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(6, 15, 7, 0.6); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 18px 0; display: flex; }
.ticker li { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 22px; white-space: nowrap; display: flex; align-items: center; gap: 22px; }
.ticker li::after { content: "◆"; font-size: 7px; color: var(--teal); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(84px, 11vw, 140px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px 48px; align-items: start; margin-bottom: clamp(44px, 6vw, 72px); }
.sec-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); margin: 10px 0 0; display: flex; align-items: center; gap: 10px; }
.sec-label::before { content: ""; width: 18px; height: 1px; background: var(--mint); }
.sec-head .lede { margin: 22px 0 0; }

/* Scroll reveal (JS adds .in). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.bio p { font-size: 17px; line-height: 1.8; margin: 0 0 20px; color: var(--body); }
.bio p strong { color: var(--ink); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--body); border: 1px solid var(--line-mid); border-radius: 999px; padding: 6px 12px; background: rgba(182, 244, 208, 0.03); }
.term {
  border: 1px solid var(--line-mid); border-radius: 14px; background: linear-gradient(180deg, rgba(15, 31, 19, 0.95), rgba(6, 15, 7, 0.95));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(182, 244, 208, 0.06); overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 11px; color: var(--soft); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #1f3a27; }
.term-bar i:first-child { background: var(--amber); opacity: 0.75; }
.term-bar span { margin-left: auto; letter-spacing: 0.08em; }
.term pre { margin: 0; padding: 20px 20px 24px; font: 400 13px/1.85 var(--f-mono); color: var(--body); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 290px; }
.term .p { color: var(--mint); }
.term .k { color: var(--soft); }
.term .v { color: var(--ink); }
.term .ok { color: var(--teal); }
.term.typing .line { visibility: hidden; }
.term.typing .line.on { visibility: visible; }
.term .caret { display: inline-block; width: 8px; height: 15px; background: var(--mint); vertical-align: -2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(48px, 7vw, 88px); }
.stat { padding: 30px 24px 28px 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; }
.stat-num { font-family: var(--f-display); font-size: clamp(44px, 5vw, 64px); line-height: 1; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1; }
.stat-num sup { font-size: 0.45em; color: var(--mint); margin-left: 2px; }
.stat-label { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- journey ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 0; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 150px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline::after { background: linear-gradient(180deg, var(--mint), var(--teal)); bottom: auto; height: calc(var(--progress, 0) * (100% - 12px)); box-shadow: 0 0 12px rgba(182, 244, 208, 0.5); }
.tl-item { display: grid; grid-template-columns: 150px 1fr; gap: 0 44px; padding: 0 0 46px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-when { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); padding-top: 3px; text-align: right; padding-right: 26px; white-space: nowrap; }
.tl-item::before { content: ""; position: absolute; left: 145px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-deep); border: 1px solid var(--line-strong); z-index: 1; transition: background 0.4s, box-shadow 0.4s, border-color 0.4s; }
.tl-item.in::before { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 0 5px rgba(182, 244, 208, 0.1), 0 0 16px rgba(182, 244, 208, 0.6); }
.tl-body { padding-left: 4px; }
.tl-org { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin: 0 0 6px; }
.tl-body h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; color: var(--ink); margin: 0 0 10px; }
.tl-body h3 :lang(zh-CN) { font-weight: 600; font-size: 0.9em; }
.tl-body p { margin: 0; max-width: 720px; color: var(--body); }
.tl-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.tl-links a { font-family: var(--f-mono); font-size: 11.5px; color: var(--mint); letter-spacing: 0.04em; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.tl-links a:hover { border-color: var(--mint); }
.tl-item.is-now .tl-when { color: var(--mint); }

/* ---------- cards / projects ---------- */
.card {
  position: relative; isolation: isolate; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 38, 22, 0.55), rgba(10, 26, 15, 0.35)); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s;
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: 2; pointer-events: none;
  background: radial-gradient(280px circle at var(--x, 50%) var(--y, 50%), rgba(182, 244, 208, 0.7), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), rgba(93, 184, 166, 0.09), transparent 55%); opacity: 0; transition: opacity 0.3s; }
.card:hover { transform: translateY(-3px); }
.card:hover::before, .card:hover::after, .card:focus-within::before { opacity: 1; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--line-mid); border-radius: 999px; padding: 9px 14px; transition: all 0.2s;
}
.filters button:hover { color: var(--ink); border-color: var(--line-strong); }
.filters button[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: #0b2216; }
.filters .count { opacity: 0.6; margin-left: 6px; }

.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.feat { display: flex; flex-direction: column; }
.feat-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); filter: saturate(0.9); }
.feat:hover .feat-media img { transform: scale(1.04); }
.feat-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6, 15, 7, 0.75)); }
.feat-tag { position: absolute; left: 16px; top: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: rgba(6, 15, 7, 0.7); backdrop-filter: blur(8px); border: 1px solid var(--line-mid); border-radius: 999px; padding: 6px 11px; }
.feat-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }

.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj { padding: 24px 24px 22px; display: flex; flex-direction: column; min-height: 268px; }
.proj[hidden] { display: none; }
.proj-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--soft); margin-bottom: 18px; }
.proj-top .idx { color: var(--mint); }
.card h3 { font-family: var(--f-display); font-weight: 500; font-size: 27px; line-height: 1.15; color: var(--ink); margin: 0 0 12px; letter-spacing: -0.005em; }
.card h3 :lang(zh-CN) { font-weight: 600; font-size: 0.86em; line-height: 1.35; }
.card p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.7; color: var(--body); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; }
.card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--mint); }
.card-link::after { content: "↗"; transition: transform 0.25s var(--ease); }
.card-link:hover::after { transform: translate(2px, -2px); }
.card-link.muted { color: var(--soft); }
.card-link.muted::after { content: "◌"; }
.stretch::before { content: ""; position: absolute; inset: 0; z-index: 3; }
.more-row { display: flex; justify-content: center; margin-top: 30px; }

/* ---------- what's next ---------- */
.next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vector { padding: 28px 26px 26px; min-height: 320px; display: flex; flex-direction: column; }
.vector .v-idx { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--mint); display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; }
.signal { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.signal i { width: 3px; background: var(--teal); border-radius: 1px; animation: sig 1.6s ease-in-out infinite; }
.signal i:nth-child(1) { height: 5px; } .signal i:nth-child(2) { height: 9px; animation-delay: 0.2s; } .signal i:nth-child(3) { height: 13px; animation-delay: 0.4s; }
@keyframes sig { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.vector h3 { font-size: 30px; }
.card p.v-ground { margin: auto 0 0; padding-top: 16px; border-top: 1px dashed var(--line-mid); font-size: 11px; letter-spacing: 0.04em; color: var(--teal); line-height: 1.5; }
.roadmap { margin-top: 56px; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.roadmap::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: linear-gradient(90deg, var(--mint), var(--teal) 50%, var(--line-mid)); }
.stop { position: relative; padding-top: 34px; }
.stop::before { content: ""; position: absolute; top: 2px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-deep); border: 1px solid var(--mint); }
.stop.now::before { background: var(--mint); box-shadow: 0 0 0 5px rgba(182, 244, 208, 0.12), 0 0 16px rgba(182, 244, 208, 0.7); }
.stop .when { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--mint); text-transform: uppercase; }
.stop .when b { color: var(--soft); font-weight: 400; margin-left: 8px; }
.stop ul { margin: 12px 0 0; padding: 0; list-style: none; }
.stop li { font-size: 14.5px; color: var(--body); padding: 5px 0 5px 16px; position: relative; }
.stop li::before { content: "›"; position: absolute; left: 0; color: var(--teal); font-family: var(--f-mono); }

/* ---------- notes ---------- */
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.note a { display: grid; grid-template-columns: 120px 150px 1fr 30px; gap: 20px; align-items: center; padding: 22px 8px; border-bottom: 1px solid var(--line); transition: background 0.25s, padding 0.25s var(--ease); }
.note a:hover { background: rgba(182, 244, 208, 0.035); padding-left: 16px; }
.note .date { font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.note .cat { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.note .title { font-family: var(--f-display); font-size: 23px; line-height: 1.3; color: var(--ink); }
.note .title :lang(zh-CN) { font-size: 0.86em; font-weight: 600; }
.note .title small { font-family: var(--f-mono); font-size: 10px; color: var(--soft); border: 1px solid var(--line-mid); border-radius: 4px; padding: 1px 5px; margin-left: 10px; vertical-align: 4px; letter-spacing: 0.08em; }
.note .go { font-family: var(--f-mono); color: var(--mint); text-align: right; transition: transform 0.25s var(--ease); }
.note a:hover .go { transform: translate(3px, -3px); }
.lab-band {
  margin-top: 56px; border-radius: 20px; border: 1px solid var(--line-mid); padding: clamp(36px, 5vw, 64px); position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 70% 120% at 100% 0%, rgba(26, 71, 42, 0.9), transparent 60%), linear-gradient(135deg, #0f2416, #081409);
  display: grid; grid-template-columns: 1.3fr auto; gap: 28px; align-items: end;
}
.lab-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(182, 244, 208, 0.18) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 30%, #000); opacity: 0.4; }
.lab-band .cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.lab-band .cats a { font-family: var(--f-mono); font-size: 11px; color: var(--body); border: 1px solid var(--line-mid); border-radius: 999px; padding: 6px 12px; transition: all 0.2s; }
.lab-band .cats a:hover { color: var(--ink); border-color: var(--mint); }

/* ---------- contact ---------- */
.contact { text-align: left; }
.contact .display-xl { max-width: 980px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; align-items: center; }
.contact-meta { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; border-top: 1px solid var(--line); padding-top: 26px; }
.contact-meta div { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.contact-meta b { display: block; margin-top: 8px; font-family: var(--f-sans); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 500; }
.copy-note { font-family: var(--f-mono); font-size: 11px; color: var(--mint); min-width: 10ch; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 34px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--soft); }
.footer a { color: var(--muted); } .footer a:hover { color: var(--mint); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav a .n { display: none; }
  .clock { display: none; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --nav-h: 62px; }
  .menu-btn { display: inline-block; }
  .nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: #060f07; border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .topbar.menu-open { background: #060f07; border-bottom-color: var(--line); }
  .topbar.menu-open .nav { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 4px; font-size: 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a .n { display: inline; }
  .bar-tools { margin-left: auto; }
  .bar-tools .btn { display: none; }
  /* Phones: put the bust right under the headline (the copy column dissolves into the flow). */
  .hero-body { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 28px; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; }
  .hero-copy h1 { order: 2; margin-bottom: 0; }
  .bust { order: 3; height: 470px; margin: 4px 0 18px; }
  .hero-copy .lede { order: 4; }
  .hero-actions { order: 5; }
  .hero-meta { order: 6; }
  .hero-status { order: 7; margin-bottom: 8px; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; }
  .profile-grid, .featured, .next-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .roadmap { grid-template-columns: 1fr; gap: 0; }
  .roadmap::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--mint), var(--line-mid)); }
  .stop { padding: 0 0 26px 30px; }
  .stop::before { top: 3px; }
  .note a { grid-template-columns: 1fr 24px; gap: 6px 12px; }
  .note .date, .note .cat { grid-column: 1; }
  .note .date { order: 0; }
  .note .title { grid-column: 1; }
  .note .go { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .lab-band { grid-template-columns: 1fr; align-items: start; }
  .contact-meta { grid-template-columns: 1fr; }
  .hero-bottom > span:first-child { display: none; }
}
@media (max-width: 640px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj { min-height: 0; }
  .timeline::before, .timeline::after { left: 5px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 30px; }
  .tl-item::before { left: 0; }
  .tl-when { text-align: left; margin-bottom: 6px; padding-right: 0; }
  .bust { height: 420px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .bust__orbit { width: 300px; }
  .bust__telemetry { grid-template-columns: auto auto; font-size: 9px; }
  .bust__telemetry dt:nth-of-type(n+4), .bust__telemetry dd:nth-of-type(n+4) { display: none; }
  .bust__coord { font-size: 9px; }
  .brand > span:last-child { display: none; }
  .hero-meta { margin-top: 32px; }
  .btn { height: 46px; }
  .term pre { font-size: 12px; min-height: 0; }
  .hero-bottom .tail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .rise { opacity: 1; transform: none; }
}
