/* ============================================================================
   CV · CV — styles
   Design thesis: light-first, warm-neutral surfaces with ONE burnt-orange accent and
   a single dark anchor (the contact close). A type pairing that means something —
       serif = the human writer   ·   sans = the interface   ·   mono = the machine
   All neutrals carry a faint warm bias. No pure black, no stark white.
   Smooth, roomy, low-clutter — built to be navigated, not decoded.
   ============================================================================ */

:root {
  /* — surfaces (light-first) — */
  --bg:            #FBFAF6;   /* page */
  --bg-2:          #F3F1EA;   /* alternating band */
  --surface:       #FFFFFF;   /* cards, console */
  --surface-2:     #F7F5EF;   /* sunk card / input well */

  /* — dark anchor (contact + accents) — */
  --ground-ink:    #15120D;
  --ground-ink-2:  #1E1A14;

  /* — text — */
  --ink:           #211C15;
  --ink-strong:    #14110B;
  --muted:         #6B6456;
  --muted-2:       #8C8474;
  --chalk:         #ECE7DC;   /* text on the dark anchor */
  --chalk-strong:  #F7F3EA;
  --muted-on-dark: #A39B8C;
  --muted-on-dark-2:#8C8475;

  /* — hairlines — */
  --hairline:        #E7E2D6;
  --hairline-strong: #D9D2C4;
  --hairline-dark:   #322D26;

  /* — accent: burnt orange (the writer's ink) — */
  --accent:       #C2410C;   /* primary FILLS (pairs with white text) */
  --accent-text:  #C2410C;   /* accent TEXT/links on the page bg (flips on dark) */
  --accent-deep:  #9A3412;   /* hover / pressed */
  --accent-ink:   #F08A4B;   /* accent text on the always-dark anchor */
  --accent-quiet: #8E4A2C;   /* softened inline em in body prose */
  --accent-soft:  rgba(194, 65, 12, 0.08);
  --accent-tint:  rgba(194, 65, 12, 0.05);
  --accent-ring:  rgba(194, 65, 12, 0.45);

  /* — signature & semantic — */
  --wine-dot: #6B2333;   /* deep oxblood — distinct from the orange accent */
  --scrim-light: rgba(251, 250, 246, 0.86);

  /* — type — */
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* — layout — */
  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 56px);

  /* — soft elevation — */
  --shadow-sm: 0 1px 2px rgba(20,17,11,0.04), 0 4px 12px -8px rgba(20,17,11,0.10);
  --shadow-md: 0 2px 6px rgba(20,17,11,0.05), 0 24px 48px -28px rgba(20,17,11,0.22);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ============================================================================
   DARK THEME  — JS sets data-theme="dark" on <html> (an inline head script
   resolves it before paint to avoid a flash). Only tokens that must change are
   overridden; --accent (fills) and --accent-ink (the dark anchor) stay put.
   ============================================================================ */
:root[data-theme="dark"] {
  --bg:            #14110D;
  --bg-2:          #100E0A;
  --surface:       #221E18;   /* cards/console/active pill — lighter than bg */
  --surface-2:     #1A1712;   /* input well / toggle track — darker */
  --ground-ink:    #0C0A07;   /* contact band — deeper than the page */

  --ink:           #ECE7DC;
  --ink-strong:    #F7F3EA;
  --muted:         #A79F90;
  --muted-2:       #8C8475;

  --hairline:        #2E2922;
  --hairline-strong: #3A352D;

  --accent-text:  #F2925A;   /* lighter orange — legible on dark */
  --accent-deep:  #D8551E;   /* brighter hover lifts on dark */
  --accent-quiet: #D98A5A;   /* softened em on dark */
  --wine-dot:     #B5566A;   /* lift the oxblood so it reads on dark */

  --scrim-light:  rgba(14, 11, 8, 0.86);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 4px 12px -8px rgba(0,0,0,0.55);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.40), 0 24px 48px -28px rgba(0,0,0,0.75);
}
/* nav bar background is a hardcoded translucent paper — flip it for dark */
:root[data-theme="dark"] #site-nav { background: rgba(14, 11, 8, 0.72); }

::selection { background: var(--accent-soft); color: var(--ink-strong); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--accent-text); text-decoration: none; }
p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* skip link — first focusable element, hidden until focused */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-family: var(--sans); font-size: 0.9rem; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

/* no-JS safety net: if scripts never run, reveal content anyway */
.no-js .reveal { opacity: 1 !important; transform: none !important; }

em { font-style: italic; }

/* — focus, always visible, never animated — */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--accent-ink); }

/* ============================================================================
   NAV
   ============================================================================ */
#site-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px var(--pad);
  background: rgba(251, 250, 246, 0.78);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}

#wordmark {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem;
  letter-spacing: -0.01em; color: var(--ink-strong);
}
.wordmark__dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--wine-dot); margin: 0 1px;
  transform-origin: center;
}

.nav__controls { display: flex; align-items: center; gap: 12px; }

/* audience picker — visible "I'm a…" framing glued to the toggle */
.audience-picker { display: inline-flex; align-items: center; gap: 9px; }
.audience-picker__label {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.01em;
  color: var(--muted); white-space: nowrap; flex: none;
}

/* audience toggle (segmented) */
#audience-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 11px;
}
#audience-toggle button {
  position: relative;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500;
  color: var(--muted); background: transparent; border: 0;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
#audience-toggle button:hover { color: var(--ink); }
#audience-toggle button[aria-checked="true"] {
  background: var(--surface); color: var(--ink-strong); box-shadow: var(--shadow-sm);
}

/* per-chip tooltip — what each lens does */
#audience-toggle button::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(-3px);
  width: max-content; max-width: 220px;
  font-family: var(--sans); font-weight: 400; font-size: 0.76rem; line-height: 1.4;
  text-align: left; color: var(--chalk); background: var(--ground-ink);
  border: 1px solid var(--hairline-dark); border-radius: 9px;
  padding: 8px 11px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
#audience-toggle button::before {
  content: ""; position: absolute; top: calc(100% + 3px); left: 50%;
  transform: translateX(-50%); width: 9px; height: 9px;
  background: var(--ground-ink); border-left: 1px solid var(--hairline-dark);
  border-top: 1px solid var(--hairline-dark); rotate: 45deg;
  opacity: 0; pointer-events: none; z-index: 51;
  transition: opacity 0.16s var(--ease);
}
#audience-toggle button:hover::after,
#audience-toggle button:focus-visible::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
#audience-toggle button:hover::before,
#audience-toggle button:focus-visible::before { opacity: 1; }

.nav__btn {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 9px;
  padding: 7px 11px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.nav__btn:hover { color: var(--ink); border-color: var(--hairline-strong); }
.nav__btn kbd {
  font-family: var(--mono); color: var(--accent-text);
  border: 1px solid var(--hairline-strong); border-radius: 4px;
  padding: 0 4px; margin-right: 5px; font-size: 0.72rem;
}

/* theme toggle — single icon button cycling system → light → dark */
.nav__icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 34px; padding: 0; flex: none;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 9px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.nav__icon-btn:hover { color: var(--ink); border-color: var(--hairline-strong); }
.nav__icon-btn svg { width: 17px; height: 17px; }
.nav__icon-btn .ic { display: none; }
#theme-toggle[data-pref="system"] .ic--system,
#theme-toggle[data-pref="light"]  .ic--light,
#theme-toggle[data-pref="dark"]   .ic--dark { display: block; }

/* ============================================================================
   HERO + CONSOLE  (light)
   ============================================================================ */
.hero {
  background: var(--bg);
  color: var(--ink);
  position: relative;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: clamp(56px, 9vw, 104px);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(110% 70% at 84% -10%, var(--accent-soft), transparent 56%);
}
.hero__inner {
  position: relative; z-index: 1; padding-top: clamp(48px, 8vw, 88px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero__text { min-width: 0; }

.hero__portrait { margin: 0; flex: none; }
.hero__portrait img {
  display: block; width: clamp(200px, 22vw, 300px); aspect-ratio: 4 / 5;
  object-fit: cover; border-radius: 20px;
  border: 1px solid var(--hairline); box-shadow: var(--shadow-md);
  background: var(--surface-2);
}

.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text);
  margin-bottom: 22px;
}

h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
  line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance;
  margin: 0 0 18px; max-width: 16ch; color: var(--ink-strong);
}
h1 em { color: var(--accent-text); font-style: italic; }

.hero__lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.125rem, 0.95rem + 0.9vw, 1.45rem);
  line-height: 1.5; color: var(--muted); max-width: 46ch; margin-bottom: 42px;
}

/* — console shell (clean light card; no terminal chrome, single column) — */
.console {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  max-width: 760px;
  overflow: hidden;
}

.console__body { min-width: 0; display: flex; flex-direction: column; }

/* console title bar — minimal */
.console__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-bottom: 1px solid var(--hairline);
}
.console__title {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2);
  letter-spacing: 0.04em; text-transform: lowercase;
}
.console__live {
  margin-left: auto; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text);
  display: inline-flex; align-items: center; gap: 6px;
}
.console__live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s infinite;
}

/* transcript */
.transcript-wrap { position: relative; }
.transcript {
  padding: 22px 20px 8px;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 220px; max-height: 52vh; overflow-y: auto;
}
/* shown when a turn's answer runs past the visible window, so the reader
   knows to scroll rather than assuming that's the whole answer */
.transcript-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none; opacity: 0; transition: opacity 0.15s ease;
}
.transcript-wrap.has-more .transcript-fade { opacity: 1; }
.turn { display: flex; flex-direction: column; }
.turn--q { align-items: flex-end; }
.turn--a { align-items: flex-start; }

.bubble-q {
  max-width: 82%;
  font-family: var(--sans); font-size: 0.9rem; line-height: 1.5;
  background: var(--accent); color: #fff;
  padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  overflow-wrap: anywhere;
}
.bubble-a { max-width: 96%; }
.bubble-a .who {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px;
}
.bubble-a .prose {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.62; color: var(--ink);
  overflow-wrap: anywhere;
}
.bubble-a .prose em { color: var(--ink-strong); font-style: italic; }
.bubble-a .hedge {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  margin-bottom: 8px; letter-spacing: 0.02em;
}

/* typing caret + composing dots */
.caret {
  display: inline-block; width: 7px; height: 1.05em; vertical-align: -0.18em;
  background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite;
}
.composing { display: inline-flex; gap: 4px; padding: 2px 0; }
.composing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2);
  animation: breathe 1.4s ease-in-out infinite;
}
.composing i:nth-child(2) { animation-delay: 0.18s; }
.composing i:nth-child(3) { animation-delay: 0.36s; }

/* project cards inside an answer */
.cards { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* compact "Source · …" disclosure inside an answer */
.source { margin-top: 14px; }
.source__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.02em;
  color: var(--accent-text); background: transparent; border: 0;
  padding: 4px 0; cursor: pointer; transition: color 0.14s;
}
.source__toggle:hover { color: var(--accent-deep); }
.source__chev { width: 13px; height: 13px; transition: transform 0.18s var(--ease); }
.source__toggle[aria-expanded="true"] .source__chev { transform: rotate(90deg); }
.source__cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.source__cards[hidden] { display: none; }

/* console input */
.console__form {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--hairline);
  background: var(--surface-2);
}
.console__input {
  flex: 1; resize: none; min-height: 24px; max-height: 120px;
  font-family: var(--sans); font-size: 0.95rem; line-height: 1.45;
  color: var(--ink); background: transparent; border: 0; outline: none;
  padding: 8px 4px;
}
.console__input::placeholder { color: var(--muted-2); }
.console__send {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0;
  transition: background 0.12s, transform 0.09s;
}
.console__send:hover { background: var(--accent-deep); }
.console__send.is-flick { transform: translateY(2px); }
.console__send svg { width: 18px; height: 18px; }
.console__hint {
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted-2);
  padding: 6px 18px 14px; background: var(--surface-2);
}
.console__hint kbd {
  color: var(--accent-text); border: 1px solid var(--hairline-strong);
  border-radius: 4px; padding: 0 4px;
}

/* command palette */
.command-palette {
  list-style: none; margin: 0; padding: 6px;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  max-height: 240px; overflow-y: auto;
}
.command-palette li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
}
.command-palette li[aria-selected="true"], .command-palette li:hover { background: var(--accent-soft); }
.command-palette .cmd { font-family: var(--mono); font-size: 0.84rem; color: var(--accent-text); flex: none; min-width: 84px; }
.command-palette .cmd-desc { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }

/* suggested chips */
.chips {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; max-width: 760px;
}
.chip {
  font-family: var(--sans); font-size: 0.84rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 22px; padding: 9px 16px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s, color 0.16s, background 0.16s, transform 0.16s, box-shadow 0.16s;
}
.chip .arrow { color: var(--accent-text); margin-right: 7px; display: inline-block; transition: transform 0.16s; }
.chip:hover { border-color: var(--accent-text); color: var(--ink-strong); background: var(--accent-tint); transform: translateY(-1px); }
.chip:hover .arrow { transform: translateX(3px); }

/* downloads strip (CV + portfolio) — sits under the suggested chips */
.downloads {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin: -16px 0 28px; max-width: 760px;
}
.downloads__label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin-right: 2px;
}
.dl-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.14s, transform 0.14s, box-shadow 0.14s;
}
.dl-btn:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.dl-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.dl-btn__icon { width: 16px; height: 16px; flex: none; }
.dl-btn__meta { font-family: var(--mono); font-weight: 400; font-size: 0.7rem; opacity: 0.8; letter-spacing: 0.02em; }
@media (max-width: 480px) { .dl-btn__meta { display: none; } }

/* seams panel (overlay inside console body) */
.seams-panel {
  position: absolute; inset: 0; z-index: 5;
  background: var(--scrim-light);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px; overflow-y: auto;
}
.seams-panel__head {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.42; color: var(--ink-strong);
  max-width: 48ch; margin-bottom: 18px;
}
.seam-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--hairline);
}
.seam-row .stage { font-family: var(--sans); font-weight: 600; font-size: 0.84rem; color: var(--accent-text); }
.seam-row .tool { font-family: var(--mono); font-size: 0.72rem; color: var(--muted-2); margin-top: 4px; }
.seam-row .prompt {
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; color: var(--muted);
  padding-left: 12px; border-left: 2px solid var(--accent); margin-bottom: 8px;
}
.seam-row .human { font-family: var(--serif); font-size: 0.95rem; line-height: 1.55; color: var(--ink); }
.seams-back { margin-top: 18px; }

/* help / action rows shared inside transcript */
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.action-btn {
  font-family: var(--sans); font-weight: 500; font-size: 0.84rem;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.action-btn--primary { background: var(--accent); color: #fff; }
.action-btn--primary:hover { background: var(--accent-deep); }
.action-btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline-strong); }
.action-btn--ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }

.help-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-top: 14px; }
.help-grid h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; font-weight: 500; }
.help-grid .cmd-list { display: flex; flex-direction: column; gap: 8px; }
.help-grid .cmd-line { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.help-grid .cmd-line b { color: var(--accent-text); font-weight: 500; }

/* ============================================================================
   SECTIONS / BANDS
   ============================================================================ */
.band { padding: clamp(64px, 10vw, 120px) 0; }
.band--paper { background: var(--bg); color: var(--ink); }
.band--sunk { background: var(--bg-2); }

.kicker {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 24px;
}

h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.14; letter-spacing: -0.015em; text-wrap: balance;
  margin: 0 0 24px; color: var(--ink-strong);
}

/* positioning line */
#positioning-line {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem); line-height: 1.36;
  letter-spacing: -0.01em; max-width: 26ch; margin: 0; text-wrap: balance;
  min-height: 2.5em; color: var(--ink-strong);
}
#positioning-line em { font-style: italic; color: var(--accent-text); }

.positioning__note {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted-2);
  margin-top: 26px;
}

/* project grid */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lead-line {
  font-family: var(--serif); font-size: 1.18rem; line-height: 1.55; color: var(--muted);
  margin-bottom: 28px; max-width: 54ch;
}

/* project card (used on the grid AND inside answers) */
.project-card {
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--surface); padding: 20px 20px 18px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.project-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform 0.2s var(--ease);
}
.project-card:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: var(--shadow-md); }
.project-card:hover::before { transform: scaleY(1); }
.project-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-card__name { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; color: var(--ink-strong); }
.project-card__tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); flex: none; }
.project-card__role { font-family: var(--mono); font-size: 0.74rem; color: var(--accent-text); margin-top: 4px; }
.project-card__blurb { font-size: 0.95rem; line-height: 1.55; color: var(--ink); margin-top: 10px; }
.project-card__detail { margin-top: 12px; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }
.project-card__link { font-family: var(--mono); font-size: 0.74rem; margin-top: 12px; display: inline-block; }
.project-card__link::after { content: " ↗"; }

/* project card screenshot — sits inside a small browser-chrome frame, bleeds
   to the card's edges (negative margin cancels the card's own padding) */
.project-card__frame {
  margin: -20px -20px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  overflow: hidden;
}
.project-card__frame-bar {
  display: flex; gap: 5px; align-items: center;
  padding: 9px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--hairline);
}
.project-card__frame-bar span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--hairline-strong);
}
.project-card__image {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  background: var(--surface-2);
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-card__image { transform: scale(1.035); }

/* real-estate style mosaic — no browser chrome, three photos side by side */
.project-card__mosaic {
  margin: -20px -20px 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.project-card__mosaic img {
  display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-card__mosaic img { transform: scale(1.05); }

/* blend bar */
.blend { margin-top: 16px; }
.blend__track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: flex; }
.blend__fill { background: var(--accent); height: 100%; width: 0; transition: width 0.5s var(--ease); }
.blend__legend {
  display: flex; justify-content: space-between; margin-top: 7px;
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted-2);
}

/* approach / background */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.feature { background: var(--surface); padding: 24px 22px; }
.feature h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin: 0 0 8px; color: var(--ink-strong); }
.feature p { font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

.prose-block { max-width: 62ch; }
.prose-block p { margin-bottom: 16px; font-size: 1.08rem; line-height: 1.66; }
.prose-block p:last-child { margin-bottom: 0; }
.prose-block em { color: var(--accent-quiet); font-style: italic; }
code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--accent-soft); color: var(--accent-deep);
  padding: 1px 6px; border-radius: 5px;
}

.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tool-tag { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); border: 1px solid var(--hairline-strong); border-radius: 16px; padding: 5px 12px; background: var(--surface); }
.tag-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin: 28px 0 0; }
.tag-label + .tool-tags { margin-top: 10px; }

/* publication credits (Background section) */
.credits__lead { max-width: 62ch; margin: 10px 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.credits { list-style: none; margin: 14px 0 0; padding: 0; max-width: 820px; }
.credit {
  display: grid; grid-template-columns: 170px 1fr; gap: 4px 20px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
}
.credit:last-child { border-bottom: 1px solid var(--hairline); }
.credit__role { font-family: var(--sans); font-weight: 600; font-size: 0.84rem; color: var(--accent-text); }
.credit__orig { font-weight: 400; font-style: italic; color: var(--muted-2); }
.credit__body { font-family: var(--serif); font-size: 1rem; line-height: 1.45; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.credit__body cite { font-style: italic; }
.credit__where { display: block; margin-top: 3px; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.credit__where a { color: var(--accent-text); }
.credit__where a:hover { text-decoration: underline; }
@media (max-width: 640px) { .credit { grid-template-columns: 1fr; } }

/* AI projects — built-with-AI showcase */
.ai-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ai-card {
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--surface); padding: 20px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.ai-card:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: var(--shadow-md); }
.ai-card__name { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; color: var(--ink-strong); }
.ai-card__blurb { font-size: 0.95rem; line-height: 1.55; color: var(--muted); flex: 1; }
.ai-card__link { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-text); align-self: flex-start; }
.ai-card__note { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); align-self: flex-start; opacity: 0.9; }

.meta-line { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.meta-line b { color: var(--ink-strong); font-weight: 500; }

/* ============================================================================
   CONTACT (dark anchor — the one deliberate dark band)
   ============================================================================ */
.contact {
  background: var(--ground-ink); color: var(--chalk);
  padding: clamp(64px, 10vw, 112px) 0;
  position: relative; overflow: hidden;
}
.contact::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(100% 70% at 12% -10%, rgba(240,138,75,0.18), transparent 56%);
}
.contact .wrap { position: relative; z-index: 1; }
.contact h2 { color: var(--chalk-strong); }
.contact .kicker { color: var(--accent-ink); }
.contact__lead { font-size: 1.1rem; line-height: 1.6; color: var(--muted-on-dark); max-width: 46ch; margin-bottom: 30px; }
.contact__email {
  font-family: var(--serif); font-size: clamp(1.4rem, 1rem + 2vw, 2.1rem);
  color: var(--accent-ink); letter-spacing: -0.01em; overflow-wrap: anywhere;
  background-image: linear-gradient(var(--accent-ink), var(--accent-ink));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.2s var(--ease);
}
.contact__email:hover { background-size: 100% 1px; }
.contact__links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.contact__links a { font-family: var(--mono); font-size: 0.82rem; color: var(--accent-ink); }
.contact__links a:hover { color: var(--chalk-strong); }
.contact__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--hairline-dark);
}
.contact__privacy { margin: 14px 0 0; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.03em; color: var(--muted-on-dark-2); }
.contact__sig { font-family: var(--serif); font-size: 1.1rem; color: var(--chalk); }
.contact__sig small { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--muted-on-dark-2); letter-spacing: 0.03em; margin-top: 4px; }

#motion-toggle {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted-on-dark);
  background: transparent; border: 1px solid var(--hairline-dark); border-radius: 9px;
  padding: 7px 12px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
#motion-toggle:hover { color: var(--chalk); border-color: var(--muted-on-dark-2); }
#motion-toggle[aria-pressed="true"] { color: var(--accent-ink); border-color: var(--accent-ink); }

/* ============================================================================
   ENTRANCE / SCROLL REVEAL
   ============================================================================ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* entrance plays purely in CSS on load — never gated on JS/rAF */
.load-rise { opacity: 0; animation: load-rise-anim 0.55s var(--ease) both; }
.load-rise.d1 { animation-delay: 0.08s; }
.load-rise.d2 { animation-delay: 0.16s; }
.load-rise.d3 { animation-delay: 0.24s; }

.wordmark__dot.is-bloom { animation: bloom 0.38s var(--ease) both; }

/* ============================================================================
   KEYFRAMES
   ============================================================================ */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 7px rgba(194,65,12,0); } 100% { box-shadow: 0 0 0 0 rgba(194,65,12,0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes bloom { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes load-rise-anim { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .load-rise { opacity: 1 !important; transform: none !important; }
}
.reduce-motion .reveal, .reduce-motion .load-rise { opacity: 1 !important; transform: none !important; }
.reduce-motion .caret { animation: none; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1099px) {
  .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .project-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; margin-bottom: 8px; }
  .hero__portrait img { width: clamp(140px, 40vw, 200px); aspect-ratio: 1 / 1; }
}
@media (max-width: 719px) {
  #site-nav { flex-wrap: wrap; gap: 10px; padding: 12px var(--pad); }
  .nav__controls { width: 100%; justify-content: space-between; }
  .audience-picker { min-width: 0; }
  #audience-toggle { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  #audience-toggle button::after, #audience-toggle button::before { display: none; }
  .nav__btn { white-space: nowrap; }
  .seam-row { grid-template-columns: 1fr; gap: 6px; }
  .chips { gap: 8px; }
  .bubble-q, .bubble-a { max-width: 100%; }
  .transcript { max-height: 60vh; }
}
@media (max-width: 420px) {
  #wordmark { font-size: 1.15rem; }
  .nav__btn { font-size: 0.72rem; padding: 6px 9px; }
  .audience-picker__label { display: none; }
}
