/* ==========================================================================
   Yunhao — Chrome Minimal
   Quiet grid, thin rules and mono labels; chrome is reserved for the name,
   the tuning wave and the active channel. Day is the default theme.
   ========================================================================== */

:root {
  --rhythm: 40px;
  /* Solid 1px divider, Sequoia style */
  --rule: linear-gradient(var(--line), var(--line));
  --bg: #fbf7f0;
  --surface: #fffcf7;
  --ink: #1b1916;
  --muted: #6b655c;
  --line: #aeada9;
  --grid: #1b191610;
  --signal: #007354;
  --dock: #fffcf7e6;
  --chrome: linear-gradient(180deg, #5f5a52 0%, #1b1916 32%, #948d82 50%, #2e2a25 64%, #716b61 100%);
  --sheen-color: #ffffffb3;
  --holo: linear-gradient(110deg, #b7dcc9, #ece3cf 35%, #d5ebdc 65%, #b7dcc9);
  --glow: #00735422;

  --display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --body: "Geist", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --reading: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  /* Essays, Sequoia style: a quiet sans for titles, a book serif for reading (Unica77 / Rosart stand-ins) */
  --serif: "Newsreader", "Noto Serif SC", "Songti SC", Georgia, serif;

  --gutter: 6.25%;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

[data-theme=night] {
  --bg: #1b1916;
  --surface: #24211d;
  --ink: #fbf7f0;
  --muted: #9d968b;
  --line: #625d56;
  --grid: #ffffff0b;
  --signal: #4fb38b;
  --dock: #24211de0;
  --chrome: linear-gradient(180deg, #ffffff 0%, #d6d0c4 24%, #625c53 48%, #f8f4ec 57%, #a39c90 78%, #eee8dc 100%);
  --sheen-color: #ffffffd9;
  --glow: #4fb38b2e;
  color-scheme: dark;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font: 400 15px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .4s, color .4s;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 0, var(--bg) 75%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
em { font-style: normal; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--signal); outline-offset: 6px; }

.label, .eyebrow, .placeholder, .hud-tag, .art-label, .socials, #lang-toggle {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header + channel nav ---------- */

header {
  height: 104px;
  margin: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}
.brand { position: relative; display: inline-flex; align-items: baseline; padding: 9px 16px; overflow: hidden; isolation: isolate; color: #1b1916; }
.brand-foil { --x: 50%; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0) 0 14px, rgba(255,255,255,.55) 16px, rgba(255,255,255,0) 22px),
    conic-gradient(from 200deg at var(--x) 60%, #b7dcc9, #efe2cc, #d5ebdc, #f5e7c2, #b7dcc9);
  filter: saturate(1.15); }
.brand-foil::after { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
.brand-en { font: 700 28px/1 "Barlow", var(--body); letter-spacing: .06em; text-transform: uppercase; } /* DIN-like caps, after the Sequoia wordmark */
.brand-zh { display: none; font: 900 31px/1 "Noto Sans SC", "PingFang SC", sans-serif; letter-spacing: .04em; }
html[lang=zh-CN] .brand-en { display: none; }
html[lang=zh-CN] .brand-zh { display: inline; }
.tuner { width: 440px; flex-shrink: 0; }
nav { display: flex; }
nav a {
  width: 25%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  transition: color .2s;
}
nav a i { font: 9px var(--mono); font-style: normal; opacity: .6; }
nav a b { font: 500 10.5px var(--mono); letter-spacing: .14em; }
nav a:hover { color: var(--ink); }
nav a.active b { color: var(--ink); }
nav a.active i { color: var(--signal); opacity: 1; }

/* ---------- Layout ---------- */

main { max-width: 1600px; margin: auto; padding: 0 var(--gutter); }
.side { padding: var(--rhythm) 0 var(--rhythm); border-bottom: 1px solid var(--line); }

.side > :first-child { margin-top: 0; }

.side-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 9%; margin-top: 46px; }
.side-layout > * { min-width: 0; }

h2 {
  font: 400 clamp(30px, 3.6vw, 54px)/1.18 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 24px;
  text-wrap: balance;
}
html[lang=zh-CN] h2 { font-family: var(--body); font-weight: 300; text-transform: none; letter-spacing: .06em; line-height: 1.35; }

.section-desc { font-size: 14px; line-height: 1.9; color: var(--muted); max-width: 38em; }
.placeholder { display: block; margin-top: 20px; letter-spacing: .08em; text-transform: none; line-height: 1.7; }

/* HUD panel: two opposing corner brackets, no radius, no shadow */
.hud-panel {
  position: relative;
  padding: 26px 24px 20px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(6px);
}
.hud-panel::before, .hud-panel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
}
.hud-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-tag { position: absolute; top: -7px; right: 16px; padding: 0 8px; background: var(--bg); color: var(--signal); font-size: 9px; }

/* ---------- Origin ---------- */

/* Every page shares one centred content column; text inside it stays left-aligned */
.intro, .side { padding-inline: max(0px, calc((100% - 760px) / 2)); }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.intro-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 6%; align-items: center; padding: 30px 0 70px; }
.intro-grid > * { min-width: 0; }

.chrome-name {
  --sheen: 50%;
  position: relative;
  display: grid;
  margin: 34px 0 30px;
  font: 400 clamp(38px, 7.4vw, 124px)/1 var(--display);
  letter-spacing: .02em;
  cursor: default;
}
.name-face {
  grid-area: 1 / 1;
  background:
    linear-gradient(100deg, transparent calc(var(--sheen) - 12%), #b7dcc9cc calc(var(--sheen) - 5%), var(--sheen-color) var(--sheen), #d5ebdccc calc(var(--sheen) + 5%), transparent calc(var(--sheen) + 12%)),
    var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.name-zh { display: none; font-family: var(--body); font-weight: 500; letter-spacing: .16em; }
html[lang=zh-CN] .name-en { display: none; }
html[lang=zh-CN] .chrome-name { font-size: clamp(72px, 9vw, 140px); }
html[lang=zh-CN] .name-zh { display: block; }

.lead { font-size: 24px; font-weight: 300; line-height: 1.4; margin: 0 0 18px; }
.intro-note { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0; }
.social-note { font: 11px var(--mono); color: var(--muted); }

/* Tuning wave: noise resolves into a clean signal on each channel */
.wave {
  position: relative;
  width: 100%;
  height: 320px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: crosshair;
  touch-action: pan-y;
}
.wave canvas { display: block; width: 100%; height: 100%; }
.wave.locked { cursor: pointer; }
.wave-readout {
  position: absolute;
  top: 14px;
  left: 0;
  display: grid;
  gap: 4px;
  font: 10px var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#wave-ch { color: var(--signal); min-height: 1em; }
.wave-hint { position: absolute; right: 0; bottom: 12px; font: 9px var(--mono); letter-spacing: .14em; color: var(--muted); pointer-events: none; }
@keyframes spin { to { rotate: 360deg; } }

/* Long introduction */
.long-intro { max-width: none; margin-top: calc(var(--rhythm) - .55em); } /* minus the text's half-leading so the visible gap matches the line above */
.about > p:last-child { margin-bottom: 0; }
.about { margin-top: 0; font-size: 15px; line-height: 1.9; }
.about p { margin: 0 0 14px; }
.long-intro > .label, .about h3 { display: block; margin: 34px 0 10px; font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.9; letter-spacing: 0; text-transform: none; color: var(--ink); }
/* Subheads: same size as the text, set apart by a channel number, Syne caps and a rule */
.about { counter-reset: sub; }
.about h3 { counter-increment: sub; display: flex; align-items: center; gap: 12px; margin: 30px 0 6px; font: 800 15px/1.9 "Syne", var(--body); letter-spacing: .06em; text-transform: uppercase; }
html[lang=zh-CN] .about h3 { font-family: var(--body); font-weight: 700; letter-spacing: .12em; }
.about h3::before { content: "0" counter(sub); font: 400 11px/1 var(--mono); letter-spacing: .12em; color: var(--signal); }
.long-intro > .label { margin-top: 0; }
.peek { position: relative; border-bottom: 1px dashed var(--signal); cursor: default; outline: none; }
.peek-card { position: absolute; left: 0; bottom: calc(100% + 12px); width: 220px; aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center; background: var(--holo); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(27, 25, 22, .12); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 5; }
.peek-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peek-card > span { font: 400 9px var(--mono); letter-spacing: .16em; color: #1b1916; }
.peek:hover .peek-card, .peek:focus .peek-card { opacity: 1; transform: none; }
/* Name meaning: a text card over the name in the first line of the intro */
.name-card { position: absolute; left: 0; bottom: calc(100% + 10px); display: grid; gap: 4px; width: max-content; max-width: min(260px, 80vw); padding: 10px 14px; font-size: 13px; line-height: 1.7; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(27, 25, 22, .1); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 5; }
.name-card b { font: 400 10px var(--mono); letter-spacing: .16em; color: var(--signal); }
.peek:hover .name-card, .peek:focus .name-card { opacity: 1; transform: none; }
/* Scrolled away: the card drifts up, shrinks toward its word and softens out */
.peek-hush .peek .peek-card, .peek-hush .peek .name-card { opacity: 0; transform: translateY(-8px) scale(.92); filter: blur(6px); transform-origin: 24px 100%; transition: opacity .35s, transform .35s var(--ease), filter .35s; }
.about strong { font-weight: 500; background: var(--holo); background-size: 200% 100%; padding: 0; color: var(--ink); }
[data-theme="night"] .about strong { color: #1b1916; }

/* ---------- Tech ---------- */

.entry {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.entry i { font: 10px var(--mono); font-style: normal; color: var(--muted); }
.entry h3 { font-size: 16px; font-weight: 400; margin: 0; }
.entry .tags { font: 9px var(--mono); letter-spacing: .14em; color: var(--muted); border: 1px solid var(--line); padding: 3px 7px; }
.entry em { color: var(--signal); }

/* ---------- Art ---------- */

.art-wall {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 120px 120px;
  gap: 8px;
}
.tile { position: relative; background: var(--surface); filter: grayscale(1); transition: filter .4s, outline-color .4s; outline: 1px solid var(--line); outline-offset: -1px; }
.tile:hover { filter: none; outline: 1px solid transparent; box-shadow: 0 0 0 1px #b7dcc9, 0 0 24px #b7dcc955; }
.t1 { grid-row: span 2; background: radial-gradient(circle at 30% 30%, #f8f4ec, #6f695f 40%, #1b1916 75%); }
.t2 { background: linear-gradient(135deg, #b7dcc9, #ece3cf 50%, #d5ebdc); }
.t3 { background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 8px), var(--surface); }
.t4 { grid-column: span 2; background: linear-gradient(180deg, #eee8dc, #625c53 50%, #d6d0c4); }
.art-label { display: flex; justify-content: space-between; padding-top: 14px; }

/* ---------- Thoughts: signal off, back to reality ---------- */

.reading { max-width: 640px; margin: 46px auto 0; }
.quiet h2 { font-family: var(--reading); text-transform: none; letter-spacing: 0; font-size: clamp(32px, 3.4vw, 48px); }
.idea { margin-top: 48px; border-left: 1px solid var(--line); padding-left: 32px; }
.idea > p { font: 400 30px/1.4 var(--reading); margin: 18px 0; }
.idea em { color: var(--signal); }

/* ---------- Tech + Art panes ---------- */

.seg { --n: 2; --i: 0; position: relative; display: inline-grid; grid-template-columns: repeat(var(--n), 1fr); margin-top: var(--rhythm); border: 1px solid var(--line); padding: 3px; isolation: isolate; }
.seg button { position: relative; border: 0; background: none; padding: 10px 22px; font: 500 14px var(--body); color: var(--ink); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed=true] { color: #1b1916; }
.seg .knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); z-index: -1; transform: translateX(calc(var(--i) * 100%)); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
  background: repeating-linear-gradient(115deg, #fff0 0 12px, #ffffff8c 14px, #fff0 19px), conic-gradient(from 200deg at 50% 60%, #b7dcc9, #efe2cc, #d5ebdc, #f5e7c2, #b7dcc9); }
#tech-host, #art-host { margin-top: var(--rhythm); }
.pane-sub { color: var(--muted); margin: 26px 0 26px; max-width: 36em; font-size: 15px; line-height: 1.8; }
.ph { position: relative; display: grid; place-items: end start; padding: 10px; background: var(--holo); border: 1px solid var(--line); max-width: 100%; }
.ph.ph-2 { background: linear-gradient(160deg, #ece3cf, #d5ebdc); } .ph.ph-3 { background: linear-gradient(200deg, #d5ebdc, #b7dcc9 70%); } .ph.ph-4 { background: linear-gradient(30deg, #f5e7c2, #ece3cf 60%, #b7dcc9); }
.ph > span { font: 9px var(--mono); letter-spacing: .14em; color: #1b1916; background: #fffcf7d9; padding: 4px 6px; }
.side .kind { font: 10px var(--mono); letter-spacing: .14em; color: var(--signal); }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 5%; align-items: start; }
.rows a { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--ink); transition: padding .25s var(--ease); }
.rows a.on { padding-left: 12px; }
.rows a.on h3 { background: var(--holo); color: #1b1916; }
.rows .when { font: 11px var(--mono); letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.rows h3 { margin: 0; padding: 0 .1em; font: 400 clamp(20px, 2.4vw, 28px)/1.2 var(--serif); letter-spacing: 0; }
html[lang=zh-CN] .rows h3 { font-weight: 500; }
.rows .kind { margin-left: auto; white-space: nowrap; }
.rows em { font-style: normal; }
.preview { position: sticky; top: 140px; display: grid; gap: 12px; }
.preview .ph { aspect-ratio: 4 / 3; }
.preview .cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.rows a[role=button] { cursor: default; }
.rows .drawer { display: none; }
.preview p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.career { max-width: 980px; }
.job { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.job:last-child, .rows a:last-child { border-bottom: 0; padding-bottom: 0; }
/* Content starts exactly one rhythm below the tabs, on every pane */
.job:first-child, .rows a:first-child { padding-top: 0; }
/* Optical trims so the last line of every page sits as far above the divider as the footer sits below it */
.workgrid, .board { margin-bottom: 3px; }
.archive .yr:last-child a:last-child { border-bottom: 0; padding-bottom: 0; }
.job .span { font: 400 clamp(20px, 2vw, 26px)/1.1 var(--body); letter-spacing: -.02em; white-space: nowrap; }
.job .span i { font-style: normal; color: var(--signal); margin: 0 .12em; }
html[lang=zh-CN] .job .span { font-size: clamp(20px, 2vw, 26px); }
.job h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.job .logo { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: transform .4s var(--ease); }
.job .logo .wash { stroke: none; opacity: .9; }
.job:hover .logo { transform: rotate(-8deg); }
.job p { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; } .job .todo { font-style: italic; }
.deal .job { animation: deal .55s cubic-bezier(.2, .8, .3, 1.2) backwards; } .deal .job:nth-child(2) { animation-delay: .07s; } .deal .job:nth-child(3) { animation-delay: .14s; }
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pin { position: relative; background: var(--surface); border: 1px solid var(--line); padding: 10px 10px 12px; box-shadow: 0 10px 24px #1b19160f; transition: transform .3s var(--ease); outline: none; min-width: 0; }
.pin:hover, .pin:focus-visible { z-index: 2; }
.pin .ph { aspect-ratio: 1; }
.pin h3 { margin: 10px 0 2px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.pin .why { max-height: 0; overflow: hidden; padding-bottom: 6px; margin-bottom: -6px; transition: max-height .4s var(--ease); font-size: 13px; line-height: 1.6; color: var(--muted); }
.pin:hover .why, .pin:focus .why { max-height: 260px; }
.pin .why p { margin: 8px 0 0; }
.pin .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pin-1 { grid-column: 1 / span 4; rotate: -2deg; } .pin-2 { grid-column: 5 / span 3; margin-top: 60px; rotate: 1.5deg; }
.pin-3 { grid-column: 8 / span 4; rotate: -1deg; } .pin-4 { grid-column: 2 / span 4; rotate: 2deg; }
.pin-5 { grid-column: 7 / span 4; margin-top: -30px; rotate: -1.5deg; }
.pin:hover, .pin:focus { rotate: 0deg; scale: 1.02; }
.workgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.workgrid .ph { aspect-ratio: 1; }
.workgrid .wide { grid-column: span 2; aspect-ratio: 2 / 1; }

/* A real work: cover photo under the caption chip, opens the photo viewer */
.work-cover { overflow: hidden; color: inherit; }
.work-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-cover span { position: relative; }
.work-cover:hover img, .work-cover:focus-visible img { transform: scale(1.03); }

/* ---------- Photo viewer ---------- */
/* Plain field the colour of the page; photo on top, an optional note under it, filmstrip at the foot */
html.viewing { overflow: hidden; }
.viewer { --v-bg: var(--bg); position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; --v-room: 0px; background: var(--v-bg); color: var(--ink); animation: v-in .35s var(--ease); }
.viewer[hidden] { display: none; }
@keyframes v-in { from { opacity: 0; } }
.v-bar { display: flex; align-items: baseline; gap: 18px; padding: 18px var(--gutter) 14px; font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.v-back { color: var(--signal); text-decoration: none; white-space: nowrap; }
.v-title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v-count { margin-left: auto; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.viewer.has-note { --v-room: 7.5em; }
.v-stage { position: relative; display: flex; justify-content: center; align-items: flex-start; padding: 0 var(--gutter); touch-action: pan-y; }
.v-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 140px - var(--v-room)); width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .35s var(--ease); user-select: none; -webkit-user-drag: none; }
.v-stage img.in { opacity: 1; }
.v-stage button { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; padding: 0 calc(var(--gutter) * .35); background: none; color: var(--ink); font: 18px var(--mono); cursor: pointer; display: flex; align-items: center; }
.v-prev { left: 0; cursor: w-resize !important; } .v-next { right: 0; justify-content: flex-end; cursor: e-resize !important; }
.v-stage button span { opacity: 0; transition: opacity .25s; }
.v-stage button:hover span, .v-stage button:focus-visible span { opacity: .6; }
.v-stage button:focus-visible { outline: none; }
.v-note { margin: 18px auto 0; padding: 0 var(--gutter); max-width: calc(34em + 2 * var(--gutter)); font: 400 16px/1.8 var(--serif); color: var(--ink); text-align: center; }
.v-strip { grid-row: 5; align-self: end; display: flex; gap: 6px; overflow-x: auto; padding: 18px var(--gutter) max(22px, env(safe-area-inset-bottom)); scrollbar-width: none; }
.v-strip::-webkit-scrollbar { display: none; }
.v-strip button { flex: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .4; transition: opacity .25s; outline-offset: 2px; }
.v-strip button:hover { opacity: .8; }
.v-strip button.on { opacity: 1; outline: 1px solid var(--ink); }
.v-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Touch screens: no arrows beside the photo; two small ones sit at the ends just above the filmstrip */
.v-arrows { display: none; grid-row: 4; align-self: end; justify-content: space-between; padding: 0 var(--gutter); font: 13px var(--mono); color: var(--ink); opacity: .45; pointer-events: none; }
@media (hover: none) { .v-stage button span { display: none; } .v-arrows { display: flex; } .viewer { cursor: pointer; -webkit-tap-highlight-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .viewer, .v-stage img, .work-cover img { animation: none; transition: none; } }

.deal .rows a, .deal .preview, .deal .pin, .workgrid.deal > .ph { animation: deal .55s cubic-bezier(.2, .8, .3, 1.2) backwards; }
.deal .rows a:nth-child(2), .deal .pin:nth-child(2), .workgrid.deal > .ph:nth-child(2) { animation-delay: .07s; }
.deal .rows a:nth-child(3), .deal .pin:nth-child(3), .workgrid.deal > .ph:nth-child(3) { animation-delay: .14s; }
.deal .pin:nth-child(4), .workgrid.deal > .ph:nth-child(4) { animation-delay: .21s; }
.deal .pin:nth-child(5), .workgrid.deal > .ph:nth-child(5) { animation-delay: .28s; } .workgrid.deal > .ph:nth-child(6) { animation-delay: .35s; }
@keyframes deal { from { opacity: 0; transform: translateY(-36px) rotate(-10deg) scale(.92); } }
@media (prefers-reduced-motion: reduce) { .seg .knob, .rows a, .pin, .pin .why, .rows .drawer { transition: none; } .deal * { animation: none !important; } }

/* ---------- Thoughts: featured essay, archive, reader ---------- */
#thoughts-host { max-width: none; }
#thoughts-host > .essay { margin-top: var(--rhythm); }
.feature { display: block; margin-bottom: var(--rhythm); color: inherit; text-decoration: none; }
.feature > .kind:first-child { display: block; line-height: 1.3; }
.feature h3 { font: 400 clamp(34px, 5.4vw, 60px)/1.1 var(--body); letter-spacing: -.025em; margin: 10px 0 18px; }
html[lang=zh-CN] .feature h3 { font-weight: 500; letter-spacing: .02em; }
.feature h3 span { background: var(--holo); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; color: #1b1916; }
.feature p { margin: 0 0 14px; }
.feature em { font-style: normal; display: inline-block; transition: transform .2s; }
.feature:hover em { transform: translateX(4px); }
.archive h4 { margin: 0 0 8px; color: var(--muted); }
.archive .yr { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; border-top: 1px solid; border-image: var(--rule) 1; padding-top: 14px; }
.archive .yr + .yr { margin-top: calc(var(--rhythm) * .8); }
.archive .yr > span { font: 400 28px/1 var(--body); letter-spacing: -.02em; }
.archive a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: inherit; text-decoration: none; }
.archive a b { font: 400 18px/1.4 var(--serif); }
.archive a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.archive .when { font: 400 10px var(--mono); letter-spacing: .12em; color: var(--muted); white-space: nowrap; }
.essay { margin: 0; }
.essay .back { display: block; width: max-content; margin-bottom: 36px; color: var(--muted); text-decoration: none; }
.essay .back:hover { color: var(--ink); }
.essay h1 { font: 400 clamp(36px, 5.6vw, 64px)/1.08 var(--body); letter-spacing: -.025em; margin: 12px 0 18px; text-wrap: balance; }
html[lang=zh-CN] .essay h1 { font-weight: 500; letter-spacing: .02em; line-height: 1.25; }
.essay .by { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 30px; }
.essay-body { max-width: 640px; font-family: var(--serif); }
.essay-body p { margin: 0 0 1.2em; font-size: 20px; line-height: 1.55; }
html[lang=zh-CN] .essay-body p { font-size: 18px; line-height: 1.9; letter-spacing: .02em; }
.essay-body strong { font-weight: 600; }
.essay-body > p:first-child::first-letter { float: left; font: 400 78px/.78 var(--serif); padding: 8px 10px 0 0; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.essay-body > p + p { clear: left; }
.essay-body h2 { clear: left; font: 400 32px/1.15 var(--serif); letter-spacing: -.01em; text-transform: none; margin: 1.8em 0 .7em; }
html[lang=zh-CN] .essay-body h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.35; letter-spacing: .02em; }
html[lang=zh-CN] .essay-body > p:first-child::first-letter { font: 600 56px/.9 var(--serif); }
.essay-body ul { margin: 0 0 1.4em; padding-left: 1.2em; font-size: 20px; line-height: 1.55; }
.essay-body li { margin: 0 0 .5em; padding-left: .2em; }
.essay-body li::marker { color: var(--muted); }
html[lang=zh-CN] .essay-body ul { font-size: 18px; line-height: 1.9; letter-spacing: .02em; }
.essay-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid; border-image: var(--holo) 1; font-size: 24px; font-style: italic; line-height: 1.45; }
.essay-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid; border-image: var(--rule) 1; margin-top: 48px; padding-top: 16px; }
.essay-nav:empty { display: none; }
.essay-nav a { display: grid; gap: 4px; max-width: 48%; color: inherit; text-decoration: none; }
.essay-nav a.nx { margin-left: auto; text-align: right; }
.essay-nav b { font: 400 18px/1.4 var(--serif); }
.read-progress { position: fixed; left: 0; top: 0; z-index: 60; width: 100%; height: 3px; background: var(--holo); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* ---------- Footer ---------- */

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: var(--rhythm) max(0px, calc((100% - 760px) / 2)) 96px; } /* bottom clears the fixed controls dock */
.socials { display: flex; gap: 26px; }
.socials a { border-bottom: 1px solid var(--line); padding-bottom: 6px; color: var(--ink); }
.socials em { color: var(--signal); margin-left: 8px; }

/* ---------- Control dock ---------- */

.controls {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: var(--dock);
  backdrop-filter: blur(15px);
  white-space: nowrap;
}
.divider { height: 16px; width: 1px; background: var(--line); }
.controls button { padding: 0; display: flex; align-items: center; gap: 9px; border: 0; background: none; cursor: pointer; min-height: 24px; }
.sun, .moon { font-size: 17px; color: var(--muted); }
.toggle-track { display: inline-flex; align-items: center; width: 30px; height: 15px; padding: 2px; border: 1px solid var(--line); }
.toggle-track span { width: 9px; height: 9px; background: var(--signal); transition: transform .25s var(--ease); }
[data-theme=night] .toggle-track span { transform: translateX(15px); }
#lang-toggle { font-size: 11px; }
.lang-slash, .zh-label { color: var(--muted); }
html[lang=zh-CN] .zh-label { color: var(--ink); }
html[lang=zh-CN] .en-label { color: var(--muted); }

/* ---------- Motion layers: channel switch ---------- */


/* Page switch: the content fades out, swaps, and fades back in */
.tuning main { animation: fade .42s var(--ease) both; }
@keyframes fade {
  0% { opacity: 1; }
  33% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  header { gap: 24px; }
  .tuner { width: 380px; }
}

@media (max-width: 760px) {
  header { height: auto; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 0 8px; }
  .tuner { width: 100%; }
  .intro-grid, .side-layout { grid-template-columns: 1fr; gap: 36px; }
  .wave { height: 220px; }
}

@media (max-width: 600px) {
  :root { --gutter: 6%; --rhythm: 24px; }
  main { padding: 0 var(--gutter); }
  nav a { flex-direction: column; gap: 0; height: 40px; }
  nav a b { font-size: 9.5px; }
  .chrome-name { margin: 24px 0 22px; }
  .lead { font-size: 20px; }
  .side-layout { margin-top: 26px; }
  .hud-panel { padding: 22px 16px 16px; }
  .entry { grid-template-columns: 26px 1fr auto; }
  .entry .tags { display: none; }
  .art-wall { grid-template-rows: 90px 90px; }
  .split { grid-template-columns: 1fr; } .preview { display: none; }
  .rows a { flex-wrap: wrap; } .rows a[role=button] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .rows .drawer { display: grid; grid-template-rows: 0fr; flex-basis: 100%; order: 9; transition: grid-template-rows .35s var(--ease); }
  .rows .drawer > span { overflow: hidden; min-height: 0; }
  .rows .drawer img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 6px; border: 1px solid var(--line); }
  .rows a.open .drawer { grid-template-rows: 1fr; }
  .rows a[role=button].on { padding-left: 0; } .rows a[role=button].on h3 { background: none; color: inherit; }
  .rows a[role=button].open { padding-left: 12px; } .rows a[role=button].open h3 { background: var(--holo); color: #1b1916; }
  .board { grid-template-columns: 1fr 1fr; } .board .pin { grid-column: auto; margin-top: 0; }
  .workgrid { grid-template-columns: 1fr 1fr; }
  .seg button { padding: 10px 12px; font-size: 13px; }
  .job { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
  .archive .yr { grid-template-columns: 1fr; gap: 6px; }
  /* Phone rhythm: subheads sit closer to their text, big display type steps down */
  .about h3 { margin: 22px 0 4px; }
  .feature h3 { font-size: 32px; margin: 8px 0 14px; }
  .essay-body p { font-size: 18px; }
  .essay-body h2 { font-size: 26px; }
  .essay-body ul { font-size: 18px; }
  .archive .yr > span { font-size: 24px; }
  .archive a { padding: 9px 0; }
  .ph > span { letter-spacing: .08em; }
  .essay { margin-top: 24px; }
  .idea { padding-left: 20px; }
  .idea > p { font-size: 25px; }
  footer { flex-wrap: wrap; row-gap: 14px; padding-bottom: 80px; }
  .controls { bottom: 16px; gap: 13px; padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Selected text: mint wash + wavy underline. Keep the underline continuous under descenders (g, p, y) */
body { text-decoration-skip-ink: none; text-underline-offset: 3px; }
::selection { background: #cfe6d9; color: #1b1916; text-decoration: underline wavy #007354; text-decoration-thickness: 1.5px; text-decoration-skip-ink: none; text-underline-offset: 3px; }
/* Where the Custom Highlight API exists, app.js mirrors the selection into a highlight and the highlight paints both
   the wash and the wave, so they cover exactly the same glyphs (native ::selection boxes also fill the line gap and
   trailing spaces at wraps, which put the wash and the wave out of step). iOS Safari also ignores decorations on ::selection. */
.has-sel-hl ::selection { background: transparent; text-decoration: none; }
::highlight(sel-line) { background-color: #cfe6d9; color: #1b1916; text-decoration: underline wavy #007354; text-decoration-thickness: 1.5px; text-decoration-skip-ink: none; text-underline-offset: 3px; }
