/* ============================================================
   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);
}

/* 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: 16px;
  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: 11px;
  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;
  /* the header is the grid made visible: wordmark holds the first
     column, the four nav items each start on a grid line */
  display: grid;
  grid-template-columns: 1fr 2fr;
  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);
}
.hd__mark {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.01em;
  line-height: 1;
  align-self: center;
}
/* serif nav: one column per grid line, full-height ink fill on
   hover and current page, square marker at the column's end */
.hd__nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}
.hd__nav a {
  font-family: var(--serif);
  font-size: 15px;
  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: clamp(46px, 7.6vw, 118px);
  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: clamp(16px, 1.35vw, 19px);
  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: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  border: 1px solid var(--line2);
  border-radius: 999px;
  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: 11px; 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: 12px; 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
   ============================================================ */
.entry {
  border-top: 1px solid var(--line);
  padding: clamp(44px, 7vh, 76px) 0 clamp(56px, 9vh, 96px);
}
.entry__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: clamp(14px, 2.5vw, 32px);
}
.entry__num {
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  color: var(--acc);
  letter-spacing: 0.08em;
}
.entry__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.015em;
}
.entry__name a { transition: color 0.25s ease; }
.entry__name a:hover { color: var(--acc); }
.entry__meta { text-align: right; line-height: 1.8; }

.entry__sum {
  margin: clamp(18px, 3vh, 26px) 0 clamp(28px, 4.5vh, 40px);
  font-size: clamp(17px, 1.45vw, 20px);
  color: var(--ink2);
  max-width: 56ch;
}

.entry__media {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9.2;
  background: var(--paper2);
  box-shadow: inset 0 0 0 1px rgba(23, 21, 17, 0.06);
  position: relative;
  isolation: isolate;
}
.entry__media img, .entry__media video {
  width: 100%; height: 100%;
  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(20px, 3.4vh, 30px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.chip {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink2);
  border: 1px solid color-mix(in srgb, var(--acc) 32%, var(--line));
  border-radius: 999px;
  padding: 7px 13px;
}
.entry__cta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px; 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); }

/* ============================================================
   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: clamp(38px, 4.6vw, 68px);
  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: 12px; color: var(--muted); padding-top: 4px; }
.cap__t { font-weight: 600; font-size: 17.5px; letter-spacing: -0.01em; margin-bottom: 5px; }
.cap__b { font-size: 15.5px; 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: clamp(56px, 6.4vw, 100px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__l {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(246, 244, 238, 0.55);
  margin-top: 14px;
}
.stat__d { font-size: 14px; 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: 16px;
  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: clamp(30px, 3.6vw, 52px);
  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: 11.5px; 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: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.xp__role { font-weight: 600; font-size: 17px; }
.xp__org { color: var(--muted); font-size: 15px; margin-top: 2px; }
.xp__note { color: var(--ink2); font-size: 15px; 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 36px;
}
.sec + .foot, .stats + .foot { margin-top: 0; }
.foot__state {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 168px);
  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: clamp(14px, 1.6vw, 19px);
  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: 10.5px; 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: clamp(64px, 12.5vw, 200px);
  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: 14px; }
.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: clamp(30px, 4.4vw, 60px);
  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: clamp(56px, 10.5vw, 170px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.case-hd__sum {
  margin-top: clamp(22px, 3.6vh, 36px);
  font-size: clamp(17px, 1.5vw, 21px);
  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: 18px;
}

/* 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: 16px; 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: clamp(32px, 4.4vw, 60px);
  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: 16.5px; 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: 14px;
  box-shadow: inset 0 0 0 1px rgba(23, 21, 17, 0.05);
}
.fig figcaption {
  font-family: var(--mono);
  font-size: 11px;
  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: 14px;
  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: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; max-width: 24ch; }
.call p { font-size: 15px; 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: clamp(48px, 8.5vw, 130px);
  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; } }

/* ============================================================
   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; }
  .entry__top { grid-template-columns: auto 1fr; }
  .entry__meta { grid-column: 2; text-align: left; }
}
@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; }
}
