/* =========================================================
   Nocturne — natansantolo.com
   A gallery after hours, lit by one amber lamp.

   One fixed look for the whole site. Long reads (articles and
   book chapters) carry html[data-reading] and may switch to the
   Day reading light (html[data-light="day"]).
   The home page changes colour per section (html[data-scene]).
   ========================================================= */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #17121B; }
@property --bg2 { syntax: '<color>'; inherits: true; initial-value: #0F0B12; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #EEE7DA; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #9A909C; }
@property --rule { syntax: '<color>'; inherits: true; initial-value: #EEE7DA22; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #F0B347; }
@property --patina { syntax: '<color>'; inherits: true; initial-value: #7FAE9F; }

:root {
  /* Palette */
  --bg: #17121B;        /* aubergine black: the wall */
  --bg2: #0F0B12;       /* a step darker: frames, panels */
  --room: #09070B;      /* the dark room: book scenes */
  --fg: #EEE7DA;        /* bone */
  --muted: #9A909C;
  --rule: #EEE7DA22;
  --accent: #F0B347;    /* the lamp */
  --patina: #7FAE9F;    /* verdigris: the green brass turns with age */
  --glow: #F5C46B;
  --on-accent: #17121B;
  --plate-filter: invert(1) hue-rotate(180deg) saturate(1.5) brightness(1.08) contrast(1.05);
  --plate-blend: screen;

  /* Type */
  --f-display: "Bodoni Moda", Didot, "Bodoni 72", "Times New Roman", serif;
  --f-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-book: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --fs-h1: clamp(3rem, 1.2rem + 6.6vw, 9rem);
  --fs-h2: clamp(2.4rem, 1.4rem + 4.2vw, 5.4rem);
  --fs-h3: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem);

  /* Layout & motion */
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  /* Legacy aliases (work and 404 pages still use these) */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem;
  --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem; --space-10: 8rem;
  --space-section: clamp(4rem, 8vw, 7rem);
  --fs-100: .875rem; --fs-200: 1rem; --fs-300: 1.2rem; --fs-400: 1.45rem; --fs-500: 2rem;
  --fs-600: var(--fs-h3); --fs-700: clamp(2.6rem, 2rem + 3vw, 4.75rem); --fs-800: var(--fs-h1);
  --font-display: var(--f-display); --font-serif: var(--f-display); --font-sans: var(--f-sans); --font-mono: var(--f-mono);
  --color-text: var(--fg); --color-text-muted: var(--muted); --color-heading: var(--fg);
  --color-border: var(--rule); --color-accent: var(--accent); --color-bg: var(--bg);
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 6px; --radius-full: 999px;
  --dur-fast: 150ms; --dur-med: 300ms; --ease-standard: var(--ease);
  --measure: 66ch;

  color-scheme: dark;
  transition: --bg .9s var(--ease), --bg2 .9s var(--ease), --fg .9s var(--ease), --muted .9s var(--ease),
    --rule .9s var(--ease), --accent .9s var(--ease), --patina .9s var(--ease);
}

/* Day: the reading light, articles and chapters only. */
:root[data-light="day"] {
  --bg: #EEE7DA; --bg2: #E5DCCB; --fg: #1E1822; --muted: #655A67; --rule: #1E182226;
  --accent: #9A5B12; --patina: #2F6B5E; --on-accent: #EEE7DA;
  --plate-filter: sepia(.12) contrast(1.02); --plate-blend: multiply;
  color-scheme: light;
}

/* Home page scenes */
:root[data-scene="book"], :root[data-scene="footer"] { --bg: #09070B; }
:root[data-scene="index"] {
  --bg: #EEE7DA; --fg: #17121B; --muted: #655A67; --rule: #17121B26;
  --accent: #9A5B12; --patina: #2F6B5E; --on-accent: #EEE7DA;
}

/* ---------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); font-size: 1.125rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
body::before { /* film grain */
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video, svg { max-width: 100%; }
img, video { display: block; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--f-display); font-weight: 500; line-height: 1.05; letter-spacing: -.015em; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: .72rem; font-weight: 400; letter-spacing: .09em; text-transform: uppercase; }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; line-height: .98; margin: 0; }
.display em { font-style: italic; font-weight: 400; color: var(--accent); }
.textbtn { all: unset; cursor: pointer; }
.textbtn:hover { color: var(--accent); }
.textbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.only-desktop { display: block; }
@media (max-width: 960px) { .only-desktop { display: none !important; } }

.btn, .btn-primary, .btn-ghost {
  display: inline-flex; gap: 12px; align-items: center; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; padding: 14px 20px; background: var(--accent); color: var(--on-accent);
  transition: transform .3s var(--ease), color .2s, background .2s;
}
.btn:hover, .btn-primary:hover { color: var(--on-accent); transform: translateX(4px); }
.btn--ghost, .btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 30%, transparent); }
.btn--ghost:hover, .btn-ghost:hover { color: var(--accent); }
.eyebrow { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.lead { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); line-height: 1.4; font-weight: 300; max-width: 36ch; }

/* ---------------------------------------------------------- Masthead */
.mast {
  position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.mast__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 54px; }
.mast__brand { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.mast__short { display: none; }
.mast__mid { display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; color: var(--muted); min-width: 0; }
.mast__mid b { color: var(--fg); font-weight: 400; }
.mast__mid i { flex: none; width: 18px; height: 1px; background: currentColor; }
.mast__mid span { overflow: hidden; text-overflow: ellipsis; }
.mast__end { display: flex; justify-content: flex-end; align-items: center; gap: 16px; min-width: 0; }
.mast__nav { display: flex; gap: 18px; }
.mast__nav a { text-decoration: none; }
.mast__nav a:hover, .mast__nav a[aria-current="page"] { color: var(--accent); }
.mast__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.mast__progress i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.lang-switch { text-decoration: none; }

.light { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; flex: none; }
.light button {
  all: unset; cursor: pointer; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px 6px 26px; border-radius: 999px; position: relative; color: var(--muted);
}
.light button::before { content: ""; position: absolute; left: 9px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; border: 1px solid currentColor; }
.light button[data-light="night"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.light button[data-light="day"]::before { background: currentColor; }
.light button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.light button:focus-visible { outline: 2px solid var(--accent); }

@media (max-width: 960px) {
  .mast__row { grid-template-columns: auto 1fr; }
  .mast__mid { display: none; }
  .mast__nav { gap: 14px; }
  [data-reading] .mast__nav { display: none; }
  .mast__full { display: none; }
  .mast__short { display: inline; }
}
@media (max-width: 420px) {
  .mast__nav { gap: 10px; font-size: .64rem; }
}

/* ---------------------------------------------------------- Golden construction */
.golden { display: block; width: 100%; height: 100%; overflow: visible; }
.golden__sq { fill: none; stroke: var(--fg); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .2; }
.golden__arc { fill: none; stroke: var(--patina); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------- Home · cover */
.cover { padding-block: clamp(32px, 5vw, 72px) clamp(48px, 7vw, 110px); }
.cover__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 20px; position: relative; }
.cover__kicker { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; border-top: 2px solid var(--fg); padding-top: 10px; margin-bottom: clamp(24px, 4vw, 56px); color: var(--muted); }
.cover__kicker span:first-child { color: var(--fg); }
.cover__title { grid-column: 1 / span 8; grid-row: 2; font-size: var(--fs-h1); position: relative; z-index: 2; align-self: start; }
.cover__geo { grid-column: 6 / -1; grid-row: 2 / span 2; position: relative; aspect-ratio: 1.618 / 1; align-self: start; margin-top: clamp(40px, 8vw, 120px); }
.cover__geo .golden { position: absolute; inset: 0; }
/* Portrait component: still first, video fades in over it once playing. */
.portrait { display: block; position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; isolation: isolate; }
.portrait img, .portrait video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s var(--ease); }
.portrait video { opacity: 0; }
.portrait.is-playing video { opacity: 1; }
.portrait.is-playing img { opacity: 0; }
.cover__portrait { position: absolute; left: 0; top: 0; width: 61.8%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 90px -10px var(--glow); }
.cover__portrait img, .cover__portrait video { filter: grayscale(1) contrast(1.25) brightness(.95); mix-blend-mode: multiply; }
.geo-dot { position: absolute; width: 14.6%; aspect-ratio: 1; border-radius: 50%; background: var(--patina); right: 9%; bottom: 4%; }
.coverlines { grid-column: 1 / span 5; grid-row: 3; margin: clamp(28px, 5vw, 64px) 0 0; display: grid; list-style: none; padding: 0; position: relative; z-index: 2; }
.coverlines li { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.coverlines .mono { color: var(--muted); padding-top: 6px; }
.coverlines a { text-decoration: none; display: grid; gap: 2px; }
.coverlines strong { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; line-height: 1.1; letter-spacing: -.01em; }
.coverlines a:hover strong { color: var(--accent); }
.coverlines a span { color: var(--muted); font-size: .98rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------- Home · letter */
.letter { padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid var(--rule); }
.letter__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 2fr); gap: 32px; }
.letter__side { display: grid; align-content: start; gap: 10px; color: var(--muted); }
.letter__sign { font-family: var(--f-display); font-style: italic; font-size: 1.6rem; color: var(--fg); }
.letter__body { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.6; max-width: 36em; }
.letter__body p { margin: 0 0 1em; }
.letter__body p:first-child::first-letter { font-family: var(--f-display); font-style: italic; font-weight: 400; float: left; font-size: 5.2em; line-height: .78; margin: .06em .1em 0 -.02em; color: var(--accent); }
.letter__body strong { font-weight: 600; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 40%, transparent) 62%); }
.pull { margin: clamp(48px, 7vw, 100px) 0 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: center; }
.pull__rule { height: 1px; background: var(--fg); position: relative; }
.pull__rule::after { content: ""; position: absolute; right: 0; top: 50%; width: 22px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); transform: translate(50%, -50%); box-shadow: 0 0 30px var(--glow); }
.pull blockquote { margin: 0; font-size: var(--fs-h2); }

/* ---------------------------------------------------------- Home · book feature */
.feature { padding-block: clamp(72px, 10vw, 150px); position: relative; overflow: hidden; }
.feature__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.stage { position: relative; min-height: clamp(420px, 52vw, 640px); display: grid; place-items: center; perspective: 1600px; --lit: 0; --ry: -30deg; --rx: 6deg; }
.stage__light { position: absolute; inset: -20% -30%; pointer-events: none; opacity: var(--lit);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 50%, transparent), color-mix(in srgb, var(--glow) 12%, transparent) 55%, transparent 75%); }
.stage__cone { position: absolute; left: 50%; top: -30%; width: 120%; height: 120%; transform: translateX(-50%); pointer-events: none;
  clip-path: polygon(46% 0, 54% 0, 86% 100%, 14% 100%); background: linear-gradient(color-mix(in srgb, var(--glow) 50%, transparent), transparent 85%);
  opacity: calc(var(--lit) * .55); mix-blend-mode: screen; filter: blur(14px); }
.stage__floor { position: absolute; bottom: 9%; left: 50%; width: 62%; height: 30px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, #000c, transparent); opacity: calc(.35 + var(--lit) * .45); filter: blur(6px); }
.book3d { --w: clamp(210px, 22vw, 300px); --d: 38px; width: var(--w); aspect-ratio: 2 / 3; position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s linear; }
.book3d > * { position: absolute; inset: 0; backface-visibility: hidden; }
.b-front { transform: translateZ(calc(var(--d) / 2)); background: #EFE6D6 center / cover; border-radius: 2px 4px 4px 2px; overflow: hidden; box-shadow: inset 4px 0 8px -4px #0006; }
.b-front::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #F3EBDD00 30%, #F3EBDDcc 70%, #F3EBDD 100%); }
.b-front::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(105deg, transparent 40%, #ffffff88 50%, transparent 60%);
  transform: translateX(calc((var(--lit) - .5) * 70%)); mix-blend-mode: soft-light; }
.b-front__txt { position: absolute; left: 9%; right: 9%; bottom: 7%; z-index: 1; color: #2B1F12; }
.b-front__title { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; line-height: .95; font-size: calc(var(--w) * .13); margin: 0 0 8px; text-wrap: balance; }
.b-front__by { font-family: var(--f-mono); font-size: calc(var(--w) * .038); letter-spacing: .14em; text-transform: uppercase; }
.b-spine { width: var(--d); left: calc(var(--d) / -2); transform: rotateY(-90deg); background: #D9C7A6; display: grid; place-items: center; }
.b-spine span { writing-mode: vertical-rl; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: #3A2B18; white-space: nowrap; }
.b-pages { width: calc(var(--d) - 4px); left: auto; right: calc(var(--d) / -2 + 2px); transform: rotateY(90deg); top: 3px; bottom: 3px; background: repeating-linear-gradient(90deg, #F7F2E7 0 1px, #E4DCCB 1px 2px); }
.b-back { transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); background: #D9C7A6; }
.feature__body > .mono { color: var(--muted); }
.feature__title { font-size: var(--fs-h2); margin: 14px 0 18px; }
.feature__text { font-size: 1.35rem; line-height: 1.45; font-weight: 300; max-width: 30ch; margin: 0 0 30px; }
.toc { list-style: none; margin: 0 0 32px; padding: 0; }
.toc li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); }
.toc li:last-child { border-bottom: 1px solid var(--rule); }
.toc .mono { color: var(--accent); }
.toc a { text-decoration: none; }
.toc__min { color: var(--muted); font-family: var(--f-mono); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- Index & focus lens */
.index { padding-block: clamp(64px, 9vw, 130px); }
.index__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid var(--fg); padding-bottom: 14px; margin-bottom: 8px; }
.index__head .mono { color: var(--muted); }
.index__title { font-size: var(--fs-h2); }
.lens-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; }
.lens { list-style: none; margin: 0; padding: 12vh 0 18vh; }
.lens li { --f: 1; padding-block: clamp(14px, 2vw, 26px); border-bottom: 1px solid var(--rule); }
.lens a { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 4px 16px; align-items: baseline; text-decoration: none; color: inherit; transform-origin: 0 50%; }
.js .lens li { --f: 0; }
.js .lens a { transform: translateX(calc(var(--f) * 1.4rem)) scale(calc(.84 + var(--f) * .16)); opacity: calc(.26 + var(--f) * .74); filter: blur(calc((1 - var(--f)) * 1.2px)); will-change: transform, opacity; }
.lens__yr { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lens__ttl { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; line-height: 1; font-size: clamp(1.7rem, 1rem + 2.8vw, 3.6rem); text-wrap: balance; }
.lens li.is-on .lens__yr { color: var(--fg); }
.lens a:hover .lens__ttl { color: var(--accent); }
.lens__desc { display: none; grid-column: 2; font-size: 1rem; line-height: 1.45; color: var(--muted); margin-top: 8px; }
.lens-panel { position: sticky; top: 30vh; align-self: start; display: grid; gap: 16px; padding-top: 12vh; }
.lens-panel__glyph { width: 120px; aspect-ratio: 1; position: relative; }
.lens-panel__glyph i { position: absolute; inset: 0; background: var(--fg); transition: clip-path .6s var(--ease); clip-path: circle(50% at 50% 50%); }
.lens-panel__glyph i + i { background: var(--patina); clip-path: inset(50% 0 0 0); }
.lens-panel__year { font-family: var(--f-display); font-weight: 500; font-size: 4.4rem; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.lens-panel__meta { color: var(--muted); }
.lens-panel__desc { font-size: 1.15rem; line-height: 1.5; margin: 0; max-width: 34ch; min-height: 6.5em; }
.lens-panel__read { text-decoration: none; }
.fade { animation: fade .5s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.index--page { padding-top: clamp(40px, 6vw, 80px); }

/* ---------------------------------------------------------- Home · back page */
.play { padding-block: clamp(56px, 8vw, 110px); border-top: 1px solid var(--rule); }
.play__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: center; }
.play .mono { color: var(--muted); }
.play__title { font-size: var(--fs-h3); margin: 10px 0 14px; }
.play p { margin: 0; color: var(--muted); max-width: 38ch; }
#arcade { position: relative; width: 643px; height: 800px; max-width: 100%; justify-self: center; background: url('../images/handheld-gameset.png') center top / contain no-repeat; filter: drop-shadow(0 40px 60px #000a); }
#snake-game { position: absolute; top: 100px; left: 123px; width: 398px; height: 444px; margin: 0; border-radius: 24px; border: 1px solid #ffffff55;
  background: #ffffff80; box-shadow: 0 0 30px -4px var(--glow); }
#snake-canvas { border-radius: 24px; overflow: hidden; }

/* ---------------------------------------------------------- Page heads, rows, taxonomy */
.page-head { padding-block: clamp(40px, 6vw, 88px) clamp(24px, 3vw, 40px); border-bottom: 2px solid var(--fg); display: grid; gap: 14px; }
.page-head .mono { color: var(--muted); }
.page-head h1 { font-size: var(--fs-h1); }
.page-head p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.2rem; }
.rows { list-style: none; margin: 0; padding: 0; }
.row a { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 6px 16px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.row__yr, .row__meta { color: var(--muted); }
.row__body { display: grid; gap: 6px; }
.row__body strong { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem); line-height: 1.05; letter-spacing: -.015em; transition: color .2s; }
.row__body span { color: var(--muted); font-size: 1rem; line-height: 1.45; max-width: 60ch; }
.row a:hover strong { color: var(--accent); }
.taxo { padding-bottom: clamp(64px, 8vw, 120px); }
.taxo__group { padding-top: clamp(40px, 5vw, 64px); }
.taxo__name { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--fg);
  font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: var(--fs-h3); line-height: 1.05; }
.taxo__name a { text-decoration: none; }
.taxo__name .mono { font-style: normal; color: var(--muted); }
.taxo__more { display: inline-block; margin-top: 14px; text-decoration: none; color: var(--accent); }

/* ---------------------------------------------------------- Article */
.art-open { padding-block: clamp(48px, 8vw, 120px) clamp(32px, 5vw, 64px); position: relative; --sp: 0; }
.art-open__geo { position: absolute; right: var(--gutter); top: 24px; width: min(52vw, 640px); aspect-ratio: 1.618; pointer-events: none; opacity: calc(.9 - var(--sp) * .9); }
.art-open__geo .golden__arc { stroke: var(--accent); opacity: .55; stroke-width: 1; }
.art-open__geo .golden__sq { opacity: .12; }
.art-open__glow { position: absolute; left: 10%; top: 0; width: 70%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 16%, transparent), transparent); opacity: calc(1 - var(--sp)); }
:root[data-light="day"] .art-open__glow { opacity: 0; }
.art-kicker { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); position: relative; }
.art-kicker b { color: var(--accent); font-weight: 400; }
.art-title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.6rem, 1.2rem + 6vw, 8rem); line-height: .96; letter-spacing: -.025em; margin: 22px 0 28px; max-width: 14ch; position: relative; }
.art-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.art-title a { text-decoration: none; }
.art-stand { font-size: clamp(1.25rem, 1rem + .9vw, 1.7rem); line-height: 1.4; font-weight: 300; max-width: 34ch; margin: 0 0 36px; position: relative; }
.art-by { display: flex; align-items: center; gap: 14px; position: relative; }
.art-by__avatar { flex: none; width: 44px; height: 44px; box-shadow: 0 0 0 1px var(--accent); }
.art-by__avatar img, .art-by__avatar video { filter: grayscale(1) contrast(1.1); }
.art-by > span { display: grid; line-height: 1.3; }
.art-by .mono { color: var(--muted); }
.art-fig { margin-block: 0 clamp(40px, 6vw, 88px); }
.art-fig__frame { background: var(--bg2); border: 1px solid var(--rule); display: grid; place-items: center; padding: clamp(32px, 6vw, 96px) 16px; }
.art-fig__frame img { width: min(720px, 100%); }
.art-fig figcaption { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.art-fig figcaption .mono { color: var(--accent); padding-top: 3px; }

.art-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: clamp(24px, 3vw, 48px); }
.rail { grid-column: 1; position: sticky; top: 96px; align-self: start; }
.rail h2 { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 400; color: var(--muted); margin: 0 0 10px; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail li a { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: 6px; text-decoration: none; font-size: .9rem; line-height: 1.35; padding: 6px 0; color: var(--muted); }
.rail li a span:first-child { font-family: var(--f-mono); font-size: .7rem; padding-top: 2px; }
.rail li a.on { color: var(--fg); }
.rail li a.on span:first-child { color: var(--accent); }
.prose { grid-column: 2; min-width: 0; font-size: clamp(1.1rem, 1rem + .3vw, 1.25rem); line-height: 1.72; counter-reset: sec; }

/* Prose (markdown) */
.prose > * { margin: 0 0 1.15em; }
.prose > p:first-child:not(:has(img)), .prose > p:has(> img:only-child) + p { font-size: 1.22em; line-height: 1.5; font-weight: 300; }
.prose > p:first-child:not(:has(img))::first-letter, .prose > p:has(> img:only-child) + p::first-letter {
  font-family: var(--f-display); font-style: italic; font-weight: 400; color: var(--accent); float: left; font-size: 4.4em; line-height: .8; margin: .08em .1em 0 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.05; letter-spacing: -.015em; margin: 2.2em 0 .7em; scroll-margin-top: 90px; transition: color .5s; }
.prose h2 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); }
.prose h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
.prose h4 { font-size: 1.3rem; }
.prose[data-depth="2"] h2::before, .prose[data-depth="3"] h3::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero); display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; font-weight: 400; }
.prose .lit { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.25em; top: .68em; width: .42em; height: .42em; border-radius: 50%; border: 1px solid var(--accent); }
.prose li + li { margin-top: .45em; }
.prose ol > li::marker { font-family: var(--f-mono); font-size: .8em; color: var(--accent); }
.prose strong { font-weight: 650; }
.prose > p:last-child::after { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--accent); margin-left: .4em; vertical-align: .05em; }
.prose img { margin-inline: auto; }
.prose > p:has(> img:only-child), .prose figure { margin: 0 0 2em; background: var(--bg2); border: 1px solid var(--rule); padding: clamp(24px, 4vw, 56px) 16px; display: grid; place-items: center; }
.prose > p:has(> img:only-child) img { max-height: 70vh; width: auto; }
.prose blockquote { margin: 2em 0; padding: 0; border: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; }
.prose blockquote p { margin: 0; }
.prose blockquote::before { content: ""; display: block; width: 48px; height: 1px; background: var(--accent); margin-bottom: 18px; }
.prose hr { border: 0; height: 9px; margin: 3em 0; background: radial-gradient(circle, var(--accent) 2.5px, transparent 3px) center / 24px 9px repeat-x; width: 72px; margin-inline: auto; }
.prose code { font-family: var(--f-mono); font-size: .86em; background: var(--bg2); border: 1px solid var(--rule); padding: .08em .35em; border-radius: 2px; }
.prose pre { font-family: var(--f-mono); font-size: .86rem; line-height: 1.6; padding: 20px 22px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 2px; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.prose th { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.prose iframe { max-width: 100%; }

.art-end { padding-block: clamp(48px, 7vw, 96px); }
.reply { margin: 0 0 40px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; }
.reply p { margin: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem); line-height: 1.2; max-width: 30ch; }
.reply .mono { color: var(--muted); padding-top: 10px; }
.filed { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; border-top: 1px solid var(--rule); padding-top: 18px; }
.filed .mono { color: var(--muted); }
.filed a { text-decoration: none; font-size: .95rem; }
.filed a::before { content: "#"; color: var(--accent); margin-right: 3px; font-family: var(--f-mono); }
.neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); margin-top: 40px; }
.neighbours a { text-decoration: none; padding: 28px 28px 32px 0; display: grid; gap: 12px; align-content: start; }
.neighbours > :nth-child(2) { padding: 28px 0 32px 28px; border-left: 1px solid var(--rule); text-align: right; }
.neighbours .mono { color: var(--muted); }
.neighbours strong { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.3rem); line-height: 1.05; letter-spacing: -.01em; transition: color .3s; }
.neighbours a:hover strong { color: var(--accent); }

/* ---------------------------------------------------------- Footer: colophon + bleed */
.colophon { padding-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--rule); }
.colophon__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 2fr)) minmax(0, 3fr); gap: 32px; }
.colophon h2 { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 400; color: var(--muted); margin: 0 0 14px; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.colophon a { text-decoration: none; }
.colophon p { margin: 0; }
.colophon__set { font-size: 1.15rem; line-height: 1.5; max-width: 34ch; }
.colophon__set b { font-weight: 600; }
.colophon__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 80px); padding-block: 14px; border-top: 1px solid var(--rule); color: var(--muted); }
.bleed { position: relative; overflow: hidden; height: 16vw; margin-top: clamp(24px, 4vw, 56px); --rise: 0px; --q: 0; }
.bleed__word {
  position: absolute; left: var(--gutter); top: -1.5vw; margin: 0; line-height: 1; white-space: nowrap;
  font-family: var(--f-sans); font-weight: 900; letter-spacing: -.035em; font-size: 22vw;
  color: transparent; background: linear-gradient(100deg, var(--fg) 0 38%, var(--glow) 50%, var(--fg) 62% 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; background-position: calc(var(--q) * 100%) 0;
  transform: translate3d(0, var(--rise), 0); will-change: transform;
}

/* ---------------------------------------------------------- 404 */
.not-found { padding-block: clamp(64px, 10vw, 160px); }
.not-found h1 { font-family: var(--f-display); font-weight: 500; font-size: var(--fs-h2); line-height: 1; max-width: 14ch; margin: 0 0 24px; }
.not-found__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 960px) {
  .cover__title { grid-column: 1 / -1; }
  .cover__geo { grid-column: 3 / -1; grid-row: 3; margin-top: 32px; }
  .coverlines { grid-column: 1 / -1; grid-row: 4; }
  .letter__grid, .pull, .feature__grid, .play__grid, .reply { grid-template-columns: minmax(0, 1fr); }
  .letter__grid > :last-child:empty { display: none; }
  .lens-grid { grid-template-columns: minmax(0, 1fr); }
  .lens-panel { display: none; }
  .lens { padding-block: 4vh 10vh; }
  .lens__desc { display: block; opacity: calc(var(--f) * 1.2 - .2); }
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .prose { grid-column: 1; }
  .art-open__geo { width: 90vw; opacity: .45; }
  .neighbours { grid-template-columns: minmax(0, 1fr); }
  .neighbours > :nth-child(2) { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; text-align: left; }
  .colophon__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon__grid > :first-child { grid-column: 1 / -1; }
  .row a { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  html { scroll-behavior: auto; }
  .golden__arc { animation: none; stroke-dashoffset: 0; }
  .js .lens a { transform: none; filter: none; }
  .book3d { transition: none; }
  .bleed__word { transform: none; }
  .fade { animation: none; }
}
