/* =========================================================
   Vinson Fung — Interactive Résumé
   ========================================================= */

@property --acc1 { syntax: '<color>'; inherits: true; initial-value: #123a63; }
@property --acc2 { syntax: '<color>'; inherits: true; initial-value: #7c93ab; }
@property --r { syntax: '<length>'; inherits: false; initial-value: 0px; }

/* palette: 霜月白 frost-moon white · 深海蓝 deep-sea blue · 雾蓝灰 mist blue-grey */
:root {
  --bg: #f2f5f8;
  --ink: #0d2137;
  --ink-2: #33475c;
  --muted: #586a7e;
  --faint: #a3b1bf;
  --line: rgba(13, 42, 72, .1);
  --line-2: rgba(13, 42, 72, .18);
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .88);
  --glass-border: rgba(13, 42, 72, .09);
  --glass-hi: rgba(255, 255, 255, .9);
  --shadow: 0 22px 50px -28px rgba(13, 42, 72, .3), 0 2px 6px -2px rgba(13, 42, 72, .07);
  --shadow-sm: 0 12px 30px -18px rgba(13, 42, 72, .3), 0 1px 3px -1px rgba(13, 42, 72, .06);
  --acc1: #123a63;
  --acc2: #7c93ab;
  --on-acc: #f2f5f8;
  --g-data: #2e3a6e; --g-space: #4f6aa0; --g-ai: #6f86b8; --g-write: #8a8fb8; --g-lang: #4b4f8c;
  /* one shape system: primary cards · secondary cards · inner elements */
  --radius: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  /* icon tiles share one tint, whatever section they sit in */
  --tile-bg: color-mix(in oklab, var(--acc1) 9%, transparent);
  --tile-line: color-mix(in oklab, var(--acc1) 16%, transparent);
  --f-display: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --f-zh-display: 'Noto Serif SC', 'Instrument Serif', 'Songti SC', serif;
  --f-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --pad: clamp(20px, 5vw, 76px);
  color-scheme: light;
  transition: --acc1 1.4s var(--ease), --acc2 1.4s var(--ease);
}
[data-theme="dark"] {
  --bg: #071321;
  --ink: #e8eef3;
  --ink-2: #b7c4d1;
  --muted: #8195a9;
  --faint: #52667b;
  --line: rgba(200, 220, 240, .1);
  --line-2: rgba(200, 220, 240, .18);
  --glass: rgba(19, 22, 27, .56);
  --glass-strong: rgba(21, 24, 30, .9);
  --glass-border: rgba(200, 220, 240, .1);
  --glass-hi: rgba(255, 255, 255, .06);
  --shadow: 0 30px 70px -32px rgba(0, 0, 0, .8), 0 2px 10px -3px rgba(0, 0, 0, .45);
  --shadow-sm: 0 14px 34px -20px rgba(0, 0, 0, .75), 0 1px 4px -2px rgba(0, 0, 0, .4);
  --acc1: #b5cadd;
  --acc2: #6f91b2;
  --on-acc: #071321;
  --g-data: #d4d8f0; --g-space: #a9b6e0; --g-ai: #8aa0d0; --g-write: #9a9cc9; --g-lang: #bfc3e6;
  --tile-bg: color-mix(in oklab, var(--acc1) 11%, transparent);
  --tile-line: color-mix(in oklab, var(--acc1) 18%, transparent);
  color-scheme: dark;
}

/* Traditional Chinese (Hong Kong): HK glyph forms for display type, HK system fonts for body */
html[lang="zh-HK"] {
  --f-display: 'Instrument Serif', 'Noto Serif SC', serif;
  --f-zh-display: 'Noto Serif SC', 'Instrument Serif', serif;
  --f-body: 'Inter', 'PingFang HK', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans HK', system-ui, sans-serif;
}

/* per-section accents — every chapter has its own hue, but each pair is tonal (a deep and a
   light shade of the same family) and all sit at the same muted chroma, so they glide into
   one another as the active section changes. Neutrals (paper, ink, glass) never change. */
[data-sec="about"] { --acc1: #3f3a34; --acc2: #a38f76; }      /* graphite · sand */
[data-sec="edu"] { --acc1: #1f4d3f; --acc2: #6f9a88; }        /* pine · sage */
[data-sec="intern"] { --acc1: #7a4529; --acc2: #bb8a66; }     /* copper · tan */
[data-sec="research"] { --acc1: #134e4a; --acc2: #5f968e; }   /* deep teal · celadon */
[data-sec="honors"] { --acc1: #1b2a41; --acc2: #a8874a; }     /* navy · champagne */
[data-sec="skills"] { --acc1: #2e3a6e; --acc2: #7b86b8; }     /* indigo · lavender grey */
[data-sec="photo"] { --acc1: #4a3540; --acc2: #a07a82; }      /* plum · dusty rose */
[data-theme="dark"][data-sec="about"] { --acc1: #e2d6c6; --acc2: #ad9679; }
[data-theme="dark"][data-sec="edu"] { --acc1: #a9d1bf; --acc2: #6f9f8a; }
[data-theme="dark"][data-sec="intern"] { --acc1: #ecc6a8; --acc2: #c48b63; }
[data-theme="dark"][data-sec="research"] { --acc1: #9ad3ca; --acc2: #5f9d94; }
[data-theme="dark"][data-sec="honors"] { --acc1: #e8d6ae; --acc2: #b0975f; }
[data-theme="dark"][data-sec="skills"] { --acc1: #b9c0e6; --acc2: #7c86bf; }
[data-theme="dark"][data-sec="photo"] { --acc1: #e6c9d0; --acc2: #a8818b; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.loading { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd, figure, h1, h2, h3, h4, h5, p { margin: 0; padding: 0; }
ul { list-style: none; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
::selection { background: var(--acc1); color: var(--on-acc); }
:focus-visible { outline: 2px solid var(--acc1); outline-offset: 3px; border-radius: 8px; }

@media (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}

/* ---------- canvas & atmosphere ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; opacity: 0; transition: opacity 1s var(--ease); }
.gl-on #gl { opacity: 1; }
.no-gl #gl { display: none; }
.bg-fallback {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60vw 50vh at 20% 10%, rgba(124, 147, 171, .28), transparent 60%),
    radial-gradient(70vw 50vh at 80% 100%, rgba(18, 58, 99, .12), transparent 60%),
    var(--bg);
}
[data-theme="dark"] .bg-fallback {
  background:
    radial-gradient(60vw 50vh at 20% 10%, rgba(36, 73, 108, .45), transparent 60%),
    radial-gradient(70vw 50vh at 80% 100%, rgba(20, 48, 75, .5), transparent 60%),
    var(--bg);
}
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
main { position: relative; z-index: 2; transition: opacity .42s var(--ease), transform .75s var(--ease); }
/* menu jumps: content leaves in the travel direction, then arrives from the other side */
body.warp-out main { opacity: 0; transform: translate3d(0, calc(var(--wdir, 1) * -44px), 0); }
body.warp-in main { opacity: 0; transform: translate3d(0, calc(var(--wdir, 1) * 44px), 0); transition: none; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
}

/* ---------- reveal system ---------- */
.rv {
  opacity: 0;
  transform: translate3d(0, 38px, 0);
  filter: blur(8px);
  transition: opacity 1s var(--ease), transform 1.25s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 85ms + 60ms);
}
.glass.rv, .rv.glass { filter: none; }

/* ---------- icon system ----------
   every glyph is a 24-unit line icon (1.6 stroke, round caps); brand marks are monochrome.
   Two tile families: tinted 30px tiles for rows and card headings, filled tiles for card heads. */
.tile, .info .ic, .pj-ic, .medal {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  color: var(--acc1); background: var(--tile-bg); border: 1px solid var(--tile-line);
}
.tile svg, .info .ic svg, .pj-ic svg, .medal svg { width: 16px; height: 16px; }
.crest, .icard-icon, .cb-ic {
  width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center;
  color: var(--on-acc); background: linear-gradient(135deg, var(--acc1), var(--acc2));
  box-shadow: 0 12px 26px -14px var(--acc1), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.crest svg, .icard-icon svg { width: 24px; height: 24px; }
.cb-ic { width: 44px; height: 44px; border-radius: 13px; }
.cb-ic svg { width: 20px; height: 20px; }
.sec.in .rv { opacity: 1; transform: none; filter: none; }
.ln { display: block; overflow: hidden; padding: .04em 0 .12em; margin: -.04em 0 -.12em; }
.rv-up {
  display: inline-block;
  transform: translate3d(0, 108%, 0) rotate(2.5deg);
  transform-origin: 0 100%;
  transition: transform 1.35s var(--ease) calc(var(--d, 0) * 85ms + 60ms);
}
.sec.in .rv-up { transform: none; }

/* language swap: content dissolves, swaps, condenses back */
.sec-inner { transition: filter .42s var(--ease); }
body.lang-out .sec-inner,
body.lang-out .hud-label,
body.lang-out #dots span,
body.lang-out .brand-name,
body.lang-out #menuLabel { filter: blur(12px) opacity(0); }
.hud-label, #dots span, .brand-name, #menuLabel { transition: filter .42s var(--ease); }

html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .8s var(--ease), color .8s var(--ease), border-color .8s var(--ease), fill .8s, stroke .8s !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 26px var(--pad);
  background: radial-gradient(80vw 70vh at 50% 50%, color-mix(in oklab, var(--acc1) 10%, var(--bg)), var(--bg));
  transition: background-color 1s var(--ease), opacity 1.1s var(--ease);
}
.loader.is-done { opacity: 0; transition-delay: .1s; }
.loader.is-gone { pointer-events: none; }
.no-gl .loader.is-done { opacity: 0; }
.ld-top, .ld-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .24em; color: var(--muted); text-transform: uppercase;
  transition: opacity .5s, transform .6s var(--ease);
}
.ld-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.ld-ring { position: relative; width: 132px; height: 132px; margin: 0 auto; }
.ld-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; transition: opacity .6s var(--ease) .1s; }
.ld-track { fill: none; stroke: var(--line-2); stroke-width: 1; }
.ld-arc { fill: none; stroke: var(--acc1); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px var(--acc1)); }
.ld-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 26px; font-weight: 500; letter-spacing: .04em; }
.ld-pct i { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ld-label { margin-top: 28px; font-family: var(--f-display); font-size: 24px; letter-spacing: .06em; }
.ld-sub { margin-top: 4px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .34em; color: var(--muted); }
.loader.is-done .ld-pct, .loader.is-done .ld-label, .loader.is-done .ld-sub, .loader.is-done .ld-top, .loader.is-done .ld-bottom { opacity: 0; transform: translateY(-10px); transition: opacity .45s, transform .6s var(--ease); }
.ld-label, .ld-sub, .ld-pct { transition: opacity .45s, transform .6s var(--ease); }
.no-gl .loader.is-done .ld-ring { transform: scale(2.6); opacity: 0; transition: transform 1.1s var(--ease), opacity 1s; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  transform: translateY(-130%);
  transition: transform 1.2s var(--ease) .2s;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar::before {
  content: ''; position: absolute; inset: 0 0 -26px 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: linear-gradient(color-mix(in oklab, var(--bg) 55%, transparent), transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
  opacity: 0; transition: opacity .6s var(--ease);
}
.scrolled .topbar::before { opacity: 1; }
.ready .topbar { transform: none; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; position: relative; display: grid; place-items: center; }
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.mark b { position: relative; font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 17px; letter-spacing: -.02em; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: 15px; letter-spacing: .04em; }
.brand-name em { font-style: normal; font-family: var(--f-mono); font-weight: 400; font-size: 10.5px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-btn, .lang-toggle, .theme-toggle, .menu-btn {
  height: 42px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(120%); backdrop-filter: blur(18px) saturate(120%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-hi);
  transition: transform .4s var(--ease), background-color .4s;
}
.lang-toggle:hover, .theme-toggle:hover, .menu-btn:hover { transform: translateY(-2px); }
.lang-toggle { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); width: 128px; padding: 4px; font-size: 13px; font-weight: 600; }
.lt-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: linear-gradient(120deg, var(--acc1), var(--acc2)); transition: transform .6s var(--ease); box-shadow: 0 6px 16px -6px var(--acc1); }
.lang-toggle[data-lang="zh"] .lt-ind { transform: translateX(100%); }
.lang-toggle[data-lang="hk"] .lt-ind { transform: translateX(200%); }
.lt-o { position: relative; display: grid; place-items: center; transition: color .5s; letter-spacing: .04em; }
.lt-o[data-l="hk"] { font-family: 'Noto Serif SC', var(--f-body); }
.lt-o[data-l="zh"] { font-family: 'Noto Serif SC', var(--f-body); }
.lang-toggle[data-lang="en"] .lt-o[data-l="en"], .lang-toggle[data-lang="zh"] .lt-o[data-l="zh"], .lang-toggle[data-lang="hk"] .lt-o[data-l="hk"] { color: var(--on-acc); }
.theme-toggle { width: 42px; display: grid; place-items: center; }
.tt { width: 22px; height: 22px; overflow: visible; }
.tt-core { r: 5px; transition: r .7s var(--ease); }
.tt-mask { cx: 30px; cy: 0px; transition: cx .7s var(--ease), cy .7s var(--ease); }
.tt-rays { transform-origin: 12px 12px; transition: transform .7s var(--ease), opacity .4s; }
[data-theme="dark"] .tt-core { r: 8.5px; }
[data-theme="dark"] .tt-mask { cx: 17px; cy: 6.5px; }
[data-theme="dark"] .tt-rays { transform: rotate(60deg) scale(.4); opacity: 0; }
.menu-btn { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.mb-ic { width: 16px; height: 10px; position: relative; }
.mb-ic i { position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.mb-ic i:first-child { top: 1px; }
.mb-ic i:last-child { top: 7px; right: 4px; }
.menu-btn.on .mb-ic i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn.on .mb-ic i:last-child { top: 4px; right: 0; transform: rotate(-45deg); }

/* ---------- side dots & HUD ---------- */
.dots {
  position: fixed; right: 26px; top: 50%; z-index: 25;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
  transform: translate(160%, -50%);
  transition: transform 1.2s var(--ease) .4s;
}
.ready .dots { transform: translate(0, -50%); }
.dot { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 14px; }
.dot i { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: height .5s var(--ease), background-color .4s, width .5s var(--ease); }
.dot.on i { height: 26px; width: 6px; background: linear-gradient(var(--acc1), var(--acc2)); }
.dot.on { height: 30px; }
.dot span {
  position: absolute; right: 22px; white-space: nowrap; font-size: 12px; letter-spacing: .06em; color: var(--ink-2);
  padding: 4px 10px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border);
  opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .4s var(--ease), filter .42s;
  pointer-events: none;
}
.dot:hover span, .dot:focus-visible span { opacity: 1; transform: none; }
/* reading progress: a hairline across the very top, never over the content */
.hud { position: fixed; left: 0; right: 0; top: 0; z-index: 31; height: 2px; pointer-events: none; opacity: 0; transition: opacity 1s .5s; }
.ready .hud { opacity: 1; }
.hud-num, .hud-label { display: none; }
.hud-line { display: block; width: 100%; height: 100%; overflow: hidden; }
.hud-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc1), var(--acc2)); transform-origin: left; transform: scaleX(0); }

/* ---------- custom cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor.on { opacity: 1; }
.c-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.c-ring {
  position: absolute; left: 0; top: 0; will-change: transform;
}
.c-ring::before {
  content: ''; position: absolute; width: 36px; height: 36px; left: -18px; top: -18px; border-radius: 50%;
  border: 1px solid var(--ink); opacity: .45;
  transition: width .45s var(--ease), height .45s var(--ease), left .45s var(--ease), top .45s var(--ease), background-color .4s, opacity .4s, border-color .4s;
}
.c-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--on-acc); opacity: 0; white-space: nowrap; transition: opacity .3s, transform .45s var(--ease); text-transform: uppercase; }
.cursor[data-mode="link"] .c-ring::before { width: 54px; height: 54px; left: -27px; top: -27px; background: color-mix(in oklab, var(--acc1) 16%, transparent); border-color: var(--acc1); opacity: 1; }
.cursor[data-mode="link"] .c-dot { transform: scale(.5); }
.cursor[data-mode="drag"] .c-ring::before, .cursor[data-mode="view"] .c-ring::before { width: 78px; height: 78px; left: -39px; top: -39px; background: linear-gradient(135deg, var(--acc1), var(--acc2)); border-color: transparent; opacity: .92; }
.cursor[data-mode="drag"] .c-label, .cursor[data-mode="view"] .c-label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor[data-mode="drag"] .c-dot, .cursor[data-mode="view"] .c-dot { transform: scale(0); }
.cursor.down .c-ring::before { transform: scale(.85); }

/* ---------- menu overlay ---------- */
/* sits under the top bar so the close button and toggles stay reachable */
.menu { position: fixed; inset: 0; z-index: 28; visibility: hidden; transition: visibility 0s linear .75s; }
.menu.on { visibility: visible; transition-delay: 0s; }
.menu-bg {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  clip-path: circle(0px at var(--ox, 90%) var(--oy, 40px));
  transition: clip-path .75s var(--ease-io);
  will-change: clip-path;
}
.menu.on .menu-bg { clip-path: circle(160vmax at var(--ox, 90%) var(--oy, 40px)); }
.menu-panel { position: absolute; inset: 110px var(--pad) 40px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.menu-panel > * { pointer-events: auto; }
.menu-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 40px; max-width: 1200px; }
.menu-list a {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 14px; padding: 16px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(40px);
  transition: opacity .5s, transform .8s var(--ease), color .3s;
}
.menu.on .menu-list a { opacity: 1; transform: none; transition-delay: calc(var(--i) * 45ms + 250ms); }
.menu-list a span { color: var(--muted); font-size: 12px; }
.menu-list a b { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.1; transition: transform .5s var(--ease); }
html:lang(zh) .menu-list a b { font-family: var(--f-zh-display); font-weight: 600; font-size: clamp(24px, 2.8vw, 38px); }
.menu-list a em { grid-column: 2; font-style: normal; font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.menu-list a:hover b, .menu-list a.cur b { transform: translateX(10px); color: var(--acc1); }
.menu-foot { display: flex; flex-wrap: wrap; gap: 14px 30px; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity .6s .6s; }
.menu.on .menu-foot { opacity: 1; }
.menu-foot a, .menu-foot span { display: inline-flex; align-items: center; gap: 8px; }
.menu-foot svg { width: 16px; height: 16px; }

/* ---------- sections ---------- */
.sec { position: relative; padding: clamp(84px, 11vh, 120px) var(--pad) clamp(48px, 7vh, 84px); overflow-x: clip; }
main { overflow-x: clip; }
.sec-inner { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; }
.sec-word {
  position: absolute; top: clamp(50px, 8vh, 100px); left: 50%; margin-left: -50vw; width: 100vw; text-align: center;
  white-space: nowrap; pointer-events: none; z-index: 1;
  font-family: var(--f-display); font-style: italic; font-size: clamp(84px, 14vw, 230px); line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2); opacity: .2;
  user-select: none;
}
#hero .sec-word { display: none; }
.sec-head { margin-bottom: clamp(20px, 3.4vh, 34px); }
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.kicker.center { justify-content: center; }
.kicker .num { color: var(--acc1); font-weight: 500; }
.kicker .bar { display: block; width: 52px; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(0); transition: transform 1.3s var(--ease) .35s; }
.sec.in .kicker .bar { transform: scaleX(1); }
.sec-title { margin-top: 10px; font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 4.6vw, 70px); line-height: 1.04; letter-spacing: -.01em; }
html:lang(zh) .sec-title { font-family: var(--f-zh-display); font-weight: 600; letter-spacing: .03em; font-size: clamp(32px, 3.4vw, 52px); }
.lead { margin-top: 10px; max-width: 720px; color: var(--ink-2); font-size: clamp(15px, 1.05vw, 16.5px); line-height: 1.75; }
.hint { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.hint svg { width: 14px; height: 14px; flex: none; }
.anchor-box { position: relative; width: 100%; }
.ab-cap { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 10.5px; letter-spacing: .3em; color: var(--muted); white-space: nowrap; }

/* ---------- 00 hero ---------- */
#hero { height: 100vh; min-height: 640px; padding-top: 0; padding-bottom: 0; display: flex; align-items: center; justify-content: center; }
#hero .sec-inner { width: 100%; }
.hero { text-align: center; max-width: 1100px; margin: 0 auto; }
.h-rv { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(10px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms + 150ms); }
.ready .h-rv { opacity: 1; transform: none; filter: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 0 0 var(--acc1); animation: pulse 2.2s infinite; }
.hero-title { margin-top: 26px; display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.hello { font-family: var(--f-display); font-style: italic; font-size: clamp(24px, 3vw, 44px); color: var(--ink-2); line-height: 1.2; }
.name { display: block; font-family: var(--f-display); font-size: clamp(68px, 12.5vw, 196px); line-height: .98; letter-spacing: -.02em; padding: 0 .04em .06em; }
.name.zh, .name.hk { font-family: var(--f-zh-display); font-weight: 600; letter-spacing: .08em; font-size: clamp(64px, 11vw, 172px); padding-left: .08em; }
.word { display: inline-block; white-space: nowrap; }
.sp { display: inline-block; width: .26em; }
.ch {
  display: inline-block;
  color: color-mix(in oklab, var(--acc1) calc(100% - var(--t, 0) * 100%), var(--acc2));
  transform: translate3d(0, .5em, 0) rotate(6deg) scale(.9);
  opacity: 0; filter: blur(14px);
  transition: transform 1.5s var(--ease), opacity 1.2s var(--ease), filter 1.2s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 300ms);
}
[data-theme="dark"] .ch { text-shadow: 0 0 36px rgba(140, 175, 205, .18); }
.ready .ch { transform: none; opacity: 1; filter: none; }
.hero-alt { margin-top: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.roles { margin-top: 26px; display: flex; justify-content: center; align-items: baseline; gap: .4em; font-family: var(--f-display); font-style: italic; font-size: clamp(22px, 2.5vw, 36px); line-height: 1.4; color: var(--ink-2); }
html:lang(zh) .roles { font-family: var(--f-zh-display); font-style: normal; font-weight: 500; font-size: clamp(19px, 2vw, 28px); }
.role-win { position: relative; display: inline-grid; justify-items: start; height: 1.45em; overflow: hidden; transition: width .7s var(--ease); vertical-align: bottom; }
.hrole { grid-area: 1 / 1; white-space: nowrap; transform: translateY(110%); opacity: 0; transition: transform .8s var(--ease), opacity .6s; color: var(--acc1); padding-right: .1em; }
.hrole.on { transform: none; opacity: 1; }
.hrole.was { transform: translateY(-110%); opacity: 0; }
.hero-sub { margin: 22px auto 0; max-width: 600px; color: var(--ink-2); font-size: clamp(15px, 1.15vw, 17.5px); line-height: 1.85; text-wrap: balance; }
.sec-lead, .about-intro p, .rcard .r-ofm dd { text-wrap: pretty; }
/* a soft halo in the page colour keeps hero copy crisp where the particle ring passes behind it */
.hero-sub, .hero-alt, .roles, .hello { text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg), 0 0 24px var(--bg); }
.hero-meta { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-meta li { padding: 6px 14px; border-radius: 999px; font-size: 12.5px; letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--line-2); background: color-mix(in oklab, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-cue { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
.scroll-cue { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .2em; color: var(--muted); }
@media (max-height: 820px) {
  .name { font-size: clamp(60px, min(12.5vw, 17vh), 196px); }
  .name.zh, .name.hk { font-size: clamp(56px, min(11vw, 15vh), 172px); }
  .hero-title { margin-top: 18px; }
  .roles { margin-top: 16px; }
  .hero-sub { margin-top: 14px; }
  .hero-meta { margin-top: 16px; }
  .hero-cue { bottom: 16px; }
  .scroll-cue > span:last-child { display: none; }
}
.mouse { width: 22px; height: 34px; border-radius: 12px; border: 1.4px solid currentColor; position: relative; }
.mouse i { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; border-radius: 2px; background: currentColor; animation: wheel 2s var(--ease) infinite; }

/* ---------- 01 about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(280px, .85fr) 1.15fr; gap: clamp(36px, 6vw, 100px); align-items: start; }
.portrait-col { display: flex; flex-direction: column; align-items: center; gap: 16px; position: sticky; top: max(12vh, 90px); align-self: start; }
.portrait-frame { position: relative; aspect-ratio: 1024 / 1336; width: min(100%, calc(min(62vh, 560px) * 0.7665)); border-radius: var(--radius); }
.portrait-frame::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--line-2); background: radial-gradient(70% 60% at 50% 40%, color-mix(in oklab, var(--acc1) 8%, transparent), transparent 70%); }
.portrait-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  opacity: 0;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 40%), #000 55%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 40%), #000 55%, transparent 100%);
  transition: opacity .6s var(--ease), --r .9s var(--ease);
  user-select: none;
}
.portrait-frame.hover .portrait-img { opacity: 1; --r: 170px; }
.portrait-frame.full .portrait-img { opacity: 1; --r: 1200px; }
.no-gl .portrait-img { opacity: 1; -webkit-mask-image: none; mask-image: none; }
.pf-c { position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--acc1); pointer-events: none; transition: transform .6s var(--ease); }
.pf-c.tl { top: -8px; left: -8px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.pf-c.tr { top: -8px; right: -8px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.pf-c.bl { bottom: -8px; left: -8px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.pf-c.br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.portrait-frame.hover .pf-c.tl { transform: translate(-6px, -6px); }
.portrait-frame.hover .pf-c.tr { transform: translate(6px, -6px); }
.portrait-frame.hover .pf-c.bl { transform: translate(-6px, 6px); }
.portrait-frame.hover .pf-c.br { transform: translate(6px, 6px); }
.pf-tag { position: absolute; left: 18px; bottom: 16px; font-size: 10px; letter-spacing: .28em; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.pf-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.pf-hint svg { width: 14px; height: 14px; }
.about-body .sec-head { margin-bottom: 26px; }
.about-intro { color: var(--ink-2); font-size: clamp(15px, 1.05vw, 16.5px); line-height: 1.85; max-width: 680px; }
html[lang="en"] .about-intro { line-height: 1.8; }
/* a single spec-sheet panel: each row is icon · label · value (right-aligned) · copy */
.info-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr; padding: 4px 20px; border-radius: var(--radius); max-width: 680px; }
.info { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr) 16px; column-gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); transition: color .3s; }
.info:last-child { border-bottom: 0; }
.info .ic { grid-column: 1; }
.info .k { grid-column: 2; font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.info .v { grid-column: 3; text-align: right; font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.info .cp { grid-column: 4; display: grid; place-items: center; color: var(--muted); opacity: .6; transition: opacity .3s, transform .4s var(--ease); }
.info .cp svg { width: 16px; height: 16px; }
.about-intro p + p { margin-top: 12px; }
.info.copyable, .info.linkable { cursor: pointer; }
.info .v { transition: color .3s; }
.info.copyable:hover .v, .info.linkable:hover .v { color: var(--acc1); }
.info.copyable:hover .cp, .info.linkable:hover .cp { opacity: 1; color: var(--acc1); transform: scale(1.12); }
.info.linkable:hover .cp { transform: translate(2px, -2px); }
.stat b small { font-size: .55em; margin-left: 2px; }
.stats { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.stat b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 2.8vw, 44px); line-height: 1; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat > span { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); letter-spacing: .02em; }
.stat b { white-space: nowrap; }

/* ---------- 02 education ---------- */
.edu-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.edu-aside { position: sticky; top: 16vh; }
.tree-box { height: min(56vh, 500px); }
.school { padding: clamp(20px, 2vw, 28px); }
.school-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.school-name h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; }
html:lang(zh) .school-name h3 { font-family: var(--f-zh-display); font-weight: 600; letter-spacing: .04em; }
.school-name p { font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill svg { width: 14px; height: 14px; }
.school-major { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; font-size: clamp(16px, 1.25vw, 18px); font-weight: 600; }
.school-major span { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.school-stats { margin-top: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px clamp(20px, 3vw, 40px); align-items: center; }
.school .tl { margin-top: 34px; }
.gauges { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 32px); }
@media (max-width: 620px) { .school-stats { grid-template-columns: 1fr; } }
.gauge { position: relative; width: 116px; text-align: center; }
.gauge svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.g-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.g-fg { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; }
.sec.in .g-fg { animation: gauge 2s var(--ease) .5s both; }
@keyframes gauge { from { stroke-dashoffset: 326.73; } to { stroke-dashoffset: calc(326.73 * (1 - var(--p))); } }
.g-val { position: absolute; left: 0; right: 0; top: 37px; display: flex; flex-direction: column; align-items: center; }
.g-val b { font-family: var(--f-display); font-weight: 400; font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.g-val span { font-size: 11px; color: var(--muted); margin-top: 4px; font-family: var(--f-mono); }
.g-label { margin-top: 6px; font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.tl { margin-top: 20px; }
.tl-bar { position: relative; height: 6px; border-radius: 999px; background: var(--line); }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--acc1), var(--acc2)); transform-origin: left; transform: scaleX(0); }
.sec.in .tl-fill { animation: grow 2.2s var(--ease) .7s both; }
.tl-now { position: absolute; top: 50%; left: calc(var(--p) * 100%); }
.tl-now b { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--bg); border: 3px solid var(--acc2); box-shadow: 0 0 0 6px color-mix(in oklab, var(--acc2) 22%, transparent); animation: pulse2 2.4s infinite; }
.tl-now em { position: absolute; bottom: 14px; left: 0; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--acc2); white-space: nowrap; letter-spacing: .08em; }
.tl-labels { margin-top: 12px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
/* selected coursework */
/* core coursework — four rows inside the university card */
.courses { min-width: 0; padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.courses h4 { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--acc1); margin-bottom: 2px; }
.courses li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; row-gap: 5px; padding: 8px 0 4px; }
.courses li:last-child { border-bottom: 0; padding-bottom: 0; }
.cn { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); transition: color .3s; }
.courses li b { font-size: 13px; font-weight: 500; color: var(--ink); }
.cbar { grid-column: 1 / -1; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cbar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--acc2), var(--acc1)); transform-origin: left; transform: scaleX(0); }
.sec.in .cbar i { animation: grow 1.6s var(--ease) .7s both; }
.courses li:hover .cn { color: var(--acc1); }
@media (max-width: 620px) { .courses { padding-left: 0; border-left: 0; padding-top: 12px; border-top: 1px solid var(--line); } }

.sub-title { margin: 28px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-family: var(--f-display); font-weight: 400; font-size: clamp(21px, 1.8vw, 27px); }
html:lang(zh) .sub-title { font-family: var(--f-zh-display); font-weight: 600; }
.sub-title span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .12em; color: var(--muted); font-family: var(--f-mono); font-weight: 400; }
.sub-title svg { width: 13px; height: 13px; }
.campus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.flip { perspective: 1200px; min-height: 148px; outline-offset: 6px; }
.flip-in { position: relative; display: grid; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease); }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip:hover:not(.on) .flip-in { transform: rotateY(-8deg) translateZ(10px); }
.face { grid-area: 1 / 1; position: relative; padding: 14px 16px; border-radius: var(--r-md); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi); display: flex; flex-direction: column; }
.face.back { transform: rotateY(180deg); }
.face .period { font-size: 11px; color: var(--muted); }
.face h4 { margin-top: 6px; padding-right: 26px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.face .role { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.face .big { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.face .big b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.face .big span { font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.face ul { margin-top: 8px; display: grid; gap: 6px; }
.face li { position: relative; padding-left: 13px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.face li::before { content: ''; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(var(--acc1), var(--acc2)); }
.flip-ic { position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); transition: transform .6s var(--ease), color .3s; }
.flip-ic svg { width: 12px; height: 12px; }
.flip:hover .flip-ic { color: var(--acc1); transform: rotate(180deg); }

/* ---------- 03 internships ---------- */
.deck { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: clamp(24px, 3.4vw, 48px); align-items: start; }
.deck-nav { position: sticky; top: 18vh; display: grid; grid-auto-rows: minmax(88px, auto); padding-left: 22px; }
.deck-line { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: var(--line); }
.deck-line b { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% / 3); border-radius: 2px; background: linear-gradient(var(--acc1), var(--acc2)); transform: translateY(calc(var(--i) * 100%)); transition: transform .8s var(--ease); box-shadow: 0 0 14px var(--acc1); }
.deck-tab { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 16px 18px; border-radius: var(--r-md); text-align: left; transition: background-color .4s, transform .5s var(--ease), color .3s; }
.deck-tab span { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.deck-tab b { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.15; transition: color .3s; }
html:lang(zh) .deck-tab b { font-family: var(--f-zh-display); font-weight: 600; font-size: 22px; }
.deck-tab em { font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.deck-tab:hover { transform: translateX(4px); }
.deck-tab.on { background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.deck-tab.on b { color: var(--acc1); }
.ruler { margin-bottom: 12px; }
.ruler-track { position: relative; height: 34px; border-radius: 12px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 12)); border: 1px solid var(--line); }
.ruler-bar { position: absolute; top: 5px; bottom: 5px; border-radius: 8px; background: color-mix(in oklab, var(--acc1) 22%, transparent); border: 1px solid color-mix(in oklab, var(--acc1) 40%, transparent); transition: background-color .4s, transform .4s var(--ease); overflow: visible; }
.ruler-bar span { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--muted); opacity: 0; transition: opacity .3s; }
.ruler-bar:hover span, .ruler-bar.on span { opacity: 1; }
.ruler-bar.on { background: linear-gradient(90deg, var(--acc1), var(--acc2)); border-color: transparent; box-shadow: 0 6px 18px -6px var(--acc1); }
.ruler-bar.on span { color: var(--acc1); }
.ruler-years { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.deck-cards, .rpanels { position: relative; display: grid; transition: height .7s var(--ease); }
.deck-cards > *, .rpanels > * { grid-area: 1 / 1; }
.p-enter, .p-leave { pointer-events: none; }
.deck-cards > *, .rpanels > * { transition: opacity .6s var(--ease), transform .75s var(--ease), filter .6s var(--ease); }
.axis-y > .p-enter { opacity: 0; transform: translate3d(0, calc(var(--dir) * 60px), 0) scale(.98); filter: blur(8px); transition: none; }
.axis-y > .p-leave { opacity: 0; transform: translate3d(0, calc(var(--dir) * -50px), 0) scale(.98); filter: blur(8px); }
.axis-x > .p-enter { opacity: 0; transform: translate3d(calc(var(--dir) * 80px), 0, 0); filter: blur(8px); transition: none; }
.axis-x > .p-leave { opacity: 0; transform: translate3d(calc(var(--dir) * -60px), 0, 0); filter: blur(8px); }
.icard { padding: clamp(20px, 2vw, 28px); align-self: start; }
.icard-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.icard-title h3 { font-size: clamp(18px, 1.6vw, 23px); font-weight: 600; line-height: 1.35; }
.icard-title p { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.icard-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--ink-2); }
.icard-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.icard-meta svg { width: 13px; height: 13px; color: var(--muted); }
.tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--acc1); background: color-mix(in oklab, var(--acc1) 10%, transparent); border: 1px solid color-mix(in oklab, var(--acc1) 24%, transparent); }
.metrics { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric { padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in oklab, var(--bg) 40%, transparent); border: 1px solid var(--line); }
.metric b { display: flex; align-items: baseline; gap: 4px; font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 2.3vw, 36px); line-height: 1; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.metric b small { font-size: .5em; }
.metric > span { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.ibullets { margin-top: 16px; display: grid; gap: 12px; }
.ib { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ib-k { font-size: 12px; color: var(--acc1); padding-top: 2px; }
.ib h4 { font-size: 15.5px; font-weight: 600; }
.ib p { margin-top: 4px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }

/* ---------- 04 research ---------- */
.tabs { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); margin-bottom: 14px; }
.tab-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: linear-gradient(120deg, var(--acc1), var(--acc2)); transform: translateX(calc(var(--i) * 100%)); transition: transform .7s var(--ease); box-shadow: 0 8px 20px -8px var(--acc1); }
.tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: color .5s; white-space: nowrap; }
.tab svg { width: 17px; height: 17px; }
.tab.on { color: var(--on-acc); }
.rpanel { display: grid; gap: 14px; align-self: start; }
.r-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; align-items: stretch; }
.r-row2 { grid-template-columns: .9fr 1.1fr; }
/* research: paper / project details on the left, visuals stacked on the right */
.r-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; align-items: start; }
/* research deck: list + 3D loop on the left, one compact card on the right */
.deck-side { position: sticky; top: 16vh; display: grid; gap: 14px; align-self: start; }
.rdeck .deck-nav { position: relative; top: 0; }
.deck-2 .deck-line b { height: 50%; }
.loop-box { height: 210px; }
.rcard .icard-title h3 { font-size: clamp(15.5px, 1.2vw, 18px); line-height: 1.45; }
.rcard .icard-title p { margin-top: 4px; font-size: 13px; }
.rcard .icard-title p b { color: var(--ink); font-weight: 600; }
.rcard .r-links { margin-top: 14px; }
.rcard .award { margin-top: 14px; }
.rcard .r-ofm { margin-top: 12px; gap: 7px; }
.rcard { padding: clamp(18px, 1.8vw, 24px); }
.rcard .r-ofm div { padding-top: 7px; }
.rcard .r-ofm dd { font-size: 13px; line-height: 1.6; }
.rcard .r-note { margin-top: 10px; font-size: 13px; }
.fig { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fig-tabs { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; margin-bottom: 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 50%, transparent); }
.fig-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: linear-gradient(120deg, var(--acc1), var(--acc2)); transition: transform .55s var(--ease); }
.fig[data-show="1"] .fig-ind { transform: translateX(100%); }
.fig-tabs button { position: relative; padding: 5px 16px; font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: color .4s; }
.fig[data-show="0"] [data-fig="0"], .fig[data-show="1"] [data-fig="1"] { color: var(--on-acc); }
.fig-body { display: grid; }
.fig .fig-pane { grid-area: 1 / 1; padding: 0; background: none; border: 0; box-shadow: none; transition: opacity .45s var(--ease), transform .55s var(--ease); }
.fig[data-show="0"] .fig-pane[data-pane="1"], .fig[data-show="1"] .fig-pane[data-pane="0"] { opacity: 0; transform: translateY(8px); visibility: hidden; pointer-events: none; transition: opacity .25s, transform .3s, visibility 0s linear .3s; }
.fig-note { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.case-viz { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.case-viz h5, .fig .caseload h5 { margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.case-viz .facts { gap: 8px; }
.case-viz .fact { padding: 8px 10px; }
.case-viz .fact b { font-size: clamp(18px, 1.4vw, 22px); }
.case-viz .fact > span { font-size: 11.5px; }
.fig .layers-body { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 860px) { .case-viz { grid-template-columns: 1fr; } }
.r-side { display: grid; gap: 14px; min-width: 0; }
.facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.facts-4 .fact { padding: 9px 10px; }
.facts-4 .fact b { font-size: clamp(17px, 1.35vw, 21px); }
.facts-4 .fact > span { font-size: 11px; line-height: 1.4; }
.chart-cap { margin: 14px 0 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.r-strip { display: grid; grid-template-columns: minmax(150px, auto) repeat(4, minmax(0, 1fr)); gap: 10px 22px; align-items: center; padding: 12px clamp(16px, 1.8vw, 22px); }
.r-strip-t { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); max-width: 210px; }
.sf { display: flex; flex-direction: column; gap: 2px; padding-left: 16px; border-left: 1px solid var(--line); }
.sf b { display: flex; align-items: baseline; gap: 3px; font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 1.6vw, 25px); line-height: 1.05; white-space: nowrap; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf b small { font-family: var(--f-mono); font-size: 11px; -webkit-text-fill-color: var(--muted); }
.sf span { font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 860px) {
  .r-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-strip-t { grid-column: 1 / -1; max-width: none; }
  .sf { padding-left: 12px; }
}
.cl-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: center; }
.caseload .pstats { grid-template-columns: 1fr; gap: 8px; }
.caseload .pstats .fact { padding: 6px 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.caseload .pstats .fact b { font-size: clamp(19px, 1.5vw, 22px); }
.caseload .pstats .fact > span { margin-top: 0; text-align: right; }
.r-meta { padding: clamp(18px, 1.8vw, 24px); }
.r-type { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--acc1); letter-spacing: .06em; }
.r-type svg { width: 15px; height: 15px; }
.r-title { margin-top: 10px; font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 1.6vw, 25px); line-height: 1.25; }
html:lang(zh) .r-title { font-family: var(--f-zh-display); font-weight: 600; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; }
.r-role { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; color: var(--ink-2); }
.r-role b { color: var(--ink); }
.doi { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; border: 1px solid color-mix(in oklab, var(--acc1) 40%, transparent); color: var(--acc1); transition: background-color .3s, transform .4s var(--ease); word-break: break-all; }
.doi span { padding: 2px 7px; border-radius: 6px; font-size: 10.5px; color: var(--on-acc); background: var(--acc1); }
.r-links { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.doi-num { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; word-break: break-all; }
.doi svg { width: 14px; height: 14px; flex: none; }
.doi:hover { background: color-mix(in oklab, var(--acc1) 10%, transparent); transform: translateY(-2px); }
.r-note, .award { margin-top: 10px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.r-note svg, .award svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--acc2); }
.award { padding: 10px 14px; border-radius: var(--r-sm); background: color-mix(in oklab, var(--acc2) 10%, transparent); border: 1px solid color-mix(in oklab, var(--acc2) 26%, transparent); color: var(--ink); }
.r-ofm { margin-top: 14px; display: grid; gap: 9px; }
.r-ofm div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding-top: 9px; border-top: 1px solid var(--line); }
html[lang="en"] .r-ofm div { grid-template-columns: 96px 1fr; }
.r-ofm dt { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--acc1); padding-top: 3px; text-transform: uppercase; }
.r-ofm dd { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.fw, .layers { padding: clamp(16px, 1.6vw, 22px); display: flex; flex-direction: column; }
.fw-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.fw-head h4 { font-size: 16px; font-weight: 600; }
.fw-head .hint { font-size: 11px; }
.fw-body { position: relative; flex: 1; display: grid; grid-template-columns: 1fr .82fr 1fr; grid-template-areas: "p1 c p2" "t t t" "d0 d1 d2"; gap: 20px 12px; align-items: center; }
.fw-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fw-line { fill: none; stroke: var(--line-2); stroke-width: 1.4; transition: stroke .4s, stroke-width .4s; }
.fw-flow { fill: none; stroke: var(--acc1); stroke-width: 1.6; stroke-dasharray: 3 11; stroke-linecap: round; animation: flow 1.4s linear infinite; opacity: .55; }
.fw.focus .fw-line.hl { stroke: var(--acc1); stroke-width: 2; }
.fw-node { position: relative; z-index: 1; padding: 9px 11px; border-radius: var(--r-sm); background: var(--glass-strong); border: 1px solid var(--line); transition: transform .45s var(--ease), opacity .4s, border-color .4s, box-shadow .4s; cursor: default; }
.fw-node b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.fw-node ul { margin-top: 8px; display: grid; gap: 5px; }
.fw-node li { font-size: 12px; line-height: 1.45; color: var(--ink-2); padding-left: 12px; position: relative; }
.fw-node li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--acc1); }
.fw-p1 { grid-area: p1; } .fw-p2 { grid-area: p2; }
.fw-c { grid-area: c; justify-self: center; width: min(100%, 112px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--on-acc); background: radial-gradient(circle at 30% 25%, var(--acc2), var(--acc1)); border: 0; box-shadow: 0 18px 40px -16px var(--acc1); font-size: 13px; font-weight: 600; line-height: 1.35; }
.fw-c i { position: absolute; inset: -8px; border-radius: 50%; border: 1px dashed color-mix(in oklab, var(--acc1) 60%, transparent); animation: spin 14s linear infinite; }
.fw-dims-title { grid-area: t; text-align: center; font-size: 10.5px; letter-spacing: .24em; color: var(--muted); text-transform: uppercase; position: relative; z-index: 1; }
.fw-d { text-align: center; }
.fw-d span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.fw-d0 { grid-area: d0; } .fw-d1 { grid-area: d1; } .fw-d2 { grid-area: d2; }
.fw.focus .fw-node:not(.hl) { opacity: .28; }
.fw.focus .fw-node.hl:not(.fw-c) { border-color: color-mix(in oklab, var(--acc1) 60%, transparent); box-shadow: 0 14px 30px -18px var(--acc1); transform: translateY(-3px); }
.case, .chart, .caseload, .pstats { padding: clamp(16px, 1.6vw, 22px); }
.case h4, .chart h4, .caseload h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 35%, transparent); }
.fact b { display: flex; align-items: baseline; gap: 4px; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 1.8vw, 28px); line-height: 1.05; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.fact b small { font-family: var(--f-mono); font-size: 11px; -webkit-text-fill-color: var(--muted); }
.fact > span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.chart-box { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cg { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ct { fill: var(--muted); font-family: var(--f-mono); font-size: 11px; }
.c-area { fill: url(#carea); opacity: 0; }
.c-line { fill: none; stroke: var(--acc1); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.sec.in .c-line { animation: draw 2.2s var(--ease) .3s forwards; }
.sec.in .c-area { animation: fadein 1.4s var(--ease) 1.2s forwards; }
.c-pt { fill: var(--bg); stroke: var(--acc1); stroke-width: 2; vector-effect: non-scaling-stroke; transition: r .3s var(--ease), fill .3s; opacity: 0; }
.sec.in .c-pt { animation: fadein .6s var(--ease) 1.6s forwards; }
.c-pt.on { r: 7px; fill: var(--acc1); }
.c-guide { stroke: var(--acc1); stroke-dasharray: 3 4; opacity: 0; vector-effect: non-scaling-stroke; transition: opacity .3s; }
.chart.hover .c-guide { opacity: .6; }
.c-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); padding: 7px 11px; border-radius: 10px; font-size: 11px; line-height: 1.5; background: var(--ink); color: var(--bg); pointer-events: none; opacity: 0; transition: opacity .25s, left .3s var(--ease), top .3s var(--ease); white-space: nowrap; text-align: center; }
.c-tip b { font-size: 13px; }
.c-tip span { opacity: .7; }
.chart.hover .c-tip { opacity: 1; }
.chart .note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.layers-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.stack { position: relative; height: 206px; perspective: 1100px; }
.plate { position: absolute; left: 50%; top: calc(10px + var(--i) * 40px); width: 140px; height: 86px; margin-left: -70px; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-42deg); transition: transform .7s var(--ease), opacity .5s; cursor: pointer; z-index: calc(10 - var(--i)); }
.pl-face { position: absolute; inset: 0; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--ink); background: linear-gradient(135deg, color-mix(in oklab, var(--acc1) 26%, var(--glass-strong)), color-mix(in oklab, var(--acc2) 18%, var(--glass-strong))); border: 1px solid color-mix(in oklab, var(--acc1) 35%, transparent); box-shadow: 0 34px 30px -24px rgba(13, 42, 72, .42), inset 0 1px 0 var(--glass-hi); transition: background .5s, box-shadow .5s; }
.pl-face svg { width: 30px; height: 30px; }
.pl-k { font-family: var(--f-zh-display); font-weight: 700; font-size: 26px; }
html[lang="en"] .pl-k { font-family: var(--f-display); font-weight: 400; font-style: italic; font-size: 24px; }
.plate.on { transform: rotateX(58deg) rotateZ(-42deg) translateZ(34px); }
.plate.on .pl-face { background: linear-gradient(135deg, var(--acc1), var(--acc2)); color: var(--on-acc); box-shadow: 0 50px 40px -26px var(--acc1), inset 0 1px 0 rgba(255, 255, 255, .4); }
.stack:hover .plate:not(.on), .stack .plate:not(.on) { opacity: .72; }
.layer-info { position: relative; display: grid; min-height: 140px; }
.li-card { grid-area: 1 / 1; align-self: center; animation: liIn .6s var(--ease) both; }
.li-card.out { animation: liOut .38s var(--ease) both; }
.li-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--on-acc); background: linear-gradient(135deg, var(--acc1), var(--acc2)); box-shadow: 0 10px 22px -12px var(--acc1); }
.li-ic svg { width: 22px; height: 22px; }
.li-k { display: block; margin-top: 14px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .2em; color: var(--acc1); text-transform: uppercase; }
.li-card h5 { margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.li-card p { margin-top: 8px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: clamp(14px, 2.4vw, 30px); height: 150px; padding-top: 4px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 84px; }
.bar b { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.bar i { display: block; width: 100%; height: calc(var(--h) * 84px); border-radius: 10px 10px 4px 4px; transform-origin: bottom; transform: scaleY(0); }
.b1 i { background: linear-gradient(var(--line-2), color-mix(in oklab, var(--muted) 40%, transparent)); }
.b2 i { background: linear-gradient(var(--acc1), var(--acc2)); box-shadow: 0 16px 30px -14px var(--acc1); }
.sec.in .bar i { animation: growY 1.6s var(--ease) .4s both; }
.sec.in .b2 i { animation-delay: .8s; }
.bar span { margin-top: 10px; font-size: 12px; color: var(--muted); }
.drop { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--acc2); }
.drop b { font-family: var(--f-display); font-weight: 400; font-size: 32px; line-height: 1; background: linear-gradient(120deg, var(--acc1), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drop svg { width: 24px; height: 24px; animation: bob 1.8s var(--ease-io) infinite; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: center; }

/* ---------- 05 honors ---------- */
/* sticky heading + 3D star on the left, compact two-column cards on the right */
.honors-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(24px, 3.4vw, 56px); align-items: start; }
.honors-aside { position: sticky; top: 16vh; }
.honors-aside .sec-head { margin-bottom: 10px; }
.star-box { height: min(36vh, 320px); margin-top: 4px; }
.honors-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* the two headline awards sit side by side; the rest follow two per row */
.honor {
  --tier: var(--acc1);
  position: relative; height: 100%; padding: 16px 18px; border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(120%); backdrop-filter: blur(20px) saturate(120%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-hi);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease), box-shadow .4s;
}
.honor.tilting { transition: transform .12s linear, box-shadow .4s; box-shadow: 0 40px 70px -30px color-mix(in oklab, var(--tier) 55%, transparent), inset 0 1px 0 var(--glass-hi); }
.honor::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--tier), transparent); }
.tier-gold { --tier: #a8874a; } .tier-silver { --tier: #6b7a8c; } .tier-bronze { --tier: #9a7556; } .tier-violet { --tier: #5c6f8a; } .tier-teal { --tier: #5d837a; }
[data-theme="dark"] .tier-gold { --tier: #e8d6ae; } [data-theme="dark"] .tier-silver { --tier: #c3cdd8; } [data-theme="dark"] .tier-bronze { --tier: #d7b493; } [data-theme="dark"] .tier-violet { --tier: #a9b8cc; } [data-theme="dark"] .tier-teal { --tier: #a5c8bf; }
.honor-shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; z-index: 0;
  background:
    radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 45%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 48%, rgba(190, 210, 228, .25) 54%, transparent 70%);
  background-size: 100% 100%, 240% 240%;
  background-position: center, var(--mx, 50%) var(--my, 50%);
  mix-blend-mode: soft-light;
}
[data-theme="dark"] .honor-shine { mix-blend-mode: screen; opacity: 0; }
.honor.tilting .honor-shine { opacity: 1; }
[data-theme="dark"] .honor.tilting .honor-shine { opacity: .5; }
.honor > *:not(.honor-shine) { position: relative; z-index: 1; }
.honor-top { display: flex; justify-content: space-between; align-items: center; }
.honor .medal { color: var(--tier); background: color-mix(in oklab, var(--tier) 12%, transparent); border-color: color-mix(in oklab, var(--tier) 24%, transparent); }
.honor .date { font-size: 12px; color: var(--muted); }
.level { margin-top: 10px; font-family: var(--f-display); font-weight: 400; font-size: clamp(21px, 1.6vw, 25px); line-height: 1.15; }
html:lang(zh) .level { font-family: var(--f-zh-display); font-weight: 700; font-size: clamp(18px, 1.35vw, 21px); letter-spacing: .04em; }
.featured .level { font-size: clamp(23px, 1.9vw, 29px); background: linear-gradient(110deg, var(--acc1) 15%, var(--tier)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html:lang(zh) .featured .level { font-size: clamp(21px, 1.6vw, 25px); }
.hname { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--ink); font-weight: 500; }
.featured .hname { font-size: 15.5px; }
.horg { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.horg b { color: var(--ink-2); font-weight: 600; }
.hcta { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; color: var(--tier); }
.hcta svg { width: 14px; height: 14px; transition: transform .4s var(--ease); }
.honor:hover .hcta svg { transform: translateX(4px); }
.hcta.muted { color: var(--muted); }
.honor[data-cert] { cursor: pointer; }

/* ---------- 06 skills ---------- */
.skills-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.sgroups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* every skills card shares one shell, one heading (tile + title) and one list rhythm */
.sgroup, .sprojs, .scerts { padding: 16px 18px; border-radius: var(--r-md); transition: transform .5s var(--ease), border-color .4s, box-shadow .4s, opacity .4s; }
.sgroup h4, .sprojs h4, .scerts h4 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 12px; }
.g-data { color: var(--g-data); } .g-space { color: var(--g-space); } .g-ai { color: var(--g-ai); } .g-write { color: var(--g-write); } .g-lang { color: var(--g-lang); }
.sgroup ul { display: flex; flex-wrap: wrap; gap: 7px; }
.sgroup li { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); background: color-mix(in oklab, var(--bg) 45%, transparent); border: 1px solid var(--line); }
.sgroup li.ai-chip { display: inline-flex; align-items: center; gap: 7px; padding-left: 9px; transition: transform .4s var(--ease), border-color .3s; }
.sgroup li.ai-chip:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ai-ic { display: inline-grid; place-items: center; width: 14px; height: 14px; flex: none; color: var(--ink-2); }
.ai-ic svg { width: 100%; height: 100%; }
.snote { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.slc { margin-top: 14px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.sprojs h4 { margin-bottom: 2px; }
.sprojs li + li, .scerts li + li { border-top: 1px solid var(--line); }
.sprojs a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; }
.sprojs li:last-child a { padding-bottom: 0; }
.pj-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pj-t b { font-size: 13.5px; font-weight: 600; color: var(--ink); transition: color .3s; }
.pj-t em { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-go { color: var(--muted); transition: transform .4s var(--ease), color .3s; }
.pj-go svg { width: 15px; height: 15px; }
.sprojs a:hover b, .sprojs a:hover .pj-go { color: var(--acc1); }
.sprojs a:hover .pj-go { transform: translate(2px, -2px); }
.scerts li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.scerts li:first-child { padding-top: 0; }
.scerts li:last-child { padding-bottom: 0; }
.scerts li b { font-family: var(--f-mono); font-size: 12.5px; color: var(--acc1); white-space: nowrap; }
.skills-aside { position: sticky; top: 14vh; }
.sphere-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sphere { width: min(100%, 470px); aspect-ratio: 1; touch-action: none; user-select: none; }
.sphere .tags { position: absolute; inset: 0; margin: 0; }
.tag {
  position: absolute; left: 0; top: 0; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  box-shadow: 0 8px 20px -12px rgba(13, 42, 72, .32);
  will-change: transform, opacity; transition: filter .35s, background-color .35s;
}
.tag::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: middle; transform: translateY(-1px); }
.tag.has-logo { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; }
.tag.has-logo::before { display: none; }
.tag .ai-ic { width: 16px; height: 16px; }
.tag.g-data::before { background: var(--g-data); } .tag.g-space::before { background: var(--g-space); } .tag.g-ai::before { background: var(--g-ai); } .tag.g-write::before { background: var(--g-write); } .tag.g-lang::before { background: var(--g-lang); }
.tag { color: var(--ink); }
.sphere.grabbing .tag { transition: none; }
#skills[data-hl="data"] .tag:not(.g-data), #skills[data-hl="space"] .tag:not(.g-space), #skills[data-hl="ai"] .tag:not(.g-ai), #skills[data-hl="write"] .tag:not(.g-write), #skills[data-hl="lang"] .tag:not(.g-lang) { filter: opacity(.15) blur(1px); }
#skills[data-hl="data"] .sgroup[data-group="data"], #skills[data-hl="space"] .sgroup[data-group="space"], #skills[data-hl="ai"] .sgroup[data-group="ai"], #skills[data-hl="write"] .sgroup[data-group="write"], #skills[data-hl="lang"] .slangs { transform: translateY(-4px); border-color: color-mix(in oklab, var(--acc1) 50%, transparent); box-shadow: 0 24px 50px -26px var(--acc1), inset 0 1px 0 var(--glass-hi); }
#skills[data-hl] .sgroup:not([data-group]) { opacity: 1; }

/* ---------- 07 photography ---------- */
#photo .sec-inner { max-width: 1360px; }
.pcontrols { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; margin-top: -10px; }
.chips { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pcontrols .mode { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .4s var(--ease), color .3s, background-color .4s, box-shadow .4s; }
.chip .mono { font-size: 10.5px; color: var(--muted); transition: color .3s; }
.chip sup { font-size: 10px; color: var(--muted); top: -.3em; }
.chip:hover { transform: translateY(-2px); }
.chip.on { color: var(--on-acc); background: linear-gradient(120deg, var(--acc1), var(--acc2)); border-color: transparent; box-shadow: 0 10px 24px -10px var(--acc1); }
.chip.on .mono, .chip.on sup { color: var(--on-acc); opacity: .8; }
.mode { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mode-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: linear-gradient(120deg, var(--acc1), var(--acc2)); box-shadow: 0 6px 16px -8px var(--acc1); transform: translateX(calc(var(--i) * 100%)); transition: transform .6s var(--ease); }
.mode button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px; border-radius: 999px; font-size: 13px; transition: color .4s; }
.mode button svg { width: 16px; height: 16px; }
.mode button.on { color: var(--on-acc); }
.gallery-wrap { margin-top: 30px; }
.gallery-stage { position: relative; }
.gallery.is-ring {
  position: relative; height: clamp(380px, 58vh, 580px);
  width: 100vw; left: 50%; margin-left: -50vw;
  perspective: 1150px; perspective-origin: 50% 46%;
  overflow: hidden; touch-action: pan-y; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.gallery.is-ring.grabbing { cursor: grabbing; }
.ph { margin: 0; }
.is-ring .ph { position: absolute; left: 50%; top: 50%; width: var(--cw, 300px); height: var(--ch, 200px); margin-left: calc(var(--cw, 300px) / -2); margin-top: calc(var(--ch, 200px) / -2); backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform, opacity; }
.ph-in { position: relative; width: 100%; height: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--glass-strong); box-shadow: 0 30px 50px -28px rgba(8, 22, 38, .55); border: 1px solid var(--glass-border); }
.ph-in img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; opacity: 0; }
.ph-in img[src] { opacity: 1; }
.ph-in::after { content: ''; position: absolute; inset: 0; background: var(--bg); opacity: calc(var(--shade, 0) * .55); pointer-events: none; }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; border-radius: 0 0 var(--r-md) var(--r-md); color: #fff; background: linear-gradient(transparent, rgba(6, 16, 28, .68)); display: flex; flex-direction: column; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none; }
.ph figcaption b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.ph figcaption span { font-size: 11px; opacity: .8; margin-top: 2px; }
.is-ring .ph.front figcaption, .is-grid .ph:hover figcaption { opacity: 1; transform: none; }
.is-ring .ph.front .ph-in { box-shadow: 0 40px 70px -30px color-mix(in oklab, var(--acc1) 70%, transparent); border-color: color-mix(in oklab, var(--acc1) 40%, transparent); }
.gallery.is-grid { columns: 260px; column-gap: 16px; }
.is-grid .ph { position: relative; break-inside: avoid; margin: 0 0 16px; aspect-ratio: var(--ar); cursor: pointer; }
.is-grid .ph:hover img { transform: scale(1.05); }
.ring-ui { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 10px; transition: opacity .5s, transform .6s var(--ease); }
.grid-mode .ring-ui { display: none; }
.ring-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .4s var(--ease), background-color .3s; }
.ring-btn svg { width: 18px; height: 18px; }
.ring-btn:hover { transform: scale(1.08); background: var(--glass-strong); }
.ring-cap { min-width: 280px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ring-cap .mono { font-size: 11px; color: var(--muted); letter-spacing: .14em; }
.ring-cap b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
html:lang(zh) .ring-cap b { font-family: var(--f-zh-display); font-weight: 600; font-size: 17px; }
#galleryHint { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- 08 outro ---------- */
#outro { display: flex; align-items: center; min-height: 100vh; }
#outro .sec-inner { width: 100%; }
.outro { text-align: center; max-width: 900px; margin: 0 auto; }
.outro-title { margin-top: 22px; font-family: var(--f-display); font-weight: 400; font-size: clamp(48px, 8vw, 128px); line-height: 1.02; letter-spacing: -.015em; }
html:lang(zh) .outro-title { font-family: var(--f-zh-display); font-weight: 600; letter-spacing: .04em; font-size: clamp(40px, 6.4vw, 96px); }
.outro-title .rv-up { background: linear-gradient(110deg, var(--ink) 20%, var(--acc1) 60%, var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.outro-sub { margin: 22px auto 0; max-width: 560px; color: var(--ink-2); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.85; }
.contact { margin: 38px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 680px; }
.cbtn b { overflow-wrap: anywhere; }
@media (max-width: 700px) { .contact { grid-template-columns: 1fr; } }
.cbtn { display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px 14px 14px; border-radius: var(--radius); text-align: left; transition: transform .5s var(--ease), box-shadow .5s; }
.cbtn .cb-t { display: flex; flex-direction: column; min-width: 0; }
.cbtn em { font-style: normal; font-size: 11.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.cbtn b { font-size: 15.5px; font-weight: 600; }
.cbtn:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -28px var(--acc1), inset 0 1px 0 var(--glass-hi); }
.back-top { margin-top: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; font-size: 13px; letter-spacing: .08em; color: var(--ink-2); border: 1px solid var(--line-2); transition: transform .5s var(--ease), color .3s, border-color .3s; }
.back-top svg { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.back-top:hover { color: var(--acc1); border-color: var(--acc1); }
.back-top:hover svg { transform: translateY(-4px); }
.foot { margin-top: 70px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 12px; color: var(--muted); }
.foot .mono { font-size: 11px; letter-spacing: .1em; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 60; visibility: hidden; transition: visibility 0s linear .75s; }
.lb.on { visibility: visible; transition-delay: 0s; }
.lb-bg { position: absolute; inset: 0; background: color-mix(in oklab, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(26px) saturate(130%); backdrop-filter: blur(26px) saturate(130%); opacity: 0; transition: opacity .7s var(--ease); }
.lb.on .lb-bg { opacity: 1; }
.lb-fig { position: fixed; left: 0; top: 0; width: 100px; height: 100px; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 50px 100px -40px rgba(6, 16, 28, .7); transition: left .75s var(--ease), top .75s var(--ease), width .75s var(--ease), height .75s var(--ease), opacity .5s, border-radius .75s; z-index: 1; background: var(--glass-strong); touch-action: pan-y; }
.lb.on .lb-fig { border-radius: 10px; }
.lb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.lb-hi { opacity: 0; }
.lb-hi.ready { opacity: 1; }
.lb-fig.swap .lb-img { opacity: 0; transform: translateX(calc(var(--dir) * -50px)); }
.lb-fig.swap-in .lb-img { opacity: 0; transform: translateX(calc(var(--dir) * 50px)); transition: none; }
.lb-cap { position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; opacity: 0; transition: opacity .5s, transform .7s var(--ease); max-width: 90vw; }
.lb.on .lb-cap { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
.lb-count { font-size: 11px; color: var(--muted); letter-spacing: .16em; }
.lb-cap b { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.3; }
html:lang(zh) .lb-cap b { font-family: var(--f-zh-display); font-weight: 600; font-size: 20px; }
.lb-cap span:last-child { font-size: 12.5px; color: var(--ink-2); }
.lb-btn { position: fixed; z-index: 3; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transform: scale(.8); transition: opacity .4s, transform .5s var(--ease), background-color .3s; }
.lb-btn svg { width: 20px; height: 20px; }
.lb.on .lb-btn { opacity: 1; transform: none; transition-delay: .2s; }
.lb-btn:hover { background: var(--glass-hi); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 26px; top: 50%; margin-top: -25px; }
.lb-next { right: 26px; top: 50%; margin-top: -25px; }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }
body.lb-open .cursor { z-index: 101; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 90; display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 14px; border-radius: 999px; font-size: 13px; background: var(--ink); color: var(--bg); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5); transform: translate(-50%, 30px); opacity: 0; transition: opacity .4s, transform .6s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--acc2); flex: none; }
.toast b { font-family: var(--f-mono); font-weight: 400; font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--acc1) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes pulse2 { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--acc2) 26%, transparent); } 50% { box-shadow: 0 0 0 10px color-mix(in oklab, var(--acc2) 6%, transparent); } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes liIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes liOut { to { opacity: 0; transform: translateY(-14px); filter: blur(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .menu-list { grid-template-columns: repeat(2, 1fr); }
  .r-row, .r-row2, .r-grid { grid-template-columns: 1fr; }

}
@media (max-width: 960px) {
  .about-grid, .edu-grid, .skills-grid, .honors-grid { grid-template-columns: minmax(0, 1fr); }
  .edu-aside, .skills-aside, .portrait-col, .honors-aside, .deck-side { position: relative; top: 0; }
  .edu-aside { order: -1; }
  .tree-box { height: 46vh; }
  .star-box { height: 26vh; }
  .portrait-frame { width: min(100%, calc(min(58vh, 520px) * 0.7665)); }
  .deck { grid-template-columns: 1fr; }
  .deck-nav { position: relative; top: 0; grid-auto-flow: column; grid-auto-columns: 1fr; grid-auto-rows: auto; padding-left: 0; padding-bottom: 12px; gap: 6px; }
  .deck-line { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 2px; }
  .deck-line b { width: calc(100% / 3); height: 100%; transform: translateX(calc(var(--i) * 100%)); }
  .deck-2 .deck-line b { width: 50%; height: 100%; }
  .loop-box { height: 130px; }
  .deck-tab { padding: 12px; }
  .deck-tab em { display: none; }
  .dots { display: none; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .ld-top, .ld-bottom { font-size: 10px; letter-spacing: .14em; }
  .tabs { display: grid; width: 100%; }
  .tab { padding: 9px 10px; font-size: 13px; gap: 6px; }
  .roles { font-size: 18px; }
  .lang-toggle { width: 110px; font-size: 12px; }
  .tb-right { gap: 8px; }
  .ld-bottom span:last-child { display: none; }
  .sec { padding-top: 100px; padding-bottom: 80px; }
  .brand-name em { display: none; }
  .menu-btn { padding: 0 13px; }
  .menu-btn #menuLabel { display: none; }
  .menu-list { grid-template-columns: 1fr; }
  .menu-list a { padding: 10px 0; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid { padding: 2px 14px; }
  .info { column-gap: 10px; }
  .info .k { letter-spacing: .06em; }
  .info .v { font-size: 13.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .campus { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-width: none; }
  .campus::-webkit-scrollbar { display: none; }
  .flip { scroll-snap-align: start; }
  .school-top { grid-template-columns: auto 1fr; }
  .school-top .pill { grid-column: 1 / -1; justify-self: start; }
  .gauge, .gauge svg { width: 128px; }
  .gauge svg { height: 128px; }
  .g-val { top: 42px; }
  .g-val b { font-size: 32px; }
  .icard-head { grid-template-columns: auto 1fr; }
  .icard-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:last-child:nth-child(odd) { grid-column: span 2; }
  .deck-tab b { font-size: 17px !important; }
  .fw-body { grid-template-columns: repeat(3, 1fr); grid-template-areas: "p1 p1 p1" "c c c" "p2 p2 p2" "t t t" "d0 d1 d2"; gap: 22px 8px; }
  .fw-c { width: 116px; }
  .fw-d { padding: 10px 8px; }
  .fw-d span { font-size: 10.5px; }
  .layers-body { grid-template-columns: 1fr; }
  .stack { height: 270px; }
  .honors-list { grid-template-columns: 1fr; }
  .facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-row { grid-template-columns: 1fr; }
  .honor-wrap.featured { grid-column: auto; }
  .sgroups, .slc { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .pstats { grid-template-columns: repeat(3, 1fr); }
  .pstats .fact { padding: 10px; }
  .r-ofm div, html[lang="en"] .r-ofm div { grid-template-columns: 1fr; gap: 4px; }
  .pcontrols { flex-wrap: wrap; }
  .chips { flex: 0 0 calc(100% + var(--pad) * 2); flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .gallery.is-grid { columns: 2; column-gap: 10px; }
  .is-grid .ph { margin-bottom: 10px; }
  .ring-cap { min-width: 0; flex: 1; }
  .lb-prev, .lb-next { top: auto; bottom: 28px; margin-top: 0; width: 44px; height: 44px; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-cap { bottom: 30px; max-width: calc(100vw - 140px); }
  .scroll-cue { bottom: 24px; }
  .sec-word { font-size: 28vw; }
}

@media (max-width: 400px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
