:root {
  /* Paper palette (default) */
  --paper:        oklch(96.8% 0.012 92);
  --paper-2:      oklch(94.2% 0.016 88);
  --ink:          oklch(19% 0.012 95);
  --ink-2:        oklch(32% 0.012 95);
  --ink-3:        oklch(52% 0.010 95);
  --ink-4:        oklch(72% 0.008 95);
  --rule:         oklch(85% 0.010 95);
  --rule-strong:  oklch(72% 0.012 95);
  --accent:       oklch(62% 0.145 52);      /* warm amber/umber */
  --accent-soft:  oklch(78% 0.085 60);
  --surface:      oklch(99% 0.004 92);

  --bg:           var(--paper);
  --bg-2:         var(--paper-2);
  --rail-w:       72px;
  --header-offset: 72px;

  /* Type families */
  --f-display: "Fraunces", "Times New Roman", serif;
  --f-grotesk: "Inter Tight", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-serif:   "Instrument Serif", "Times New Roman", serif;

  --maxw: 1320px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- Palettes ---------- */
html[data-palette="paper"] {
  --bg: oklch(96.8% 0.012 92);
  --bg-2: oklch(94.2% 0.016 88);
  --ink: oklch(19% 0.012 95);
  --ink-2: oklch(32% 0.012 95);
  --ink-3: oklch(52% 0.010 95);
  --ink-4: oklch(72% 0.008 95);
  --rule: oklch(85% 0.010 95);
  --rule-strong: oklch(72% 0.012 95);
  --accent: oklch(62% 0.145 52);
  --accent-soft: oklch(78% 0.085 60);
  --surface: oklch(99% 0.004 92);
}
html[data-palette="cinematic"] {
  --bg: oklch(17% 0.012 95);
  --bg-2: oklch(20% 0.014 100);
  --ink: oklch(96% 0.008 95);
  --ink-2: oklch(84% 0.010 95);
  --ink-3: oklch(64% 0.010 95);
  --ink-4: oklch(44% 0.010 95);
  --rule: oklch(30% 0.012 95);
  --rule-strong: oklch(42% 0.012 95);
  --accent: oklch(78% 0.145 72);
  --accent-soft: oklch(68% 0.095 72);
  --surface: oklch(22% 0.012 95);
}
html[data-palette="cool"] {
  --bg: oklch(96.5% 0.008 240);
  --bg-2: oklch(93% 0.012 240);
  --ink: oklch(18% 0.018 255);
  --ink-2: oklch(34% 0.014 255);
  --ink-3: oklch(54% 0.012 255);
  --ink-4: oklch(72% 0.010 255);
  --rule: oklch(84% 0.012 240);
  --rule-strong: oklch(70% 0.014 240);
  --accent: oklch(58% 0.175 260);
  --accent-soft: oklch(74% 0.10 260);
  --surface: oklch(99% 0.004 240);
}

/* ---------- Type pairings ---------- */
html[data-type="grotesk-serif"] {
  --f-head: var(--f-grotesk);
  --f-body: var(--f-grotesk);
  --f-accent: var(--f-serif);
}
html[data-type="editorial"] {
  --f-head: var(--f-display);
  --f-body: var(--f-grotesk);
  --f-accent: var(--f-serif);
}
html[data-type="mono-forward"] {
  --f-head: var(--f-grotesk);
  --f-body: var(--f-grotesk);
  --f-accent: var(--f-mono);
}
html[data-type="pure-sans"] {
  --f-head: var(--f-grotesk);
  --f-body: var(--f-grotesk);
  --f-accent: var(--f-grotesk);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: clip;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

::selection { background: var(--accent); color: var(--bg); }

.mono { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-3); font-weight: 500; text-transform: uppercase;}
.wrap { width: min(var(--maxw), calc(100% - var(--gutter) * 2)); margin: 0 auto; }
:is(section[id], footer[id]) { scroll-margin-top: var(--header-offset); }
a, button { touch-action: manipulation; }
:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--accent) 72%, white);
  outline-offset: 3px;
}

/* ---------- Top chrome: masthead rail ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
}
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  min-height: 58px;
}
.mast-left, .mast-center, .mast-right { display: flex; align-items: center; gap: 1.1rem;}
.mast-right { justify-content: flex-end; }
.mast-center { justify-content: center; }

.mast-mark {
  font-family: var(--f-accent, var(--f-serif));
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.mast-mark b { font-style: normal; font-family: var(--f-body); font-weight: 600; letter-spacing: -0.02em; margin-right: 0.1em;}

.mast-nav a {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
  position: relative;
  padding: 0.2em 0;
  transition: color 200ms var(--ease-soft);
}
.mast-nav a:hover { color: var(--ink); }
.mast-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:-2px; height:1px;
  background: var(--accent); transition: right 260ms var(--ease-out);
}
.mast-nav a:hover::after { right: 0; }

.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.05em;
  color: var(--ink-3);
  white-space: nowrap;
}
.status-location, .status-time { color: currentColor; }
.status-sep { color: var(--ink-4); }
.status .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: oklch(70% 0.18 145);
  box-shadow: 0 0 0 0 color-mix(in oklch, oklch(70% 0.18 145) 60%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, oklch(70% 0.18 145) 60%, transparent);}
  70%  { box-shadow: 0 0 0 8px color-mix(in oklch, oklch(70% 0.18 145) 0%, transparent);}
  100% { box-shadow: 0 0 0 0 color-mix(in oklch, oklch(70% 0.18 145) 0%, transparent);}
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: clip;
  isolation: isolate;
}
.hero-grain, .hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
}
.hero-glow {
  background:
    radial-gradient(600px 500px at var(--mx, 30%) var(--my, 30%),
      color-mix(in oklch, var(--accent) 18%, transparent) 0%, transparent 60%),
    radial-gradient(800px 700px at calc(100% - var(--mx, 30%)) calc(100% - var(--my, 30%)),
      color-mix(in oklch, var(--accent-soft) 14%, transparent) 0%, transparent 65%);
  transition: background 220ms linear;
  mix-blend-mode: multiply;
  opacity: 0.9;
}
html[data-palette="cinematic"] .hero-glow { mix-blend-mode: screen; opacity: 0.85; }

.hero-grain {
  background-image:
    radial-gradient(circle at 20% 20%, color-mix(in oklch, var(--ink) 3%, transparent), transparent 50%);
  opacity: 0.6;
}

.hero-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: stretch;
}
.hero-rail {
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--rule);
  padding-right: 1rem;
  min-height: 100%;
}
.hero-rail .mono { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 0.14em; }

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.eyebrow {
  display: flex; gap: 0.8rem; align-items: center;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .rule-line {
  flex: 0 0 2.5rem; height: 1px; background: var(--rule-strong);
}

.display {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(2.9rem, 7.3vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
  max-width: 16ch;
}
.display .serif {
  font-family: var(--f-accent);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02em;
  letter-spacing: -0.015em;
  color: var(--accent);
}
.display .tok { display: inline-block; }
.display .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(6px);
  animation: chIn 900ms var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 22ms);
}
@keyframes chIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.lede {
  font-family: var(--f-body);
  max-width: 44ch;
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 450;
}
.lede em { font-family: var(--f-accent); font-style: italic; color: var(--ink); font-weight: 400; font-size: 1.05em; }
.lede .nowrap { white-space: nowrap; }

/* Action row */
.actions {
  display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center;
  margin-top: 0.6rem;
}
.btn {
  --b-bg: var(--ink);
  --b-fg: var(--bg);
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.78rem 1.15rem 0.78rem 1rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 550;
  font-size: 0.94rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 260ms var(--ease-out), background 260ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.btn .arrow { display: inline-block; transition: transform 260ms var(--ease-out);}
.btn:hover { transform: translateY(-1px); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn.ghost {
  --b-bg: transparent;
  --b-fg: var(--ink);
  border-color: var(--rule-strong);
}
.btn.ghost:hover { border-color: var(--ink); background: color-mix(in oklch, var(--ink) 5%, transparent); }

.inline-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--ink-3);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid transparent;
  transition: color 200ms var(--ease-soft), border-color 200ms var(--ease-soft);
}
.inline-link:hover { color: var(--ink); border-bottom-color: var(--ink);}

/* Meta strip */
.meta-strip {
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.meta-cell {
  padding: 1.1rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.35rem;
  min-height: 92px;
}
.meta-cell:last-child { border-right: 0; }
.meta-cell .k {
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--ink-4); text-transform: uppercase;
}
.meta-cell .v {
  font-family: var(--f-body);
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.meta-cell .v em {
  font-family: var(--f-accent); font-style: italic; font-weight: 400;
  color: var(--accent); font-size: 1.12em;
}

/* ---------- Currently (Neat) ---------- */
section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; position: relative;}
.section-head {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head.compact { margin-bottom: 2rem; }
.section-head .rail {
  border-right: 1px solid var(--rule);
  padding-right: 1rem;
}
.section-head .rail .mono { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 0.14em; }
.section-title {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.section-title .serif {
  font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--accent);
}

.currently {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.currently .rail { border-right: 1px solid var(--rule); padding-right: 1rem; }

.now-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.now-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px 300px at 90% -10%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 70%);
}
.now-left { display: flex; flex-direction: column; gap: 1rem; min-width: 0;}
.now-kicker {
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.08em;
  color: var(--ink-3); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.now-kicker .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: oklch(70% 0.18 145);
  box-shadow: 0 0 0 3px color-mix(in oklch, oklch(70% 0.18 145) 20%, transparent);
}
.now-title {
  font-family: var(--f-head); font-weight: 600;
  font-size: clamp(1.9rem, 3.3vw, 2.6rem); line-height: 1.02;
  letter-spacing: -0.025em; margin: 0;
}
.now-title .serif { font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--accent); }
.now-body { color: var(--ink-2); font-size: 1rem; line-height: 1.6; max-width: 40ch;}
.now-body-subtle { color: var(--ink-3); font-size: 0.92rem; }
.now-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem;}
.tag {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 0.35rem 0.6rem; border: 1px solid var(--rule-strong);
  border-radius: 999px;
}
.now-cta {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}

.now-right {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.phones {
  position: relative;
  width: 100%;
  aspect-ratio: 5/4;
  max-width: 560px;
}
.phone {
  position: absolute;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.18), 0 8px 20px rgba(0,0,0,.08);
  border: 1px solid color-mix(in oklch, var(--ink) 12%, transparent);
  background: #000;
  transition: transform 500ms var(--ease-out);
}
.phone img { width: 100%; height: 100%; object-fit: cover;}
.phone.p1 {
  width: 54%;
  left: 4%;
  top: 8%;
  transform: rotate(-5deg);
  z-index: 2;
}
.phone.p2 {
  width: 46%;
  right: 4%;
  top: 0;
  transform: rotate(4deg);
  z-index: 1;
}
.phone.p3 {
  width: 40%;
  left: 32%;
  bottom: 0;
  transform: rotate(-1deg);
  z-index: 3;
}
.now-card:hover .phone.p1 { transform: rotate(-6deg) translate(-4px, -4px); }
.now-card:hover .phone.p2 { transform: rotate(6deg) translate(6px, -2px); }
.now-card:hover .phone.p3 { transform: rotate(-1.5deg) translateY(-2px); }

/* ---------- Selected Work ---------- */
.work-list {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.work-list .rail { border-right: 1px solid var(--rule); padding-right: 1rem; }
.works {
  display: grid; gap: 0;
  border-top: 1px solid var(--rule);
}
.work {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 0.5rem 1.25rem;
  align-items: center;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  cursor: default;
  transition: background 300ms var(--ease-soft);
}
.work .title-stack {
  display: flex; flex-direction: column; gap: 0.35rem; min-width: 0;
}
.work .title-sub {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.work:hover { background: color-mix(in oklch, var(--accent) 5%, transparent); }
.work .idx {
  font-family: var(--f-mono); font-size: 0.72rem;
  color: var(--ink-4); letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.work .title-line {
  font-family: var(--f-head);
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.work .at {
  font-family: var(--f-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 1rem;
}
.work .lede-short {
  color: var(--ink-3);
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 56ch;
}
.work .year {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.work .role {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

/* Hover — lift a faint underline sweep on the title */
.work .title-line .tl {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 480ms var(--ease-out);
}
.work:hover .title-line .tl { background-size: 100% 1px; }

/* ---------- Thinking / Approach ---------- */
.approach {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.approach .rail { border-right: 1px solid var(--rule); padding-right: 1rem;}
.tenets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tenet {
  padding: 1.5rem 1.25rem 1.75rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.tenet:last-child { border-right: 0; }
.tenet .no {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--ink-4);
}
.tenet h3 {
  margin: 0; font-family: var(--f-head); font-weight: 550;
  font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2;
}
.tenet h3 em { font-family: var(--f-accent); font-style: italic; color: var(--accent); font-weight: 400; }
.tenet p { margin: 0; font-size: 0.96rem; color: var(--ink-3); line-height: 1.55; max-width: 34ch;}

/* ---------- Pull quote ---------- */
.pullquote {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pullquote-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.pullquote .rail { border-right: 1px solid var(--rule); padding-right: 1rem;}
.pullquote blockquote {
  margin: 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.pullquote blockquote .mk { color: var(--accent); font-family: var(--f-accent); }
@media (max-width: 860px) {
  .pullquote-grid { grid-template-columns: 1fr;}
  .pullquote .rail { display: none;}
}

/* ---------- Work hover footnote ---------- */
.work { position: relative; }
.work .fn {
  display: block;
  grid-column: 2 / -1;
  justify-self: start;
  margin-top: 0.15rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 260ms var(--ease-out), max-height 320ms var(--ease-out);
  white-space: nowrap;
}
.work:hover .fn {
  opacity: 1;
  max-height: 2rem;
}
@media (max-width: 980px) { .work .fn { display: none;} }

/* ---------- Progress rail ---------- */
#progress {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--ink-4); text-transform: uppercase;
  pointer-events: none;
}
#progress a {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
  opacity: 0.6; transition: opacity 200ms, color 200ms;
}
#progress a .bar {
  display: inline-block; width: 22px; height: 1px;
  background: var(--rule-strong);
  transition: width 260ms var(--ease-out), background 260ms var(--ease-out);
}
#progress a.active { opacity: 1; color: var(--ink);}
#progress a.active .bar { width: 44px; background: var(--accent); }
#progress a .lbl { opacity: 0; transition: opacity 220ms;}
#progress a:hover .lbl { opacity: 1;}
@media (max-width: 980px) { #progress { display: none;} }

/* ---------- Konami overlay ---------- */
#cheat {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 2rem;
}
#cheat.on { display: grid; animation: cheatIn 400ms var(--ease-out);}
@keyframes cheatIn { from { opacity: 0; transform: scale(.98);} to { opacity: 1;} }
.cheat-card {
  max-width: 520px; width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.2);
}
.cheat-card h3 {
  margin: 0 0 1rem 0;
  font-family: var(--f-head); font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.6rem;
}
.cheat-card h3 em { font-family: var(--f-accent); color: var(--accent); font-style: italic; font-weight: 400;}
.cheat-stats { display: grid; gap: 0.5rem; font-family: var(--f-mono); font-size: .82rem; color: var(--ink-2);}
.cheat-stats .s { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px dashed var(--rule); }
.cheat-stats .s:last-child { border-bottom: 0;}
.cheat-stats .s b { font-weight: 500; color: var(--ink);}
.cheat-card .hint {
  margin-top: 1rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: 0.08em;
  color: var(--ink-4); text-transform: uppercase;
}
.contact {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--rule);
  position: relative;
}
.contact-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.contact .rail { border-right: 1px solid var(--rule); padding-right: 1rem;}
.contact-main { display: grid; gap: 1.6rem;}
.c-head {
  font-family: var(--f-head);
  font-weight: 550;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 26ch;
  padding-left: 1rem;
}
.c-head .serif { font-family: var(--f-accent); font-style: italic; color: var(--accent); font-weight: 400;}

.email-row {
  display: flex; align-items: baseline; gap: 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 1rem;
}
.email {
  font-family: var(--f-head);
  font-weight: 550;
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  display: inline-flex; align-items: center; gap: 0.6rem;
  position: relative;
}
.email::after {
  content: "";
  width: 0.9em; height: 0.12em;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease-out);
}
.email:hover::after { transform: scaleX(1);}
.email-copy {
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 200ms, border-color 200ms, background 200ms;
}
.email-copy:hover { color: var(--ink); border-color: var(--ink);}
.email-copy.copied { color: var(--accent); border-color: var(--accent); }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.cm-cell {
  padding: 1rem 1rem 1.25rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.3rem;
}
.cm-cell:last-child { border-right: 0; }
.cm-cell .k { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-4); text-transform: uppercase;}
.cm-cell .v { font-family: var(--f-body); font-size: 0.98rem; color: var(--ink); font-weight: 500;}
.cm-cell a { text-decoration: none; color: inherit;}
.cm-cell a:hover { color: var(--accent);}

.colophon {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.6rem 1rem;
  padding-top: 1.25rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.colophon span { white-space: nowrap;}

/* ---------- Tweaks panel ---------- */

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --header-offset: 120px; }
  .hero-grid, .currently, .work-list, .approach, .section-head, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-rail, .currently .rail, .work-list .rail, .approach .rail, .section-head .rail, .contact .rail {
    display: none;
  }
  .meta-strip, .tenets, .contact-meta { grid-template-columns: repeat(2, minmax(0, 1fr));}
  .meta-cell:nth-child(2n), .tenet:nth-child(2n), .cm-cell:nth-child(2n) { border-right: 0;}
  .meta-cell, .tenet, .cm-cell { padding-inline: 1rem; }
  .now-card { grid-template-columns: 1fr; }
  .now-right { min-height: 320px; }
  .work {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.4rem 0.8rem;
  }
  .work .title-stack { grid-column: 2 / -1; }
  .work .lede-short { grid-column: 2 / -1;}
  .work .year { grid-column: 2 / -1; justify-self: start;}
  .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand status"
      "nav nav";
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 0;
  }
  .mast-left { grid-area: brand; min-width: 0; }
  .mast-center { grid-area: nav; justify-content: flex-start; }
  .mast-right { grid-area: status; }
  .mast-nav {
    display: flex;
    gap: 0.45rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
    width: 100%;
  }
  .mast-nav::-webkit-scrollbar { display: none; }
  .mast-nav a {
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: color-mix(in oklch, var(--surface) 78%, transparent);
    white-space: nowrap;
  }
  .mast-nav a::after { display: none; }
}

@media (max-width: 640px) {
  :root {
    --gutter: 1rem;
    --header-offset: 130px;
  }
  .masthead-inner { gap: 0.65rem 0.75rem; }
  .mast-mark { font-size: 1rem; }
  .mast-nav { gap: 0.4rem; }
  .mast-nav a { font-size: 0.68rem; padding: 0.52rem 0.78rem; }
  .status { font-size: 0.66rem; letter-spacing: 0.04em; gap: 0.38rem; }
  .status-location, .status-sep { display: none; }
  .hero {
    padding: clamp(2.25rem, 12vw, 3.5rem) 0 clamp(2.5rem, 10vw, 3.5rem);
  }
  .eyebrow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 0.45rem 0.9rem;
    align-items: start;
  }
  .eyebrow .rule-line,
  .eyebrow span:nth-of-type(3) { display: none; }
  .display {
    font-size: clamp(3rem, 14vw, 4.4rem);
    max-width: 10ch;
  }
  .lede {
    max-width: none;
    font-size: 1rem;
    line-height: 1.6;
  }
  .actions { gap: 0.75rem; }
  .actions .btn {
    flex: 1 1 calc(50% - 0.375rem);
    justify-content: center;
    min-width: 0;
  }
  .actions .inline-link {
    flex-basis: 100%;
    padding-top: 0;
  }
  .meta-strip,
  .tenets,
  .contact-meta { grid-template-columns: 1fr; }
  .meta-cell,
  .tenet,
  .cm-cell {
    min-height: 0;
    padding: 0.95rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .meta-cell:last-child,
  .tenet:last-child,
  .cm-cell:last-child { border-bottom: 0; }
  .meta-cell:nth-child(2n),
  .tenet:nth-child(2n),
  .cm-cell:nth-child(2n) { border-right: 0; }
  .now-card {
    padding: 1.15rem;
    gap: 1.25rem;
    border-radius: 18px;
  }
  .now-right { min-height: 240px; }
  .phones {
    max-width: 340px;
    aspect-ratio: 1 / 1.08;
  }
  .section-title { max-width: 12ch; }
  .work {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 0;
  }
  .work .idx,
  .work .title-stack,
  .work .lede-short,
  .work .year { grid-column: auto; }
  .work .year { font-size: 0.72rem; }
  .work .title-sub { gap: 0.4rem 0.6rem; }
  .tenet h3 { font-size: 1.2rem; }
  .tenet p { max-width: none; }
  .email-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.1rem 1rem;
  }
  .email { font-size: clamp(1.9rem, 11vw, 3rem); }
  .colophon {
    justify-content: flex-start;
    gap: 0.5rem 0.8rem;
    padding-top: 1rem;
  }
}

@media (max-width: 420px) {
  .actions .btn { flex-basis: 100%; }
}

@media (hover: none), (pointer: coarse) {
  .btn:hover,
  .btn:hover .arrow,
  .work:hover .title-line .tl,
  .now-card:hover .phone.p1,
  .now-card:hover .phone.p2,
  .now-card:hover .phone.p3 {
    transform: none;
    background-size: 0 1px;
  }
  .email:hover::after { transform: scaleX(0); }
  .mast-nav a:hover::after { right: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .display .ch { animation: none; opacity: 1; transform: none; filter: none;}
  .hero-glow { transition: none;}
  .status .dot { animation: none;}
}
