/* ============================================================
   Andie Hemmersmeier — portfolio
   Built on the Andie UI Kit: ocean blues and seafoam greens on an
   airy canvas. Newsreader display + Hanken Grotesk body.
   ============================================================ */

/* ---------- Fonts (self-hosted: no third-party requests) ---------- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---------- Andie UI Kit ----------
     Ratios below are measured, not copied from the kit — all of the kit's
     own figures were independently verified and were accurate. */

  /* Ground */
  --canvas: #f4fafb;
  --canvas-deep: #e8f2f5;
  --surface: #ffffff;
  --rule: #dce8ed;              /* decorative divider */
  --border-strong: #586d73;     /* real UI borders — 5.4:1, clears 1.4.11 */

  /* Ink — also the dark ground; one token, both jobs */
  --ink: #0e2c34;               /* 13.9:1 on canvas · AAA */
  --ink-deep: #0a2027;
  --ink-muted: #425860;         /* 7.1:1 · AAA */
  --ink-soft: #586d73;          /* 5.2:1 · AA */

  /* Brand. The plain tones are LARGE-TEXT ONLY (3.2–4.0:1).
     Anything at body or label size must use a -deep variant. */
  --ocean: #0e86c9;             /* 3.8:1 · large only */
  --ocean-deep: #0b6a99;        /* 5.6:1 · AA, body-safe */
  --seafoam: #12a075;           /* 3.2:1 · large only */
  --seafoam-deep: #0e7e5c;      /* 4.8:1 · AA, body-safe */
  --coral: #ea5744;             /* 3.4:1 · large only */
  --coral-deep: #c6483d;        /* 4.5:1 · AA */
  --warning: #8a5a0c;
  --danger: #c0392b;

  /* Light-on-dark. NOT from the kit — it defines none, and its ink-muted
     manages only 1.96:1 on ink. Derived from ocean, hue held, to clear AA. */
  --on-ink: #ffffff;            /* 14.7:1 on ink */
  --on-ink-muted: #7695a1;      /* 4.6:1 on ink */
  --accent-on-ink: #1097e3;     /* 4.6:1 on ink — kickers, labels */

  /* Ocean → seafoam clears 3:1 on ink, canvas, and surface, so one
     gradient serves every ground. Large text only. */
  --gradient: linear-gradient(100deg, var(--ocean) 0%, var(--seafoam) 100%);

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.11rem + 0.44vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2.15rem);
  --step-3: clamp(1.95rem, 1.6rem + 1.75vw, 3.2rem);
  --step-4: clamp(2.5rem, 1.85rem + 3.2vw, 4.6rem);
  /* "Hemmersmeier" is one unbreakable word — the low base keeps it inside
     narrow viewports while the steep slope preserves the desktop scale. */
  --step-5: clamp(2.4rem, 0.6rem + 8vw, 8rem);

  /* Space */
  --gutter: clamp(1.25rem, 0.9rem + 1.7vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --measure: 62ch;
  --maxw: 1440px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: `overflow-x: hidden` computes overflow-y to `auto`,
     which makes body a scroll container and breaks position: sticky. */
  overflow-x: clip;
}

/* Headings are Newsreader. A serif needs far looser tracking than the
   grotesk this replaced — the old -0.022em closes the counters up. */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ocean-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--on-ink);
}
.skip:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - (var(--gutter) * 2), 1080px); }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--canvas { background: var(--canvas); }
.section--dark { background: var(--ink); color: var(--on-ink); }
.section--dark .lede { color: var(--on-ink-muted); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.section--dark .eyebrow { color: var(--on-ink-muted); }

.display { font-size: var(--step-4); }
.h-lg { font-size: var(--step-3); }
.h-md { font-size: var(--step-2); }
.h-sm { font-size: var(--step-1); }

/* The signature: big ocean-blue question headings, now in Newsreader.
   Ocean is large-text-only (3.8:1) — safe here, never at label size. */
.statement {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.004em;
  color: var(--ocean);
  max-width: 20ch;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: var(--measure);
  letter-spacing: -0.01em;
}

.prose { max-width: 54ch; color: var(--ink-muted); }
.prose > * + * { margin-top: 1.15em; }

.muted { color: var(--ink-soft); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}
.nav__mark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  font-size: var(--step-0);
}
.nav__links { display: flex; gap: clamp(0.85rem, 2.5vw, 2.25rem); }
.nav__links a {
  text-decoration: none;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ocean); }

/* Résumé sits in the nav but isn't a page — it leaves the site for a PDF.
   The arrow marks that without turning it into a button. */
.nav__links .nav__resume { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav__resume svg {
  width: 0.7em;
  height: 0.7em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Secondary by design: a text link with a rule under it, not a button. */
.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--ocean-deep);          /* 5.9:1 on surface — body-safe */
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ocean-deep) 40%, transparent);
  padding-bottom: 3px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.resume-link:hover { border-bottom-color: var(--ocean-deep); }
.resume-link svg {
  width: 0.95em;
  height: 0.95em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.resume-link__note { color: var(--ink-soft); font-size: 0.85em; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--on-ink);
  /* Every term is the original scaled by 2/3 — clamp(5rem, 3rem + 12vw, 11rem)
     — so the reduction holds at every viewport, not just where it's clamped. */
  padding-block: clamp(3.33rem, 2rem + 8vw, 7.33rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* soft gradient bloom, echoing the deck's cover */
  content: "";
  position: absolute;
  inset: auto -20% -60% 30%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(169, 193, 217, 0.22), transparent 70%);
  pointer-events: none;
}
.hero__name {
  font-family: var(--serif);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.018em;
  margin-bottom: 0.4em;
}
.hero__role {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  color: var(--on-ink);
}
.hero__meta {
  margin-top: 2.5rem;
  color: var(--on-ink-muted);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
}
/* Pins the group to two columns whatever the item count. Left explicit rather
   than relying on auto-fit: with two items auto-fit happens to give the same
   result, but a third would silently reflow to a cramped 3-across. */
.pillars--two { grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  .pillars--two { grid-template-columns: repeat(2, 1fr); }
}
.pillar h3 {
  font-size: var(--step-1);
  margin-bottom: 0.9rem;
  letter-spacing: -0.025em;
}
.pillar p { color: var(--ink-muted); font-size: 0.97rem; }

/* The icon replaces the gradient rule that used to sit here — it carries the
   same gradient, so the brand mark survives without stacking two elements.
   Stroked with url(#iconGradient), defined once per page. */
.pillar__icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1.15rem;
  fill: none;
  stroke: url(#iconGradient);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* ---------- Project cards ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1.25rem, 0.5rem + 2vw, 2rem);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.28);
}
.card__body { padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); }
.card__index {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.card__title { font-size: var(--step-2); margin-bottom: 0.6rem; }
.card__desc { color: var(--ink-muted); max-width: 34ch; }
.card__tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.card__thumb {
  margin-top: auto;
  padding-inline: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  overflow: hidden;
  height: clamp(11rem, 8rem + 12vw, 16rem);
}
.card__thumb img {
  width: 100%;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -1px 0 var(--rule), 0 18px 40px -20px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s var(--ease);
}
.card:hover .card__thumb img { transform: translateY(-8px) scale(1.015); }
.card__lock {
  position: absolute;
  top: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  right: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Case study hero ---------- */
.cs-hero { background: var(--ink); color: var(--on-ink); padding-block: clamp(4rem, 2.5rem + 9vw, 8rem); }
.cs-hero__kicker {
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-on-ink);   /* ocean is only 3.7:1 on ink — too low at this size */
  margin-bottom: 1.25rem;
}
.cs-hero__title { font-size: var(--step-4); margin-bottom: 1.5rem; }
.cs-hero__lede { font-size: var(--step-1); color: var(--on-ink-muted); max-width: 52ch; line-height: 1.45; }

.meta-grid {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 2rem;
}
.meta-grid dt {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
  margin-bottom: 0.6rem;
}
.meta-grid dd { margin: 0; font-size: 0.97rem; line-height: 1.45; }

/* ---------- Split (statement + body) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
}
@media (min-width: 62rem) {
  .split { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

/* ---------- Objectives panel ---------- */
.objectives {
  background: var(--canvas);
  border-radius: 14px;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}
.section--canvas .objectives { background: var(--surface); }
.objectives h3 {
  font-family: var(--sans);   /* tracked caps are a label — Hanken, not Newsreader */
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.objectives ul { list-style: none; margin: 0; padding: 0; }
.objectives li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: var(--step-1);
  letter-spacing: -0.015em;
  padding-block: 0.9rem;
  border-top: 1px solid var(--rule);
}
.objectives li:first-child { border-top: 0; padding-top: 0; }
.objectives li::before {
  content: "✓";
  color: var(--ocean-deep);      /* small glyph: needs AA, not large-text */
  font-size: 0.9rem;
  flex: none;
}

/* ---------- Learned → Did ---------- */
.pivot { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.pivot__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  background: var(--surface);
  padding-block: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);
}
.section--canvas .pivot__row { background: var(--canvas); }
@media (min-width: 48rem) {
  .pivot__row { grid-template-columns: 1fr 1fr; align-items: baseline; }
}
.pivot__from { font-size: var(--step-1); letter-spacing: -0.02em; font-weight: 500; }
.pivot__to {
  color: var(--ink-muted);
  display: flex;
  gap: 0.75rem;
}
.pivot__to::before {
  content: "→";
  color: var(--ocean-deep);      /* body-size glyph */
  flex: none;
}

/* ---------- Numbered steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  counter-reset: step;
}
.step-item { counter-increment: step; }
.step-item::before {
  content: counter(step);
  display: block;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--ocean);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.step-item h3 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.step-item p { color: var(--ink-muted); font-size: 0.97rem; }

/* ---------- Trade-off cards ---------- */
.tradeoffs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
}
.tradeoff {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
}
.tradeoff__n {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.tradeoff__title {
  font-size: var(--step-1);
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}
.tradeoff dl { margin: 0; display: grid; gap: 1rem; }
.tradeoff dt {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ocean-deep);
  margin-bottom: 0.3rem;
}
.tradeoff dd { margin: 0; color: var(--ink-muted); font-size: 0.93rem; line-height: 1.5; }
.tradeoff dl > div { padding-top: 1rem; border-top: 1px solid var(--rule); }
.tradeoff dl > div:first-child { padding-top: 0; border-top: 0; }

/* ---------- Sticky scroll build (05 — The Design) ---------- */
.build { position: relative; }
.build__inner { display: grid; gap: 2rem; }
@media (min-width: 64rem) {
  .build__inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(3rem, 1rem + 5vw, 6rem);
    align-items: start;
  }
}
.build__media {
  display: none;
  position: sticky;
  top: 14vh;
  border-radius: 12px;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.45);
}
@media (min-width: 64rem) { .build__media { display: block; } }
.build__media-stack { position: relative; }
.build__media img {
  transition: opacity 0.5s var(--ease);
}
.build__media img + img { position: absolute; inset: 0; }
.build__media img:not(.is-active) { opacity: 0; }

.build__step { padding-block: 1.5rem; }
@media (min-width: 64rem) {
  .build__step {
    min-height: 74vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 0;
    transition: opacity 0.45s var(--ease);
  }
  /* Same rule: only dim the inactive steps once JS is confirmed. */
  .js .build__step { opacity: 0.32; }
  .js .build__step.is-active { opacity: 1; }
}
.build__step h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.build__step p { color: var(--ink-muted); max-width: 40ch; }
.build__step-media {
  margin-top: 1.75rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
@media (min-width: 64rem) { .build__step-media { display: none; } }

/* ---------- Iteration list ---------- */
.changes { display: grid; gap: 1px; background: var(--rule); }
.change {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 2rem;
  background: var(--surface);
  padding-block: 1.4rem;
  align-items: baseline;
}
.section--canvas .change { background: var(--canvas); }
@media (min-width: 48rem) { .change { grid-template-columns: 1fr 1.2fr; } }
.change__was { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--rule); }
.change__now { font-weight: 500; display: flex; gap: 0.75rem; }
.change__now::before { content: "→"; color: var(--ocean-deep); flex: none; }

/* ---------- Before / After ---------- */
.ba {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 0.5rem + 2vw, 2rem);
}
@media (min-width: 52rem) { .ba { grid-template-columns: 1fr 1fr; } }
.ba__label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.ba__label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.ba__frame {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  max-height: 34rem;
}
.ba__frame img { width: 100%; }

/* ---------- Zoomable figure ---------- */
.zoom {
  display: block;
  position: relative;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  padding: 0;
}
.zoom__hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  color: var(--on-ink);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.zoom:hover .zoom__hint, .zoom:focus-visible .zoom__hint { opacity: 1; }

figure { margin: 0; }
figcaption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 22, 0.94);
  display: none;
  overflow: auto;
  padding: clamp(1rem, 3vw, 3rem);
}
.lightbox[open] { display: block; }
.lightbox img { margin-inline: auto; max-width: none; }
.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: clamp(1.5rem, 0.5rem + 2.5vw, 3rem);
}
.stat__fig {
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 0.75rem;
  /* Darker gradient by default (stats sit on white/panel); the bright deck
     gradient is restored on charcoal, where it has plenty of contrast. */
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { font-size: 0.92rem; color: var(--ink-muted); max-width: 22ch; }
.section--dark .stat__label { color: var(--on-ink-muted); }

/* ---------- Two-up (reflection) ---------- */
.twoup {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
}
@media (min-width: 52rem) { .twoup { grid-template-columns: 1fr 1fr; } }
.twoup__label {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ocean-deep);
  margin-bottom: 1rem;
}
.twoup h3 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.twoup p { color: var(--ink-muted); max-width: 44ch; }

/* ---------- Next / footer ---------- */
.next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  text-decoration: none;
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  border-top: 1px solid var(--rule);
}
.next__label {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.next__title { font-family: var(--serif); font-size: var(--step-2); letter-spacing: -0.006em; }
.next:hover .next__title { color: var(--ocean-deep); }

.footer {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: end;
}
.footer__cta { font-family: var(--serif); font-size: var(--step-2); letter-spacing: -0.006em; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a {
  color: var(--on-ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease);
}
.footer__links a:hover { border-bottom-color: var(--ocean); }
.footer__fine {
  margin-top: 3rem;
  color: var(--on-ink-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- About ----------
   .about-grid and .portrait are currently UNUSED — about.html dropped the
   photo column while Andie's headshot is outstanding. Kept, not deleted, so
   restoring it is a markup change rather than a rebuild. Delete both if the
   page ships permanently without a photo. */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}
@media (min-width: 56rem) { .about-grid { grid-template-columns: 0.8fr 1.2fr; } }
/* Placeholder only — a real headshot replaces this. Kept quiet on purpose:
   at full gradient saturation it shouts louder than the writing next to it. */
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: var(--canvas-deep);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink-soft);
  overflow: hidden;
  position: relative;
}
.portrait span {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 1rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact ---------- */
.contact-links { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.contact-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  text-decoration: none;
  transition: padding-inline 0.35s var(--ease), background 0.35s var(--ease);
}
.contact-link:hover { padding-inline: 1.25rem; background: var(--canvas); }
.contact-link__label {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-link__value { font-family: var(--serif); font-size: var(--step-1); letter-spacing: -0.006em; }

/* ---------- Reveal ----------
   Progressive enhancement: content is visible by default. Only once the
   inline head script confirms JS (html.js) do we hide it to animate in,
   so a JS failure can never leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .build__step { opacity: 1 !important; }
}
