/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  /* Mist and navy: one palette for every page. Pale cool grey, deep navy type
     (it echoes her blazer), and the same navy for the hero's scrolling name,
     timeline dots and focus rings. */
  --paper: #e2e6ea;
  --ink: #15202d;
  --ink-soft: #3e4a58;
  --ink-faint: #56626f;
  --accent: var(--ink);
  --accent-wash: rgba(21, 32, 45, 0.06);
  --line: rgba(21, 32, 45, 0.28);
  --line-soft: rgba(21, 32, 45, 0.16);
  --ph-bg: rgba(21, 32, 45, 0.05);        /* placeholder and logo frames: a quiet tint of the mist */
  --ph-line: rgba(21, 32, 45, 0.06);
  --band: #d6dbe1;                        /* a slightly deeper mist for full-width bands */

  /* Site type: Helvetica Neue everywhere (light weight for display), mono for labels */
  --sans: "Helvetica Neue ME", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: var(--sans); /* display face; kept under the old token name so page styles need no edits */
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* 1% of the width other pages lay out in (the hero gives back the scrollbar
     space, which would otherwise make its vw a little larger) */
  --vw: calc((100vw - var(--hero-sb, 0px)) / 100);
  --gutter: clamp(24px, calc(2.8 * var(--vw)), 40px);       /* one side margin for header, hero and content */
  --stage-gutter: var(--gutter);
  --header-h: 124px;                         /* fixed header: content starts below it */
  --measure: 620px;
  --radius: 14px;
  --radius-pill: 999px;

  --space-hero: 140px;
  --space-section: 140px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
/* Always reserve the scrollbar's space, so pages that scroll and pages that
   don't (the hero, a page mid-slide) share one content width and never shift */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 8px; }
.skip-link:focus { left: 8px; z-index: 100; }

/* ------------------------------------------------------------------
   Type helpers
------------------------------------------------------------------ */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}
.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.09;
  letter-spacing: -0.04em;
}
.lede { font-size: 18px; line-height: 1.55; max-width: var(--measure); }
.prose p { max-width: var(--measure); }
.prose p + p { margin-top: 18px; }
.text-link { position: relative; font-weight: 500; letter-spacing: -0.02em; transition: opacity 0.2s var(--ease); }
.text-link:active { opacity: 0.6; }
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; opacity: 0.35; transition: opacity 0.2s var(--ease);
}
.text-link:hover::after { opacity: 1; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
/* The hero's header, the same on every page. It is fixed, so only the page
   content scrolls (and slides) beneath it. Solid grey so content passes under
   it cleanly; see hero.css for the hero, where it sits on the stage. */
.site-header {
  position: fixed; top: 0; inset-inline: 0 var(--hero-sb, 0px); z-index: 110;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 32px var(--stage-gutter) 24px;
  background: var(--paper);
  transition: background-color 0.3s var(--ease);  /* soft change when a slide lands on the hero */
  font-size: 14px; line-height: 1.5; letter-spacing: 0;
}
.site-header__brand { font-size: 18px; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.site-header__meta { display: flex; align-items: flex-start; gap: clamp(48px, calc(6.5 * var(--vw)), 96px); }
.site-header__column { display: flex; flex-direction: column; gap: 2px; }
.site-header__brand, .site-header__column a { transition: opacity 0.3s var(--ease); }
.site-header__brand:hover, .site-header__column a:hover { opacity: 0.6; }
.site-header__brand:active, .site-header__column a:active { opacity: 0.4; transition-duration: 0.08s; }
main:where(:not(.stage)) { padding-top: var(--header-h); }

/* Buttons are plain text links on this site: no pills, no borders */
.btn { display: inline-flex; align-items: center; font-size: 15px; color: var(--ink); transition: opacity 0.3s var(--ease); }
.btn:hover { opacity: 0.6; }
.btn:active { opacity: 0.4; transition-duration: 0.08s; }

/* ------------------------------------------------------------------
   Placeholder frames (replace the inner label with an <img>)
------------------------------------------------------------------ */
.ph {
  position: relative;
  background: var(--ph-bg);
  border: 1px solid var(--ph-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.ph > img, .ph > video { width: 100%; height: 100%; object-fit: cover; }
.ph__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0; color: var(--ink-faint); text-align: center; padding: 8px; }
.ph--portrait { aspect-ratio: 4 / 5; }
.ph--square { aspect-ratio: 1; }
.ph--landscape { aspect-ratio: 4 / 3; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--banner { aspect-ratio: 16 / 7; }
.logo { display: block; filter: brightness(0); opacity: 0.85; }   /* charcoal silhouettes */
.ph--logo > img.logo { width: auto; height: auto; max-width: 56%; max-height: 34%; object-fit: contain; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-top: 160px; padding-bottom: 40px;
  font-size: 14px; line-height: 1.6;
}
.site-footer__soft { color: var(--ink-soft); }
.site-footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.site-footer__links a { transition: opacity 0.3s var(--ease); }
.site-footer__links a:hover { opacity: 0.6; }
.site-footer__links a:active { opacity: 0.4; transition-duration: 0.08s; }

/* ------------------------------------------------------------------
   Back to top
------------------------------------------------------------------ */
.back-to-top {
  position: fixed; left: 50%; bottom: 28px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  color: var(--ink); font-size: 14px; line-height: 1;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.back-to-top svg { width: 14px; height: 14px; }
.back-to-top.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ------------------------------------------------------------------
   Placeholder audit (append ?placeholders to the URL)
------------------------------------------------------------------ */
body.show-placeholders [data-placeholder] { outline: 1px dashed var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
/* Narrow windows: brand left; on the right, Work / About / Contact above
   LinkedIn / Email / Résumé, so every link stays in the header */
@media (max-width: 900px) {
  :root { --header-h: 84px; }
  .site-header { align-items: center; padding: 24px var(--stage-gutter) 16px; font-size: 13px; }
  .site-header__meta { flex-direction: column; align-items: flex-end; gap: 4px; }
  .site-header__year { display: none; }
  .site-header__column { flex-direction: row; gap: 18px; }
}
/* Smallest phones: tighten so the brand and links never touch */
@media (max-width: 380px) {
  .site-header { gap: 12px; }
  .site-header__brand { font-size: 16px; }
  .site-header__column { gap: 12px; }
}

@media (max-width: 760px) {
  :root { --space-hero: 96px; --space-section: 96px; }
  .section-title { font-size: 30px; }
  .site-footer { padding-top: 112px; padding-bottom: 32px; font-size: 13px; }
  .back-to-top { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ------------------------------------------------------------------
   Page slide (js/page-slide.js): during a page change the outgoing and
   incoming pages each sit in a full-screen panel and slide together.
------------------------------------------------------------------ */
.page-panel {
  position: fixed; inset: 0; z-index: 100;
  overflow: hidden;
  background: var(--paper);
  will-change: transform;
}
/* Leaving the hero (no scrollbar space) for a page that reserves it: lay the
   arriving page out at its final width so nothing shifts when it lands */
.page-panel:not(:has(> .stage)) { padding-right: var(--hero-sb, 0px); }

/* Arriving by slide: no entrance animation on top of it */
:root[data-arrived] .stage, :root[data-arrived] .stage__portrait, :root[data-arrived] .stage__figure, :root[data-arrived] .stage__rule { animation: none; }
