/* ============================================================================
   Said Dulevic — editorial design system (2026)
   Paper · ink · one orange accent. Fraunces for display, Inter for reading.
   Sections: tokens · base · primitives · motion · nav · home · pages · forms
   ========================================================================== */

/* ── Fonts: self-hosted, latin subset (covers ë ç Ë Ç), variable ─────────── */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* colour */
  --paper:      #F6F5F1;
  --paper-2:    #EDEBE4;
  --paper-3:    #E2DFD5;
  --card:       #FBFAF7;
  --ink:        #171717;
  --ink-2:      #45433E;   /* secondary text, 9.3:1 on paper */
  --ink-3:      #69665E;   /* tertiary text, 5.2:1 on paper */
  --line:       rgba(23, 23, 23, .14);
  --line-2:     rgba(23, 23, 23, .34);
  --accent:     #F05A28;   /* fills + large display type only (3.2:1 on paper) */
  --accent-hi:  #FF6D3D;
  --accent-ink: #B5400F;   /* small orange text on paper, 5.5:1 */
  --night:      #171717;
  --night-2:    #201F1D;
  --on-night:   #F6F5F1;
  --on-night-2: #B8B5AC;   /* 8.9:1 on night */
  --line-night: rgba(246, 245, 241, .16);
  --ok:         #1E6B3A;
  --err:        #A82A12;

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --fs-hero:  clamp(2.9rem, 15.2vw, 8.6rem);
  --fs-h1:    clamp(2.5rem, 7vw, 5.6rem);
  --fs-h2:    clamp(2.05rem, 4.8vw, 3.9rem);
  --fs-h3:    clamp(1.4rem, 2.3vw, 1.9rem);
  --fs-h4:    clamp(1.15rem, 1.5vw, 1.3rem);
  --fs-lead:  clamp(1.08rem, 1.4vw, 1.28rem);
  --fs-body:  1.0625rem;
  --fs-sm:    .9375rem;
  --fs-xs:    .8125rem;
  --fs-label: .75rem;

  /* space */
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --container: 82.5rem;
  --section:   clamp(4.5rem, 10vw, 9.5rem);
  --nav-h:     4rem;

  /* shape */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 14px;
  --r-pill: 999px;

  /* motion */
  --ease-out:   cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 200ms;
  --t-med:  450ms;
  --t-slow: 650ms;
  --rise:   20px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  overflow-x: clip;
}
img, picture, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.04; letter-spacing: -.025em; font-optical-sizing: auto; text-wrap: balance; }
p { }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.section--night :focus-visible, .cta :focus-visible, .prompt-box :focus-visible { outline-color: var(--accent); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: var(--paper); padding: .75rem 1.1rem; border-radius: var(--r-1); transition: top var(--t-fast) var(--ease-out); }
.skip-link:focus { top: .75rem; }

/* ── Primitives ──────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 58rem; }
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); }
.section--night { background: var(--night); color: var(--on-night); }
.section--flush-top { padding-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); flex: none; }
.eyebrow--plain::before { display: none; }
.section--night .eyebrow, .cta .eyebrow { color: var(--on-night-2); }

.display { font-size: var(--fs-h2); }
.display em, .hero__title em, .page-head__title em, .cta__title em { color: var(--accent); font-weight: 300; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 38em; }
.section--night .lead { color: var(--on-night-2); }

.section-head { display: grid; gap: 1.25rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); align-items: end; }
.section-head .eyebrow { margin-bottom: .25rem; }
.section-head__aside { display: grid; gap: 1.25rem; justify-items: start; }
@media (min-width: 60rem) {
  .section-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .section-head__title { grid-column: 1; }
}

/* Text link with a drawn underline */
.link {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: .15rem; min-height: 1.75rem;
  transition: background-size var(--t-med) var(--ease-out), color var(--t-fast) ease;
}
.link svg { width: 1em; height: 1em; flex: none; transition: transform var(--t-fast) var(--ease-out); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--accent-ink); }
.link:hover svg { transform: translate(3px, 0); }
.link--ext:hover svg { transform: translate(2px, -2px); }
.section--night .link:hover, .cta .link:hover { color: var(--accent); }

/* Buttons */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .7rem 1.6rem;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.005em; line-height: 1.2; text-align: center;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: var(--r-pill);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out);
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; transition: transform var(--t-fast) var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--ink); --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-hi); --btn-bd: var(--accent-hi); }
.btn--ink:hover { --btn-bg: #000; }
.btn--line { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn--line:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.section--night .btn--line, .cta .btn--line { --btn-fg: var(--on-night); --btn-bd: rgba(246, 245, 241, .4); }
.section--night .btn--line:hover, .cta .btn--line:hover { --btn-bg: var(--on-night); --btn-fg: var(--ink); --btn-bd: var(--on-night); }
.btn--sm { min-height: 2.75rem; padding: .5rem 1.15rem; font-size: var(--fs-xs); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn .spinner { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
.btn.is-busy .spinner { display: block; }
.btn.is-busy svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Small labels */
.tag {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 1.75rem; padding: .15rem .7rem;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); color: var(--ink-2); white-space: nowrap;
}
.tag--model::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
.section--night .tag, .prompt-box .tag { border-color: rgba(246, 245, 241, .35); color: var(--on-night); }
.meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .01em; }
.meta > * + *::before { content: "·"; margin-right: .9rem; color: var(--ink-3); }
.meta a:hover { color: var(--accent-ink); }
.meta__cat { font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-label); align-self: center; }

/* Media frame: fixed ratio, image scales inside */
.frame { position: relative; overflow: hidden; border-radius: var(--r-2); background: var(--paper-3); }
.frame > img, .frame > picture > img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.frame--16x10 { aspect-ratio: 16 / 10; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--top > img { object-position: top center; }
a:hover > .frame > img, .project:hover .frame > img, .post:hover .frame > img { transform: scale(1.035); }
.frame__mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4.5rem); color: var(--ink-3); letter-spacing: -.03em; }

/* ── Motion: scroll reveals (only when JS is running) ─────────────────────── */
.js [data-reveal] { opacity: 0; transform: translate3d(0, var(--rise), 0); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal] .frame > img { transform: scale(1.08); }
.js [data-reveal].is-in .frame > img { transform: scale(1); }
.js [data-reveal].is-in:hover .frame > img { transform: scale(1.035); }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  border-bottom: 1px solid transparent; transition: border-color var(--t-med) ease;
}
/* The glass lives on a pseudo-element: a backdrop-filter on .nav itself would
   make it the containing block of the fixed mobile menu. */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(246, 245, 241, .84); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); transition: background-color var(--t-med) ease; }
.nav.is-scrolled, .nav.is-open { border-bottom-color: var(--line); }
.nav.is-scrolled::before, .nav.is-open::before { background: rgba(246, 245, 241, .95); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav__logo { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.03em; line-height: 1; display: inline-flex; align-items: baseline; gap: .1rem; min-height: 2.75rem; align-items: center; }
.nav__logo i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: .15rem; transform: translateY(.32rem); }
.nav__menu { display: flex; align-items: center; gap: clamp(.25rem, 1.2vw, 1rem); }
.nav__list { display: flex; align-items: center; gap: clamp(.1rem, .8vw, .6rem); }
.nav__link { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .7rem; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); transition: color var(--t-fast) ease; }
.nav__link::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .45rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out); }
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__num, .nav__extra { display: none; }
.nav__toggle { display: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; align-items: center; justify-content: center; margin-right: -.5rem; }
.nav__toggle span:first-child { position: relative; width: 1.35rem; height: 2px; background: var(--ink); transition: background-color var(--t-fast) ease; }
.nav__toggle span:first-child::before, .nav__toggle span:first-child::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); transition: transform var(--t-med) var(--ease-out); }
.nav__toggle span:first-child::before { transform: translateY(-6px); }
.nav__toggle span:first-child::after { transform: translateY(6px); }
.nav__toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav__toggle[aria-expanded="true"] span:first-child::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:first-child::after { transform: rotate(-45deg); }

@media (max-width: 56.24rem) {
  .js .nav__toggle { display: inline-flex; }
  .js .nav__menu {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99; background: var(--paper);
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem;
    padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom)); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translate3d(0, -12px, 0);
    transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
  }
  .js .nav__menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav__list li { border-bottom: 1px solid var(--line); }
  .js .nav__link { width: 100%; min-height: 4rem; padding: 0; font-family: var(--font-display); font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 400; letter-spacing: -.02em; color: var(--ink); gap: 1rem; }
  .js .nav__link::after { display: none; }
  .js .nav__link[aria-current="page"] { color: var(--accent-ink); font-weight: 400; }
  .js .nav__num { display: inline; font-family: var(--font-body); font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; color: var(--ink-3); width: 1.75rem; }
  .js .nav__extra { display: grid; gap: 1.25rem; }
  .js .nav__extra .btn { width: 100%; }
  .js .nav__cta-desktop { display: none; }
  .nav__social { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: var(--fs-sm); color: var(--ink-2); }
  .nav__social a { min-height: 2.75rem; display: inline-flex; align-items: center; }
  /* Without JS the menu simply wraps under the bar. */
  html:not(.js) .nav { height: auto; position: static; }
  html:not(.js) .nav__inner { flex-wrap: wrap; padding-block: .5rem; }
  html:not(.js) .nav__menu, html:not(.js) .nav__list { flex-wrap: wrap; }
}
body.is-locked { overflow: hidden; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(2rem, 5vw, 4.5rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.hero__name { display: flex; align-items: center; gap: .7rem; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em; color: var(--ink-2); margin-bottom: clamp(1rem, 2vw, 1.6rem); text-wrap: nowrap; flex-wrap: wrap; }
.hero__name::before { content: ""; width: 2.25rem; height: 1px; background: var(--ink); }
.hero__name b { font-weight: 600; color: var(--ink); }
.hero__title { font-size: var(--fs-hero); line-height: .93; letter-spacing: -.045em; font-weight: 400; }
.hero__title .line { display: block; overflow: hidden; padding: .07em 0 .13em; margin: -.07em 0 -.13em; }
.hero__title .line > span { display: inline-block; }
.hero__lead { margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 33em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.hero__figure { position: relative; max-width: 30rem; width: 100%; justify-self: center; }
.hero__figure .frame { border-radius: var(--r-2); box-shadow: .9rem .9rem 0 -1px var(--paper), .9rem .9rem 0 0 var(--line-2); }
.hero__figure { padding: 0 .9rem .9rem 0; }
.hero__figure img { transform: translate3d(var(--tx, 0), var(--ty, 0), 0) scale(1.06); transition: transform 600ms var(--ease-out); will-change: transform; }
.hero__caption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; font-size: var(--fs-xs); color: var(--ink-3); }
.hero__caption b { color: var(--ink); font-weight: 600; }
.hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line-2); }
.hero__fact { padding: 1.4rem 1rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.hero__fact dt { font-size: var(--fs-xs); color: var(--ink-3); order: 2; }
.hero__fact dd { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.03em; margin-bottom: .4rem; }
.hero__fact { display: flex; flex-direction: column; }
.hero__fact--social dd { font-family: var(--font-body); font-size: var(--fs-sm); letter-spacing: 0; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 0 1rem; margin: 0; order: 3; }
.hero__fact--social dd a { min-height: 2.75rem; display: inline-flex; align-items: center; font-weight: 500; }
.hero__fact--social dd a:hover { color: var(--accent-ink); }
@media (min-width: 40rem) { .hero__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hero__fact { border-bottom: 0; padding-right: 1.5rem; } .hero__fact + .hero__fact { padding-left: 1.5rem; border-left: 1px solid var(--line); } }
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); }
  .hero__figure { justify-self: end; max-width: none; }
}

/* Hero entrance — pure CSS so it never waits for JS */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .line > span { animation: line-up 900ms var(--ease-out) both; animation-delay: calc(120ms + var(--l, 0) * 90ms); }
  .hero__name, .hero__lead, .hero__actions, .hero__caption, .hero__facts { animation: rise 700ms var(--ease-out) both; }
  .hero__name { animation-delay: 60ms; }
  .hero__lead { animation-delay: 480ms; }
  .hero__actions { animation-delay: 580ms; }
  .hero__facts { animation-delay: 760ms; }
  .hero__caption { animation-delay: 700ms; }
  .hero__figure .frame { animation: unveil 1100ms var(--ease-out) 200ms both; }
}
@keyframes line-up { from { transform: translate3d(0, 108%, 0); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, var(--rise), 0); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { opacity: 0; transform: translate3d(0, 28px, 0) scale(.985); } to { opacity: 1; transform: none; } }

/* ── Marquee of institutions ─────────────────────────────────────────────── */
.marquee { border-block: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 5rem); overflow: hidden; display: flex; align-items: center; }
.marquee__label { flex: none; padding: 1.1rem var(--gutter); font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); border-right: 1px solid var(--line); position: relative; z-index: 1; }
.marquee__viewport { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track.is-paused, .marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: 2.5rem; padding-left: 2.5rem; font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.5rem); white-space: nowrap; color: var(--ink-2); }
.marquee__item::after { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (max-width: 40rem) { .marquee { flex-direction: column; align-items: stretch; } .marquee__label { border-right: 0; border-bottom: 1px solid var(--line); padding-block: .8rem; } .marquee__viewport { padding-block: .9rem; } }

/* ── Projects ────────────────────────────────────────────────────────────── */
.work__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 2.5rem); }
.project { grid-column: span 12; display: flex; flex-direction: column; gap: 1.25rem; color: inherit; }
.project__body { display: grid; gap: .6rem; align-content: start; }
.project__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.project__title { font-size: var(--fs-h3); }
.project__title svg { display: inline-block; vertical-align: .02em; margin-left: .15em; width: .62em; height: .62em; color: var(--accent-ink); transition: transform var(--t-med) var(--ease-out); }
a.project:hover .project__title svg { transform: translate(4px, -4px); }
.project__desc { color: var(--ink-2); font-size: var(--fs-sm); max-width: 34em; }
.project__host { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--t-med) var(--ease-out); justify-self: start; padding-bottom: .1rem; }
a.project:hover .project__host { background-size: 100% 1px; }
.section--night .project__desc { color: var(--on-night-2); }
.section--night .project__top { color: var(--on-night-2); }
.section--night .project__host { color: var(--on-night); }
.section--night .project__title svg { color: var(--accent); }

@media (min-width: 40rem) { .project { grid-column: span 6; } .project--lead { grid-column: span 12; } }
@media (min-width: 60rem) {
  .project--lead { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: end; }
  .project--lead .project__title { font-size: var(--fs-h2); }
  .work__grid > .project:nth-child(2) { grid-column: span 7; }
  .work__grid > .project:nth-child(3) { grid-column: span 5; margin-top: clamp(3rem, 8vw, 7rem); }
  .work__grid > .project:nth-child(4) { grid-column: span 5; }
  .work__grid > .project:nth-child(5) { grid-column: span 7; margin-top: clamp(2rem, 5vw, 4rem); }
  /* Library page: repeating 7/5 · 5/7 · 4/4/4 rhythm */
  .work__grid--library > .project { grid-column: span 4; margin-top: 0 !important; }
  .work__grid--library > .project:nth-child(7n + 1) { grid-column: span 7; }
  .work__grid--library > .project:nth-child(7n + 2) { grid-column: span 5; }
  .work__grid--library > .project:nth-child(7n + 3) { grid-column: span 5; }
  .work__grid--library > .project:nth-child(7n + 4) { grid-column: span 7; }
}

/* Index list (compact project rows, also reused for trainings) */
.index { margin-top: clamp(3.5rem, 7vw, 6rem); }
.index__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-2); }
.index__row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .25rem 1rem; align-items: center; padding: 1.05rem 0; border-bottom: 1px solid var(--line); min-height: 3.5rem; position: relative; transition: color var(--t-fast) ease; }
.index__row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -.5); background: var(--paper-2); opacity: 0; transition: opacity var(--t-fast) ease; z-index: -1; border-radius: var(--r-1); }
a.index__row:hover::before { opacity: 1; }
.index__num { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.index__name { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.02em; transition: transform var(--t-med) var(--ease-out); }
a.index__row:hover .index__name { transform: translateX(6px); }
.index__kind { display: none; font-size: var(--fs-sm); color: var(--ink-3); }
.index__host { font-size: var(--fs-sm); color: var(--ink-2); display: inline-flex; align-items: center; gap: .4rem; }
.index__host svg { width: .9em; height: .9em; color: var(--accent-ink); transition: transform var(--t-fast) var(--ease-out); }
a.index__row:hover .index__host svg { transform: translate(2px, -2px); }
.index__foot { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
@media (min-width: 48rem) { .index__row { grid-template-columns: 3rem minmax(0, 1.1fr) minmax(0, 1fr) auto; } .index__kind { display: block; } }
@media (max-width: 30rem) { .index__host span { display: none; } }

/* ── Services (night) ────────────────────────────────────────────────────── */
.services__list { border-top: 1px solid var(--line-night); }
.service { display: grid; gap: .75rem 2rem; padding: clamp(1.75rem, 3.5vw, 2.75rem) 0; border-bottom: 1px solid var(--line-night); align-items: start; }
.service__num { font-size: var(--fs-label); font-weight: 600; letter-spacing: .12em; color: var(--accent); padding-top: .55rem; }
.service__title { font-size: clamp(1.7rem, 3.4vw, 2.9rem); transition: transform var(--t-med) var(--ease-out), color var(--t-fast) ease; }
.service__desc { color: var(--on-night-2); max-width: 32em; }
.service__more { display: grid; gap: 1rem; justify-items: start; }
.service__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.service:hover .service__title { transform: translateX(8px); color: var(--accent); }
@media (min-width: 60rem) { .service { grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 6fr); } .service__more { grid-column: 3; } .service__desc { grid-column: 3; } .service__title, .service__num { grid-row: span 2; } }

/* ── About ───────────────────────────────────────────────────────────────── */
.about__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.about__bio { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); margin-top: 1.5rem; }
.about__bio strong { color: var(--ink); font-weight: 600; }
.about__skills { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.about__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.about__photo figcaption { margin-top: .8rem; font-size: var(--fs-xs); color: var(--ink-3); }
.timeline { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line-2); }
.timeline__item { display: grid; gap: .3rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.timeline__period { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; color: var(--accent-ink); text-transform: uppercase; padding-top: .3rem; }
.timeline__role { font-size: var(--fs-h4); letter-spacing: -.015em; }
.timeline__org { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.timeline__desc { font-size: var(--fs-sm); color: var(--ink-2); margin-top: .35rem; }
@media (min-width: 36rem) { .timeline__item { grid-template-columns: 8.5rem minmax(0, 1fr); } }
@media (min-width: 60rem) { .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .about__intro { position: sticky; top: calc(var(--nav-h) + 2rem); } }

/* ── Journal (blog preview + blog index) ─────────────────────────────────── */
.journal__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.post { display: flex; flex-direction: column; gap: 1rem; }
.post__title { font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.15; letter-spacing: -.02em; }
.post__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--t-med) var(--ease-out); }
.post:hover .post__title a { background-size: 100% 1px; }
.post__title a::after { content: ""; position: absolute; inset: 0; }        /* whole card is the target */
.post { position: relative; }
.post .meta a { position: relative; z-index: 1; }
.post__excerpt { font-size: var(--fs-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post--lead .post__title { font-size: var(--fs-h3); }
.post-list { border-top: 1px solid var(--line-2); }
.post-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1.25rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.post-row__title { font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.2; letter-spacing: -.02em; transition: transform var(--t-med) var(--ease-out); }
.post-row__title a::after { content: ""; position: absolute; inset: 0; }
.post-row:hover .post-row__title { transform: translateX(6px); }
.post-row .meta { grid-column: 1; }
.post-row__arrow { grid-row: 1 / span 2; grid-column: 2; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.post-row__arrow svg { width: 1rem; height: 1rem; }
.post-row:hover .post-row__arrow { background: var(--accent); border-color: var(--accent); }
@media (min-width: 60rem) { .journal__grid { grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr); align-items: start; } }

.posts { display: grid; gap: clamp(2.5rem, 4vw, 3.5rem) clamp(1.25rem, 2.5vw, 2.25rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
@media (min-width: 60rem) {
  .posts > .post--lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; padding-bottom: clamp(2.5rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
  .posts > .post--lead .post__title { font-size: var(--fs-h2); }
  .posts > .post--lead .post__body { display: grid; gap: 1rem; }
}
.post__body { display: grid; gap: .65rem; }

/* ── Prompts ─────────────────────────────────────────────────────────────── */
.prompts { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.prompt { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; transition: border-color var(--t-fast) ease, transform var(--t-med) var(--ease-out); }
.prompt:hover { border-color: var(--line-2); }
.prompt__media { aspect-ratio: 16 / 9; border-radius: 0; }
.prompt__main { display: flex; flex-direction: column; gap: .9rem; padding: clamp(1.25rem, 2.2vw, 1.75rem); flex: 1; }
.prompt__top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; justify-content: space-between; }
.prompt__top > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.prompt__copies { font-size: var(--fs-xs); color: var(--ink-3); display: inline-flex; gap: .35rem; align-items: center; }
.prompt__copies svg { width: .95em; height: .95em; }
.prompt__title { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.02em; line-height: 1.12; }
.prompt__title a:hover { color: var(--accent-ink); }
.prompt__desc { font-size: var(--fs-sm); color: var(--ink-2); }
.prompt__code { position: relative; margin-top: auto; background: var(--night); color: var(--on-night-2); border-radius: var(--r-2); padding: 1rem 1.1rem; font-family: var(--font-mono); font-size: .8rem; line-height: 1.6; max-height: 8.6rem; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt__code::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3rem; background: linear-gradient(transparent, var(--night)); }
.prompt__actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; }
/* A single prompt should still look composed: lay it out wide. */
@media (min-width: 60rem) {
  .prompts > .prompt:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .prompts > .prompt:only-child .prompt__media { aspect-ratio: auto; height: 100%; min-height: 22rem; }
  .prompts > .prompt:only-child .prompt__title { font-size: var(--fs-h3); }
}
.copy-btn.is-done { --btn-bg: var(--ok); --btn-fg: #fff; --btn-bd: var(--ok); }
.copy-btn.is-failed { --btn-bg: var(--err); --btn-fg: #fff; --btn-bd: var(--err); }

.prompt-box { background: var(--night); color: var(--on-night); border-radius: var(--r-3); overflow: hidden; margin-block: 2rem; }
.prompt-box__bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .9rem 1rem .9rem 1.4rem; border-bottom: 1px solid var(--line-night); }
.prompt-box__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); }
.prompt-box__text { padding: 1.4rem; font-family: var(--font-mono); font-size: .875rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: #E9E6DD; max-height: 34rem; overflow-y: auto; }
.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line-2); margin-top: 1.25rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; color: var(--accent-ink); padding-top: .3rem; }
.steps a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.steps code, .prose code { font-family: var(--font-mono); font-size: .875em; background: var(--paper-3); padding: .1em .4em; border-radius: var(--r-1); }

/* ── CTA + footer ────────────────────────────────────────────────────────── */
.cta { background: var(--night); color: var(--on-night); padding-block: clamp(5rem, 11vw, 10rem); position: relative; overflow: hidden; }
.cta__title { font-size: clamp(2.6rem, 8.4vw, 7.5rem); line-height: .95; letter-spacing: -.04em; margin-top: 1.5rem; }
.cta__row { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 2rem; align-items: end; border-top: 1px solid var(--line-night); padding-top: 2rem; }
.cta__mail { font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 2.2rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.cta__note { color: var(--on-night-2); max-width: 30em; margin-bottom: 1rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 60rem) { .cta__row { grid-template-columns: minmax(0, 1fr) auto; } }

.footer { padding-block: clamp(3.5rem, 7vw, 6rem) 2rem; }
.footer__mark { font-family: var(--font-display); font-size: clamp(3rem, 13.5vw, 12.5rem); line-height: .85; letter-spacing: -.055em; color: var(--ink); white-space: nowrap; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.footer__mark i { display: inline-block; width: .13em; height: .13em; border-radius: 50%; background: var(--accent); margin-left: .04em; }
.footer__grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); padding-top: 2.5rem; }
.footer__about { grid-column: 1 / -1; max-width: 26em; color: var(--ink-2); font-size: var(--fs-sm); }
.footer__heading { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .75rem; }
.footer__links a { display: inline-flex; align-items: center; min-height: 2.5rem; font-size: var(--fs-sm); color: var(--ink-2); transition: color var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.footer__links a:hover { color: var(--ink); transform: translateX(3px); }
.footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.footer__bottom a { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); }
.footer__bottom a:hover { color: var(--ink); }
.footer__bottom svg { width: 1em; height: 1em; }
@media (min-width: 40rem) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .footer__grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); } .footer__about { grid-column: auto; } }
.footer__links a { overflow-wrap: anywhere; }

/* ── Internal page header ────────────────────────────────────────────────── */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head__title { font-size: var(--fs-h1); letter-spacing: -.04em; line-height: .98; margin-top: 1.1rem; }
.page-head__grid { display: grid; gap: 1.5rem 3rem; align-items: end; }
.page-head .lead { margin-top: .25rem; }
@media (min-width: 60rem) { .page-head__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.crumbs { display: flex; flex-wrap: wrap; gap: .25rem .6rem; font-size: var(--fs-xs); color: var(--ink-3); }
.crumbs a { min-height: 1.75rem; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--line-2); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs [aria-current] { color: var(--ink-2); }

/* Filter chips (categories) */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-block: .25rem 1rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.05rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.chip small { font-size: var(--fs-label); color: var(--ink-3); font-weight: 600; transition: color var(--t-fast) ease; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="true"], .chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-current] small { color: var(--on-night-2); }
@media (min-width: 60rem) { .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

/* Search */
.search { position: relative; display: flex; gap: .5rem; width: 100%; max-width: 32rem; }
.search__field { position: relative; flex: 1; }
.search__field svg { position: absolute; left: 1.1rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search__input { width: 100%; min-height: 3.25rem; padding: 0 1.1rem 0 2.9rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--card); transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.search__input::placeholder { color: var(--ink-3); }
.search__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240, 90, 40, .28); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 20; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: 0 24px 60px rgba(23, 23, 23, .16); overflow: hidden; }
.suggest[hidden] { display: none; }
.suggest__item { display: grid; gap: .1rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); min-height: 3rem; }
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:hover, .suggest__item.is-active { background: var(--paper-2); }
.suggest__kind { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.suggest__title { font-weight: 500; font-size: var(--fs-sm); }
.suggest__empty { padding: 1rem 1.1rem; font-size: var(--fs-sm); color: var(--ink-2); }
.result-note { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }

/* Pagination */
.pager { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.pager__pages { display: flex; gap: .3rem; flex-wrap: wrap; }
.pager__num, .pager__step { min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: 0 .6rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; border: 1px solid transparent; transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease; }
.pager__num:hover, .pager__step:hover { border-color: var(--ink); }
.pager__num[aria-current="page"] { background: var(--ink); color: var(--paper); }
.pager__step { padding: 0 1.1rem; border-color: var(--line-2); }
.pager__step svg { width: 1em; height: 1em; }
.pager__step[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pager__gap { align-self: center; color: var(--ink-3); padding: 0 .2rem; }

/* Empty state */
.empty { border: 1px dashed var(--line-2); border-radius: var(--r-3); padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); text-align: center; display: grid; gap: 1rem; justify-items: center; }
.empty__title { font-size: var(--fs-h3); }
.empty p { color: var(--ink-2); max-width: 30em; }

/* ── Article ─────────────────────────────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.article__head { padding-block: clamp(2rem, 5vw, 4rem) clamp(1.75rem, 3vw, 2.5rem); }
.article__title { font-size: clamp(2.1rem, 5.2vw, 4.2rem); letter-spacing: -.035em; line-height: 1.02; margin-block: 1.25rem 1.5rem; }
.article__lede { font-size: var(--fs-lead); color: var(--ink-2); max-width: 40em; margin-bottom: 1.5rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.byline__who { display: flex; align-items: center; gap: .8rem; font-size: var(--fs-sm); }
.byline__who span { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--font-display); font-size: 1rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.share { display: flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); color: var(--ink-3); }
.share__btn { min-width: 2.75rem; min-height: 2.75rem; padding: 0 .85rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-size: var(--fs-xs); font-weight: 500; color: var(--ink); transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.share__btn svg { width: 1rem; height: 1rem; }
.share__btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.article__cover { border-radius: var(--r-3); }
.article__body { padding-block: clamp(2rem, 5vw, 4rem); }

.prose { max-width: 42.5rem; margin-inline: auto; font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); line-height: 1.75; color: #2B2A27; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.35em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.prose h3 { font-size: clamp(1.35rem, 2.1vw, 1.65rem); margin-top: 1.9em; }
.prose h4 { font-size: 1.2rem; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .8em; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t-fast) ease; }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: .55em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.5em; }
.prose ul > li::before { content: ""; position: absolute; left: .15em; top: .72em; width: .42em; height: .42em; border-radius: 50%; background: var(--accent); }
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--accent-ink); font-weight: 600; font-size: .9em; }
.prose li > ul, .prose li > ol { margin-top: .55em; }
.prose blockquote { font-family: var(--font-display); font-size: 1.35em; line-height: 1.35; letter-spacing: -.015em; color: var(--ink); padding-left: 1.2em; border-left: 3px solid var(--accent); margin-block: 1.8em; }
.prose blockquote p + p { margin-top: .6em; }
.prose img, .prose video, .prose iframe { border-radius: var(--r-2); margin-block: 2em; max-width: 100%; height: auto; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.prose figure { margin-block: 2em; }
.prose figure img { margin-block: 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--ink-3); margin-top: .6em; text-align: center; }
.prose pre { background: var(--night); color: #E9E6DD; padding: 1.2rem 1.3rem; border-radius: var(--r-2); overflow-x: auto; font-family: var(--font-mono); font-size: .875rem; line-height: 1.65; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin-block: 2.5em; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; }
.prose th, .prose td { padding: .7em .9em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 8em; }
.prose th { font-weight: 600; color: var(--ink); border-bottom-color: var(--line-2); white-space: nowrap; }

.article__foot { max-width: 42.5rem; margin: clamp(2.5rem, 5vw, 4rem) auto 0; display: grid; gap: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.author-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; padding: 1.5rem; background: var(--paper-2); border-radius: var(--r-3); align-items: start; }
.author-card .avatar { width: 3.75rem; height: 3.75rem; font-size: 1.3rem; }
.author-card h2 { font-size: 1.3rem; margin-bottom: .35rem; }
.author-card p { font-size: var(--fs-sm); color: var(--ink-2); }
.author-card__links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: .5rem; font-size: var(--fs-sm); }
.author-card__links a { min-height: 2.75rem; display: inline-flex; align-items: center; font-weight: 500; }
.author-card__links a:hover { color: var(--accent-ink); }

/* ── Contact + forms ─────────────────────────────────────────────────────── */
.contact__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.contact__mail { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.4rem); letter-spacing: -.025em; overflow-wrap: anywhere; display: inline-block; margin-block: .5rem 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat; padding-bottom: .15rem; }
.contact__mail:hover { color: var(--accent-ink); }
.facts { border-top: 1px solid var(--line-2); margin-top: 2.25rem; }
.facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.facts dt { color: var(--ink-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding-top: .2rem; }
.facts dd { color: var(--ink-2); }
.facts dd ul { display: grid; gap: .3rem; }
.facts dd a { font-weight: 500; color: var(--ink); min-height: 2rem; display: inline-flex; align-items: center; }
.facts dd a:hover { color: var(--accent-ink); }
.facts__inline { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
@media (max-width: 30rem) { .facts > div { grid-template-columns: 1fr; gap: .25rem; } }
@media (min-width: 60rem) { .contact__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6.5fr); align-items: start; } }

.form { display: grid; gap: 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); padding: clamp(1.4rem, 3.5vw, 2.75rem); }
.form__row { display: grid; gap: 1.4rem; }
@media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .45rem; }
.field__label { font-size: var(--fs-sm); font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.field__label small { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
.field__input { width: 100%; min-height: 3.25rem; padding: .8rem 1rem; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-2); transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease; }
textarea.field__input { min-height: 10rem; resize: vertical; line-height: 1.55; }
.field__input::placeholder { color: #85827A; }
.field__input:hover { border-color: var(--ink-3); }
.field__input:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(240, 90, 40, .28); }
.field__input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(168, 42, 18, .14); }
.field__error { font-size: var(--fs-xs); color: var(--err); font-weight: 500; min-height: 1.2em; display: flex; gap: .35rem; align-items: center; }
.field__error:empty { display: none; }
.form__foot { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }
.form__note { font-size: var(--fs-xs); color: var(--ink-3); max-width: 26em; }
.notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; padding: 1.15rem 1.25rem; border-radius: var(--r-2); border: 1px solid; margin-bottom: 1.5rem; font-size: var(--fs-sm); }
.notice svg { width: 1.35rem; height: 1.35rem; margin-top: .1rem; }
.notice strong { display: block; font-size: var(--fs-body); margin-bottom: .1rem; }
.notice--ok { background: #E8F1EA; border-color: rgba(30, 107, 58, .35); color: #14502A; }
.notice--err { background: #FBE9E4; border-color: rgba(168, 42, 18, .35); color: #7E1F0D; }
.sent { display: grid; gap: 1.25rem; justify-items: start; padding: clamp(1.75rem, 4vw, 3rem); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); }
.sent h2 { font-size: var(--fs-h3); }

/* ── Toast (copy feedback) ───────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); z-index: 150; transform: translate3d(-50%, 150%, 0); opacity: 0; background: var(--ink); color: var(--paper); padding: .85rem 1.25rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; display: inline-flex; align-items: center; gap: .6rem; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); max-width: calc(100vw - 2rem); transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out); pointer-events: none; }
.toast.is-on { transform: translate3d(-50%, 0, 0); opacity: 1; }
.toast::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #53C27E; flex: none; }
.toast.is-error::before { background: var(--accent); }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.lost { min-height: 62vh; display: grid; align-items: center; padding-block: var(--section); }
.lost__code { font-family: var(--font-display); font-size: clamp(7rem, 30vw, 22rem); line-height: .8; letter-spacing: -.06em; color: var(--ink); }
.lost__code em { color: var(--accent); font-weight: 300; }
.lost__title { font-size: var(--fs-h2); margin-top: 1.5rem; }
.lost__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-reveal] .frame > img, .hero__figure img { transform: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; row-gap: .5rem; }
  .marquee__item[aria-hidden="true"] { display: none; }
}

@media print {
  .nav, .footer, .cta, .progress, .toast, .share { display: none !important; }
  body { background: #fff; }
}

.hero__title { display: block; }
.facts dd ul { list-style: none; padding: 0; }

/* ── Refinements after visual review ─────────────────────────────────────── */
/* Hairline so white screenshots don't dissolve into the paper. */
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.section--night .frame::after { box-shadow: inset 0 0 0 1px var(--line-night); }
@media (max-width: 30rem) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__caption { flex-direction: column; gap: .15rem; }
}

/* ── Night hero with the portrait film ───────────────────────────────────── */
.hero--night { --hero-bg: #101010; background: var(--hero-bg); color: var(--on-night); padding-top: clamp(1.5rem, 4vw, 3.5rem); overflow: hidden; }
.hero--night .hero__grid { align-items: center; }
.hero--night .hero__name { color: var(--on-night-2); }
.hero--night .hero__name b { color: var(--on-night); }
.hero--night .hero__name::before { background: var(--accent); }
.hero--night .lead { color: var(--on-night-2); }
.hero--night .btn--line { --btn-fg: var(--on-night); --btn-bd: rgba(246, 245, 241, .4); }
.hero--night .btn--line:hover { --btn-bg: var(--on-night); --btn-fg: var(--ink); --btn-bd: var(--on-night); }
.hero--night :focus-visible { outline-color: var(--accent); }
.hero__social { display: flex; flex-wrap: wrap; gap: 0 1.4rem; margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--on-night-2); }
.hero__social a { min-height: 2.75rem; display: inline-flex; align-items: center; transition: color var(--t-fast) ease; }
.hero__social a:hover { color: var(--accent); }

/* The film's own background is #101010, so a soft mask melts its edges away. */
.hero__media { position: relative; margin-inline: calc(var(--gutter) * -1); }
.hero__video { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 854; object-fit: cover; background: var(--hero-bg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 86%, transparent 97%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 86%, transparent 97%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.hero__strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; margin-top: clamp(1.5rem, 4vw, 3rem); padding-block: 1.25rem; border-top: 1px solid var(--line-night);
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); }
.hero__strip li { display: flex; align-items: center; gap: .7rem; min-height: 2rem; }
.hero__strip li::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: var(--accent); flex: none; }
@media (min-width: 60rem) {
  .hero--night .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 1rem; }
  .hero__media { margin: -1rem calc(var(--gutter) * -1.2) -1rem -3rem; }
  .hero__strip { grid-template-columns: repeat(4, auto); justify-content: space-between; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__social { animation: rise 700ms var(--ease-out) 660ms both; }
  .hero__strip { animation: rise 700ms var(--ease-out) 800ms both; }
  .hero__media { animation: unveil 1200ms var(--ease-out) 150ms both; }
}
.marquee--top { margin-top: 0; border-top: 0; }

/* Navigation while it sits on the dark hero (JS flips it to light afterwards) */
.has-dark-hero .nav:not(.is-light):not(.is-open) { color: var(--on-night); border-bottom-color: transparent; }
.has-dark-hero .nav:not(.is-light):not(.is-open).is-scrolled { border-bottom-color: var(--line-night); }
.has-dark-hero .nav:not(.is-light):not(.is-open) .nav__toggle span:first-child,
.has-dark-hero .nav:not(.is-light):not(.is-open) .nav__toggle span:first-child::before,
.has-dark-hero .nav:not(.is-light):not(.is-open) .nav__toggle span:first-child::after { background: var(--on-night); }
@media (min-width: 56.25rem) {
  .has-dark-hero .nav:not(.is-light) .nav__link { color: var(--on-night-2); }
  .has-dark-hero .nav:not(.is-light) .nav__link:hover, .has-dark-hero .nav:not(.is-light) .nav__link[aria-current="page"] { color: var(--on-night); }
}
.has-dark-hero .nav:not(.is-light) :focus-visible { outline-color: var(--accent); }

/* Stats (About) */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; padding-block: 1.4rem; border-block: 1px solid var(--line-2); }
.stats div { display: flex; flex-direction: column; gap: .35rem; }
.stats dd { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1; letter-spacing: -.03em; }
.stats dt { order: 2; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.35; }

/* Night hero — second pass */
.has-dark-hero .nav:not(.is-light):not(.is-open)::before { background: #101010; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero--night .hero__title { font-size: clamp(2.9rem, 15.2vw, 7.4rem); }
.hero--night .hero__lead { margin-top: clamp(1.25rem, 2.2vw, 1.75rem); max-width: 30em; }
.hero--night .hero__actions { margin-top: clamp(1.5rem, 2.4vw, 2rem); }
@media (min-width: 60rem) {
  .hero--night .hero__grid { grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr); gap: 0; }
  .hero--night .hero__copy { position: relative; z-index: 1; }
  .hero__media { margin: -2.5rem calc(var(--gutter) * -1.6) -2.5rem -7rem; }
  .hero__strip { margin-top: 0; }
}
@media (max-width: 59.99rem) {
  /* Mobile composition: name → headline → film → copy → actions */
  .hero--night .hero__grid { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .hero--night .hero__copy { display: contents; }
  .hero--night .hero__copy > h1 { order: 1; }
  .hero--night .hero__media { order: 2; margin-block: .5rem 0; }
  .hero--night .hero__lead { order: 3; margin-top: .5rem; }
  .hero--night .hero__actions { order: 4; }
  .hero--night .hero__social { order: 5; }
  .hero__video { transform: scale(1.12); transform-origin: 50% 60%; }
}
@media (min-width: 60rem) { .hero--night .hero__lead { max-width: 27rem; } }
.nav::before { inset: 0 0 -1px 0; }
@media (min-width: 60rem) { .hero--night .hero__title { font-size: clamp(4rem, 9.4vw, 7.4rem); } }

/* ── Performance pass ────────────────────────────────────────────────────────
   The headline is the LCP element: it must be painted in the first frame, so
   it slides (transform only) instead of being unmasked. */
.hero__title .line { overflow: visible; }
@keyframes line-up { from { transform: translate3d(0, .32em, 0); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__title .line > span { animation-duration: 800ms; animation-delay: calc(var(--l, 0) * 80ms); }
}
/* 3:1 for large display italics on the tinted background */
.section--tint .display em { color: #DC4A19; }

/* ── Hero entrance v2 ────────────────────────────────────────────────────────
   Keyframe animations with delays pushed the first paint back on slow CPUs.
   Now everything is in its final place for the first frame except a transform
   offset; `.is-ready` (set right after first paint) releases the transitions.
   The headline never fades, so it counts as painted immediately (LCP). */
.hero__title .line > span, .hero__name, .hero__lead, .hero__actions, .hero__caption, .hero__facts,
.hero__social, .hero__strip, .hero__media, .hero__figure .frame { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line > span { transform: translate3d(0, .32em, 0); transition: transform 800ms var(--ease-out); transition-delay: calc(var(--l, 0) * 80ms); }
  .js .hero [data-enter] { opacity: 0; transform: translate3d(0, var(--rise), 0); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
  .js.is-ready .hero__title .line > span, .js.is-ready .hero [data-enter] { opacity: 1; transform: none; }
}
.frame > picture { display: block; width: 100%; height: 100%; }
.frame--top > picture > img { object-position: top center; }
/* No-JS on the dark hero: the wrapped menu still needs light links. */
html:not(.js) .has-dark-hero .nav { background: #101010; }
html:not(.js) .has-dark-hero .nav__link { color: var(--on-night-2); }
html:not(.js) .has-dark-hero .nav__link[aria-current="page"], html:not(.js) .has-dark-hero .nav__logo { color: var(--on-night); }
