/* =========================================================
   Max Bentley — Experiential Systems Designer
   Warm editorial · image-forward · serif throughout · redline accent
   ========================================================= */

:root {
  --paper:      oklch(0.967 0.008 84);
  --paper-deep: oklch(0.946 0.010 82);
  --bone:       oklch(0.910 0.013 80);
  --ink:        oklch(0.225 0.012 60);
  --ink-rich:   oklch(0.175 0.012 58);
  --ink-soft:   oklch(0.435 0.012 62);
  --ink-faint:  oklch(0.595 0.012 65);
  --line:       oklch(0.80 0.012 76);
  --line-soft:  oklch(0.870 0.012 78);
  --redline:    oklch(51.121% 0.0363 30.357);
  --emphasis:   oklch(46.432% 0.02841 37.256);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --maxw: 1340px;
  --wide: 1600px;
  --gutter: clamp(20px, 4.5vw, 76px);

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

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

::selection { background: oklch(0.515 0.145 33 / 0.16); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Serif label (replaces all mono) ---- */
.label {
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-faint);
  overflow:hidden;
}
.label-sm { font-size: 0.66rem; letter-spacing: 0.19em; }

/* ---- Layout ---- */
.shell { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.shell-wide { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }

@media (max-width: 1647.98px) {
  .shell,
  .shell-wide { margin-left: 20px; margin-right: 20px; padding: 0; }
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule-soft { border-top-color: var(--line-soft); }

/* =========================================================
   View + reveal transitions
   ========================================================= */
.view { animation: viewIn .55s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .view, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklch, var(--paper) 84%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav.on-dark {
  background:
    linear-gradient(to bottom, color-mix(in oklch, var(--ink-rich) 60%, transparent), color-mix(in oklch, var(--ink-rich) 60%, transparent));
  backdrop-filter: blur(8px) saturate(1.05);
  border-bottom-color: color-mix(in oklch, var(--paper) 14%, transparent);
}
.nav-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative;
}
.wordmark { display: flex; align-items: baseline; gap: 12px; cursor: pointer; flex: none; min-width: 0; position: relative; }
.wordmark-ouch {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 70;
  background: var(--ink-rich); color: var(--paper);
  font-size: 0.86rem; font-style: italic; white-space: nowrap;
  padding: 7px 13px; border-radius: 4px;
  box-shadow: 0 6px 22px color-mix(in oklch, var(--ink-rich) 40%, transparent);
  animation: ouchPop .22s var(--ease) both;
}
.wordmark-ouch::before {
  content: ""; position: absolute; bottom: 100%; left: 18px;
  border: 6px solid transparent; border-bottom-color: var(--ink-rich);
}
@keyframes ouchPop { from { opacity: 0; transform: translateY(-5px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wordmark-ouch { animation: none; } }
.wordmark b { font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em; white-space: nowrap; transition: color .4s var(--ease); }
.wordmark .role { font-size: 0.84rem; color: var(--ink-faint); font-style: italic; white-space: nowrap; transition: color .4s var(--ease); }
.nav.on-dark .wordmark b { color: var(--paper); text-shadow: 0 1px 14px color-mix(in oklch, var(--ink-rich) 70%, transparent); }
.nav.on-dark .wordmark .role { color: color-mix(in oklch, var(--paper) 86%, transparent); }
@media (max-width: 820px) { .wordmark .role { display: none; } }

.nav-links {
  display: flex; align-items: center; gap: 6px; overflow:hidden;
}
.nav-link {
  font-size: 0.96rem; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
  padding: 8px 14px; border-radius: 2px; position: relative;
  transition: color .3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav.on-dark .nav-link { color: color-mix(in oklch, var(--paper) 88%, transparent); }
.nav.on-dark .nav-link:hover, .nav.on-dark .nav-link.active { color: var(--paper); }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1px; background: var(--redline);
}
.nav-stamp { font-size: 0.78rem; color: var(--ink-faint); font-style: italic; white-space: nowrap; }
.nav.on-dark .nav-stamp { color: color-mix(in oklch, var(--paper) 82%, transparent); }
@media (max-width: 680px) { .nav-stamp { display: none; } }

/* ---- Hamburger (shown < 420px) ---- */
.nav-burger {
  display: none; flex: none; width: 40px; height: 40px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav.on-dark .nav-burger span { background: var(--paper); }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-menu {
  display: none; flex-direction: column; align-items: flex-end;
  position: absolute; top: 100%; left: 0; right: 0; z-index: 59;
  padding: 6px var(--gutter) 16px;
  background: inherit; backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.nav.on-dark .nav-menu { border-bottom-color: color-mix(in oklch, var(--paper) 14%, transparent); }
.nav-menu-link {
  font-size: 1rem; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
  padding: 11px 2px; transition: color .3s var(--ease);
}
.nav-menu-link:hover, .nav-menu-link.active { color: var(--ink); }
.nav.on-dark .nav-menu-link { color: color-mix(in oklch, var(--paper) 88%, transparent); }
.nav.on-dark .nav-menu-link:hover, .nav.on-dark .nav-menu-link.active { color: var(--paper); }

@media (max-width: 419.98px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav.menu-open .nav-menu { display: flex; }
}

/* =========================================================
   Placeholders (drop-in image / video)
   ========================================================= */
.ph {
  position: relative; overflow: hidden; background: var(--bone);
  display: flex; align-items: center; justify-content: center;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0, transparent 10px,
    color-mix(in oklch, var(--ink) 9%, transparent) 10px,
    color-mix(in oklch, var(--ink) 9%, transparent) 11px);
}
.ph-label {
  position: relative; z-index: 1;
  font-family: var(--serif); font-size: 0.8rem; font-style: italic;
  color: var(--ink-soft);
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  padding: 8px 15px; border-radius: 2px; text-align: center; line-height: 1.45;
  backdrop-filter: blur(2px); max-width: 84%;
}
.ph-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ph-video .play {
  position: relative; z-index: 1; width: 60px; height: 60px; border-radius: 50%;
  background: color-mix(in oklch, var(--paper) 86%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.ph-video .play::after {
  content: ""; border-left: 14px solid var(--ink); border-top: 9px solid transparent;
  border-bottom: 9px solid transparent; margin-left: 4px;
}
/* dark variant for hero */
.ph.dark { background: var(--ink-rich); }
.ph.dark::before {
  background-image: repeating-linear-gradient(
    -45deg, transparent 0, transparent 11px,
    color-mix(in oklch, var(--paper) 7%, transparent) 11px,
    color-mix(in oklch, var(--paper) 7%, transparent) 12px);
}
.ph.dark .ph-label {
  color: color-mix(in oklch, var(--paper) 80%, transparent);
  background: color-mix(in oklch, var(--ink-rich) 55%, transparent);
}

.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-1-1  { aspect-ratio: 1 / 1; }
.aspect-3-4  { aspect-ratio: 3 / 4; }

/* =========================================================
   HOME — image-forward hero
   ========================================================= */
.hero {
  position: relative; min-height: 520px;
  height: 100vh; height: 100dvh; /* dvh tracks the mobile address bar — no jump/gap */
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }

/* crossfade + blur slideshow layers */
.hero-slide {
  position: absolute; inset: 0; opacity: 0; filter: blur(16px); transform: scale(1.03);
  transition: opacity .5s var(--ease), filter .5s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; filter: blur(0); transform: scale(1); }
.hero-ph { position: relative; width: 100%; height: 100%; }
.hero-ph-name {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  font-weight: 300; font-size: clamp(2.5rem, 10vw, 9rem); letter-spacing: -0.03em;
  color: color-mix(in oklch, var(--paper) 10%, transparent); text-transform: uppercase; user-select: none;
}
.hero-ph-hint {
  position: absolute !important; top: 88px; right: 28px; bottom: auto; left: auto; max-width: 22ch; text-align: right;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity .2s linear; filter: none; transform: none; }
  .hero-slide.active { filter: none; transform: none; }
}

/* hover arrows */
.hero-nav-zone {
  position: absolute; top: 0; bottom: 0; width: 16%; min-width: 90px; z-index: 4;
  display: flex; align-items: center; cursor: pointer;
}
.hero-nav-zone.left { left: 0; justify-content: flex-start; padding-left: clamp(16px, 2.5vw, 34px); }
.hero-nav-zone.right { right: 0; justify-content: flex-end; padding-right: clamp(16px, 2.5vw, 34px); }
.hero-arrow {
  width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in oklch, var(--paper) 12%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid color-mix(in oklch, var(--paper) 26%, transparent);
  color: var(--paper); font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.86);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.hero-nav-zone:hover .hero-arrow { opacity: 1; transform: scale(1); }
.hero-arrow:hover { background: color-mix(in oklch, var(--paper) 24%, transparent); }
@media (hover: none) { .hero-nav-zone { display: none; pointer-events: none; } }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, color-mix(in oklch, var(--ink-rich) 64%, transparent) 0%,
      color-mix(in oklch, var(--ink-rich) 14%, transparent) 12%, transparent 22%),
    linear-gradient(to top, color-mix(in oklch, var(--ink-rich) 82%, transparent) 0%,
      color-mix(in oklch, var(--ink-rich) 30%, transparent) 42%, transparent 72%),
    linear-gradient(to right, color-mix(in oklch, var(--ink-rich) 40%, transparent) 0%, transparent 55%);
}
.hero-inner { position: relative; z-index: 6; width: 100%; padding-bottom: clamp(48px, 7vw, 96px); padding-top: 120px; pointer-events: none; }
.hero-kicker { color: color-mix(in oklch, var(--paper) 82%, transparent); margin: 0 0 26px; }
.hero-statement {
  font-weight: 300; font-size: clamp(2.5rem, 6.6vw, 6rem); line-height: 1.02;
  letter-spacing: -0.022em; margin: 0; max-width: 17ch; color: var(--paper); text-wrap: balance;
}
.hero-statement em { font-style: italic; color: var(--paper); font-weight: 350; background-color: var(--ink-rich) }

.hero-bottom {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-top: clamp(34px, 5vw, 56px);
}
.hero-cue {
  display: inline-flex; align-items: center; gap: 12px;
  color: color-mix(in oklch, var(--ink-faint) 78%, transparent); font-style: italic; font-size: 1rem;
}
.hero-project-link {
  pointer-events: auto; cursor: pointer; color: var(--ink-faint); font-style: italic;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem); display: inline-flex; align-items: baseline; gap: 10px;
  text-shadow: 0 1px 18px color-mix(in oklch, var(--ink-rich) 70%, transparent);
  transition: gap .3s var(--ease), color .3s var(--ease);
  animation: hplIn .5s var(--ease) both;
  border-bottom: 1px solid color-mix(in oklch, var(--paper) 36%, transparent); padding-bottom: 3px;
}
.hero-project-link:hover { gap: 17px; color: oklch(0.82 0.11 40); }
.hero-project-link .hpl-arrow { font-style: normal; }
@keyframes hplIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-project-link { animation: none; } }
.hero-cue .arrow { display: inline-block; animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .hero-cue .arrow { animation: none; } }

/* =========================================================
   HOME — work section
   ========================================================= */
.work { padding: clamp(52px, 7vw, 104px) 0 clamp(40px, 5vw, 72px); }
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px 24px; flex-wrap: wrap;
  margin-bottom: clamp(30px, 4vw, 52px);
}
.work-head > div:first-child { min-width: 0; }
.work-head h2 { margin: 8px 0 0; font-weight: 300; font-size: clamp(1.8rem, 3.4vw, 2.8rem); letter-spacing: -0.018em; }

.filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter .filter-lead { margin-right: 4px; }
.tag {
  font-family: var(--serif); font-size: 0.9rem; color: var(--ink-soft);
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 100px;
  cursor: pointer; background: transparent; transition: all .25s var(--ease); white-space: nowrap;
}
.tag:hover { border-color: var(--ink-faint); color: var(--ink); }
.tag.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag.clear { border-style: dashed; }

.filter-count { font-style: italic; color: var(--ink-faint); font-size: 0.9rem; }

/* project grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3.4vw, 56px) clamp(24px, 3vw, 48px); }
.card { cursor: pointer; display: flex; flex-direction: column; }
.card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.32fr 1fr; gap: clamp(24px, 3vw, 52px); align-items: center; }

.card-media { position: relative; overflow: hidden; background: var(--bone); }
.card-media .ph { width: 100%; height: 100%; transition: transform 1.1s var(--ease); }
.card:hover .card-media .ph { transform: scale(1.035); }
.card-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink) 9%, transparent);
  pointer-events: none;
}
.card-index {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  font-style: italic; font-size: 0.84rem; color: var(--paper);
  background: color-mix(in oklch, var(--ink-rich) 52%, transparent);
  padding: 3px 11px; border-radius: 100px; backdrop-filter: blur(3px);
}

.card-meta { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.card.feature .card-meta { padding-top: 0; gap: 16px; }
.card-disc { color: var(--ink-faint); }
.card-title {
  margin: 0; font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.05; letter-spacing: -0.015em; transition: color .3s var(--ease);
  display: flex; align-items: baseline; gap: 14px;
}
.card.feature .card-title { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.card:hover .card-title { color: var(--redline); }
.card-title .yr { font-size: 0.8rem; font-style: italic; color: var(--ink-faint); font-weight: 400; letter-spacing: 0; }
.card-summary { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; max-width: 46ch; }
.card.feature .card-summary { font-size: 1.18rem; line-height: 1.55; }
.card-open {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 9px;
  font-style: italic; color: var(--ink-soft); font-size: 0.96rem; transition: gap .3s var(--ease), color .3s var(--ease);
}
.card:hover .card-open { gap: 15px; color: var(--redline); }

.empty { padding: 90px 0; text-align: center; color: var(--ink-faint); font-style: italic; font-size: 1.1rem; }

/* HOME — dark statement band (breaks the beige) */
.band {
  background: var(--ink-rich); color: var(--paper);
  margin: 0;
}
.band-inner { padding: clamp(0px, 10vw, 70px) 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 48px; align-items: end; }
.band .label { color: color-mix(in oklch, var(--paper) 64%, transparent); }
.band-quote {
  font-weight: 300; font-size: clamp(1.7rem, 3.6vw, 3.1rem); line-height: 1.22; letter-spacing: -0.018em;
  margin: 22px 0 0; max-width: 22ch; text-wrap: balance;
}
.band-quote em { font-style: italic; color: var(--emphasis); }
.band-link {
  white-space: nowrap; color: var(--paper); font-style: italic; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; transition: gap .3s var(--ease);
  border-bottom: 1px solid color-mix(in oklch, var(--paper) 40%, transparent); padding-bottom: 3px;
}
.band-link:hover { gap: 16px; }
@media (max-width: 720px) { .band-inner { grid-template-columns: 1fr; gap: 28px; } }

/* =========================================================
   CASE STUDY
   ========================================================= */
.cs { padding-bottom: 110px; }
.cs-back {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-style: italic; color: var(--ink-soft); font-size: 0.98rem;
  padding: 26px 0; transition: color .3s var(--ease), gap .3s var(--ease);
}
.cs-back:hover { color: var(--ink); gap: 14px; }

.cs-hero { padding: clamp(20px, 3vw, 40px) 0 clamp(34px, 4vw, 56px); }
.cs-eyebrow { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.cs-eyebrow .sep { color: var(--line); }
.cs-eyebrow .proj { color: var(--redline); }
.cs-title {
  font-weight: 300; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 0.98;
  letter-spacing: -0.025em; margin: 0 0 22px; max-width: 16ch; text-wrap: balance;
}
.cs-standfirst {
  font-size: clamp(1.2rem, 2.1vw, 1.6rem); line-height: 1.5; max-width: 42ch;
  color: var(--ink-soft); font-weight: 300; margin: 0;
}
.cs-standfirst em { font-style: italic; color: var(--ink); }

.factstrip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  margin: clamp(34px, 5vw, 54px) 0;
}
.fact { background: var(--paper); padding: 22px 24px; display: flex; flex-direction: column; gap: 9px; }
.fact .k { color: var(--ink-faint); }
.fact .v { font-size: 1.05rem; line-height: 1.4; }

.prose { max-width: 68ch; }
.section-num { display: flex; align-items: baseline; gap: 16px; margin: clamp(54px,7vw,92px) 0 24px; }
.section-num .n { color: var(--redline); font-style: italic; font-size: 1.05rem; padding-top: 2px; }
.section-num h2 { margin: 0; font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.015em; line-height: 1.1; }
.prose p { margin: 0 0 1.15em; }
.prose p.lead { font-size: 1.2rem; line-height: 1.55; }

.pull {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem); line-height: 1.32; font-weight: 300;
  letter-spacing: -0.012em; margin: clamp(30px,4vw,50px) 0; max-width: 30ch; color: var(--ink-rich);
}
.pull em { font-style: italic; color: var(--redline); }

.decisions { margin: 18px 0; border-top: 1px solid var(--line); }
.decision { display: grid; grid-template-columns: 38px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.decision .dn { color: var(--redline); font-style: italic; padding-top: 4px; }
.decision h4 { margin: 0 0 8px; font-weight: 500; font-size: 1.14rem; letter-spacing: -0.01em; }
.decision p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }

/* figures */
.figure { margin: clamp(38px, 5vw, 68px) 0; }
.figure.bleed { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.figure figcaption { display: flex; gap: 14px; align-items: baseline; margin-top: 13px; }
.figure figcaption .fc-num { color: var(--redline); font-style: italic; flex: none; }
.figure figcaption .fc-text { color: var(--ink-faint); font-style: italic; font-size: 0.92rem; }

/* figure row — 2 or 3 images side-by-side */
.figure-row { margin: clamp(38px, 5vw, 68px) 0; }
.figure-row.bleed { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.figure-row-images {
  display: grid;
  gap: clamp(10px, 1.4vw, 20px);
}
.figure-row-images.cols-2 { grid-template-columns: 1fr 1fr; }
.figure-row-images.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.figure-row-item { margin: 0; }
.figure-row-item figcaption { display: flex; gap: 10px; align-items: baseline; margin-top: 10px; flex-wrap: wrap; }
.figure-row-item .fc-num { color: var(--redline); font-style: italic; flex: none; }
.figure-row-item .fc-text { color: var(--ink-faint); font-style: italic; font-size: 0.92rem; }
@media (max-width: 600px) {
  .figure-row-images.cols-2,
  .figure-row-images.cols-3 { grid-template-columns: 1fr; }
}

/* next project */
.cs-next {
  border-top: 1px solid var(--ink); margin-top: 80px; padding-top: 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  cursor: pointer; transition: padding-left .35s var(--ease);
}
.cs-next:hover { padding-left: 12px; }
.cs-next .nx-label { color: var(--ink-faint); font-style: italic; }
.cs-next h3 { margin: 6px 0 0; font-weight: 400; font-size: clamp(1.8rem,3.5vw,3rem); letter-spacing: -0.02em; transition: color .3s var(--ease); }
.cs-next:hover h3 { color: var(--redline); }
.cs-next .nx-arrow { font-size: 1.6rem; color: var(--ink-faint); transition: transform .35s var(--ease); }
.cs-next:hover .nx-arrow { transform: translateX(7px); }

/* =========================================================
   MANIFESTO
   ========================================================= */
.man { padding: clamp(40px, 7vw, 88px) 0 110px; }
.man-eyebrow { margin-bottom: clamp(36px,5vw,64px); }
.man-lead {
  font-weight: 300; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.12;
  letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 clamp(46px,7vw,88px); text-wrap: balance;
}
.man-lead em { font-style: italic; color: var(--redline); }
.man-grid { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.man-grid + .man-grid { margin-top: clamp(46px, 6vw, 76px); padding-top: clamp(38px,5vw,60px); border-top: 1px solid var(--line); }
.man-aside { position: sticky; top: 100px; }
.man-aside .num { color: var(--redline); font-style: italic; font-size: 1.05rem; }
.man-aside h3 { margin: 10px 0 0; font-weight: 400; font-size: 1.34rem; letter-spacing: -0.01em; line-height: 1.15; }
.man-body { max-width: 60ch; }
.man-body p { margin: 0 0 1.2em; font-size: 1.1rem; line-height: 1.66; }
.man-body p:first-child { font-size: 1.24rem; line-height: 1.55; }
.man-body em { font-style: italic; }
.man-body .marginal { font-style: italic; color: var(--ink-faint); font-size: 0.94rem; margin: 26px 0 0; }

.man-signoff { margin-top: clamp(56px,8vw,104px); padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.man-sig { font-size: clamp(2rem,4vw,3.2rem); font-style: italic; font-weight: 300; letter-spacing: -0.01em; }

/* =========================================================
   FOOTER
   ========================================================= */
.foot { border-top: 1px solid var(--ink); margin-top: 0px; }
.foot-inner { max-width: var(--wide); margin: 0 auto; padding: 52px var(--gutter) 60px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot h4 { margin: 0 0 18px; color: var(--ink-faint); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.17em; text-transform: uppercase; }
.foot .big { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 300; line-height: 1.2; letter-spacing: -0.015em; max-width: 20ch; }
.foot .big em { font-style: italic; color: var(--redline); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot li { color: var(--ink-soft); font-size: 1rem; cursor: pointer; transition: color .2s var(--ease); width: fit-content; }
.foot li:hover { color: var(--ink); }
.foot-stamp { color: var(--ink-faint); font-style: italic; line-height: 1.8; font-size: 0.94rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .factstrip { grid-template-columns: 1fr 1fr; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .grid { grid-template-columns: 1fr; }
  .card.feature { grid-template-columns: 1fr; gap: 20px; }
  .man-grid { grid-template-columns: 1fr; gap: 16px; }
  .man-aside { position: static; }
  .factstrip { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
  .hero { min-height: 82svh; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-page {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  height: 100vh; height: 100dvh; /* dvh survives mobile address-bar resize */
}
.contact-image {
  position: relative; overflow: hidden; object-fit: cover;
}
.contact-img {
  max-width: 100%; object-fit: cover; display: block; height: 100%;
}
.contact-info {
  display: flex; align-items: center;
  padding: clamp(60px, 10vw, 130px) clamp(40px, 7vw, 100px);
}
.contact-name {
  font-weight: 300; font-size: clamp(2.6rem, 4.5vw, 4rem);
  line-height: 1; letter-spacing: -0.025em;
  margin: 20px 0 clamp(40px, 5vw, 64px);
}
.contact-links { display: flex; flex-direction: column; gap: 36px; }
.contact-row {
  display: flex; flex-direction: column; gap: 7px;
  color: inherit; text-decoration: none;
}
.contact-val {
  font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--ink);
  transition: color .25s var(--ease);
}
.contact-row:hover .contact-val { color: var(--redline); }
@media (max-width: 720px) {
  .contact-page {
    grid-template-columns: 1fr;
    display: flex; flex-direction: column;
    height: auto !important; margin-top: 0 !important;
    min-height: calc(100svh - 68px);
  }
  .contact-image { flex: 1 1 auto; min-height: 200px; width: 150%; }
  .contact-image::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
    background: linear-gradient(to bottom, transparent, var(--paper) 92%);
    pointer-events: none; z-index: 2;
  }
  .contact-info {
    flex: none; align-items: flex-start;
    position: relative; z-index: 3; margin-top: -80px;
    padding: 0 26px 32px;
  }
  .contact-name { margin: 14px 0 26px; }
  .contact-links { gap: 22px; }
}

/* =========================================================
   404 — Not Found
   ========================================================= */
.nf {
  display: flex; align-items: center;
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  padding: clamp(56px, 9vw, 120px) 0;
}
.nf-grid {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px); align-items: center;
}
.nf-numwrap {
  display: flex; flex-direction: column; gap: 18px;
  border-right: 1px solid var(--line); padding-right: clamp(20px, 4vw, 70px);
}
.nf-num {
  font-weight: 200; font-size: clamp(7rem, 20vw, 18rem);
  line-height: 0.8; letter-spacing: -0.045em; color: var(--ink-rich);
}
.nf-num em { font-style: italic; font-weight: 300; color: var(--redline); }
.nf-stamp {
  font-style: italic; color: var(--ink-faint); font-size: 0.92rem;
  letter-spacing: 0.01em; word-break: break-all;
}
.nf-stamp .nf-path { color: var(--ink-soft); }

.nf-eyebrow { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.nf-eyebrow .proj { color: var(--redline); }
.nf-eyebrow .sep { color: var(--line); }
.nf-head {
  font-weight: 300; font-size: clamp(1.75rem, 3.3vw, 2.7rem);
  line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 22px; max-width: 18ch; text-wrap: balance;
}
.nf-head em { font-style: italic; color: var(--redline); }
.nf-text {
  color: var(--ink-soft); font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.6; max-width: 44ch; margin: 0 0 36px;
}
.nf-link {
  display: inline-flex; align-items: center; gap: 11px; cursor: pointer;
  font-style: italic; color: var(--ink); font-size: 1.08rem;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
  transition: gap .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.nf-link:hover { gap: 17px; color: var(--redline); border-color: var(--redline); }
.nf-link .nf-arrow { font-style: normal; }

@media (max-width: 820px) {
  .nf { min-height: 0; }
  .nf-grid { grid-template-columns: 1fr; gap: clamp(22px, 7vw, 40px); }
  .nf-numwrap {
    border-right: 0; padding-right: 0;
    border-bottom: 1px solid var(--line); padding-bottom: clamp(18px, 5vw, 28px);
  }
}

/* =========================================================
   Loading screen
   ========================================================= */
.loader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  transition: opacity .5s var(--ease);
}
.loader.is-hidden { opacity: 0; pointer-events: none; }

/* Dual ring — recolored to ink + redline accent */
.l-dual {
  --size: 46px;
  width: var(--size); height: var(--size); border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--ink);
  border-bottom-color: var(--redline);
  animation: spin 1.1s cubic-bezier(.6, .2, .4, .8) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .l-dual { animation-duration: 2.4s; animation-timing-function: linear; }
}

/* =========================================================
   Navigation veil
   ========================================================= */
#veil {
  position: fixed; inset: 0; z-index: 9999;
  backdrop-filter: blur(500px) saturate(0);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
#veil.veil-in { opacity: 1; pointer-events: auto; }
