/* ─────────────────── tokens ─────────────────── */
:root[data-theme="dark"] {
  --bg:       #0b0b0a;
  --bg-1:     #15140f;
  --bg-2:     #1d1c16;
  --ink:      #f1ede1;
  --ink-2:    #b1ac9e;
  --ink-3:    #817b6f;  /* raised from #6f6a5d — 4.7:1 on dark bg, passes AA */
  --rule:     rgba(241,237,225,.13);
  --rule-2:   rgba(241,237,225,.06);
  --accent:   #e8412a;
  --accent-2: #ff5a3f;
  --accent-ink:#0b0b0a;
}
:root[data-theme="light"] {
  --bg:       #faf9f6;
  --bg-1:     #f3f2ed;
  --bg-2:     #ebe9e2;
  --ink:      #171512;
  --ink-2:    #454239;
  --ink-3:    #6e695d;
  --rule:     rgba(23,21,18,.12);
  --rule-2:   rgba(23,21,18,.06);
  --accent:   #c42d12;
  --accent-2: #e8412a;
  --accent-ink:#faf9f6;
}
:root {
  --display:  "Space Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --sans:     "Inter Tight", -apple-system, "Helvetica Neue", sans-serif;
  --mono:     "Geist Mono", ui-monospace, monospace;
  --display-tt: uppercase;
  --display-ls: -0.045em;
  --gutter:   clamp(24px, 5vw, 72px);
  --pad:      max(96px, 10vh);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 9999;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0; }

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

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); transition: background .35s ease, color .35s ease; }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(196, 45, 18, 0.20); color: inherit; }

/* ─────────────────── nav ─────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gutter);
  padding: 18px var(--gutter);
  z-index: 50;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
}
.nav .brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.nav .brand .sig {
  height: 36px;
  width: auto;
}
.nav .brand .sig path { fill: var(--ink); transition: fill .35s ease; }
.nav .brand:hover .sig path { fill: var(--accent); }
.nav .brand .id {
  display: flex; flex-direction: column; gap: 2px;
  line-height: 1;
}
.nav .brand .id .name { color: var(--ink); font-size: 11px; line-height: 1; }
.nav .brand .id .role { color: var(--ink-3); font-size: var(--text-nano); letter-spacing: 0.12em; line-height: 1; }
.nav .right { display: flex; align-items: center; gap: 28px; }
.nav .right a { color: var(--ink-2); }
.nav .right a:hover { color: var(--ink); }
.nav .theme {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color .25s;
}
.nav .theme:hover { border-color: var(--ink); }
.nav .theme .icon { width: 13px; height: 13px; display: block; color: var(--ink); transition: transform var(--transition-fast); }
:root[data-theme="dark"] .nav .theme .icon { transform: scaleX(-1); }

/* ─────────────────── hero ─────────────────── */
.hero {
  padding: max(160px, var(--pad)) var(--gutter) 64px; /* min 160px clears the 2-row homepage nav + breathing room */
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: none;
  margin: 0;
}
.site-nav--home .meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px var(--gutter) 32px;
  border-bottom: 1px solid var(--rule);
  max-height: 80px;
  overflow: hidden;
  /* smooth collapse for scroll-driven state */
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease, border-color 0.3s ease;
}
/* Scroll-driven: smooth height collapse */
.site-nav--home.scrolled .meta {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  border-bottom-color: transparent;
}
/* Hamburger open: fade out + collapse height instantly (no height transition = no slide jank) */
.site-nav.site-nav--home:has(.nav-hamburger.open) .meta {
  transition: opacity 0.15s ease;
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}
.site-nav.site-nav--home:has(.nav-hamburger.open) {
  border-bottom-color: var(--rule);
}
.meta-id {
  display: flex; align-items: center; gap: 10px;
}
.meta-name {
  font-weight: 500;
  color: var(--ink);
}
.meta-sep {
  color: var(--ink-3);
}
.meta-role {
  color: var(--ink-3);
}
.hero .body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  padding-top: clamp(40px, 6vh, 64px);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}
.hero .left {
  max-width: 92%;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4.2vw, 68px);
  line-height: 0.92;
  letter-spacing: var(--display-ls);
  text-transform: var(--display-tt);
  margin-bottom: clamp(32px, 5vh, 56px);
  max-width: min(16ch, 56vw);
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .cursor {
  display: inline-block;
  width: 0.32em; height: 0.78em;
  background: var(--accent);
  vertical-align: -7%;
  margin-left: 0.04em;
  animation: blink 1.05s steps(2,end) infinite;
  box-shadow: 0 0 24px color-mix(in oklab, var(--accent) 50%, transparent);
}
@keyframes blink { 50% { opacity: 0; } }

.hero .deck p {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero .deck p strong { color: var(--ink); font-weight: 500; }
.hero .deck p a.inline {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  transition: border-color .25s;
}
.hero .deck p a.inline:hover { border-bottom-color: var(--accent); }
.hero .cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: max(13px, 0.68rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
  white-space: nowrap;
}
.hero .cta:hover {
  background: var(--ink-2);
  color: var(--bg);
  border-color: var(--ink-2);
  transform: translateY(-2px);
}
.hero .cta::after { content: "→"; font-family: var(--sans); }

/* ── rotating project showcase ── */
.showcase {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.showcase .stack {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
}
.showcase .card {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 20px;
  background: var(--bg-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 1.2s cubic-bezier(.2,.7,.2,1),
              transform 1.2s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.showcase .card.in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}
.showcase .card.out {
  opacity: 0;
  transform: translateY(-24px) scale(1.015);
  z-index: 1;
}
.showcase .card .img {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #000;
}
.showcase .card .img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) brightness(.95);
  transform: scale(1.02);
  transition: transform 9s ease-out;
}
.showcase .card.in .img img { transform: scale(1.08); }
.showcase .card .img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.78));
}
:root[data-theme="light"] .showcase .card .img::after {
  background: linear-gradient(180deg, transparent 35%, rgba(26,22,18,.55));
}
.showcase .card .label {
  position: absolute;
  top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: max(12px, 0.68rem);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,.45);
  border: none;
  padding: 7px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.showcase .card .label .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px color-mix(in oklab, var(--accent) 60%, transparent);
}
.showcase .card .cap {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  text-align: left;
  color: #fff;
}
:root[data-theme="light"] .showcase .card .cap { color: #fff; }
.showcase .card .cap .num {
  display: none;
}
.showcase .card .cap .ttl {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  text-transform: none;
}
.showcase .card .cap .ttl .acc { color: #fff; }
.showcase .card .cap .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(255,255,255,.72);
  line-height: 1.4;
}

.showcase-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-top: 4px;
}
.showcase-count {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink-3);
  font-feature-settings: "tnum";
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}
.showcase-count .sc-cur {
  color: var(--accent);
  font-weight: 500;
}
.showcase-count .sc-sep {
  color: var(--ink-3);
  margin: 0 1px;
}
.showcase-progress-wrap {
  flex: 1;
  height: 1px;
  align-self: center;
  background: var(--rule);
  position: relative;
  min-width: 0;
}
#sc-prog.progress {
  position: absolute;
  inset: 0;
  display: block;
}
#sc-prog.progress::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--progress, 0%);
  background: var(--accent);
  transition: width 0.1s linear;
}
.showcase-arrows {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.showcase-arrows button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  min-height: 44px;               /* WCAG 2.5.5 touch target */
  min-width: 44px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s;
}
.showcase-arrows button:hover {
  color: var(--accent);
}

/* legacy nav-row (unused) */
.showcase .nav-row {
  display: none;
}

/* ─────────────────── stats strip ─────────────────── */
.strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-family: var(--mono);
}
.strip .cell {
  padding: 32px var(--gutter);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  transition: background .25s;
}
.strip .cell:last-child { border-right: none; }
.strip a.cell:hover { background: var(--bg-1); }
.strip .num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.strip .num .acc { color: inherit; }
.strip .lbl {
  font-size: max(13px, 0.68rem);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.strip .link {
  margin-top: auto;
  font-size: max(13px, 0.72rem);
  line-height: 1.45;
  color: var(--ink-2);
  display: flex; gap: 10px; align-items: baseline;
}
.strip .link .arrow {
  color: var(--accent);
  font-family: var(--sans);
  transition: transform .25s;
}
.strip a.cell:hover .link .arrow { transform: translateX(4px); }

/* ─────────────────── work — section header ─────────────────── */
.work-hdr {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: end;
  padding: var(--pad) var(--gutter) 28px;
  gap: 48px;
}
.work-hdr .left .eyebrow {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.work-hdr .left .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.work-hdr h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-transform: none;
  max-width: 100%;
}
.work-hdr h2 .acc { color: var(--accent); }

/* ─────────────────── company divider ─────────────────── */
.cohdr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: clamp(24px, 3vw, 40px) var(--gutter) 24px;
  gap: 20px;
}
.cohdr .lbl {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.cohdr .lbl .swatch {
  width: 12px; height: 12px;
  border: 1.5px solid var(--ink);
  display: inline-block;
}
.cohdr .lbl.google .swatch { background: var(--accent); border-color: var(--accent); }
.cohdr .lbl.indie .swatch { background: transparent; border-color: var(--ink); border-radius: 50%; }
.cohdr .lbl.cnn .swatch { background: var(--ink); border-color: var(--ink); }
.cohdr .meta {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cohdr .meta .acc {
  color: var(--accent);
}

.cohdr-lbl {
  gap: 12px !important;
}
.cohdr-logo {
  display: block;
  width: auto;
  height: 28px;
  flex-shrink: 0;
}
.cohdr-logo--cnn { height: 26px; }
.cohdr-name {
  display: none;
}
:root[data-theme="light"] .cohdr-logo {
  filter: brightness(0) saturate(100%);
  opacity: 0.88;
}
:root[data-theme="dark"] .cohdr-logo {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* ─────────────────── work tiles ─────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px 24px;
  padding: 8px var(--gutter) clamp(32px, 4vw, 56px);
}
.tile {
  position: relative;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  padding-bottom: 20px;
  cursor: pointer;
  transition: opacity .35s;
  display: flex; flex-direction: column;
}
.grid:hover .tile:not(:hover) .img { opacity: 0.5; }
.tile .img {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  margin-bottom: 16px;
  border: 1px solid var(--rule-2);
  border-radius: 12px;
}
.tile .img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s;
  filter: saturate(0.78) brightness(0.94);
}
.tile:hover .img img { transform: scale(1.04); filter: saturate(1) brightness(1); }
.tile .img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45));
  opacity: 0; transition: opacity .4s;
}
:root[data-theme="light"] .tile .img::after { background: linear-gradient(180deg, transparent 55%, rgba(26,22,18,.18)); }
.tile:hover .img::after { opacity: 1; }
.tile .img.placeholder {
  background:
    repeating-linear-gradient(45deg, var(--rule-2) 0 2px, transparent 2px 14px),
    var(--bg-1);
  display: flex; align-items: center; justify-content: center;
}
.tile .img.placeholder span {
  font-family: var(--mono);
  font-size: max(12px, 0.65rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg);
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

/* full-width tile header (wide tiles only) */
.tile-header {
  width: 100%;
  margin-bottom: 14px;
}
.t-feature .tile-header { margin-top: 28px; }
.tile-num {
  display: block;
  font-family: var(--mono);
  font-size: max(13px, 0.7rem);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
/* tile-num always floats above the image */
.tile > .tile-num {
  margin-bottom: 10px;
  padding-bottom: 8px;
  order: -1;
}

.tile-below {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(112px, 1fr);
  gap: 0 24px;
  align-items: start;
  width: 100%;
}
.tile-main {
  min-width: 0;
  padding-right: 24px;
  border-right: 1px solid var(--rule);
}
.tile-aside {
  align-self: start;
  padding-top: 2px;
}

/* aside status line with dot (wide tiles) */
.aside-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.aside-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px color-mix(in oklab, var(--accent-2) 60%, transparent);
  flex-shrink: 0;
}

/* narrow tiles: bullets stacked inline (no aside) */
.tile > .bullets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-family: var(--mono);
  font-size: max(13px, 0.7rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-bottom: 12px;
}
.tile > .bullets .year { color: var(--ink); font-weight: 500; }

/* c-third tiles: bullets run horizontal with · separator */
.c-third-1 > .bullets,
.c-third-2 > .bullets,
.c-third-3 > .bullets {
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.c-third-1 > .bullets .role-line + .role-line::before,
.c-third-2 > .bullets .role-line + .role-line::before,
.c-third-3 > .bullets .role-line + .role-line::before {
  content: ' · ';
  color: var(--ink-2);
}

.tile h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin-bottom: 12px;
  text-transform: none;
}
.tile.t-feature h3 { font-size: clamp(22px, 2.2vw, 32px); }
.tile h3 .acc { color: var(--accent); }
.tile p {
  font-size: max(15px, 0.88rem);
  line-height: 1.55; color: var(--ink-2);
  max-width: none;
  margin-bottom: 16px;
}
.tile-aside .bullets {
  margin-top: 0;
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.tile-aside .bullets .year { color: var(--ink); font-weight: 500; }
.tile-aside .role-line { display: block; }

.tile .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 4px;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.tile .read.btn-read {
  margin-top: 12px;
  padding: 7px 14px;
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  font-size: max(12px, 0.66rem);
  gap: 6px;
  color: var(--ink-2);
  align-self: flex-start;
  width: auto;
}
.tile.case-link .read.btn-read::after { content: "→"; font-family: var(--sans); font-size: 1.05em; }
.tile:hover .read.btn-read {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
  gap: 10px;
}

/* Google row: 1 feature + 2 small */
.g-feature  { grid-column: 1 / -1; padding-top: var(--sp-6); }
.g-feature .img { aspect-ratio: 16 / 9; }
.g-small-a  { grid-column: 1 / -1; }
.g-small-b  { grid-column: 1 / -1; }
.g-small-a .img, .g-small-b .img { aspect-ratio: 16 / 9; }

/* Independent: single large */
.i-full { grid-column: 1 / 13; }
.i-full .img { aspect-ratio: 16 / 9; }

/* CNN row */
.c-full    { grid-column: 1 / 13; }
.c-full .img { aspect-ratio: 16 / 9; }
.c-half-a  { grid-column: 1 / 7; }
.c-half-b  { grid-column: 7 / 13; }
.c-half-a .img, .c-half-b .img { aspect-ratio: 16 / 10; }
.c-third-1 { grid-column: 1 / 5; }
.c-third-2 { grid-column: 5 / 9; }
.c-third-3 { grid-column: 9 / 13; }
.c-third-1 .img, .c-third-2 .img, .c-third-3 .img { aspect-ratio: 4 / 3; }

/* ─────────────────── philosophy (now after work) ─────────────────── */
.philosophy {
  padding: var(--pad) var(--gutter);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.philosophy .eyebrow {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 14px;
}
.philosophy .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.philosophy .body {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.28;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: none;
}
.philosophy .body .lead {
  display: block;
  font-weight: 600;
  margin-bottom: 28px;
}
.philosophy .body .lead .acc { color: var(--accent); }

.philosophy .points {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.philosophy .points .p {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink-2);
  align-items: baseline;
}
.philosophy .points .p .n {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.philosophy .points .p .t strong { color: var(--ink); font-weight: 700; }

.philosophy .ai {
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.philosophy .ai .ai-lead {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.28;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-bottom: 16px;
}
.philosophy .ai .ai-lead em { font-style: normal; color: var(--ink); }
.philosophy .ai p {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.05vw, 16px);
  max-width: 75ch;
  line-height: 1.65;
  color: var(--ink-2);
  letter-spacing: 0;
  margin: 0;
}
.philosophy .ai strong { color: var(--ink); font-weight: 500; }
.philosophy .ai em { font-style: normal; color: var(--ink); }
.philosophy .ai p + p { margin-top: 14px; }

/* §02 Open To — constrained width + main/sidebar 3-col feel */
#open-to .body {
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 220px;
  grid-template-areas:
    "lead sidebar"
    "points sidebar";
  column-gap: 56px;
  align-items: start;
}
#open-to .body .lead { grid-area: lead; padding-right: 24px; }
#open-to .body .points { grid-area: points; padding-right: 24px; }
#open-to .body .ai {
  grid-area: sidebar;
  border-top: none;
  padding-top: 0;
  border-left: 1px solid var(--rule);
  padding-left: 40px;
  position: sticky;
  top: 80px;
}
#open-to .ai .ai-lead {
  font-family: var(--mono);
  font-size: max(11px, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
  margin-bottom: 20px;
}
#open-to .ai p {
  font-size: clamp(13px, 0.9vw, 14px);
  max-width: none;
  line-height: 1.6;
  color: var(--ink-3);
}
#open-to .ai strong { color: var(--ink); }
#open-to .ai p + p { margin-top: 12px; }

/* ─────────────────── contact / marquee ─────────────────── */
.contact-hdr {
  padding: var(--pad) var(--gutter) 24px;
}
.contact-hdr .eyebrow {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 14px;
}
.contact-hdr .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.marquee {
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  padding: 14px 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: max(13px, 0.75rem);
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.marquee .track {
  display: inline-flex; gap: 28px;
  animation: scroll 48s linear infinite;
  flex-shrink: 0;
  padding-right: 28px;
  align-items: center;
}
.marquee .track .star { color: var(--accent); font-size: 0.6em; line-height: 1; transform: translateY(-0.05em); }
.marquee .track .open { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-100%); } }

/* ─────────────────── footer ─────────────────── */
.footer {
  padding: var(--pad) var(--gutter) 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
  border-top: none;
}
.footer .big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: var(--display-tt);
}
.footer .big .acc { color: var(--accent); }
.footer .big a.email {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: max(13px, 0.78rem);
  line-height: 1;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--ink-2);
  padding-bottom: 4px;
  transition: color .25s, border-color .25s;
}
.footer .big a.email:hover { color: var(--accent); border-color: var(--accent); }
.footer .col h5 {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  font-weight: 400;
}
.footer .col h5::before { content: "// "; color: var(--accent); }
.footer .col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer .col li a {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .25s, border-color .25s;
}
.footer .col li a:hover { color: var(--accent); border-color: var(--accent); }
.footer .col.colo li {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.footer .col.colo li::before { content: "› "; color: var(--accent); }

.subfooter {
  border-top: 1px solid var(--rule);
  margin: 0 var(--gutter);
  padding: 18px 0 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.subfooter .quick { display: flex; gap: 16px; flex-wrap: wrap; }
.subfooter .quick a { color: var(--ink-2); transition: color .25s; }
.subfooter .quick a:hover { color: var(--accent); }
.subfooter .quick .slash { color: var(--accent); }

/* ─────────────────── reveal ─────────────────── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ─────────────────── tweaks panel ─────────────────── */
#tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 320px;
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px;
  z-index: 100;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  display: none;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
#tweaks.show { display: block; }
#tweaks h6 {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-3); margin-bottom: 14px;
  display:flex; justify-content:space-between; align-items: center;
}
#tweaks h6 .close { cursor: pointer; font-size: 16px; color: var(--ink-2); line-height: 1; }
#tweaks .group {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
#tweaks .group:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
#tweaks .group .label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-3); margin-bottom: 4px; display: block;
}
#tweaks .group .role {
  font-size: 10.5px; color: var(--ink-2); margin-bottom: 10px;
  display: flex; justify-content: space-between;
  letter-spacing: 0.05em;
}
#tweaks .group .role .value { color: var(--ink); }
#tweaks .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#tweaks .opts button {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 4px;
  transition: border-color .2s, color .2s, background .2s;
  line-height: 1.1;
  display: flex; flex-direction: column; gap: 2px;
}
#tweaks .opts button:hover { border-color: var(--ink-3); color: var(--ink); }
#tweaks .opts button.on {
  border-color: var(--accent);
  color: var(--ink);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
#tweaks .opts button .pv { font-size: 14px; line-height: 1.05; }
#tweaks .opts button .nm {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
#tweaks .opts button.on .nm { color: var(--accent); }

/* ─────────────────── responsive ─────────────────── */
@media (max-width: 1100px) {
  .hero .body { grid-template-columns: 1fr; gap: 48px; }
  .hero .left { max-width: 100%; }
  .showcase { max-width: none; margin-left: 0; }
  .showcase .stack { aspect-ratio: 16 / 10; }
  .philosophy { gap: 20px; }
  .work-hdr { grid-template-columns: 1fr; gap: 18px; }
  .work-hdr h2 { max-width: 100%; }
  /* All multi-column tiles hold until 720px */
  .footer { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer .big { grid-column: 1 / -1; }
  .cohdr { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 768px) {
  #open-to .body {
    grid-template-columns: 1fr;
    grid-template-areas: "lead" "points" "sidebar";
  }
  #open-to .body .lead  { padding-right: 0; }
  #open-to .body .points { padding-right: 0; }
  #open-to .body .ai {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 24px;
    position: static;
  }
}
@media (max-width: 720px) {
  .site-nav--home .meta { display: none; }
  .hero h1 {
    font-size: clamp(36px, 10vw, 56px);
    max-width: 100%;
  }
  .hero .deck p { max-width: 100%; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip .cell:nth-child(2) { border-right: none; }
  .strip .cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .grid { grid-template-columns: 1fr; gap: 48px; }
  /* everything stacks at mobile */
  .g-feature, .g-small-a, .g-small-b, .i-full,
  .c-full, .c-half-a, .c-half-b,
  .c-third-1, .c-third-2, .c-third-3 { grid-column: 1; }
  .footer { grid-template-columns: 1fr; }
  .nav .right { gap: 14px; }
  .nav .right a:not(.theme) { display: none; }
  .nav .brand .id .role { display: none; }

  .tile-below {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .tile-aside {
    order: -1;
    padding-top: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
  }
  .tile-aside .bullets {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .tile-main {
    border-right: none;
    padding-right: 0;
    padding-top: 14px;
    border-bottom: none;
  }
}
@media (max-width: 480px) {
  .strip { grid-template-columns: 1fr; }
  .strip .cell { border-right: none; border-bottom: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  /* Ensure reveal items are always visible regardless of JS timing */
  .reveal { opacity: 1 !important; transform: none !important; }
  /* Showcase cards — no slide transition, just snap */
  .showcase .card, .showcase .card .img img { transition: none !important; }
  /* Progress bar — hide entirely */
  #sc-prog.progress::after { transition: none !important; }
}

/* Hidden until a future release (News Showcase, TowerHill weather) — remove this rule to preview */
.future-release {
  display: none !important;
}

/* Homepage nav-id: hidden by default (meta bar has identity), clip approach enables transitions */
.site-nav--home .nav-brand--mark { gap: 0; }
.site-nav--home .nav-id {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  flex-direction: row;
  white-space: nowrap;
  padding-left: 0;
  transition: max-width 0.4s ease, opacity 0.35s ease, padding-left 0.4s ease;
}

/* Scrolled: slide in inline name next to signature */
.site-nav--home.scrolled .nav-id {
  max-width: 320px;
  opacity: 1;
  pointer-events: auto;
  padding-left: 14px;
}

/* Hamburger open: show stacked (overrides scrolled if both active) */
.site-nav--home:has(.nav-hamburger.open) .nav-id {
  flex-direction: column;
  max-width: 200px;
  opacity: 1;
  pointer-events: auto;
  padding-left: 14px;
}
.site-nav--home:has(.nav-hamburger.open) .nav-role::before { display: none; }

/* Homepage: global nav + landing theme pill (rest of page uses landing tokens) */
.site-nav.site-nav--home {
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  border-bottom-color: transparent;
}
.site-nav.site-nav--home .site-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
}
.site-nav.site-nav--home.scrolled {
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Landing page nav: show inline links + always-visible hamburger (contains theme) */
.site-nav.site-nav--home .nav-hamburger {
  display: flex;
}

/* Theme pill lives in hamburger menu only — never in desktop nav bar */
.site-nav.site-nav--home .theme--nav { display: none; }

/* Suppress accent underline animation on homepage nav links */
.site-nav.site-nav--home .nav-links > li > a::after { display: none; }

.site-nav.site-nav--home .nav-links > li > a:hover,
.site-nav.site-nav--home .nav-links > li > a.active {
  color: var(--ink);
}

.site-nav.site-nav--home .nav-dropdown {
  background: var(--bg-1);
  border-color: var(--rule);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.site-nav.site-nav--home .nav-dropdown li a {
  color: var(--ink-2);
}

.site-nav.site-nav--home .nav-dropdown li a:hover {
  color: var(--ink);
}

.site-nav.site-nav--home .nav-hamburger span {
  background: var(--ink);
}

.site-nav.site-nav--home .nav-id {
  gap: 5px;
}
.site-nav.site-nav--home .nav-name {
  font-size: 13px;
}
.site-nav.site-nav--home .nav-role {
  font-size: 10px;
  letter-spacing: 0.14em;
}
.site-nav.site-nav--home .nav-links a {
  font-family: var(--mono);
  font-size: max(13px, 0.72rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.site-nav.site-nav--home .nav-links > li > a:hover,
.site-nav.site-nav--home .nav-links > li > a.active {
  color: var(--ink);
}
.site-nav.site-nav--home .site-nav-end {
  gap: 12px;
}

