/* ============ Tokens ============ */
:root {
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-soft: #f4f4f5;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #a1a1aa;
  --line: #e4e4e7;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --warm: var(--accent);
  --warm-soft: var(--accent-soft);
  --gold: #52525b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
  --radius: 12px;
  --maxw: 1080px;
  --serif: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b; --bg-elev: #141416; --bg-soft: #1c1c1f;
    --ink: #f4f4f5; --ink-2: #a1a1aa; --ink-3: #71717a; --line: #27272a;
    --accent: #60a5fa; --accent-soft: rgba(96, 165, 250, .12);
    --gold: #a1a1aa;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0b; --bg-elev: #141416; --bg-soft: #1c1c1f;
  --ink: #f4f4f5; --ink-2: #a1a1aa; --ink-3: #71717a; --line: #27272a;
  --accent: #60a5fa; --accent-soft: rgba(96, 165, 250, .12);
  --gold: #a1a1aa;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ============ Nav ============ */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--ink-2); padding: 7px 12px; border-radius: 999px; transition: .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--ink); background: var(--bg-soft); }
.nav-links a.life-link { color: var(--accent); }
.nav-links a.life-link:hover { background: var(--warm-soft); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--ink-2); display: inline-grid; place-items: center;
  cursor: pointer; margin-left: 8px; transition: .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 16px; }
  .nav-links .icon-btn { display: none; }
}

/* ============ Hero ============ */
.hero { padding: 88px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: center; }
.eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: 0;
  color: var(--ink-3); display: inline-flex; align-items: center; gap: 10px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #22c55e;
  opacity: 0; animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .8 } 100% { transform: scale(1.6); opacity: 0 } }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 5.5vw, 52px);
  line-height: 1.05; letter-spacing: -.02em; margin: 14px 0 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 620px; margin: 0; }
.hero .lede a { color: var(--ink); border-bottom: 1px solid var(--line); transition: .15s; }
.hero .lede a:hover { border-color: var(--accent); color: var(--accent); }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font-size: 14.5px; font-weight: 500; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--ink); transition: .18s;
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .85; }
.portrait { position: relative; }
.portrait img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 30%;
  border-radius: 22px; box-shadow: var(--shadow);
}
.portrait::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 22px;
  border: 1px solid var(--line); z-index: -1;
}
@media (max-width: 820px) {
  .hero { padding: 48px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 260px; order: -1; }
}

.portrait a[data-lightbox] { display: block; cursor: zoom-in; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.lightbox img {
  max-width: min(92vw, 1100px); background: #fff; max-height: 88vh; width: auto; height: auto; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); cursor: default;
  transform: scale(.96); transition: transform .25s ease;
}
.lightbox.open img { transform: none; }
.lb-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
}
.lb-close svg { width: 18px; height: 18px; }
body.lb-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .lightbox, .lightbox img { transition: none; } }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
.stat { padding: 22px 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num { font-family: var(--sans); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.stat .lbl { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 700px) {
  .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); }
}

/* ============ Sections ============ */
section.block { padding: 72px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 46px); letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.sec-head .idx { font-size: 13px; color: var(--ink-3); }
.sec-sub { color: var(--ink-2); margin: -20px 0 32px; max-width: 640px; }

/* Research thesis */
.thesis { margin-bottom: 40px; }
.thesis-line {
  font-size: clamp(20px, 2.6vw, 26px); line-height: 1.5; letter-spacing: -.015em; font-weight: 500;
  color: var(--ink-2); max-width: 900px; margin: 0 0 28px;
}
.thesis-line .hl {
  color: var(--ink);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px;
  transition: background-size 1.2s ease;
}
.thesis-line .hl + .hl { transition-delay: .9s; }
.thesis.in .thesis-line .hl { background-size: 100% 2px; }
.gaps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gap {
  margin: 0; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 14px;
}
.gap-art { width: 100%; height: auto; display: block; background: var(--bg-soft); border-radius: 10px; }
.gap figcaption { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.gap figcaption b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.gap .topics-inline { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--accent); }
@media (max-width: 760px) { .gaps { grid-template-columns: 1fr; } }

.gap-art .lbl { font: 500 11px var(--sans); fill: var(--ink-3); }
.gap-art .flag { font: 600 11.5px var(--sans); fill: var(--accent); opacity: 0; }
/* A: out-of-distribution */
.ood .region { fill: var(--bg-elev); stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 4 5; }
.ood .seen circle { fill: var(--ink-3); }
.ood .dot { fill: var(--accent); }
.ood .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; transform-origin: 268px 118px; }
.ood .newcomer { transform: translate(-150px, -40px); opacity: 0; }
.thesis.in .ood .newcomer { animation: ood-arrive 6s ease-in-out infinite; }
.thesis.in .ood .ring { animation: ood-ring 6s ease-out infinite; }
.thesis.in .ood .flag { animation: flag-in 6s ease infinite; }
@keyframes ood-arrive {
  0% { opacity: 0; transform: translate(-60px, -70px); }
  12% { opacity: 1; }
  35%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes ood-ring {
  0%, 36% { opacity: 0; transform: scale(.4); }
  44% { opacity: 1; transform: scale(1); }
  88% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}
@keyframes flag-in { 0%, 42% { opacity: 0; } 50%, 88% { opacity: 1; } 100% { opacity: 0; } }
/* B: hallucination */
.hal .frame { fill: var(--bg-elev); stroke: var(--line); stroke-width: 1.2; }
.hal .table { stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.hal .cup { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; }
.hal .ghost { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: 0; }
.hal .cap { font: 500 15px var(--sans); fill: var(--ink); }
.hal .w { opacity: 0; }
.hal .strike { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 60; stroke-dashoffset: 60; }
.thesis.in .hal .w { animation: word-in 7s ease infinite; }
.thesis.in .hal .w2 { animation-delay: .25s; } .thesis.in .hal .w3 { animation-delay: .5s; }
.thesis.in .hal .w4 { animation-delay: .75s; } .thesis.in .hal .w5 { animation-delay: 1s; }
.thesis.in .hal .w6 { animation-delay: 1.25s; } .thesis.in .hal .w7 { animation-delay: 1.5s; }
.thesis.in .hal .w8 { animation-delay: 1.75s; } .thesis.in .hal .w9 { animation-delay: 2s; }
.thesis.in .hal .bad { animation-name: word-bad; }
.thesis.in .hal .strike { animation: strike 7s ease infinite; }
.thesis.in .hal .ghost { animation: ghost 7s ease infinite; }
.thesis.in .hal .flag { animation: flag-hal 7s ease infinite; }
@keyframes word-in { 0% { opacity: 0; } 4%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes word-bad {
  0% { opacity: 0; fill: var(--ink); } 4%, 20% { opacity: 1; fill: var(--ink); }
  28%, 86% { opacity: 1; fill: var(--accent); } 94%, 100% { opacity: 0; }
}
@keyframes strike { 0%, 50% { stroke-dashoffset: 60; opacity: 1; } 60%, 86% { stroke-dashoffset: 0; opacity: 1; } 94%, 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes ghost { 0%, 46% { opacity: 0; } 54%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes flag-hal { 0%, 56% { opacity: 0; } 64%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .thesis .gap-art *, .thesis .gap-art .newcomer { animation: none !important; }
  .thesis .ood .newcomer, .thesis .ood .ring, .gap-art .flag, .hal .w, .hal .ghost { opacity: 1; transform: none; }
  .hal .bad { fill: var(--accent); }
  .hal .strike { stroke-dashoffset: 0; }
  .thesis-line .hl { transition: none; }
}

/* Research interests */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: .2s;
}
.topic:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.topic .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.topic .ico svg { width: 20px; height: 20px; }
.topic h3 { font-size: 17px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; }
.topic p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
@media (max-width: 860px) { .topics { grid-template-columns: 1fr; } }

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-3); padding-top: 2px; }
.news p { margin: 0; color: var(--ink-2); }
.news p b { color: var(--ink); font-weight: 600; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 500;
  padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; margin-right: 6px;
}
.tag.gold { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.tag.warm { background: var(--bg-soft); color: var(--ink-2); }
@media (max-width: 600px) { .news li { grid-template-columns: 1fr; gap: 4px; } }

/* Experience */
.timeline { position: relative; }
.job { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job .when { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.job .when .now { color: #16a34a; }
.job .org { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.logo {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 17px; color: var(--ink-2); letter-spacing: -.02em;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.job h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.job .role { color: var(--ink-3); font-size: 14.5px; }
.job p { margin: 10px 0 0; color: var(--ink-2); max-width: 640px; }
@media (max-width: 700px) { .job { grid-template-columns: 1fr; gap: 10px; } }

/* Publications */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: inherit; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); transition: .15s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .ct { opacity: .55; margin-left: 4px; font-family: var(--mono); font-size: 12px; }
.pubs { display: grid; gap: 14px; }
.pub {
  display: grid; grid-template-columns: 200px 1fr; gap: 26px; padding: 20px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); transition: .2s;
}
.pub:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.pub.hidden { display: none; }
.pub .thumb {
  aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--bg-soft);
  display: grid; place-items: center; border: 1px solid var(--line);
}
.pub .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.pub a.thumb { cursor: zoom-in; background: #fff; }
.pub .thumb.gen { font-family: var(--sans); font-weight: 600; font-size: 26px; color: var(--ink-3); position: relative; }
.pub .thumb.gen::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 25% 25%, var(--accent-soft), transparent 65%);
}
.pub .thumb.gen span { position: relative; }
.pub .venue { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pub h3 { margin: 0 0 6px; font-size: 17.5px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.pub .authors { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.pub .authors .me { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.pub .links { display: flex; gap: 14px; margin-top: 12px; font-size: 13.5px; font-weight: 500; }
.pub .links a { color: var(--accent); }
.pub .links a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .pub { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .pub .thumb.gen { display: none; }
}

/* Education + awards */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 20px; } }
.edu { padding: 18px 0; border-top: 1px solid var(--line); }
.edu:last-child { border-bottom: 1px solid var(--line); }
.edu .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.edu h3 { margin: 0; font-size: 17px; font-weight: 600; }
.edu time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-3); padding-top: 3px; }
.edu p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.award { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.award:last-child { border-bottom: 1px solid var(--line); }
.award .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.award .ico svg { width: 18px; height: 18px; }
.award b { display: block; font-weight: 600; }
.award span { color: var(--ink-2); font-size: 14.5px; }
.sub-h { font-size: 13px; color: var(--ink-3); margin: 0 0 10px; font-weight: 600; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skills span { font-size: 13.5px; padding: 6px 12px; border-radius: 8px; background: var(--bg-soft); color: var(--ink-2); }

/* Life teaser on home */
.teaser {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border-radius: 22px; overflow: hidden;
  background: var(--ink); color: var(--bg); position: relative;
}
.teaser .txt { padding: 48px; position: relative; z-index: 1; }
.teaser h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 50px); line-height: 1.02; margin: 12px 0 14px; letter-spacing: -.02em; }
.teaser h2 em { font-style: normal; color: var(--accent); }
.teaser p { opacity: .72; margin: 0 0 26px; max-width: 420px; }
.teaser .eyebrow { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.teaser .btn { background: var(--bg); color: var(--ink); border-color: transparent; }
.teaser .btn:hover { opacity: .85; }
.teaser .art { position: relative; min-height: 260px; }
.teaser .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 760px) {
  .teaser { grid-template-columns: 1fr; }
  .teaser .txt { padding: 32px 24px; }
  .teaser .art { min-height: 180px; order: -1; }
}

/* Footer */
footer { padding: 48px 0 56px; border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
footer a:hover { color: var(--ink); }
footer .fl { display: flex; gap: 18px; flex-wrap: wrap; }

/* Reveal */
.js .reveal:not(.in) { transform: translateY(12px); }
.reveal { transition: transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal:not(.in) { transform: none; }
  .reveal { transition: none; }
  html { scroll-behavior: auto; }
  .pulse::after { animation: none; }
}

/* ============ Life page ============ */
.life-hero { padding: 80px 0 40px; }
.life-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(44px, 7vw, 80px); line-height: 1.02; letter-spacing: -.035em; margin: 16px 0 22px; }
.life-hero h1 em { font-style: normal; color: var(--accent); }
.life-hero .lede { font-size: 19px; color: var(--ink-2); max-width: 600px; margin: 0; }

.sky {
  position: relative; border-radius: 26px; overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #3b82f6 100%);
  padding: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; min-height: 460px;
}
.sky .flight { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.sky .eyebrow { color: rgba(255,255,255,.65); }
.sky h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 6vw, 64px); line-height: 1; margin: 14px 0 16px; letter-spacing: -.02em; }
.sky p { color: rgba(255,255,255,.8); margin: 0; max-width: 460px; }
.crafts { display: grid; gap: 12px; }
.craft {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 18px 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; gap: 16px; align-items: center;
}
.craft svg { width: 44px; height: 44px; flex-shrink: 0; }
.craft b { display: block; font-size: 16.5px; }
.craft span { font-size: 14px; color: rgba(255,255,255,.72); }
@media (max-width: 820px) {
  .sky { grid-template-columns: 1fr; padding: 32px 22px; min-height: 0; }
}

.bili {
  margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  padding: 22px 26px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line); transition: .2s;
}
.bili:hover { border-color: #00a1d6; box-shadow: 0 8px 28px rgba(0,161,214,.15); transform: translateY(-2px); }
.bili .bl { width: 52px; height: 52px; border-radius: 14px; background: #00a1d6; display: grid; place-items: center; color: #fff; }
.bili .bl svg { width: 30px; height: 30px; }
.bili b { display: block; font-size: 17px; }
.bili span { color: var(--ink-2); font-size: 14.5px; }
.bili .go { font-size: 13.5px; font-weight: 500; color: #00a1d6; white-space: nowrap; }
@media (max-width: 600px) { .bili { grid-template-columns: auto 1fr; padding: 18px; } .bili .go { grid-column: 1 / -1; } }

.sports { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sport {
  --c: var(--accent);
  position: relative; border-radius: 18px; padding: 26px; min-height: 210px; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between;
  transition: .25s;
}
.sport:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.sport .glyph {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
}
.sport .glyph svg { width: 28px; height: 28px; }
.sport h3 { margin: 22px 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.sport h3 small { font-family: var(--sans); font-size: 14px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.sport p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.sport .big { display: none;
  position: absolute; right: -18px; top: -24px; font-family: var(--serif); font-size: 150px; line-height: 1;
  color: var(--c); opacity: .06; pointer-events: none; font-weight: 700;
}
.sport .new { position: absolute; top: 22px; right: 22px; }
@media (max-width: 900px) { .sports { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sports { grid-template-columns: 1fr; } .sport { min-height: 0; } }

.quote {
  font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3.6vw, 36px); line-height: 1.3; letter-spacing: -.02em;
  max-width: 820px; margin: 0 auto; text-align: center; color: var(--ink);
}
.quote em { font-style: normal; color: var(--accent); }
.quote-by { text-align: center; color: var(--ink-3); font-size: 14px; margin-top: 18px; }
