/* ------------------------------------------------------------------
   zezhou.alphaholic.app — design system
   Paper, ink, one accent. Newsreader for voice, Inter for reading,
   IBM Plex Mono for labels and numbers.
------------------------------------------------------------------ */

:root {
  --paper: #f6f3ec;
  --paper-2: #efebe1;
  --paper-3: #e7e2d5;
  --ink: #161511;
  --ink-2: #2e2c26;
  --body: #4b4841;
  --muted: #7d786d;
  --faint: #aaa498;
  --line: rgba(22, 21, 17, 0.12);
  --line-strong: rgba(22, 21, 17, 0.24);
  --accent: #c2482c;
  --accent-soft: rgba(194, 72, 44, 0.12);
  --dark: #131210;
  --dark-2: #1c1b18;
  --dark-paper: #ede8dc;
  --dark-body: #c9c3b5;
  --dark-muted: #8f8a7e;
  --dark-line: rgba(237, 232, 220, 0.14);
  --serif: 'Newsreader', 'Songti SC', 'STSong', 'Noto Serif SC', 'Noto Serif CJK SC', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --r: 24px;
  --r-sm: 14px;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --header-h: 80px;
}

/* ---------- reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: clip;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure, dl, dd, dt, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
/* no paragraph ends on a lone word or character (where the browser can do it) */
p, li { text-wrap: pretty; }
em { font-style: italic; }
strong { font-weight: 600; }
/* copy edited on the page (scripts/serve.mjs) can hold several paragraphs or a list */
[data-rich] > * + * { margin-top: 0.7em; }
[data-rich] :is(ul, ol) { padding-left: 1.25em; }
[data-rich] ul { list-style: disc; }
[data-rich] ol { list-style: decimal; }
[data-rich] li + li { margin-top: 0.3em; }
[data-rich] li::marker { color: var(--accent); }
.mono { font-family: var(--mono); font-feature-settings: 'ss01', 'zero'; }
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.display .line, [data-split] .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
[data-split] .line-inner { display: inline-block; vertical-align: top; white-space: nowrap; }
html.js:not(.reduced) [data-split] .line-inner { transform: translateY(110%); }
html.js:not(.reduced) [data-split].is-done .line-inner { transform: none; }
html.js:not(.reduced) [data-split]:not(.is-ready) { visibility: hidden; }

/* initial states for JS-driven reveals (no flash, no motion without JS) */
html.js:not(.reduced) [data-reveal] { opacity: 0; transform: translateY(22px); }
html.js:not(.reduced) [data-hero] { opacity: 0; transform: translateY(18px); }
html.js:not(.reduced) .hp-still { visibility: hidden; }
html.late .hp-still, .hero-photos.is-still .hp-still { visibility: visible; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- ambient layers ---------- */

/* paper grain: still and the size of the screen, with no blending, so it costs nothing to draw (a moving,
   blended layer twice the screen size was what made Safari drop frames on a 4K display) */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: 0.017; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.skip { position: fixed; top: -100px; left: 20px; z-index: 400; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; }
.skip:focus { top: 16px; }
.progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; z-index: 150; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 8px; }
.dot.live { box-shadow: 0 0 0 0 var(--accent-soft); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(194, 72, 44, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(194, 72, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 72, 44, 0); } }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 12px); opacity: 0; visibility: hidden; transition: all 0.3s var(--ease); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 12.5px; z-index: 160; letter-spacing: 0.02em; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- buttons & arrows ---------- */

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; font-size: 14.5px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.btn-sm { padding: 11px 16px; font-size: 13px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-paper { background: var(--dark-paper); color: var(--dark); }
.btn-paper:hover { background: #fff; }
.btn-ghost-paper { border: 1px solid var(--dark-line); color: var(--dark-paper); }
.btn-ghost-paper:hover { background: rgba(237, 232, 220, 0.08); }
.arrow { display: inline-flex; width: 14px; height: 14px; transition: transform 0.35s var(--ease); flex-shrink: 0; }
.arrow svg { width: 100%; height: 100%; display: block; }
a:hover .arrow, button:hover .arrow { transform: translate(2px, -2px); }
.btn:hover .arrow { transform: translate(3px, -3px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 500; transition: background 0.3s var(--ease), border-color 0.3s var(--ease); }
.pill:hover { background: var(--paper-2); border-color: var(--ink); }
button.pill { font-family: var(--sans); line-height: 1.2; }

/* ---------- header ---------- */

.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 120; transition: transform 0.5s var(--ease), background 0.4s, box-shadow 0.4s; }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { background: rgba(246, 243, 236, 0.82); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; transition: opacity 0.25s; }
.wordmark:hover { opacity: 0.7; }
/* the site's mark: the same drawing the favicon uses */
.wordmark-mark { display: block; width: 28px; height: 28px; }
.wordmark-mark .wm-box { fill: var(--ink); }
.wordmark-mark .wm-z { fill: var(--paper); }
.wordmark-mark .wm-dot { fill: var(--accent); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 14px; font-weight: 500; color: var(--body); position: relative; padding: 6px 0; transition: color 0.25s; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.header-right { display: flex; align-items: center; gap: 22px; }
.clock { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
.clock time { color: var(--ink); font-variant-numeric: tabular-nums; }
.lang { font-size: 12px; letter-spacing: 0.08em; color: var(--body); padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.lang:hover { border-bottom-color: var(--ink); }
.menu-toggle { display: none; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-nav { display: none; }

/* ---------- hero ---------- */

/* The first screen: my name, quietly, then a sentence on what I do, and beside it the photos, kept small. */
.hero { padding-top: var(--header-h); min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); align-items: center; padding: clamp(40px, 7vh, 80px) 0 clamp(48px, 9vh, 96px); }
.hero-copy { max-width: 560px; }
.hero-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; font-weight: 400; }
/* my name, the first thing on the page, held below the size of the section headings */
.hero-name { display: block; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); }
.hero-name-alt { font-size: 11px; font-weight: 400; letter-spacing: 0.08em; color: var(--muted); }
.hero-lead { max-width: 520px; margin-top: 20px; font-size: 16.5px; line-height: 1.65; color: var(--body); }
.hero-lead a { color: var(--ink); background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%; transition: background-size 0.35s var(--ease); }
.hero-lead a:hover { background-size: 100% 2px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-foot { display: flex; align-items: center; margin-top: clamp(36px, 6vh, 64px); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
/* the photos (hero.js): three prints laid out like a magazine spread, each in its photo's own 2:3 */
.hero-photos { display: flex; justify-content: flex-end; margin: 0; }
.hp-stage { position: relative; flex: none; width: min(100%, 520px, 60svh); aspect-ratio: 1 / 1.1; }
.hp-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hp-spread { position: absolute; inset: 0; }
.hp-card { position: absolute; aspect-ratio: 2 / 3; cursor: pointer; overflow: hidden; background: var(--tone, var(--paper-2)); }
.hp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ---------- ticker ---------- */

.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; color: var(--ink-2); padding-right: 40px; white-space: nowrap; }
.ticker-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 40px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.section { padding: clamp(88px, 10vw, 144px) 0; }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(36px, 4vw, 56px); }
.section-num { font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.section-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.section-rule { flex: 1; height: 1px; background: var(--line); }
.section-title-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-intro { font-size: 17px; line-height: 1.65; color: var(--body); max-width: 440px; justify-self: end; }
.section-dark { background: var(--dark); color: var(--dark-paper); }
.section-dark .section-label { color: var(--dark-muted); }
.section-dark .section-rule { background: var(--dark-line); }
.section-dark ::selection { background: var(--dark-paper); color: var(--dark); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-body { font-size: 18px; line-height: 1.7; color: var(--body); display: grid; gap: 22px; }
.about-body p:first-child { font-size: 21px; line-height: 1.55; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; color: var(--ink); line-height: 1.1; }
.facts dd { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* focus */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.focus-card { position: relative; padding: 36px 32px 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; transition: background 0.5s var(--ease); overflow: hidden; }
.focus-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.focus-card:hover { background: var(--paper-2); }
.focus-card:hover::before { transform: scaleX(1); }
.focus-num { font-family: var(--serif); font-style: italic; font-size: 40px; color: var(--faint); line-height: 1; transition: color 0.4s; }
.focus-card:hover .focus-num { color: var(--accent); }
.focus-card h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -0.015em; line-height: 1.1; margin: 42px 0 18px; }
.focus-card p { font-size: 15.5px; line-height: 1.7; color: var(--body); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 28px; }
.tags li { font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-strong); padding: 6px 10px; border-radius: 999px; }

/* projects: one after another, each its words beside its drawing */
.projects { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--dark-line); }
.project { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(40px, 5vw, 72px) 0; }
.project + .project { border-top: 1px solid var(--dark-line); }
.project:not(.has-visual) { grid-template-columns: minmax(0, 1fr); }
.project-meta { display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dark-muted); }
.project-n { color: var(--accent); letter-spacing: 0.04em; }
.project-name { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -0.02em; color: var(--dark-paper); margin-top: 20px; }
.project-lead { font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; color: var(--dark-paper); max-width: 560px; margin-top: 18px; }
.project-text { font-size: 16px; line-height: 1.75; color: var(--dark-body); max-width: 560px; margin-top: 16px; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.project-visual { position: relative; justify-self: center; width: min(100%, 460px); }
.loop { width: 100%; height: auto; display: block; overflow: visible; }
.loop-track { fill: none; stroke: var(--dark-line); stroke-width: 1; }
.loop-path { fill: none; stroke: var(--dark-paper); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 300px 300px; transform-box: view-box; }
html:not(.js) .loop-path, html.reduced .loop-path { stroke-dashoffset: 0; }
.loop-orbit { transform-origin: 300px 300px; transform-box: view-box; animation: orbit 14s linear infinite; }
.loop-comet { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(194, 72, 44, 0.9)); }
@keyframes orbit { to { transform: rotate(360deg); } }
.loop-node { opacity: 0; transition: opacity 0.6s; }
html:not(.js) .loop-node, html.reduced .loop-node { opacity: 1; }
.loop-halo { fill: rgba(237, 232, 220, 0.06); stroke: var(--dark-line); stroke-width: 1; }
.loop-dot { fill: var(--dark-paper); }
.loop-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--dark-body); }
.loop-center { font-family: var(--serif); font-style: italic; font-size: 120px; fill: var(--dark-paper); }
.loop-center-sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; fill: var(--dark-muted); }
.loop-caption { text-align: center; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dark-muted); margin-top: 18px; }

/* experience: a card with the portrait beside the lists */
.xp { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 104px); margin-top: clamp(36px, 4vw, 60px); }
.xp-card { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; max-width: 290px; }
.xp-photo { aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-3); }
.xp-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.xp-id { margin-top: 18px; display: grid; gap: 4px; }
.xp-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; font-family: var(--serif); font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.xp-name .mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); }
.xp-now { font-size: 14px; color: var(--body); }
.xp-where { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.xp-where a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.xp-where .arrow { width: 10px; height: 10px; }
.xp-block + .xp-block { margin-top: clamp(40px, 5vw, 64px); }
.xp-label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
/* one row per role: years, where, what, the city; the others fade back while you read one */
.xp-item { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; grid-template-areas: "years org city" "years role city"; column-gap: 24px; row-gap: 2px; align-items: baseline; padding: 18px 0 19px; border-bottom: 1px solid var(--line); transition: opacity 0.35s var(--ease); }
.xp-years { grid-area: years; display: flex; align-items: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xp-years .dot { margin-right: 8px; }
.xp-org { grid-area: org; font-family: var(--serif); font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.xp-role { grid-area: role; font-size: 14.5px; color: var(--body); }
.xp-city { grid-area: city; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.xp-item.is-now .xp-years { color: var(--ink); }
@media (hover: hover) {
  .xp-list:hover .xp-item { opacity: 0.38; }
  .xp-list .xp-item:hover { opacity: 1; }
}
.xp-also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
.xp-also li { display: grid; align-content: start; gap: 6px; padding: 20px 0 24px; border-bottom: 1px solid var(--line); }
.xp-also-n { font-size: 10.5px; color: var(--accent); letter-spacing: 0.06em; }
.xp-also strong { font-size: 15.5px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.xp-also p { font-size: 14px; line-height: 1.6; color: var(--body); }

/* life / bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { position: relative; background: var(--paper-2); border-radius: var(--r); padding: 26px 28px 28px; min-height: 340px; display: flex; flex-direction: column; overflow: hidden; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), background 0.5s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(22, 21, 17, 0.35); background: var(--paper-3); }
.tile-music, .tile-photo, .tile-snow, .tile-court, .tile-cat, .tile-invest { grid-column: span 4; }
.tile-body { margin-top: auto; padding-top: 22px; }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.015em; line-height: 1.1; }
.tile p { font-size: 15px; line-height: 1.65; color: var(--body); margin-top: 12px; max-width: 460px; }
.tile-meta { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.art { height: 128px; position: relative; }
.art-music { display: flex; align-items: flex-end; gap: 6px; height: 128px; padding-bottom: 4px; }
.art-music i { display: block; width: 8px; height: 30%; border-radius: 4px 4px 0 0; background: var(--ink); opacity: 0.85; transform-origin: bottom; animation: eq 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.17s); animation-play-state: paused; }
.tile-music:hover .art-music i, .tile-music.is-in .art-music i { animation-play-state: running; }
@keyframes eq { 0% { height: 18%; } 50% { height: 68%; } 100% { height: 36%; } }
.art-photo svg { width: 128px; height: 128px; overflow: visible; }
.art-photo .ring { fill: none; stroke: var(--ink); stroke-width: 1; }
.art-photo .ring2 { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 0.18 0.82; stroke-linecap: round; transform-origin: 60px 60px; transform-box: view-box; animation: ringSpin 9s linear infinite; animation-play-state: paused; opacity: 0.9; }
.art-photo .blades { transform-origin: 60px 60px; transform-box: view-box; animation: apertureSpin 28s linear infinite; animation-play-state: paused; transition: transform 0.9s var(--ease); }
.art-photo .blades path { fill: none; stroke: var(--ink); stroke-width: 1; }
.art-photo .pupil { fill: var(--accent); transform-origin: 60px 60px; transform-box: view-box; animation: breathe 3.6s ease-in-out infinite; animation-play-state: paused; }
.tile-photo.is-in .blades, .tile-photo.is-in .pupil, .tile-photo.is-in .ring2 { animation-play-state: running; }
.tile-photo:hover .blades { animation-duration: 6s; animation-direction: reverse; }
.tile-photo:hover .pupil { animation: shutter 0.9s var(--ease) forwards; }
.tile-photo:hover .ring2 { animation-duration: 2.5s; }
@keyframes apertureSpin { to { transform: rotate(360deg); } }
@keyframes ringSpin { to { transform: rotate(-360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(0.85); } 50% { transform: scale(1.15); } }
@keyframes shutter { 0% { transform: scale(1); } 35% { transform: scale(0.35); } 100% { transform: scale(1.4); } }
.art-snow { overflow: visible; }
.art-snow svg { width: 100%; height: 128px; position: relative; z-index: 1; }
.art-snow path { fill: none; stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.art-snow .ridge2 { stroke: var(--faint); }
.tile-snow.is-in .art-snow .ridge { animation: draw 1.8s var(--ease) 0.2s forwards; }
.tile-snow.is-in .art-snow .ridge2 { animation: draw 1.8s var(--ease) 0.5s forwards; }
.tile-snow:hover .art-snow .ridge { animation: drawAgain 1.4s var(--ease) forwards; }
.tile-snow:hover .art-snow .ridge2 { animation: drawAgain 1.4s var(--ease) 0.15s forwards; }
.art-snow .flake { position: absolute; top: -8px; left: var(--x); width: 4px; height: 4px; border-radius: 50%; background: var(--ink); opacity: 0; animation: fall 7s linear infinite; animation-delay: calc(var(--i) * -0.9s); animation-play-state: paused; }
.art-snow .flake:nth-child(3n) { width: 3px; height: 3px; animation-duration: 9s; }
.art-snow .flake:nth-child(3n+1) { animation-duration: 6s; }
.tile-snow.is-in .flake { animation-play-state: running; }
.tile-snow:hover .flake { animation-duration: 3.5s; }
@keyframes fall { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.55; } 90% { opacity: 0.35; } 100% { transform: translate(-14px, 150px); opacity: 0; } }
@keyframes drawAgain { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
html:not(.js) .art-snow path, html.reduced .art-snow path { stroke-dashoffset: 0; }
html.reduced .art-snow .flake { display: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.art-court svg { width: 100%; height: 128px; }
.art-court .court { fill: none; stroke: var(--ink); stroke-width: 1; }
.art-court .net { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; }
.art-court .ball { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); top: 22px; left: 12%; animation: rally 2.6s var(--ease-io) infinite alternate; animation-play-state: paused; }
.tile-court:hover .ball, .tile-court.is-in .ball { animation-play-state: running; }
@keyframes rally { 0% { left: 12%; top: 26px; } 50% { top: 84px; } 100% { left: calc(88% - 12px); top: 26px; } }
.court-names { position: absolute; right: 6%; top: -5px; height: 15px; overflow: hidden; font-size: 10.5px; line-height: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.court-names > span { display: block; animation: sports 13s var(--ease) infinite; animation-play-state: paused; }
.court-names i { display: block; font-style: normal; text-align: right; }
.tile-court.is-in .court-names > span, .tile-court:hover .court-names > span { animation-play-state: running; }
@keyframes sports { 0%, 17% { transform: translateY(0); } 20%, 37% { transform: translateY(-15px); } 40%, 57% { transform: translateY(-30px); } 60%, 77% { transform: translateY(-45px); } 80%, 97% { transform: translateY(-60px); } 100% { transform: translateY(-75px); } }
/* the paper portfolio, live: the curve wipes in from the left, the figure counts up, the last month pulses */
.art-perf { height: 128px; }
.perf-figure { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; width: fit-content; }
.perf-label { font-size: 10.5px; line-height: 1.5; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.perf-total { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.perf-plot { position: absolute; inset: 40px 0 0 0; }
.perf-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.perf-line { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.perf-area { fill: var(--ink); opacity: 0.05; }
.perf-zero { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.perf-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(194, 72, 44, 0.45); }
html.js:not(.reduced) .tile-invest .perf-chart { clip-path: inset(0 100% 0 0); }
html.js:not(.reduced) .tile-invest .perf-dot { opacity: 0; transform: scale(0); }
.tile-invest.is-in .perf-chart { animation: wipe 1.8s var(--ease) 0.25s forwards; }
.tile-invest.is-in .perf-dot { animation: popIn 0.5s var(--ease) 1.7s forwards, pulse 2.2s ease-out 2.2s infinite; }
.tile-invest:hover .perf-area { opacity: 0.09; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }
/* 米糕 / Migao: a milky-cream Minuet trotting after a butterfly. Pure CSS, no JS.
   Every loop is paused until the tile is .is-in (scrolled into view) or hovered.
   Under reduced motion the site sets animation:none; the base transforms below are
   then the resting pose (mid-trot, head up toward the butterfly). */

/* ---- drawing ---- */
.art-cat svg { display: block; width: 100%; height: 128px; overflow: visible; }
.art-cat .cat { fill: #f4e9d4; stroke: var(--ink, #161511); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round;
  transform-box: view-box; transform-origin: 130px 108px; }
.art-cat .far, .art-cat .ie, .art-cat .sh { fill: #e9d9bc; }          /* deeper cream: far legs, inner ears, soft shade */
.art-cat .ie, .art-cat .sh, .art-cat .ey, .art-cat .bl, .art-cat .ns { stroke: none; }
.art-cat .rd { fill: none; }                                           /* re-inks the outline over a shade */
.art-cat .ey { fill: var(--ink, #161511); }
.art-cat .hl { fill: #fff; }
.art-cat .bl, .art-cat .ns, .art-cat .wi { fill: var(--accent, #c2482c); }
.art-cat .bl { opacity: .25; }
.art-cat .mo { fill: none; stroke-width: 1; }
.art-cat .wi.lo { opacity: .75; }
.art-cat .bb { fill: none; stroke: var(--ink, #161511); stroke-width: 1.1; stroke-linecap: round; }
.art-cat .gd { fill: none; stroke: var(--faint, #aaa498); stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 9 15; }

/* ---- pivots and resting pose ---- */
.art-cat .leg { transform-box: view-box; }
.art-cat .leg.r { transform-origin: 110px 91px; }                  /* hips */
.art-cat .leg.f { transform-origin: 141px 91px; }
.art-cat .leg.p { transform: translateY(-2.5px) rotate(-28deg); }  /* near-front + far-back: reaching */
.art-cat .leg.q { transform: translateY(-.7px) rotate(12.5deg); }  /* the other pair: pushing off */
.art-cat .tail { transform-box: view-box; transform-origin: 105px 73px; }
.art-cat .hd { transform-box: view-box; transform-origin: 150px 84px; transform: rotate(-8deg); }
.art-cat .ey { transform-box: fill-box; transform-origin: 50% 65%; }

/* ---- loops (paused by default) ---- */
.art-cat .gd   { animation: cat-gd .33s linear infinite paused; }
.art-cat .leg  { animation: cat-trot .4s linear infinite paused; }
.art-cat .leg.q { animation-delay: -.2s; }
.art-cat .bob  { animation: cat-bob .2s ease-in-out -.15s infinite paused; }
.art-cat .tail { animation: cat-tail .8s ease-in-out -.2s infinite paused; }
.art-cat .hd   { animation: cat-head 6s ease-in-out infinite paused; }
.art-cat .ey   { animation: cat-blink 4s linear infinite paused; }
.art-cat .hl   { animation: cat-glint 4s linear infinite paused; }
.art-cat .wg   { animation: cat-flap .28s ease-in-out infinite paused; }
.art-cat .bx   { animation: cat-bfx 6s ease-in-out infinite paused; }
.art-cat .by   { animation: cat-bfy 1.3s ease-in-out infinite paused; }

.is-in .art-cat .gd, .is-in .art-cat .leg, .is-in .art-cat .bob, .is-in .art-cat .tail, .is-in .art-cat .hd,
.is-in .art-cat .ey, .is-in .art-cat .hl, .is-in .art-cat .wg, .is-in .art-cat .bx, .is-in .art-cat .by,
.tile-cat:hover .art-cat .gd, .tile-cat:hover .art-cat .leg, .tile-cat:hover .art-cat .bob,
.tile-cat:hover .art-cat .tail, .tile-cat:hover .art-cat .hd, .tile-cat:hover .art-cat .ey,
.tile-cat:hover .art-cat .hl, .tile-cat:hover .art-cat .wg, .tile-cat:hover .art-cat .bx,
.tile-cat:hover .art-cat .by { animation-play-state: running; }

/* ---- hover: crouch, wiggle, pounce; the butterfly lifts away ---- */
.tile-cat:hover .art-cat .cat { animation: cat-pounce 2.4s ease-in-out infinite running; }
.tile-cat:hover .art-cat .bf  { animation: cat-flee 2.4s ease-in-out infinite running; }

/* ---- keyframes ---- */
@keyframes cat-gd { to { stroke-dashoffset: 24; } }
@keyframes cat-trot {                         /* stance 12-62%, swing 62-112% */
  0%   { transform: translateY(-2.5px) rotate(-28deg); }
  12%  { transform: translateY(0) rotate(-24deg); }
  37%  { transform: translateY(-1.5px) rotate(0deg); }
  62%  { transform: translateY(0) rotate(24deg); }
  81%  { transform: translateY(-4.5px) rotate(0deg); }
  100% { transform: translateY(-2.5px) rotate(-28deg); }
}
@keyframes cat-bob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.4px); } }
@keyframes cat-tail  { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-6deg); } }
@keyframes cat-head  { 0%, 100% { transform: rotate(-8deg); } 30% { transform: rotate(-6deg); } 70% { transform: rotate(-12deg); } }
@keyframes cat-blink { 0%, 90%, 97%, 100% { transform: scaleY(1); } 93.5% { transform: scaleY(.08); } }
@keyframes cat-glint { 0%, 91%, 96%, 100% { opacity: 1; } 92%, 95% { opacity: 0; } }
@keyframes cat-flap  { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.3); } }
@keyframes cat-bfx {
  0%, 100% { transform: translate(0, 0); } 30% { transform: translate(12px, 5px); }
  60% { transform: translate(24px, -6px); } 80% { transform: translate(8px, -8px); }
}
@keyframes cat-bfy { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-10deg); } }
@keyframes cat-pounce {
  0%, 90%, 100% { transform: translate(0, 0) rotate(0) scale(1, 1); }
  7%, 13% { transform: translate(-3px, 0) rotate(3deg) scale(1.04, .92); }
  10% { transform: translate(-1.5px, 0) rotate(1.5deg) scale(1.04, .92); }
  16% { transform: translate(-2px, 0) rotate(2deg) scale(1.04, .92); }
  27% { transform: translate(16px, -13px) rotate(-10deg) scale(.97, 1.05); }
  37% { transform: translate(22px, -3px) rotate(2deg) scale(1, 1); }
  42% { transform: translate(22px, 0) rotate(0) scale(1.05, .93); }
  48% { transform: translate(21px, 0) rotate(0) scale(1, 1); }
}
@keyframes cat-flee {
  0%, 90%, 100% { transform: translate(0, 0); }
  16% { transform: translate(-2px, 2px); }
  27% { transform: translate(14px, -12px); }
  40% { transform: translate(22px, -14px); }
}

/* a tile with photos: a small labelled link, the whole tile clickable */
.tile-more { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; padding: 5px 15px 5px 6px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--ink); transition: background 0.3s var(--ease), border-color 0.3s var(--ease); }
.tile-more::after { content: ''; position: absolute; inset: 0; border-radius: var(--r); }
.tile:hover .tile-more { background: var(--paper); border-color: var(--ink); }
.tile-thumbs { display: inline-flex; padding-left: 2px; }
.tile-thumbs { gap: 2px; }
.tile-thumbs img { width: 20px; height: 28px; object-fit: cover; background: var(--paper-3); transition: transform 0.6s var(--ease); }
.tile:hover .tile-thumbs img:nth-child(1) { transform: translateY(-2px); }
.tile:hover .tile-thumbs img:nth-child(3) { transform: translateY(2px); }
.tile-more .arrow { width: 13px; height: 13px; }
.tile:hover .tile-more .arrow { transform: translateX(3px); }
.tile-more.is-plain { padding-left: 15px; }

/* photo viewer: one photo in focus, the neighbours dimmed at either side */
html:has(.viewer[open]) { overflow: hidden; }
.viewer { --vh-max: calc(100svh - 188px); --vw-max: min(84vw, 1100px); position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--dark); color: var(--dark-paper); opacity: 0; transition: opacity 0.4s var(--ease), overlay 0.4s allow-discrete, display 0.4s allow-discrete; }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; opacity: 1; }
@starting-style { .viewer[open] { opacity: 0; } }
.viewer::backdrop { background: transparent; }
.viewer ::selection { background: var(--dark-paper); color: var(--dark); }
.viewer-bar { display: flex; align-items: center; gap: 16px; padding: 20px var(--gutter) 16px; }
.viewer-title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.01em; line-height: 1.1; }
.viewer-count { font-size: 12px; letter-spacing: 0.08em; color: var(--dark-muted); font-variant-numeric: tabular-nums; }
.viewer-close { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--dark-line); border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1; transition: background 0.3s var(--ease), border-color 0.3s var(--ease); }
.viewer-close svg { width: 12px; height: 12px; }
.viewer-close:hover, .viewer-btn:hover:not(:disabled) { background: rgba(237, 232, 220, 0.08); border-color: rgba(237, 232, 220, 0.4); }
.viewer-track { position: relative; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track::before, .viewer-track::after { content: ''; flex: 0 0 50%; }
.viewer-slide { flex: none; scroll-snap-align: center; scroll-snap-stop: always; }
.viewer-slide img { height: min(var(--vh-max), calc(var(--vw-max) / var(--ar))); width: auto; aspect-ratio: var(--ar); background: var(--dark-2); opacity: 0.25; transition: opacity 0.5s var(--ease); }
.viewer-slide.is-current img { opacity: 1; }
.viewer-foot { display: flex; align-items: center; gap: 16px; padding: 16px var(--gutter) 22px; }
.viewer-hint { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dark-muted); }
.viewer-nav { display: flex; gap: 10px; margin-left: auto; }
.viewer-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--dark-line); border-radius: 50%; transition: background 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s; }
.viewer-btn svg { width: 16px; height: 16px; }
.viewer-btn:disabled { opacity: 0.3; cursor: default; }

/* contact: the ways to reach me as rows, WeChat first; its code opens under it */
.contact { border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-text { font-size: 18px; line-height: 1.65; color: var(--body); max-width: 460px; margin-top: 26px; }
.reach { border-top: 1px solid var(--line-strong); }
.reach-item { border-bottom: 1px solid var(--line); }
.reach-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(18px, auto); align-items: center; column-gap: 20px; width: 100%; padding: 20px 0; text-align: left; color: var(--ink); }
.reach-name { font-family: var(--serif); font-size: 25px; line-height: 1.2; letter-spacing: -0.01em; justify-self: start; transition: transform 0.5s var(--ease), color 0.3s; }
.reach-detail { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.reach-icon { display: grid; place-items: center; width: 18px; height: 18px; color: var(--muted); }
.reach-icon .arrow { width: 13px; height: 13px; }
@media (hover: hover) { :is(button.reach-row, a.reach-row):hover .reach-name, a.reach-name:hover { transform: translateX(6px); } }
.reach-copy { justify-self: end; padding: 5px 9px; border-radius: 6px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); transition: color 0.25s, background 0.25s; }
.reach-copy:hover { color: var(--ink); background: var(--paper-2); }
.chev { display: inline-block; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.45s var(--ease); }
[aria-expanded="true"] .chev { transform: translateY(2px) rotate(-135deg); }
.reach-panel { overflow: hidden; }
[data-toggle] .when-open, [data-toggle][aria-expanded="true"] .when-closed { display: none; }
[data-toggle][aria-expanded="true"] .when-open { display: inline; }
html.js .reach-panel:not(.is-open) { display: none; }
/* the code image is printed on the paper colour (not white), so it sits on the page instead of on a white card */
.wechat { display: flex; align-items: flex-end; gap: 20px; margin: 0; padding: 2px 0 24px; }
.wechat-qr { width: 132px; height: auto; flex: none; }
.wechat figcaption { display: grid; gap: 6px; padding-bottom: 4px; max-width: 280px; font-size: 13.5px; line-height: 1.6; color: var(--body); }
.wechat-touch { display: none; color: var(--muted); }
.wechat-touch a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-compact { padding-top: clamp(64px, 8vw, 112px); }
@media (hover: none), (pointer: coarse) {
  .wechat-hint { display: none; }
  .wechat-touch { display: block; }
}

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px 0; font-size: 12.5px; color: var(--muted); }
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-left .mono { font-size: 11.5px; letter-spacing: 0.04em; }
.footer-note { font-size: 12px; color: var(--faint); }
.footer-right { display: flex; gap: 22px; align-items: center; }
.footer-right a { color: var(--body); transition: color 0.25s; }
.footer-right a:hover { color: var(--ink); }
.to-top { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- articles ---------- */

.article-head { padding-top: calc(var(--header-h) + clamp(32px, 6vh, 72px)); }
.back { display: inline-flex; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color 0.25s; }
.back:hover { color: var(--ink); }
.article-head > .eyebrow { margin-top: 56px; }
.article-title { font-size: clamp(38px, 4.8vw, 72px); margin-top: 20px; max-width: 1040px; }
.article-subtitle { font-size: 18px; color: var(--body); max-width: 680px; line-height: 1.65; margin-top: 26px; }
.article-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 44px; padding: 24px 0; }
.article-meta dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.article-meta dd { font-size: 14.5px; margin-top: 8px; color: var(--ink); }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding: clamp(56px, 7vw, 96px) 0; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc nav { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.toc a { font-size: 14px; color: var(--muted); transition: color 0.25s, padding-left 0.35s var(--ease); }
.toc a:hover, .toc a[aria-current] { color: var(--ink); }
.toc a[aria-current] { padding-left: 14px; position: relative; }
.toc a[aria-current]::before { content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }
.article-body { max-width: 760px; }
.lead { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.4; letter-spacing: -0.01em; }
.facts-article { grid-template-columns: repeat(3, 1fr); margin-top: 36px; }
.article-section { padding-top: 48px; }
.article-section h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; letter-spacing: -0.015em; line-height: 1.15; margin-bottom: 20px; }
.article-section p, .article-section li { font-size: 17px; line-height: 1.75; color: var(--body); }
.article-section p + p { margin-top: 18px; }
.article-section ul { display: grid; gap: 12px; margin-top: 20px; counter-reset: pt; }
.article-section li { position: relative; padding-left: 36px; counter-increment: pt; }
.article-section li::before { content: counter(pt, decimal-leading-zero); position: absolute; left: 0; top: 0.4em; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.article-body > .btn { margin-top: 40px; }
.source-note { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 24px; }
.source-note p { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 10px; }
.related { padding-bottom: clamp(56px, 7vw, 96px); }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.related-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 20px; border-top: 1px solid var(--line); padding-top: 22px; transition: color 0.3s; }
.related-row .eyebrow { grid-column: 1 / -1; }
.related-title { font-family: var(--serif); font-size: 30px; letter-spacing: -0.015em; line-height: 1.15; }
.related-row .arrow { width: 18px; height: 18px; margin-bottom: 6px; }
.error-page { padding: calc(var(--header-h) + 120px) 0 160px; min-height: 80vh; display: grid; gap: 24px; align-content: start; justify-items: start; }

/* ---------- life pages: a headline, then each photo set as a quiet grid ---------- */

.life-head { padding-top: calc(var(--header-h) + clamp(32px, 6vh, 72px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.life-head .eyebrow { display: block; margin-top: 56px; }
.life-title { font-size: clamp(44px, 6vw, 88px); margin-top: 18px; }
.life-lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--body); max-width: 620px; margin-top: 24px; }
/* the tile's drawing, grown into the page header (it keeps the tile's classes, so its motion carries over) */
.life-hero-art { justify-self: end; width: min(100%, 560px); }
.life-head .life-hero-art { grid-column: auto; }
.life-hero-art .art { height: 240px; }
.life-hero-art.tile-photo { width: 240px; }
.life-hero-art .art-photo svg { width: 240px; height: 240px; }
.life-hero-art .art-snow svg { height: 240px; }
.life-hero-art .art-cat svg { width: 100%; height: 240px; }
.life-set { padding-top: clamp(64px, 8vw, 112px); }
.life-set-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 28px; }
.life-set-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.015em; line-height: 1.1; }
.life-set-head p { font-size: 15.5px; color: var(--body); max-width: 520px; }
.life-set-count { margin-left: auto; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* ---------- photo pages ----------
   The build writes a page's photos as a plain grid; gallery.js lays them out afresh on every visit into flows
   (compositions on a 12-column grid, no photo small) and scenes (one photo full-screen, pinned while it plays). */
.gallery:not(.is-composed) { columns: 3 240px; column-gap: 14px; }
.gallery:not(.is-composed) > .ph { margin-bottom: 14px; break-inside: avoid; }
html.js:not(.late) .gallery:not(.is-composed) { visibility: hidden; min-height: 100vh; }
.ph { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: var(--ar, 3 / 4); overflow: hidden; background: var(--tone, var(--paper-3)); isolation: isolate; }
.ph-in { display: block; width: 100%; height: 100%; overflow: hidden; transition: scale 1.1s var(--ease); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph { cursor: zoom-in; }
@media (hover: hover) { .flow .ph:hover .ph-in { scale: 1.035; } }

/* flows */
.gallery.is-composed { display: block; }
.flow { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); align-items: start; margin-top: var(--gap, 10vw); }
.gallery.is-composed > .flow:first-child { margin-top: 0; }
.slot { grid-column: var(--c) / span var(--s); grid-row: 1; margin-top: var(--mt, 0); position: relative; }

/* scenes: the stage sticks to the screen while the tall section scrolls past; the page cuts to dark */
.scene { position: relative; margin-inline: calc(50% - 50vw); margin-top: clamp(64px, 8vw, 120px); }
.scene + .flow { margin-top: clamp(64px, 8vw, 120px); }
.scene-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene-bg { position: absolute; inset: 0; background: color-mix(in oklab, var(--tone) 18%, #0b0a09); opacity: 0; }
.scene-inner { position: absolute; inset: 0; display: grid; place-items: center; }
.scene-inner > .ph { grid-area: 1 / 1; }
.sc { will-change: transform; }
.sc-fit { width: min(calc(var(--k, 0.92) * 100vw), calc(var(--k, 0.92) * 100svh * var(--ar))); height: auto; aspect-ratio: var(--ar); }
/* on a phone a landscape fills the screen's height; gallery.js moves it across */
.sc-cover { width: auto; height: 100svh; aspect-ratio: var(--ar); max-width: none; }
html.in-scene .site-header { transform: translateY(-100%); }
body { transition: background-color 0.6s var(--ease); }
html.in-scene body { background-color: var(--scene-bg, #0b0a09); }
.life-next { padding-top: clamp(72px, 9vw, 128px); }

/* ---------- investing page: where I look, then one tab per portfolio ---------- */

.focus-grid.focus-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.focus-4 .focus-card h3 { font-size: 26px; margin: 34px 0 14px; }
.pf-tabs { display: flex; gap: 8px; margin-bottom: 36px; overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { flex: none; white-space: nowrap; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--body); transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
.pf-tab:hover { border-color: var(--ink); color: var(--ink); }
.pf-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
html:not(.js) .pf-tabs { display: none; }
html.js .pf-panel:not(.is-shown) { display: none; }
html:not(.js) .pf-panel + .pf-panel { margin-top: 72px; }
.pf-panel.is-shown { animation: panelIn 0.6s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }
.pf-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: end; margin-bottom: 36px; }
.pf-big { display: flex; flex-direction: column; gap: 10px; }
.pf-big > span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pf-big strong { font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 8.4vw, 124px); line-height: 0.92; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.pf-big .pstat-sign, .pf-big .pstat-unit { font-size: 0.5em; color: var(--muted); }
.pf .pstats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 24px; padding-bottom: 8px; }
.pf .pstat strong { font-size: clamp(30px, 3vw, 44px); }
.pf-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 20px; font-size: 13.5px; line-height: 1.7; color: var(--muted); max-width: 820px; }
.pf-key { display: inline-flex; align-items: center; gap: 8px; color: var(--body); white-space: nowrap; }
.pf-key i { display: inline-block; width: 22px; height: 0; border-top: 1.75px solid var(--ink); }
.pf-key i.is-bench { border-top: 1.5px dashed var(--muted); }
.pc-plot { position: relative; height: clamp(240px, 30vw, 380px); }
.pc-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pc .perf-line { stroke-width: 1.75; }
.pc-bench { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.pc .perf-dot { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
html.js:not(.reduced) .pf .pc-plot svg { clip-path: inset(0 100% 0 0); }
html.js:not(.reduced) .pf .perf-dot { opacity: 0; transform: scale(0); }
.pf.is-in .is-shown .pc-plot svg { animation: wipe 2s var(--ease) 0.15s forwards; }
.pf.is-in .is-shown .perf-dot { animation: popIn 0.5s var(--ease) 1.8s forwards, pulse 2.2s ease-out 2.3s infinite; }
.pc-cols { position: absolute; inset: 0; }
.pc-col { position: absolute; top: 0; bottom: 0; left: calc(var(--x) - var(--w) / 2); width: var(--w); }
.pc-guide { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); opacity: 0; transition: opacity 0.2s; }
.pc-pt { position: absolute; left: 50%; top: var(--y); width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity 0.2s; }
.pc-tip { position: absolute; top: 0; left: calc(50% + 10px); z-index: 2; white-space: nowrap; font-size: 11.5px; line-height: 1.4; color: var(--body); padding: 7px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(22, 21, 17, 0.35); opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.3s var(--ease); pointer-events: none; }
.pc-tip b { font-weight: 500; color: var(--ink); margin-right: 4px; }
.pc-col.is-right .pc-tip { left: auto; right: calc(50% + 10px); }
.pc-col:hover .pc-guide, .pc-col:hover .pc-pt, .pc-col:hover .pc-tip { opacity: 1; }
.pc-col:hover .pc-tip { transform: none; }
.pc-axis { position: relative; height: 22px; margin-top: 12px; font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); }
.pc-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.pc-axis span:last-child { transform: translateX(-100%); }
.pstats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.pstat strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4vw, 60px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pstat .pstat-sign, .pstat-unit { font-size: 0.58em; color: var(--muted); }
.pstat-unit { margin-left: 0.04em; }
.pstat-label { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- music page ---------- */

.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grade { border-top: 1px solid var(--line); padding-top: 22px; }
.grade strong { display: flex; align-items: baseline; gap: 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 8vw, 120px); line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.grade-unit { font-size: 0.28em; letter-spacing: 0; color: var(--muted); }
.grade-word { font-size: 0.56em; letter-spacing: 0.02em; line-height: 1.6; }
.grade strong { min-height: 1em; align-items: flex-end; }
.grade-label { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }
.instruments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.instrument { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 26px 24px 30px 0; border-bottom: 1px solid var(--line); }
.instrument-n { grid-row: 1 / span 2; font-size: 11px; color: var(--accent); padding-top: 12px; }
.instrument h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.01em; line-height: 1.2; }
.instrument p { font-size: 15.5px; line-height: 1.7; color: var(--body); max-width: 460px; }
.stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px 72px; align-items: center; }
.stage-copy { display: grid; gap: 48px; }
.stage-photo { margin: 0; aspect-ratio: var(--ar); overflow: hidden; background: var(--tone); }
.stage-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); }
.stage-text { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.4; letter-spacing: -0.01em; max-width: 620px; }
.stage-eq { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.stage-eq i { flex: 1; height: 20%; border-radius: 3px 3px 0 0; background: var(--ink); opacity: 0.85; transform-origin: bottom; animation: eq 1.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.13s); animation-play-state: paused; }
.stage-eq i:nth-child(5n) { background: var(--accent); }
.stage.is-in .stage-eq i { animation-play-state: running; }
.life-hero-art .art-music { height: 240px; gap: 10px; }
.life-hero-art .art-music i { width: 14px; border-radius: 7px 7px 0 0; }

.perf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); }
.perf-foot p { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 640px; }
.life-next .related-row { max-width: 640px; }
.error-page p { color: var(--body); font-size: 18px; }

/* ---------- Chinese typography ---------- */

:lang(zh-CN) body, :lang(zh-CN) { line-height: 1.8; }
:lang(zh-CN) .hero-name { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: 0.02em; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
:lang(zh-CN) .display { letter-spacing: 0; line-height: 1.25; font-size: clamp(28px, 3.2vw, 46px); }
:lang(zh-CN) .project-lead { line-height: 1.7; letter-spacing: 0.01em; }
:lang(zh-CN) .hero-lead { line-height: 1.8; font-size: 16.5px; }
:lang(zh-CN) .about-body p:first-child { font-size: 20px; line-height: 1.75; }
:lang(zh-CN) .about-body { font-size: 17px; line-height: 1.85; }
:lang(zh-CN) .xp-org { font-size: 20px; letter-spacing: 0.01em; }
:lang(zh-CN) .xp-name { letter-spacing: 0.02em; }
:lang(zh-CN) .focus-card h3, :lang(zh-CN) .tile h3, :lang(zh-CN) .research-title, :lang(zh-CN) .related-title { letter-spacing: 0; }
:lang(zh-CN) .ticker-item { font-size: 20px; }
:lang(zh-CN) .article-title { line-height: 1.2; font-size: clamp(36px, 5vw, 76px); }
:lang(zh-CN) .lead { line-height: 1.65; }
:lang(zh-CN) .article-section p, :lang(zh-CN) .article-section li, :lang(zh-CN) .xp-panel li, :lang(zh-CN) .focus-card p, :lang(zh-CN) .tile p { line-height: 1.85; }
:lang(zh-CN) em { font-style: normal; }
:lang(zh-CN) .focus-num, :lang(zh-CN) .loop-center { font-style: italic; }
/* big figures keep their own tight leading; the Chinese line-height above would otherwise stretch their parts */
:lang(zh-CN) :is(.grade, .pf-big, .pstat, .stat, .perf-total) strong * { line-height: inherit; }
/* the same for headings split into lines for their entrance: the lines take the heading's leading */
:lang(zh-CN) [data-split] :is(.line, .line-inner) { line-height: inherit; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .nav { gap: 20px; }
  .clock { display: none; }
  .research-row { grid-template-columns: 110px minmax(0, 1fr) 48px; }
  .article-layout { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav, .header-right .btn, .lang.desktop { display: none; }
  .menu-toggle { display: flex; }
  .header-right { margin-left: auto; gap: 16px; }
  .mobile-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 20px var(--gutter) 28px; flex-direction: column; gap: 6px; box-shadow: 0 30px 40px -30px rgba(22, 21, 17, 0.25); }
  .mobile-nav:not([hidden]) { display: flex; }
  .mobile-nav a { font-family: var(--serif); font-size: 30px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .mobile-nav a:last-child { border: 0; margin-top: 12px; font-family: var(--sans); font-size: 15px; font-weight: 500; }
  /* the words first, then the photos */
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding: 36px 0 56px; }
  .hero-copy { max-width: 620px; }
  .hero-foot { margin-top: 32px; }
  .hero-photos { justify-content: flex-start; }
  .hp-stage { width: 100%; }
  .section-title-row, .about-grid, .project, .contact-grid { grid-template-columns: 1fr; }
  .section-intro { justify-self: start; }
  .focus-grid { grid-template-columns: 1fr; border-left: 0; }
  .focus-card { border-right: 0; min-height: 0; padding: 30px 0 34px; }
  .focus-card h3 { margin-top: 24px; }
  .focus-card::before { left: 0; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .project-visual { width: min(100%, 400px); }
  .xp { grid-template-columns: 1fr; gap: 40px; }
  .xp-card { position: static; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: end; }
  .xp-id { margin-top: 0; }
  .xp-also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 10px 16px; padding: 28px 0; }
  .research-year { font-size: 28px; grid-column: 1; }
  .research-main { grid-column: 1; grid-row: 2; }
  .research-arrow { grid-column: 2; grid-row: 2; width: 40px; height: 40px; }
  .research-title { font-size: 26px; }
  .research-row:hover .research-title { transform: none; }
  .bento { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile-music, .tile-photo, .tile-snow, .tile-court, .tile-cat, .tile-invest { grid-column: span 1; }
  .tile { min-height: 300px; padding: 22px 22px 24px; }
  .tile h3 { font-size: 26px; }
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .life-head { grid-template-columns: 1fr; }
  .pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .focus-grid.focus-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--line); }
  .focus-4 .focus-card { border-right: 1px solid var(--line); padding: 26px 22px 30px; }
  .pf-head { grid-template-columns: 1fr; }
  .grades { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .instruments { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 1fr; }
  .life-hero-art { justify-self: start; }
  .life-hero-art .art { height: 160px; }
  .life-hero-art.tile-photo, .life-hero-art .art-photo svg { width: 160px; height: 160px; }
  .life-hero-art .art-snow svg, .life-hero-art .art-cat svg { height: 160px; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .toc nav { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .toc a[aria-current] { padding-left: 0; }
  .toc a[aria-current]::before { display: none; }
  .article-meta { grid-template-columns: 1fr; gap: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: start; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wordmark-mark { width: 26px; height: 26px; }
  .hero-name { font-size: 26px; }
  :lang(zh-CN) .hero-name { font-size: 24px; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { padding: 13px 18px; font-size: 14px; }
  .ticker-item { font-size: 18px; padding-right: 28px; }
  .ticker-dot { margin-left: 28px; }
  .section { padding: 72px 0; }
  .about-body p:first-child { font-size: 19px; }
  .facts dt { font-size: 22px; }
  .bento { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 10px; margin-top: var(--mgap, 18vw); }
  .slot { grid-column: var(--mc) / span var(--ms); grid-row: var(--mr, auto); margin-top: var(--mmt, 0); margin-bottom: 0; }
  .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-axis span:nth-child(even) { display: none; }
  .focus-grid.focus-4 { grid-template-columns: 1fr; }
  .pf-tab { padding: 9px 14px; font-size: 13px; }
  .pf .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-tip { font-size: 10.5px; white-space: normal; width: 170px; }
  .stage-eq { height: 110px; }
  .life-set-count { margin-left: 0; }
  .viewer { --vh-max: calc(100svh - 176px); --vw-max: 86vw; }
  .viewer-bar { gap: 12px; }
  .xp-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "years city" "org org" "role role"; row-gap: 4px; padding: 16px 0 17px; }
  .xp-org { font-size: 20px; }
  .xp-also { grid-template-columns: 1fr; }
  .contact-grid { gap: 36px; }
  .reach-name { font-size: 22px; }
  .reach-row { padding: 18px 0; column-gap: 14px; }
  .wechat { gap: 16px; }
  .wechat-qr { width: 116px; }
  .article-title { font-size: clamp(38px, 10vw, 60px); }
  .lead { font-size: 22px; }
  .article-section h2 { font-size: 30px; }
  .error-page { padding-top: calc(var(--header-h) + 64px); }
}

/* ---------- motion preferences & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (hover: none), (pointer: coarse) {
  .art-music i, .art-court .ball, .court-names > span, .art-photo .blades, .art-photo .pupil, .art-photo .ring2, .art-snow .flake { animation-play-state: running; }
  .viewer-hint { display: none; }
}
@view-transition { navigation: auto; }
@media print {
  .site-header, .progress, .grain, .ticker, .toc, .contact, .related, .toast, .scroll-cue { display: none !important; }
  html.js [data-reveal], html.js [data-hero], html.js [data-split] .line-inner { opacity: 1 !important; transform: none !important; visibility: visible !important; }
  .xp-card { position: static; }
  .container { width: 100%; max-width: none; }
  .section { padding: 32px 0; }
  .section-dark { background: none; color: var(--ink); }
  body { font-size: 12px; }
}
