/* Alexander Ruf site. Built from Mix 1: dark image-led hero (from B) → one deliberate switch to light paper for Work and Questions (from A). */

@font-face { font-family: "DM Serif Display"; src: url("/assets/fonts/DMSerifDisplay-Regular.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("/assets/fonts/DMSerifDisplay-Italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 96%; ascent-override: 92%; }

:root {
  /* dark hero */
  --night: #0E0D0B;
  --night-2: #171613;
  --cream: #F4F1EA;
  --cream-muted: #BDB8AD;
  --night-rule: rgb(244 241 234 / .16);
  --amber: #FFB86B;
  /* light work */
  --paper: #F1EFEA;
  --paper-2: #E8E5DE;
  --ink: #1F1E1B;
  --muted: #66635C;
  --rule: rgb(31 30 27 / .16);

  --f-display: "DM Serif Display", "Serif Fallback", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;

  --t-display: clamp(2.75rem, 6.2vw, 6.75rem);
  --t-h2: clamp(2.25rem, 5vw, 4.5rem);
  --t-title: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  --t-question: clamp(1.375rem, 1rem + 1.6vw, 2.5rem);
  --t-body: 1.0625rem;
  --t-meta: 0.75rem;

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-6: 24px; --s-8: 32px;
  --s-12: 48px; --s-20: 80px; --s-30: 120px;
  --gutter: 16px;
  --max: 1440px;
  --header-h: 72px;

  /* Motion language: strong ease-out for things arriving or responding,
     ease-in-out only for the stage wipe (something already on screen being covered). */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --dur-press: 120ms;   /* :active feedback */
  --dur-fast: 160ms;    /* hover, colour, small toggles */
  --dur: 220ms;         /* state changes: filter dim, disclosure */
  --dur-text: 320ms;    /* text swaps */
  --dur-reveal: 900ms;  /* one-time hero entrance */
  --dur-stage: 1000ms;  /* project wipe */
}
@media (min-width: 768px) { :root { --gutter: 29px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; interpolate-size: allow-keywords; scroll-behavior: smooth; scrollbar-color: var(--muted) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-body)/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; padding: var(--s-2) var(--s-4); background: var(--amber); color: var(--night); z-index: 20; }
.skip:focus { top: var(--s-2); }

/* Pills: the only rounded shape on the page */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 1px solid currentColor; border-radius: 999px;
  font: 500 .9375rem/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.pill:active { transform: scale(.97); }

/* ---------- Header (sits on the dark hero) ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: var(--header-h); color: var(--cream);
}
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.wordmark-logo { display: block; width: auto; height: 20px; } /* the AR mark (assets/logo/ar.svg), single ink via currentColor */
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav-inline { display: none; gap: var(--s-8); }
.nav-inline a, .nav-menu summary { font-size: .9375rem; text-decoration: none; }
.nav-menu { position: relative; }
.nav-menu summary { cursor: pointer; list-style: none; padding: var(--s-2) 0; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu ul { position: absolute; right: 0; top: calc(100% + var(--s-2)); z-index: 5; min-width: 180px; padding: var(--s-3) var(--s-4); background: var(--night-2); border: 1px solid var(--night-rule); }
.nav-menu li a { display: block; padding: var(--s-2) 0; text-decoration: none; }
.nav .pill { min-height: 40px; padding: 0 18px; font-size: .875rem; }
@media (min-width: 768px) { .nav-inline { display: flex; } .nav-menu { display: none; } }

/* ---------- Hero shell (dark) ---------- */
.hero-shell {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(100svh, 980px);
  padding-top: calc(var(--header-h) + var(--s-12));
  background: var(--night); color: var(--cream);
}
:is(.hero-shell, .page-top) :focus-visible, .site-header :focus-visible { outline-color: var(--amber); }
:is(.hero-shell, .page-top) ::selection, .site-header ::selection { background: var(--amber); color: var(--night); }
:is(.hero-shell, .page-top) .pill--solid, .site-header .pill--solid { background: var(--cream); color: var(--night); border-color: var(--cream); }
:is(.hero-shell, .page-top) .pill--ghost { color: var(--cream); border-color: rgb(244 241 234 / .45); }

.hero { position: relative; z-index: 2; padding-bottom: var(--s-8); }
.hero-name { max-width: 44ch; font-size: .9375rem; color: var(--cream-muted); margin-bottom: var(--s-6); }
.display {
  font: 400 var(--t-display)/.92 var(--f-display);
  letter-spacing: -.03em;
}
.display .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.display .line > span { display: inline-block; }
.display em { font-style: italic; color: var(--amber); }

.hero-grid { display: grid; gap: var(--s-4); margin-top: clamp(var(--s-8), 4vw, var(--s-12)); }
/* Chips left, the picked constraint's line to their right (as in Version B) */
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: calc(var(--gutter) * 2); align-items: start; }
  .hero-grid .quote { margin-top: 0; padding-top: 26px; } /* aligns with the chips below the legend */
}
legend { font: 500 var(--t-meta)/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--cream-muted); margin-bottom: var(--s-3); }
.no-js .constraints { display: none; } /* chips need JS; every catch still prints in Work */
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; }
/* Chips are filters, not buttons: square corners + a radio box, so they never read as CTAs (pills are CTAs only) */
.chip { position: relative; -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; color: inherit; cursor: pointer; }
.chip:focus-visible { outline: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 14px 0 12px;
  border: 1px solid rgb(244 241 234 / .22); border-radius: 0;
  background: rgb(14 13 11 / .45);
  font-size: .875rem; white-space: nowrap; color: var(--cream-muted);
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.chip span::before {
  content: ""; flex: none; width: 10px; height: 10px;
  border: 1px solid currentColor;
  box-shadow: inset 0 0 0 0 var(--amber);
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.chip:active span { transform: scale(.97); }
.chip[aria-pressed="true"] span { color: var(--cream); border-color: var(--amber); background: rgb(255 184 107 / .12); }
.chip[aria-pressed="true"] span::before { box-shadow: inset 0 0 0 5px var(--amber); border-color: var(--amber); }
.chip:focus-visible span { outline: 2px solid var(--amber); outline-offset: 2px; }

/* One short line, only after a pick: keeps the default hero light on text */
.quote { min-height: 3.4em; max-width: 44ch; }
.quote p[data-quote] { text-shadow: 0 1px 12px rgb(14 13 11 / .6); } /* legibility over the project image */
.quote p[data-quote] { font: italic 400 clamp(1.125rem, 1rem + .5vw, 1.375rem)/1.35 var(--f-display); color: var(--cream); }
.quote p[data-quote]:not([hidden]), .quote-status:not(:empty) { animation: text-in var(--dur-text) var(--ease-out); }
@keyframes text-in { from { opacity: 0; transform: translateY(4px); filter: blur(3px); } }
.quote-status { font-size: .875rem; color: var(--cream-muted); }
/* The matching projects, named and linked */
.quote-status a { color: var(--cream); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color var(--dur-fast) var(--ease-out); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: clamp(var(--s-12), 5vw, 72px); } /* clear break between filters and actions */

/* ---------- Stage: one project at a time ---------- */
.stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(14 13 11 / 1) 0%, rgb(14 13 11 / .55) 22%, rgb(14 13 11 / .2) 55%, rgb(14 13 11 / .15) 100%),
    linear-gradient(0deg, rgb(14 13 11 / .9) 0%, rgb(14 13 11 / 0) 35%),
    linear-gradient(180deg, rgb(14 13 11 / .75) 0%, rgb(14 13 11 / 0) 20%);
}
@media (min-width: 1024px) {
  /* The work sits to the right of the headline, never behind it */
  .stage { left: auto; width: 62%; }
  /* Fade the stage's own left edge so a half-pixel boundary can never show as a seam */
  .stage { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%); mask-image: linear-gradient(90deg, transparent 0, #000 10%); }
}
.slide { position: absolute; inset: 0; opacity: 0; overflow: hidden; } /* the push-back and settle scale never leave the frame */
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); filter: brightness(.82); }
.slide--contain { background: var(--night-2); }
.slide--contain img { object-fit: contain; object-position: 88% 50%; padding: 6vh 4vw; }
.slide.is-prev { opacity: 1; z-index: 1; }
.slide.is-active { opacity: 1; z-index: 2; }
/* Signature motion: the next project wipes in from the right and settles */
.js .slide.is-active.is-entering { animation: wipe-in var(--dur-stage) var(--ease-in-out) both; }
.js .slide.is-active.is-entering img { animation: img-settle 1400ms var(--ease-out) both; }
.js .slide.is-prev img { animation: push-back var(--dur-stage) var(--ease-in-out) both; }
.js .slide.is-active.is-first { animation: settle 1600ms var(--ease-out) both; }
@keyframes wipe-in { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes img-settle { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes push-back { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-4%); opacity: .4; } }
@keyframes settle { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }

.stage-caption {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding-top: var(--s-4); padding-bottom: var(--s-6);
  border-top: 1px solid var(--night-rule);
  font-size: .8125rem; position: relative; color: var(--cream-muted);
}
.stage-caption p { flex: 1; }
.stage-caption [data-caption].is-swapping { display: inline-block; animation: text-in var(--dur-text) var(--ease-out); }
.stage-progress { position: absolute; left: var(--gutter); right: var(--gutter); top: -1px; height: 1px; background: var(--cream-muted); transform: scaleX(0); transform-origin: left; opacity: .7; }
.stage-progress.is-running { animation: progress var(--interval, 6000ms) linear both; }
.stage-progress.is-paused { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.stage-toggle {
  min-height: 32px; padding: 0 14px; border: 1px solid var(--night-rule); border-radius: 999px;
  background: transparent; color: var(--cream-muted); cursor: pointer;
}
.no-js .stage-toggle { display: none; }

@media (max-width: 1023px) {
  .stage::after {
    background:
      linear-gradient(0deg, rgb(14 13 11 / .97) 0%, rgb(14 13 11 / .93) 62%, rgb(14 13 11 / .6) 86%, rgb(14 13 11 / .82) 100%);
  }
  .slide img { object-position: 60% 20%; }
  .slide--contain img { object-position: 50% 10%; padding: 12vh 8vw 40vh; }
}

/* Load choreography: headline lines rise out of their own mask, the rest follows */
.js .display .line > span { animation: line-up var(--dur-reveal) var(--ease-out) both; animation-delay: 80ms; }
.js .display .line:nth-child(2) > span { animation-delay: 160ms; }
.js .reveal { animation: fade-up 700ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
.js .hero-name.reveal { --d: 0ms; }
.js .constraints.reveal { --d: 320ms; }
.js .cta-row.reveal { --d: 400ms; }
.js .stage-caption.reveal { --d: 520ms; }
@keyframes line-up { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Work (light) ---------- */
.work { padding-top: var(--s-20); padding-bottom: var(--s-20); }
.h2 { font: 400 var(--t-h2)/.95 var(--f-display); letter-spacing: -.03em; margin-bottom: clamp(var(--s-8), 5vw, var(--s-12)); }
.index { border-bottom: 1px solid var(--rule); }
.row {
  position: relative; display: grid; gap: var(--s-6);
  padding: clamp(var(--s-8), 4vw, var(--s-12)) 0;
  border-top: 1px solid var(--rule);
  transition: opacity var(--dur) var(--ease-out);
}
@media (min-width: 768px) { .row { grid-template-columns: 5rem 1fr; column-gap: var(--gutter); } .row-media { grid-column: 2; } }
@media (min-width: 1024px) { .row { grid-template-columns: 7rem 5fr 6fr; align-items: start; } .row-media { grid-column: 3; grid-row: 1; } }
.row-num { font: 400 clamp(1.75rem, 4vw, 4rem)/.9 var(--f-display); color: var(--muted); font-variant-numeric: tabular-nums; transition: color var(--dur-fast) var(--ease-out); }
.row-body { display: grid; gap: var(--s-3); max-width: 52ch; }
.meta { font: 500 var(--t-meta)/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row-title { font: 500 var(--t-title)/1.15 var(--f-body); letter-spacing: -.02em; text-wrap: balance; }
.row-title a { text-decoration: none; }
.row-title a::after { content: ""; position: absolute; inset: 0; } /* whole row is the link target */
.row-title a:focus-visible { outline: none; }
.row:has(.row-title a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }
.row-catch { font: italic 400 1.25rem/1.35 var(--f-display); }
.row-media { overflow: hidden; background: var(--paper-2); aspect-ratio: 3 / 2; }
.row-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.row-media--contain img { object-fit: contain; padding: 5%; }
/* Filter state from the hero chips: matches stay, the rest recede but return on hover/focus */
/* Recede without losing readability: the image fades, the text drops to the muted tone (5.2:1, still AA) */
.row-media, .row-title, .row-hook, .row-catch { transition: opacity var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.index.is-filtering .row :is(.row-media, .row-title, .row-hook, .row-catch) { transition-delay: calc(var(--i, 0) * 30ms); }
.index[data-filter] .row:not(.is-match) .row-media { opacity: .25; }
.index[data-filter] .row:not(.is-match) :is(.row-title, .row-hook, .row-catch) { color: var(--muted); }
.index[data-filter] .row:not(.is-match):is(:hover, :focus-within) .row-media { opacity: 1; }
.index[data-filter] .row:not(.is-match):is(:hover, :focus-within) :is(.row-title, .row-hook, .row-catch) { color: var(--ink); }
.index[data-filter] .row.is-match .row-num { color: var(--ink); }

/* ---------- Five questions (light) ---------- */
.questions { padding-top: var(--s-12); padding-bottom: var(--s-30); }
.questions .wrap > .q:last-of-type { border-bottom: 1px solid var(--rule); }
.q { border-top: 1px solid var(--rule); }
.q summary { display: grid; grid-template-columns: 2.5rem 1fr 28px; align-items: baseline; gap: var(--s-4); padding: clamp(18px, 2.2vw, 28px) 0; cursor: pointer; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q-num { font: 500 var(--t-meta)/1 var(--f-body); letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-text { font: 400 var(--t-question)/1.1 var(--f-display); letter-spacing: -.015em; text-wrap: balance; transition: transform var(--dur) var(--ease-out); }
.q[open] .q-answer p { animation: text-in var(--dur-text) var(--ease-out) 60ms both; }
.q-icon { position: relative; width: 20px; height: 20px; align-self: center; justify-self: end; }
.q-icon::before, .q-icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.q-icon { transition: transform var(--dur) var(--ease-out); }
.q[open] .q-icon { transform: rotate(180deg); }
.q-icon::after { transform: rotate(90deg); }
.q[open] .q-icon::after { transform: rotate(0deg); }
.q-answer { padding: 0 0 clamp(var(--s-6), 3vw, var(--s-8)) calc(2.5rem + var(--s-4)); }
.q-answer p { max-width: 62ch; }
.q::details-content { block-size: 0; overflow: clip; transition: block-size var(--dur) var(--ease-out), content-visibility var(--dur) allow-discrete; }
.q[open]::details-content { block-size: auto; }
@media (max-width: 599px) { .q summary { grid-template-columns: 1.75rem 1fr 20px; gap: var(--s-3); } .q-answer { padding-left: 0; } }

/* ---------- Subpages: dark top band (same one-switch rule: dark top, light body) ---------- */
.page-top {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--night); color: var(--cream);
  padding-top: calc(var(--header-h) + clamp(var(--s-12), 7vw, 104px));
  padding-bottom: clamp(var(--s-12), 6vw, var(--s-20));
}
.back { display: inline-block; margin-bottom: var(--s-8); font-size: .9375rem; color: var(--cream-muted); text-decoration: none; }
.back::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: 10px; vertical-align: middle; background: currentColor; transform-origin: right; transition: transform var(--dur-fast) var(--ease-out); }
.page-top .meta { color: var(--cream-muted); margin-bottom: var(--s-4); }
.page-h1 { font: 400 clamp(2.5rem, 6vw, 6rem)/.95 var(--f-display); letter-spacing: -.03em; max-width: 17ch; text-wrap: balance; }
.page-h1 em { font-style: italic; color: var(--amber); }
.page-lead { margin-top: var(--s-6); max-width: 46ch; font: italic 400 clamp(1.25rem, 1rem + .9vw, 1.75rem)/1.35 var(--f-display); color: var(--cream); text-wrap: pretty; }
.page-top .cta-row { margin-top: var(--s-8); }
.js .page-top .reveal { --d: 0ms; }
.js .page-top .reveal:nth-child(2) { --d: 60ms; }
.js .page-top .reveal:nth-child(3) { --d: 120ms; }
.js .page-top .reveal:nth-child(4) { --d: 200ms; }
.js .page-top .reveal:nth-child(5) { --d: 280ms; }
.js .page-top .reveal:nth-child(6) { --d: 360ms; }

/* Case facts: the work / the setup / the catch */
.facts { display: grid; gap: var(--s-6); margin: clamp(var(--s-8), 4vw, var(--s-12)) 0 0; padding-top: var(--s-6); border-top: 1px solid var(--night-rule); }
.facts dt { font: 500 var(--t-meta)/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--cream-muted); margin-bottom: var(--s-2); }
.facts dd { margin: 0; font-size: 1.0625rem; }
.facts .fact-catch dt { color: var(--amber); }
.facts .fact-catch dd { font: italic 400 1.25rem/1.35 var(--f-display); }
@media (min-width: 768px) { .facts { grid-template-columns: 1fr 1fr 2fr; column-gap: var(--gutter); } }

/* Case hero image straddles the theme switch */
.case-hero { margin: 0; background: linear-gradient(var(--night) 50%, var(--paper) 50%); }
.case-hero .frame { overflow: hidden; background: var(--night-2); aspect-ratio: 16 / 9; }
.case-hero img { width: 100%; height: 100%; object-fit: cover; }
.case-hero .frame--contain { background: var(--paper-2); }
.case-hero .frame--contain img { object-fit: contain; padding: 4%; }
.js .case-hero .frame { animation: fade-up 900ms var(--ease-out) 240ms both; }

/* Case story: label column + reading column */
.story { padding-top: clamp(var(--s-12), 7vw, var(--s-30)); padding-bottom: var(--s-12); }
.story section { display: grid; gap: var(--s-3); padding: var(--s-8) 0; border-top: 1px solid var(--rule); }
.story section:first-child { border-top: 0; padding-top: 0; }
.story h2 { font: 400 1.5rem/1.2 var(--f-display); letter-spacing: -.01em; }
.story p { max-width: 64ch; font-size: 1.125rem; line-height: 1.65; text-wrap: pretty; }
@media (min-width: 1024px) {
  .story section { grid-template-columns: 4fr 8fr; column-gap: var(--gutter); }
}
.live-link { margin-top: var(--s-6); }
.live-link a { font-weight: 500; }

/* Supporting images */
.case-figure { margin: 0 0 clamp(var(--s-12), 6vw, var(--s-20)); }
.case-figure picture, .case-figure .tall { display: block; background: var(--paper-2); }
.case-figure img { width: 100%; height: auto; }
.case-figure figcaption { margin-top: var(--s-3); font-size: .875rem; color: var(--muted); max-width: 64ch; }
.case-figure--narrow { max-width: 880px; }
/* Tall full-page screens: the frame holds still while the page scrolls through it */
.tall { height: min(86vh, 920px); overflow-y: auto; overscroll-behavior: contain; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tall-wrap { height: 260vh; view-timeline: --tall block; }
    .tall { position: sticky; top: 7vh; overflow: hidden; }
    .tall img { animation: tall-scroll linear both; animation-timeline: --tall; animation-range: contain 0% contain 100%; }
    @keyframes tall-scroll { to { transform: translateY(calc(-100% + min(86vh, 920px))); } }
  }
}

/* Next project: the chain loops, so the last case points back to the first */
.next { border-top: 1px solid var(--rule); padding-top: var(--s-8); padding-bottom: var(--s-20); }
.next a { display: block; text-decoration: none; }
.next .meta { margin-bottom: var(--s-3); }
.next-title { display: block; font: 400 clamp(2rem, 5vw, 4.5rem)/1 var(--f-display); letter-spacing: -.03em; transition: transform var(--dur) var(--ease-out); }
.next-title em { font-style: italic; }

/* About */
.about-top { display: grid; gap: var(--s-8); }
@media (min-width: 1024px) { .about-top { grid-template-columns: 7fr 5fr; align-items: center; } }
/* The portrait: the original photo in a circle, no effects (owner's instruction). The one round image on the site. */
.about-portrait { width: min(100%, 360px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--night-2); justify-self: center; }
.about-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 52% 45%; }

.section { padding-top: clamp(var(--s-12), 7vw, var(--s-20)); padding-bottom: var(--s-12); }
.section .h2 { margin-bottom: var(--s-8); }
.list-rows > li { display: grid; gap: var(--s-2); padding: var(--s-6) 0; border-top: 1px solid var(--rule); }
.list-rows > li:last-child { border-bottom: 1px solid var(--rule); }
.list-rows .when { font: 500 var(--t-meta)/1.6 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.list-rows .what { font: 400 clamp(1.375rem, 1rem + 1.2vw, 2rem)/1.15 var(--f-display); letter-spacing: -.01em; }
.list-rows .where { color: var(--muted); }
@media (min-width: 768px) {
  .list-rows > li { grid-template-columns: 3fr 5fr 4fr; column-gap: var(--gutter); align-items: baseline; }
}
.list-rows--2 > li { grid-template-columns: none; }
@media (min-width: 768px) { .list-rows--2 > li { grid-template-columns: 5fr 7fr; } }
.list-rows p { max-width: 60ch; }

/* Contact */
.big-mail { display: inline-block; margin-top: var(--s-8); font: 400 clamp(1.75rem, 4.5vw, 4rem)/1.05 var(--f-display); letter-spacing: -.02em; color: var(--cream); text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: .15em; overflow-wrap: anywhere; }
.paths { display: grid; gap: var(--s-12); }
@media (min-width: 900px) { .paths { grid-template-columns: 1fr 1fr; column-gap: calc(var(--gutter) * 2); } }
.paths h2 { font: 400 clamp(1.75rem, 3vw, 2.5rem)/1.05 var(--f-display); letter-spacing: -.02em; margin-bottom: var(--s-4); }
.paths p { max-width: 48ch; margin-bottom: var(--s-6); }
.paths .pill--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.paths .pill--ghost { color: var(--ink); border-color: var(--ink); }

/* Contact band closing every page (light) */
.contact-band { border-top: 1px solid var(--rule); padding-top: clamp(var(--s-12), 7vw, var(--s-20)); padding-bottom: clamp(var(--s-12), 7vw, var(--s-20)); }
.contact-band h2 { font: 400 clamp(2.25rem, 5.5vw, 5rem)/.98 var(--f-display); letter-spacing: -.03em; max-width: 16ch; }
.contact-band p { margin-top: var(--s-4); max-width: 48ch; color: var(--muted); font-size: 1.125rem; }
.contact-band .cta-row { margin-top: var(--s-8); }
.contact-band .pill--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact-band .pill--ghost { color: var(--ink); border-color: var(--ink); }
.nav a:not(.pill)[aria-current="page"] { color: var(--amber); }

/* Résumé */
.cv-rows > li { align-items: start; }
.cv-role .where { margin-top: var(--s-2); }
.cv-points { display: grid; gap: var(--s-2); }
.cv-points li { position: relative; padding-left: 18px; max-width: 60ch; }
.cv-points li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--muted); }
@media (min-width: 768px) { .cv-rows > li { grid-template-columns: 3fr 4fr 6fr; } }
.cv-facts { display: grid; gap: var(--s-12); }
@media (min-width: 900px) { .cv-facts { grid-template-columns: 5fr 4fr 3fr; column-gap: calc(var(--gutter) * 2); } }
.cv-h { font: 500 var(--t-meta)/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.cv-strong { font: 400 1.375rem/1.25 var(--f-display); margin-bottom: var(--s-2); }
.cv-facts .where { color: var(--muted); }
.cv-list { display: grid; gap: var(--s-2); }
.cv-level { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-download { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6); padding-bottom: var(--s-20); }
.cv-download p { color: var(--muted); }
.cv-download .pill--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Hover (pointer devices only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav-inline a:hover { color: var(--amber); }
  :is(.hero-shell, .page-top) .pill--solid:hover, .site-header .pill--solid:hover { background: #DDD8CD; }
  :is(.hero-shell, .page-top) .pill--ghost:hover { border-color: var(--cream); }
  .chip:hover span { color: var(--cream); border-color: rgb(244 241 234 / .5); }
  .quote-status a:hover { color: var(--amber); }
  .stage-toggle:hover { color: var(--cream); border-color: var(--cream-muted); }
  .row:hover .row-title a { text-decoration: underline; }
  .row:hover .row-media img { transform: scale(1.02); }
  .q summary:hover .q-text { transform: translateX(6px); }
  .back:hover { color: var(--cream); }
  .back:hover::before { transform: scaleX(1.5); }
  .next a:hover .next-title { transform: translateX(8px); }
  :is(.paths, .contact-band, .cv-download) .pill--solid:hover { background: #3A3834; }
  :is(.paths, .contact-band) .pill--ghost:hover { background: var(--ink); color: var(--paper); }
  .big-mail:hover { text-decoration-color: var(--cream); }
}

/* ---------- Footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-8); padding-bottom: var(--s-12); border-top: 1px solid var(--rule); font-size: .9375rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-6); }
.footer-links a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, .q::details-content { transition-duration: 0s !important; animation: none !important; }
}
