/* ============================================================
   WILLIAM BRUNO — PORTFOLIO V6
   A monograph, not a feed.
   Instrument Serif (display) · Geist (text) · Geist Mono (meta)
   Paper ground; each project carries its own accent.
   ============================================================ */

:root {
  --paper:  #f6f4ee;
  --paper2: #eeebe1;
  --ink:    #171511;
  --ink2:   #38342c;
  --muted:  #7a7468;
  --line:   #e0dbcd;
  --line2:  #cfc8b6;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  "Geist", -apple-system, system-ui, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", monospace;

  --acc: var(--ink);

  --gut: clamp(20px, 5vw, 72px);
  --sect: clamp(88px, 13vh, 168px);

  /* corner radius scale — one value for all media/cards, one for pills */
  --radius: 16px;       /* images, media frames, cards */
  --radius-pill: 999px; /* chips, buttons, status badges */

  /* ---- type scale: one source of truth (keep new sizes on this ramp) ---- */
  --fs-label:   11px;                     /* mono eyebrows, chips, numeric markers */
  --fs-meta:    14px;                     /* nav, captions, secondary meta */
  --fs-body:    16px;                     /* body copy */
  --fs-body-lg: 17px;                     /* emphasized body / small titles */
  --fs-lead:    clamp(17px, 1.4vw, 20px); /* intros & lead paragraphs */
  --fs-title-1: clamp(22px, 3vw, 34px);
  --fs-title-2: clamp(28px, 3.6vw, 52px);
  --fs-title-3: clamp(38px, 4.6vw, 68px);
  --fs-title-4: clamp(44px, 6.5vw, 108px);
  --fs-title-5: clamp(56px, 10.5vw, 170px);
}

/* project accents */
[data-acc="fedex"]   { --acc: #4d148c; }
[data-acc="cognex"]  { --acc: #b3880b; --acc-raw: #ffd400; }
[data-acc="cdm"]     { --acc: #0a3d91; }
[data-acc="dogfish"] { --acc: #1e5c40; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: min(1280px, 100% - 2 * var(--gut)); margin-inline: auto; }

/* ---------- type utilities ---------- */
.k {
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.k--acc { color: var(--acc); }
.it { font-style: italic; }

/* ============================================================
   HEADER
   ============================================================ */
.hd {
  position: fixed;
  inset-inline: 0; top: 0;
  z-index: 50;
  /* wordmark holds the left, nav sits tight against the right edge */
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 56px;
  padding: 0 max(var(--gut), calc((100% - 1280px) / 2));
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.hd.scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
/* backdrop-filter makes .hd a containing block for fixed-position
   descendants, which would clamp the full-screen mobile menu overlay
   to the header box on scrolled pages — drop it while the menu is open */
body.menu-open .hd,
body.menu-open .hd.scrolled {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.hd__mark {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.01em;
  line-height: 1;
  align-self: center;
}
/* serif nav: items sit at their natural width, tight against the
   right edge, with a full-height ink fill on hover and current page */
.hd__nav {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.hd__nav a {
  font-family: var(--serif);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 0 16px 0 12px;
  /* fill wipes in from the top edge, like a tab sliding down */
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: top;
  background-size: 100% 0%;
  transition: background-size 0.2s cubic-bezier(0.33, 0, 0.2, 1), color 0.14s ease 0.05s;
}
.hd__nav a::after {
  content: "";
  width: 4px; height: 4px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity 0.22s ease;
}
/* external destinations (resume, contact) get an outward arrow instead */
.hd__nav a[target="_blank"]::after,
.hd__nav a[href^="mailto:"]::after {
  content: "\2197";
  width: auto; height: auto;
  background: none;
  font-family: var(--sans);
  font-size: 0.62em;
  line-height: 1;
  opacity: 0.45;
}
.hd__nav a:hover,
.hd__nav a[aria-current="page"] {
  background-size: 100% 100%;
  color: var(--paper);
}
.hd__nav a:hover::after,
.hd__nav a[aria-current="page"]::after { opacity: 0.55; }

/* hamburger (mobile only) */
.hd__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  align-self: center;
  background: none;
  border: 0;
  padding: 12px 0 12px 16px;
  cursor: pointer;
  z-index: 2;
}
.hd__burger span {
  display: block;
  width: 23px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, background 0.3s ease;
}
.mhd-page .hd:not(.scrolled) .hd__burger span { background: #f0eee7; }
body.menu-open .hd__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
body.menu-open .hd__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
body.menu-open .hd__burger span { background: #f0eee7; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 110px;
}
.hero .k { margin-bottom: clamp(20px, 3vh, 36px); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-4);
  line-height: 0.99;
  letter-spacing: -0.018em;
  max-width: 17ch;
}

/* offset block: content sits exactly on the first grid line.
   The percentage is computed from the wrap's own width, since
   padding percentages resolve against the parent section. */
.off { padding-left: calc(min(1280px, 100% - 2 * var(--gut)) / 6); }
@media (max-width: 880px) {
  .off { padding-left: 0; }
}
.hero__sub {
  margin-top: clamp(26px, 4vh, 44px);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink2);
  max-width: 54ch;
}
.hero__row {
  margin-top: clamp(26px, 4vh, 40px);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  border: 1px solid var(--line2);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  color: var(--ink2);
  background: color-mix(in srgb, var(--paper) 60%, #fff 40%);
}
.status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2e7d4f;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__hint {
  font-family: var(--mono);
  font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.hero__hint span { display: inline-block; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .status i, .hero__hint span { animation: none; } }

/* ============================================================
   CLIENT TICKER
   ============================================================ */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 17px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex; gap: 0;
  width: max-content;
  animation: tick 140s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }
.ticker__set { display: flex; align-items: center; white-space: nowrap; }
.ticker__set span {
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink2);
  padding: 0 1.4em;
}
.ticker__set i { color: var(--line2); font-style: normal; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.sec { padding-top: var(--sect); }
.sec__hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(36px, 6vh, 64px);
}

/* ============================================================
   WORK ENTRIES
   ============================================================ */
/* Staggered 50/50 split: text column beside the media, alternating sides
   per entry. Grid areas place each part independently of DOM order, so no
   markup change is needed (source order stays top / sum / media / foot). */
.entry {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6.5vh, 72px) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "top   media"
    "sum   media"
    "foot  media";
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(30px, 5vw, 80px);
  align-items: start;
}
.entry:nth-of-type(even) {
  grid-template-areas:
    "media top"
    "media sum"
    "media foot";
}
.entry__top  { grid-area: top; }
.entry__sum  { grid-area: sum; }
.entry__foot { grid-area: foot; }

.entry__num {
  display: inline-block;
  margin-bottom: clamp(12px, 1.6vh, 18px);
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 600;
  color: var(--acc);
  letter-spacing: 0.08em;
}
.entry__name {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-3);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.entry__name a { transition: color 0.25s ease; }
.entry__name a:hover { color: var(--acc); }
.entry__meta { text-align: left; margin-top: clamp(10px, 1.4vh, 14px); line-height: 1.7; }

.entry__sum {
  margin: clamp(16px, 2.4vh, 22px) 0 clamp(20px, 3.2vh, 30px);
  font-size: var(--fs-lead);
  color: var(--ink2);
  max-width: 46ch;
}

.entry__media {
  grid-area: media;
  align-self: center;
  /* stack the montage slides in a single grid cell instead of absolute +
     height:100%. Safari collapses a percentage height taken against an
     aspect-ratio box to zero (image paints nothing); grid stretch sizes
     each slide from the cell itself, which every engine resolves. */
  display: grid;
  opacity: 1; /* explicit: a reveal must never be able to leave this hidden */
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10.5;
  background: var(--paper2);
  box-shadow: inset 0 0 0 1px rgba(23, 21, 17, 0.06);
  position: relative;
}
.entry__media img, .entry__media video {
  grid-area: 1 / 1;            /* all slides share one cell → stacked overlay */
  width: 100%; height: 100%;
  min-width: 0; min-height: 0; /* let the image shrink to the cell (grid items
                                  default to min-*:auto, which would overflow
                                  the frame at full image resolution) */
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.entry__media:hover img, .entry__media:hover video { transform: scale(1.025); }

.entry__foot {
  margin-top: clamp(18px, 3vh, 26px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.entry__cta {
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--acc);
  display: inline-flex; align-items: center; gap: 8px;
}
.entry__cta b { font-weight: 600; transition: transform 0.3s ease; }
.entry__cta:hover b { transform: translateX(5px); }

/* ============================================================
   V7 ADDITIONS — hero reel · logo ticker · work hover montage
   ============================================================ */

/* Hero — tightened (top-aligned, no dead space) so the dark band sits close */
.hero {
  min-height: auto;
  justify-content: flex-start;
  padding-top: clamp(124px, 16vh, 184px);
}

/* Hero CTA — green pill */
.hero__cta {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--paper);
  background: #1e5c40;
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.hero__cta:hover { background: #16442f; transform: translateY(-1px); }
.hero__cta span { display: inline-block; animation: nudge 2.2s ease-in-out infinite; }

/* Client ticker — white logos on a dark ground */
.ticker--logos .ticker__set img {
  /* base optical height; each logo is nudged off this for even visual weight */
  --logo-h: clamp(17px, 1.8vw, 23px);
  width: auto; height: auto;
  max-height: var(--logo-h);
  max-width: none;
  object-fit: contain;
  margin: 0 clamp(18px, 2.4vw, 40px);
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.ticker--logos .ticker__set img:hover { opacity: 0.95; }
/* logo marquee never stops — keep scrolling even on hover */
.ticker--logos:hover .ticker__track { animation-play-state: running; }

/* Optical size balancing (logos trimmed to their ink box; bold/caps marks
   are eased down, light small-text marks eased up so none dominates). */
.ticker--logos .ticker__set img[src*="FedEx"]        { max-height: calc(var(--logo-h) * 0.84); }
.ticker--logos .ticker__set img[src*="Microsoft"]    { max-height: calc(var(--logo-h) * 0.97); }
.ticker--logos .ticker__set img[src*="Forrester"]    { max-height: calc(var(--logo-h) * 0.82); }
.ticker--logos .ticker__set img[src*="Aetna"]        { max-height: calc(var(--logo-h) * 0.84); }
.ticker--logos .ticker__set img[src*="Group"]        { max-height: calc(var(--logo-h) * 0.90); } /* Johnson & Johnson */
.ticker--logos .ticker__set img[src*="Celebrity"]    { max-height: calc(var(--logo-h) * 1.12); }
.ticker--logos .ticker__set img[src*="/logo.png"]    { max-height: calc(var(--logo-h) * 0.86); } /* Cognex */
.ticker--logos .ticker__set img[src*="Logo%20copy"]  { max-height: calc(var(--logo-h) * 1.06); } /* CDM Smith */
.ticker--logos .ticker__set img[src*="dfh_sheild"]   { max-height: calc(var(--logo-h) * 0.78); } /* Dogfish emblem */
.ticker--logos .ticker__set img[src*="footer-lower"] { max-height: calc(var(--logo-h) * 1.00); } /* Ohio State */

/* Selected case studies sits a touch closer beneath the dark band */
#work { padding-top: clamp(48px, 7vh, 88px); }

/* Featured work — hover montage (cross-fading slide stack) */
.entry__media .em__slide {
  /* stacked via grid-area:1/1 (see .entry__media img rule); only the
     cross-fade opacity lives here now — no absolute/percentage-height */
  opacity: 0;
  transition: opacity 0.85s ease, transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.entry__media .em__slide.is-active { opacity: 1; }
.entry__media:hover .em__slide.is-active { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) {
  .entry__media .em__slide { transition: opacity 0.3s ease; }
}

/* ============================================================
   CAPABILITIES
   ============================================================ */
.caps { padding-block: var(--sect); }
.caps__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.caps h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-3);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 12ch;
  position: sticky; top: 110px;
}
.cap {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
}
.cap:last-child { border-bottom: 1px solid var(--line); }
.cap__n { font-family: var(--mono); font-size: var(--fs-label); color: var(--muted); padding-top: 4px; }
.cap__t { font-weight: 600; font-size: var(--fs-body-lg); letter-spacing: -0.01em; margin-bottom: 5px; }
.cap__b { font-size: var(--fs-meta); color: var(--muted); max-width: 52ch; }

/* ============================================================
   STATS BAND (dark)
   ============================================================ */
.stats {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 11vh, 130px) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.stat__n {
  font-family: var(--serif);
  font-size: var(--fs-title-4);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__l {
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(246, 244, 238, 0.55);
  margin-top: 14px;
}
.stat__d { font-size: var(--fs-meta); color: rgba(246, 244, 238, 0.72); margin-top: 8px; max-width: 26ch; }

/* ============================================================
   ABOUT TEASER / ABOUT PAGE
   ============================================================ */
.about { padding-block: var(--sect); }
.about__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.about__photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 4.8;
  background: var(--paper2);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__body .k { display: block; margin-bottom: 18px; }
.about__state {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-2);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  max-width: 20ch;
}
.about__body p { color: var(--ink2); max-width: 54ch; margin-bottom: 14px; }
.alink {
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 4px;
  transition: border-color 0.25s ease;
}
.alink:hover { border-color: var(--ink); }

/* about page extras */
.xp { border-top: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.xp:last-of-type { border-bottom: 1px solid var(--line); }
.xp__when { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.xp__role { font-weight: 600; font-size: var(--fs-body-lg); }
.xp__org { color: var(--muted); font-size: var(--fs-meta); margin-top: 2px; }
.xp__note { color: var(--ink2); font-size: var(--fs-meta); margin-top: 8px; max-width: 58ch; }

/* ============================================================
   FOOTER CTA (dark)
   ============================================================ */
.foot {
  background: var(--ink);
  color: var(--paper);
  margin-top: var(--sect);
  padding: clamp(88px, 14vh, 170px) 0 clamp(40px, 6vh, 64px);
}
.sec + .foot, .stats + .foot { margin-top: 0; }
.foot__state {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-5);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.foot__mail {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(30px, 5vh, 52px);
  font-family: var(--mono);
  font-size: var(--fs-lead);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(246, 244, 238, 0.3);
  padding-bottom: 8px;
  transition: border-color 0.25s ease;
}
.foot__mail:hover { border-color: var(--paper); }
.foot__row {
  margin-top: clamp(56px, 9vh, 96px);
  padding-top: 26px;
  border-top: 1px solid rgba(246, 244, 238, 0.14);
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.foot__row a, .foot__row span {
  font-family: var(--mono);
  font-size: var(--fs-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(246, 244, 238, 0.6);
}
.foot__row a:hover { color: var(--paper); }
.foot__row .gap { margin-left: auto; }

/* ============================================================
   CASE PAGES — dark cinematic opening act (Metalab-style),
   then the editorial paper body resumes at the facts grid.
   ============================================================ */
.mhd {
  background: #0d0d0c;
  color: #f0eee7;
}
.mhd .k { color: rgba(240, 238, 231, 0.5); }
.mhd__hero {
  padding: clamp(140px, 21vh, 215px) var(--gut) clamp(36px, 6vh, 60px);
}
.mhd__hero .k { display: block; margin-bottom: 20px; }
.mhd__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-5);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.mhd__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: clamp(26px, 4.5vh, 44px) var(--gut);
  border-top: 1px solid rgba(240, 238, 231, 0.14);
}
.mhd__meta .k { display: block; margin-bottom: 7px; }
.mhd__meta p { font-size: var(--fs-meta); }
.mhd__shot { background: #0d0d0c; }
.mhd__shot img, .mhd__shot video { width: 100%; display: block; }
.mhd__say {
  padding: clamp(96px, 15vh, 190px) var(--gut);
  display: grid; place-items: center; text-align: center;
}
.mhd__say p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-2);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 24ch;
}
.mhd__say .it {
  font-style: italic;
  color: color-mix(in srgb, var(--acc-raw, var(--acc)) 65%, #f0eee7);
}

/* fixed header goes light while over the dark act */
.mhd-page .hd:not(.scrolled) .hd__mark,
.mhd-page .hd:not(.scrolled) .hd__nav a { color: #f0eee7; }
.mhd-page .hd:not(.scrolled) .hd__nav a {
  background-image: linear-gradient(#f0eee7, #f0eee7);
}
.mhd-page .hd:not(.scrolled) .hd__nav a:hover,
.mhd-page .hd:not(.scrolled) .hd__nav a[aria-current="page"] {
  color: #171511;
}

@media (max-width: 820px) {
  .mhd__meta { grid-template-columns: 1fr 1fr; }
}

.case-hd { padding-top: clamp(140px, 22vh, 220px); }
.case-hd .k { display: block; margin-bottom: 22px; }
.case-hd h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-5);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.case-hd__sum {
  margin-top: clamp(22px, 3.6vh, 36px);
  font-size: var(--fs-lead);
  color: var(--ink2);
  max-width: 54ch;
}
.case-hd__meta { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 26px; }

.case-hero { margin-top: clamp(40px, 7vh, 76px); }
.case-hero img, .case-hero video {
  width: 100%;
  border-radius: var(--radius);
}

/* facts */
.facts { padding-top: clamp(56px, 9vh, 96px); }
.facts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 6vw, 88px);
}
.fact { border-top: 1px solid var(--line); padding: 24px 0 28px; }
.fact .k { display: block; margin-bottom: 10px; color: var(--acc); }
.fact p { font-size: var(--fs-body); color: var(--ink2); max-width: 52ch; }

/* chapters */
.chap { padding-top: clamp(72px, 11vh, 130px); }
.chap__k { display: block; margin-bottom: 18px; color: var(--acc); }
.chap h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-2);
  line-height: 1.03;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.chap__body {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 72px);
}
.chap__body p { color: var(--ink2); font-size: var(--fs-body); max-width: 56ch; }
.chap__body p + p { margin-top: 12px; }

.fig { margin-top: clamp(36px, 6vh, 60px); }
.fig img, .fig video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(23, 21, 17, 0.05);
}
.fig figcaption {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
  max-width: 84ch;
}
.fig--contain img { width: auto; max-width: 100%; max-height: 80vh; margin-inline: auto; }
.fig2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.6vw, 32px); margin-top: clamp(36px, 6vh, 60px); }
.fig2 .fig { margin-top: 0; }
.fig3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.2vw, 26px); margin-top: clamp(36px, 6vh, 60px); }
.fig3 .fig { margin-top: 0; }

/* embedded interactive */
.embed { margin-top: clamp(36px, 6vh, 60px); }
.embed iframe {
  width: 100%;
  border: 0;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}

/* case metrics */
.cmx {
  margin-top: clamp(80px, 12vh, 140px);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 10vh, 110px) 0;
}
.cmx .stats__grid { grid-template-columns: repeat(4, 1fr); }
.cmx .stat__n { color: color-mix(in srgb, var(--acc-raw, var(--acc)) 72%, var(--paper)); }

/* decisions */
.calls { padding-top: clamp(72px, 11vh, 120px); }
.calls__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
  margin-top: clamp(30px, 5vh, 48px);
}
.call { border-top: 1px solid var(--line); padding-top: 22px; }
.call h3 { font-size: var(--fs-body-lg); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; max-width: 24ch; }
.call p { font-size: var(--fs-meta); color: var(--muted); max-width: 38ch; }

/* next project */
.next {
  margin-top: var(--sect);
  border-top: 1px solid var(--line);
}
.next a {
  display: block;
  padding: clamp(56px, 9vh, 96px) 0 clamp(64px, 10vh, 110px);
  transition: background 0.4s ease;
}
.next a:hover { background: color-mix(in srgb, var(--acc) 4%, var(--paper)); }
.next .k { display: block; margin-bottom: 16px; }
.next__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-4);
  line-height: 0.96;
  letter-spacing: -0.018em;
  display: flex; align-items: baseline; gap: 24px;
}
.next__name b { font-weight: 400; font-size: 0.55em; transition: transform 0.35s ease; }
.next a:hover .next__name b { transform: translateX(12px); }
.next a:hover .next__name { color: var(--acc); }

/* ============================================================
   REVEAL
   ============================================================ */
.r { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1); }
.r.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .r { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   ARCHIVE — earlier work, typographic index on dark ground
   ============================================================ */
.arch {
  background: #16140f;
  color: var(--paper);
  margin-top: clamp(44px, 7vh, 88px);
  padding-block: clamp(72px, 11vh, 130px);
}
.arch .sec__hd { margin-bottom: clamp(26px, 4vh, 40px); }
.arch .sec__hd .k { color: rgba(246, 244, 238, 0.55); }
.arch__lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-1);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 30ch;
  color: var(--paper);
  margin-bottom: clamp(40px, 6.5vh, 72px);
}
.arch__list {
  list-style: none;
  border-top: 1px solid rgba(246, 244, 238, 0.16);
}
/* each item is a native <details> — click/keyboard toggle, no JS needed */
.arch__item { border-bottom: 1px solid rgba(246, 244, 238, 0.16); }

.arch__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: clamp(14px, 3.5vw, 48px);
  padding: clamp(20px, 3vh, 30px) 6px;
  cursor: pointer;
  list-style: none;
  transition: background 0.3s ease, padding-inline 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.arch__row::-webkit-details-marker { display: none; }
.arch__row:hover,
.arch__item[open] > .arch__row {
  background: rgba(246, 244, 238, 0.045);
  padding-inline: 16px;
}
.arch__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-title-2);
  line-height: 1;
  letter-spacing: -0.015em;
}
.arch__cat {
  color: rgba(246, 244, 238, 0.5);
  text-align: right;
  white-space: nowrap;
  align-self: center;
}
/* +/− toggle glyph */
.arch__toggle {
  width: 1.1em;
  font-family: var(--mono);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1;
  color: rgba(246, 244, 238, 0.7);
  text-align: center;
  align-self: center;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.25s ease;
}
.arch__item[open] > .arch__row .arch__toggle { transform: rotate(45deg); color: var(--paper); }

/* expanded panel: description + a row of project shots */
.arch__panel { padding: 0 6px clamp(28px, 4vh, 44px); }
.arch__item[open] > .arch__panel { animation: arch-open 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes arch-open { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.arch__desc {
  max-width: 62ch;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: rgba(246, 244, 238, 0.74);
  margin-bottom: clamp(20px, 3vh, 30px);
}
.arch__shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
}
.arch__shots img {
  width: 100%;
  height: clamp(150px, 22vw, 240px);
  object-fit: cover;
  border-radius: var(--radius);
  background: #0c0b08;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.arch__shots--single { grid-auto-columns: min(640px, 100%); justify-content: start; }
.arch__shots a { display: block; overflow: hidden; border-radius: var(--radius); }
.arch__shots a:hover img { transform: scale(1.03); }
@media (max-width: 640px) {
  .arch__row { grid-template-columns: 1fr auto; }
  .arch__cat { grid-column: 1 / -1; grid-row: 2; text-align: left; white-space: normal; margin-top: 6px; }
  .arch__shots { grid-auto-flow: row; grid-auto-columns: auto; }
  .arch__shots img { height: clamp(180px, 52vw, 280px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .caps__grid, .about__grid { grid-template-columns: 1fr; }
  .caps h2 { position: static; margin-bottom: 8px; }
  .about__photo { max-width: 520px; }
  .stats__grid, .cmx .stats__grid { grid-template-columns: 1fr 1fr; gap: 44px 28px; }
  .calls__grid { grid-template-columns: 1fr; gap: 22px; }
  .chap__body { grid-template-columns: 1fr; gap: 12px; }
  /* stack the 50/50 split: media sits below the text, same order both sides */
  .entry,
  .entry:nth-of-type(even) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "sum"
      "media"
      "foot";
    grid-template-rows: auto;
    row-gap: clamp(24px, 4vh, 36px);
  }
  .entry__media { align-self: stretch; margin: clamp(6px, 1.4vh, 14px) 0; }
}
@media (max-width: 720px) {
  .facts__grid { grid-template-columns: 1fr; }
  .fig2, .fig3 { grid-template-columns: 1fr; }
  .entry__media { aspect-ratio: 4 / 3; }
  .entry__cta { margin-left: 0; width: 100%; margin-top: 8px; }
  .hd__nav a { font-size: 13.5px; padding: 0 12px; gap: 8px; }
  .xp { grid-template-columns: 1fr; gap: 6px; }
}

/* mobile: nav collapses into a hamburger + full-screen ink overlay */
@media (max-width: 640px) {
  .hd { min-height: 52px; grid-template-columns: 1fr auto; }
  .hd__mark { font-size: 18px; position: relative; z-index: 2; }
  .hd__burger { display: flex; }
  body.menu-open .hd__mark { color: #f0eee7; }

  .hd__nav {
    position: fixed;
    inset: 0;
    background: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 0 var(--gut);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
  }
  .hd__nav a { justify-content: flex-start; align-self: flex-start; }
  body.menu-open .hd__nav { opacity: 1; pointer-events: auto; }

  .hd__nav a,
  .mhd-page .hd:not(.scrolled) .hd__nav a {
    font-size: clamp(34px, 10vw, 46px);
    letter-spacing: 0.04em;
    color: #f0eee7;
    padding: 10px 0;
    gap: 16px;
    background-image: linear-gradient(#f0eee7, #f0eee7);
  }
  .hd__nav a:hover,
  .hd__nav a[aria-current="page"],
  .mhd-page .hd:not(.scrolled) .hd__nav a:hover,
  .mhd-page .hd:not(.scrolled) .hd__nav a[aria-current="page"] {
    color: #171511;
    padding: 10px 14px;
  }
  .hd__nav a::after { width: 7px; height: 7px; }
  .hd__nav a[target="_blank"]::after,
  .hd__nav a[href^="mailto:"]::after { width: auto; height: auto; }
}
