/* zhuhanyu.me — portfolio styles. No framework; one file. */
@font-face {
  font-family: "Josefin Slab";
  src: url("/assets/fonts/josefin-slab-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 112%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2010-2013, U+2018-201E, U+2022, U+2026, U+2030-203A, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Josefin Slab", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --red: #ff3b1f;
  --pad: clamp(20px, 5vw, 72px);
  --chrome-h: 72px;
  --grid: 12px;
}
html[data-theme="dark"] {
  --bg: #121211; --ink: #ebe7de; --ink-2: #a19d93; --ink-3: #6d6a63;
  --line: rgba(235, 231, 222, .16); --line-2: rgba(235, 231, 222, .34);
  --dot: rgba(235, 231, 222, .075); --dot-hi: rgba(235, 231, 222, .32);
  --frame-bg: #1a1a18;
}
html[data-theme="light"] {
  --bg: #f4f2ec; --ink: #1c1b17; --ink-2: #6f6b62; --ink-3: #9e998f;
  --line: rgba(28, 27, 23, .14); --line-2: rgba(28, 27, 23, .32);
  --dot: rgba(28, 27, 23, .085); --dot-hi: rgba(28, 27, 23, .34);
  --red: #ff2200; --frame-bg: #eceae3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 400; font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--red); color: #fff; }

/* language switch: only the active language is rendered (and read) */
html[data-lang="zh"] [data-l="en"], html[data-lang="en"] [data-l="zh"] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--red); outline-offset: 5px; border-radius: 2px; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 6px 12px;
  background: var(--ink); color: var(--bg); font-size: 13px; transform: translateY(-160%);
  transition: transform .3s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ---------- ambient dot grid ---------- */
.dots-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, var(--dot) .9px, transparent 1.35px);
  background-size: var(--grid) var(--grid); background-position: center; }
.dots-bg::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, var(--dot-hi) 1px, transparent 1.45px);
  background-size: var(--grid) var(--grid); background-position: center;
  -webkit-mask-image: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
          mask-image: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
  opacity: var(--spot, 0); transition: opacity .6s var(--ease); }
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- chrome: back arrow + controls ---------- */
.chrome { position: fixed; inset: 0 0 auto 0; height: var(--chrome-h); z-index: 50; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
.chrome > * { pointer-events: auto; }
.back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); opacity: .85;
  transition: opacity .3s, transform .4s var(--ease); }
.back svg { width: 24px; height: 24px; }
.back:hover { opacity: 1; transform: translate(-2px, -2px); }
.back[hidden] { display: grid; visibility: hidden; opacity: 0; }
.controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.controls button { height: 44px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); transition: color .3s; }
.controls button:hover { color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; transition: transform .7s var(--ease); }
html[data-theme="light"] .theme-toggle svg { transform: rotate(180deg); }
.lang-toggle { gap: 3px; font-size: 14px; letter-spacing: .02em; padding: 0 6px; }
.lang-toggle .opt { opacity: .5; transition: opacity .3s, transform .3s var(--ease); }
.lang-toggle .sep { opacity: .35; font-size: 12px; }
html[data-lang="zh"] .lang-toggle [data-opt="zh"], html[data-lang="en"] .lang-toggle [data-opt="en"] { opacity: 1; color: var(--ink); }

/* ---------- the red dot ---------- */
.dot { position: relative; flex: 0 0 auto; width: .2em; height: .2em; border-radius: 50%; background: var(--red);
  margin-left: .32em; align-self: center; transform: translateY(.08em);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1.4); view-transition-name: title-dot; }
button.dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }
button.dot:hover { transform: translateY(.08em) scale(1.45); }
button.dot:active { transform: translateY(.08em) scale(.9); }
button.dot:focus-visible { outline-offset: 8px; border-radius: 50%; }
.intro-wait button.dot { animation: beckon 1.8s var(--ease) infinite; }
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 60% { box-shadow: 0 0 0 .5em transparent; } }
.dot.is-static { display: inline-block; vertical-align: baseline; transform: none; margin-left: .14em; width: .16em; height: .16em; }

/* ---------- views (home) ---------- */
main { position: relative; z-index: 2; }
.js .home .view { position: fixed; inset: 0; opacity: 0; visibility: hidden; transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .8s var(--ease), visibility 0s linear .8s; }
.js .home .view.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .12s, .12s, 0s; }
.js .home .view.stage:not(.is-active) { transform: translateY(-36px); }

.stage { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--chrome-h) var(--pad); }
.title-line { display: inline-flex; align-items: baseline; font-size: clamp(34px, 5.2vw, 60px); line-height: 1.1; letter-spacing: .01em; }
.title { font: inherit; font-weight: 300; }
.title .text { display: inline-block; white-space: pre; min-height: 1.1em; }
.ch { display: inline-block; animation: pop .2s cubic-bezier(.2, .8, .2, 1.3) both; }
@keyframes pop { from { opacity: 0; transform: translateY(.08em) scale(.55); } to { opacity: 1; transform: none; } }
.js .stage .title-line { cursor: default; }
.intro-wait .stage { cursor: pointer; }

.hint { position: absolute; left: 0; right: 0; bottom: calc(14vh + env(safe-area-inset-bottom)); font-size: 13px; letter-spacing: .12em; color: var(--ink-3);
  opacity: 0; transition: opacity .8s var(--ease); pointer-events: none; }
.intro-hint .hint { opacity: 1; }

.menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 30px; margin-top: 30px; font-size: 15px; letter-spacing: .06em; }
.menu a { position: relative; display: inline-block; padding: 8px 2px; color: var(--ink-2); transition: color .35s; }
.menu a::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 3px; height: 3px; border-radius: 50%; background: var(--red);
  transform: translateX(-50%) scale(0); transition: transform .35s cubic-bezier(.2, .8, .2, 1.4); }
.menu a:hover, .menu a:focus-visible { color: var(--ink); }
.menu a:hover::after, .menu a:focus-visible::after, .menu a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }
.menu-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px; }
.more { flex-basis: 100%; display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.more-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 6px; font-size: 13px; letter-spacing: .06em; color: var(--ink-3); transition: color .3s; }
.more-toggle:hover, .more-toggle[aria-expanded="true"] { color: var(--ink-2); }
.more-ico { position: relative; width: 9px; height: 9px; }
.more-ico::before, .more-ico::after { content: ""; position: absolute; left: 0; top: 4px; width: 9px; height: 1px; background: currentColor; transition: transform .45s var(--ease); }
.more-ico::after { transform: rotate(90deg); }
.more-toggle[aria-expanded="true"] .more-ico::after { transform: rotate(0deg); }
.menu-row.minor { font-size: 13px; gap: 0 22px; }
.menu-row.minor a { color: var(--ink-3); padding: 5px 2px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.menu-row[hidden] { display: none !important; }
.menu-sub { flex-basis: 100%; display: flex; justify-content: center; gap: 22px; margin-top: 6px; font-size: 13px; }
.menu-sub a { color: var(--ink-3); }

/* menus reveal with a stagger; hidden menus are display:none so they leave the tab order */
.js .stage .menu { display: none; }
.js .stage .menu.is-open { display: flex; flex-wrap: wrap; }
.js .menu.is-open a { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- scrollers + snap ---------- */
.scroller { overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y proximity; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.snap { position: relative; min-height: 100vh; min-height: 100svh; scroll-snap-align: start; }
html:has(body.detail) { scroll-snap-type: y proximity; scroll-behavior: smooth; }

.pager { position: fixed; right: max(14px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 2px; }
.pager button { width: 28px; height: 22px; display: grid; place-items: center; }
.pager button::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); transition: transform .4s var(--ease), background-color .4s; }
.pager button:hover::before { background: var(--ink-2); transform: scale(1.6); }
.pager button[aria-current="true"]::before { background: var(--ink); transform: scale(2.2); }

.cue { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; transition: opacity .4s; }
.cue span { width: 13px; height: 22px; display: block;
  background: radial-gradient(circle, var(--red) 1px, transparent 1.4px) 0 0 / 13px 4px repeat-y;
  -webkit-mask: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  animation: cue 2.2s var(--ease) infinite; }
.cue::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 9px; height: 9px; margin-left: -4.5px; border-right: 1px solid var(--red); border-bottom: 1px solid var(--red); transform: rotate(45deg) scale(.6); opacity: .9; }
@keyframes cue { 0% { transform: translateY(-5px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
.cue.is-gone { opacity: 0; pointer-events: none; }

/* reveal on scroll */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- frames (screens + portrait) ---------- */
.frame { position: relative; padding: 14px; border: 1px solid var(--line-2); background: var(--frame-bg); }
.frame::before { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--line); pointer-events: none; }
.frame > img, .frame > canvas { position: relative; width: 100% !important; height: auto !important; }
.frame .c { position: absolute; width: 9px; height: 9px; border: 1px solid var(--line-2); background: var(--bg); transform: rotate(45deg); }
.frame .tl { left: -5px; top: -5px; } .frame .tr { right: -5px; top: -5px; } .frame .bl { left: -5px; bottom: -5px; } .frame .br { right: -5px; bottom: -5px; }
.emblem-canvas { display: block; margin: 0 auto; }

/* ---------- about ---------- */
.about-cover { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(28px, 6vw, 110px);
  padding: calc(var(--chrome-h) + 24px) calc(var(--pad) + 26px) 96px var(--pad); max-width: 1240px; margin: 0 auto; }
.cv-name { font-size: clamp(44px, 6vw, 72px); font-weight: 300; line-height: 1.05; letter-spacing: .02em; }
.latin { margin-top: 12px; font-size: 13px; letter-spacing: .08em; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; font-size: 13px; color: var(--ink-2); }
.intro { margin-top: 22px; max-width: 30em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.75; color: var(--ink); opacity: .9; }
.quick { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 26px; font-size: 16px; }
.quick a { padding: 4px 0; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.quick a:hover, .quick a:focus-visible { background-size: 100% 1px; }
.mail { margin-top: 24px; font-size: 14px; }
.mail a { padding-bottom: 4px; border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.mail a:hover { border-color: var(--red); }
.portrait { max-width: 360px; justify-self: center; width: 100%; }
.portrait picture, .portrait img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; }
.portrait img { filter: saturate(.92) contrast(1.02); transition: filter .8s var(--ease); }
/* a faint dot screen over the photo, in the site's dot language; lifts on hover */
.portrait .screen { position: absolute; inset: 14px; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(0, 0, 0, .2) .8px, transparent 1.3px); background-size: 4px 4px;
  opacity: .55; transition: opacity .8s var(--ease); }
.portrait::after { content: ""; position: absolute; right: 26px; top: 26px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.portrait:hover .screen { opacity: 0; }
.portrait:hover img { filter: none; }

.about-details { max-width: 1040px; margin: 0 auto; padding: calc(var(--chrome-h) + 10px) calc(var(--pad) + 26px) 64px var(--pad); }
.row { display: grid; grid-template-columns: minmax(120px, 1fr) 3fr; gap: 10px 40px; padding: 30px 0 22px; }
.row + .row { border-top: 1px solid var(--line); }
.row h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 300; line-height: 1.3; }
.list .item { position: relative; padding: 6px 0 12px; }
.list h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 400; }
.list h3 a, .list .nolink { display: inline-flex; align-items: center; gap: 4px; }
.list h3 a span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.list h3 a:hover span, .list h3 a:focus-visible span { background-size: 100% 1px; }
.list h3 a .ico { opacity: .55; transition: transform .4s var(--ease), opacity .3s; }
.list h3 a:hover .ico { opacity: 1; transform: translate(2px, -2px); color: var(--red); }
.list time, .plain time { font-size: 13px; color: var(--ink-2); opacity: .75; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.list p { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.plain li { display: flex; gap: 18px; padding: 5px 0; font-size: 15px; color: var(--ink-2); }
.plain li time { min-width: 3.2em; padding-top: 2px; }
.edu time { display: inline-block; min-width: 0; margin-top: 2px; }
.edu .lead { min-width: 4.5em; color: var(--ink-3); font-size: 14px; }
.foot { display: flex; justify-content: space-between; padding: 40px 0 10px; font-size: 13px; color: var(--ink-3); }
.foot a:hover { color: var(--ink); }
.ico { width: 1em; height: 1em; flex: 0 0 auto; }

/* hover preview beside the lists */
.preview { position: fixed; z-index: 45; left: 0; top: 0; width: 220px; padding: 8px; border: 1px solid var(--line-2); background: var(--frame-bg); pointer-events: none;
  opacity: 0; clip-path: inset(50% 0 50% 0); transition: opacity .3s var(--ease), clip-path .5s var(--ease); will-change: transform; }
.preview.is-on { opacity: 1; clip-path: inset(0 0 0 0); }
.preview img { width: 100%; height: auto; max-height: 300px; object-fit: cover; object-position: top; }

/* ---------- contact ---------- */
.contact { display: grid; place-items: center; text-align: center; padding: var(--chrome-h) var(--pad); }
.contact h2 { font-size: clamp(40px, 5.6vw, 64px); font-weight: 300; line-height: 1.1; }
.contact-value { display: inline-block; margin-top: 22px; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: .02em; word-break: break-all; }
.contact-value:hover { color: var(--red); }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; }
.feedback { min-height: 1.6em; margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ---------- shared CTA ---------- */
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0 7px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line-2);
  transition: color .3s, border-color .3s; }
.cta .ico { transition: transform .4s var(--ease); }
.cta:hover, .cta:focus-visible { color: var(--ink); border-color: var(--red); }
.cta:hover .ico { transform: translate(2px, -2px); }

/* ---------- detail pages ---------- */
.detail main { overflow-x: clip; }
.d-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: var(--chrome-h) calc(var(--pad) + 26px) 90px var(--pad); }
.hero-art { position: relative; height: 100%; min-height: 60vh; display: grid; place-items: center; }
.hero-art canvas { position: absolute; left: 50%; top: 50%; width: min(64vw, 820px) !important; height: auto !important;
  transform: translate(-62%, -50%) rotate(-14deg); filter: none; transition: transform 1.2s var(--ease); }
.d-hero-copy { text-align: right; justify-self: end; max-width: 520px; position: relative; z-index: 2; }
.eyebrow { font-size: 12px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; }
.d-title { margin-top: 12px; font-size: clamp(40px, 5.4vw, 66px); font-weight: 300; line-height: 1.05; letter-spacing: .01em; }
.d-lead { margin-top: 16px; font-size: clamp(16px, 1.5vw, 19px); color: var(--ink); opacity: .88; }
.d-meta { margin-top: 26px; display: grid; gap: 10px; font-size: 14px; }
.d-meta div { display: flex; justify-content: flex-end; gap: 16px; }
.d-meta dt { color: var(--ink-3); flex: 0 0 auto; }
.d-meta dd { color: var(--ink-2); max-width: 24em; }
.d-links { display: flex; justify-content: flex-end; gap: 22px; margin-top: 30px; }

.d-story { display: grid; place-items: center; padding: calc(var(--chrome-h) + 10px) calc(var(--pad) + 26px) 60px var(--pad); }
.d-story-inner { width: 100%; max-width: 1180px; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(30px, 6vw, 96px); align-items: center; }
.d-story.flip .shot { order: 2; }
.shot.tall { max-width: 330px; justify-self: center; width: 100%; }
.shot.tall img { max-height: 70vh; object-fit: cover; object-position: top; }
.shot.placeholder canvas { aspect-ratio: auto; }
.d-text h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 300; line-height: 1.25; }
.d-text p { margin-top: 18px; font-size: 15px; line-height: 1.9; color: var(--ink-2); max-width: 32em; }
.d-honors { display: grid; place-items: center; padding: var(--chrome-h) var(--pad); }
.d-honors-inner { width: 100%; max-width: 720px; }
.d-honors h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 300; margin-bottom: 22px; }
.d-honors .plain li { padding: 12px 0; border-top: 1px solid var(--line); }
.d-honors .plain li:last-child { border-bottom: 1px solid var(--line); }
.note { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.d-next { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--chrome-h) var(--pad); }
.next-link { display: inline-flex; align-items: center; gap: .25em; margin-top: 14px; font-size: clamp(40px, 6vw, 76px); line-height: 1.1; }
.next-link .ico { width: .5em; height: .5em; color: var(--red); transition: transform .5s var(--ease); }
.next-link span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.next-link:hover span, .next-link:focus-visible span { background-size: 100% 1px; }
.next-link:hover .ico { transform: translate(6px, -6px); }
.next-sub { display: flex; gap: 24px; margin-top: 26px; font-size: 14px; color: var(--ink-3); }
.next-sub a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.nf .title-line { font-size: clamp(56px, 10vw, 120px); }
.nf-sub { margin-top: 14px; color: var(--ink-2); }

/* ---------- cross-document view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .38s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in .55s var(--ease) both; }
::view-transition-group(title-dot) { animation-duration: .6s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  :root { --chrome-h: 64px; --grid: 11px; }
  .about-cover { grid-template-columns: 1fr; padding-top: calc(var(--chrome-h) + 32px); padding-bottom: 110px; }
  .portrait { max-width: 300px; justify-self: start; }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .d-hero { grid-template-columns: 1fr; grid-template-rows: 42vh auto; padding-top: var(--chrome-h); }
  .hero-art { min-height: 0; }
  .hero-art canvas { width: min(120vw, 640px) !important; transform: translate(-56%, -48%) rotate(-12deg); }
  .d-hero-copy { text-align: left; justify-self: start; }
  .d-meta div { justify-content: flex-start; }
  .d-links { justify-content: flex-start; }
  .d-story-inner { grid-template-columns: 1fr; }
  .d-story.flip .shot { order: 0; }
  .menu.hub-menu { flex-direction: column; align-items: center; gap: 2px; font-size: 17px; }
  .menu-row { flex-direction: column; align-items: center; gap: 0; font-size: 17px; }
  .menu-row.minor { font-size: 14px; }
  .menu a { padding: 9px 4px; }
  .preview { display: none; }
}
@media (max-width: 520px) {
  .about-details, .about-cover, .d-hero, .d-story { padding-right: calc(var(--pad) + 22px); }
  .pager { right: 4px; }
  .list h3 { font-size: 15px; }
}
@media (hover: none) { .preview { display: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .scroller, html:has(body.detail) { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}

/* ---------- no-JS fallback: everything stacked and visible ---------- */
html:not(.js) .home .view { position: relative; }
html:not(.js) .stage .menu.works-menu { display: none; }
html:not(.js) .scroller { overflow: visible; }
html:not(.js) .pager, html:not(.js) #field { display: none; }

@media print { .chrome, .pager, #field, .dots-bg, .cue { display: none !important; } .rv { opacity: 1 !important; transform: none !important; } }

/* Josefin Slab has a small x-height: give Latin running text a little more size */
html[data-lang="en"] .d-text p, html[data-lang="en"] .list p, html[data-lang="en"] .plain li { font-size: 16.5px; }
html[data-lang="en"] .intro, html[data-lang="en"] .d-lead { font-size: clamp(17px, 1.6vw, 20px); }
html[data-lang="en"] .d-meta, html[data-lang="en"] .menu { font-size: 16px; }

/* keep the top controls legible over scrolled content */
.home[data-view="about"] .chrome, .detail .chrome { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 94%, transparent) 30%, transparent); }
