@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Archivo:wdth,wght@75..100,400..700&display=swap");

:root {
  color-scheme: light;
  --paper: #ECECE8;
  --paper-2: #E3E3DE;
  --white: #F8F8F5;
  --ink: #111214;
  --muted: #5b5e66;
  --line: rgba(17, 18, 20, 0.14);
  --line-strong: rgba(17, 18, 20, 0.32);

  --peri: #FF7A59;
  --sky: #9CC7FF;
  --cobalt: #3B46E8;
  --lime: #D7F05A;
  --anth: #1E1F24;
  --terra: #1E1F24;
  --green: #526753;
  --gray: #C5C6C4;
  --accent: #3B46E8;

  --tone: var(--peri);
  --tone-ink: #111214;
  --tone-muted: rgba(17, 18, 20, 0.72);
  --tone-line: rgba(17, 18, 20, 0.3);

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --cond: "Archivo", "Plus Jakarta Sans", system-ui, sans-serif;
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.6rem, 2.4vw, 2.1rem);
  --step-3: clamp(2rem, 3.6vw, 3rem);
  --display: clamp(2.7rem, 6.6vw, 6.4rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 86rem;
  --radius: 6px;
}

[data-tone="terra"] { --tone: var(--terra); --tone-ink: #F7ECE8; --tone-muted: rgba(247, 236, 232, 0.76); --tone-line: rgba(247, 236, 232, 0.35); }
[data-tone="green"] { --tone: var(--green); --tone-ink: #EEF2EC; --tone-muted: rgba(238, 242, 236, 0.76); --tone-line: rgba(238, 242, 236, 0.35); }
[data-tone="gray"] { --tone: var(--gray); --tone-ink: #111214; --tone-muted: rgba(17, 18, 20, 0.72); --tone-line: rgba(17, 18, 20, 0.3); }
[data-tone="peri"] { --tone: var(--peri); --tone-ink: #111214; --tone-muted: rgba(17, 18, 20, 0.72); --tone-line: rgba(17, 18, 20, 0.3); }
[data-tone="sky"] { --tone: var(--sky); --tone-ink: #111214; --tone-muted: rgba(17, 18, 20, 0.72); --tone-line: rgba(17, 18, 20, 0.3); }
[data-tone="cobalt"] { --tone: var(--cobalt); --tone-ink: #F3F3F0; --tone-muted: rgba(243, 243, 240, 0.76); --tone-line: rgba(243, 243, 240, 0.35); }
[data-tone="lime"] { --tone: var(--lime); --tone-ink: #111214; --tone-muted: rgba(17, 18, 20, 0.72); --tone-line: rgba(17, 18, 20, 0.3); }
[data-tone="anth"] { --tone: var(--anth); --tone-ink: #F3F3F0; --tone-muted: rgba(243, 243, 240, 0.72); --tone-line: rgba(243, 243, 240, 0.3); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--peri); color: var(--ink); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--white); font-weight: 600; text-decoration: none; transition: top 0.2s ease; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

em.accent { font-style: normal; color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.label, dt, .case-kicker, .work-year, .cv .years, .section-head p, .visual-title, .legend, .tick span, .foot, .cv-place, .next small, .hero-facts dt, .case-meta dt, .glance-facts dt, .fact-group h3 {
  font-family: var(--cond);
  font-stretch: 80%;
  letter-spacing: 0.01em;
}

/* Page transitions */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 160ms ease-out both fade-out; }
  ::view-transition-new(root) { animation: 280ms ease-in both fade-in; }
  @keyframes fade-out { to { opacity: 0; } }
  @keyframes fade-in { from { opacity: 0; } }
}

/* Top bar (sits on the tone block) */
.bar { background: var(--tone); color: var(--tone-ink); }
.bar-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.3rem;
  font-size: var(--step--1);
  border-bottom: 1px solid var(--tone-line);
}
.bar .brand { display: flex; gap: 1.1rem; align-items: baseline; }
.bar .wordmark { font-weight: 800; letter-spacing: -0.03em; text-decoration: none; font-size: 1.05rem; }
.bar .wordmark i { font-style: normal; font-weight: 500; font-size: 0.7em; vertical-align: super; margin-left: 0.1em; }
.bar .role { color: var(--tone-muted); }
.bar nav { display: flex; align-items: center; gap: 1.5rem; }
.bar nav a { text-decoration: none; font-weight: 500; padding: 0.45rem 0; }
.bar nav a:hover { color: var(--tone-ink); text-decoration: underline; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--tone-line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.bar .pill { background: var(--tone-ink); color: var(--tone); border-color: var(--tone-ink); padding: 0.7rem 1.6rem; flex: none; white-space: nowrap; line-height: 1.2; }
.bar .pill:hover { background: transparent; color: var(--tone-ink); text-decoration: none; }
.pill.solid { background: var(--peri); color: var(--ink); border-color: var(--peri); }
.pill.solid:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* Hero block */
.hero { position: relative; overflow: hidden; background: var(--tone); color: var(--tone-ink); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) var(--gutter);
  align-items: start;
  padding-block: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-name {
  grid-column: 1 / span 8;
  grid-row: 1;
  margin: 0;
  font-family: var(--cond);
  font-stretch: 85%;
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
}
.hero-name::after { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.6em; border-radius: 50%; background: var(--tone-ink); vertical-align: middle; }
.hero-title {
  grid-column: 1 / span 8;
  grid-row: 2;
  font-size: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 11em;
}
.hero-title em.accent { color: transparent; -webkit-text-stroke: 0.028em var(--tone-ink); }
.hero-portrait {
  grid-column: 9 / -1;
  grid-row: 1 / span 3;
  justify-self: end;
  position: relative;
  display: block;
  width: 100%;
  max-width: 24rem;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-portrait .nat { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.hero-portrait:hover .nat { opacity: 1; }
.hero-intro {
  grid-column: 1 / span 6;
  grid-row: 3;
  align-self: end;
  margin: 0;
  max-width: 30em;
  font-size: var(--step-1);
  line-height: 1.4;
  font-weight: 500;
  color: var(--tone-muted);
}
.hero-mark {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  line-height: 0.74;
  font-size: clamp(6rem, 21vw, 19rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  white-space: nowrap;
  user-select: none;
  margin-bottom: -0.1em;
}
.hero-mark i { font-style: normal; font-weight: 600; font-size: 0.22em; letter-spacing: 0; vertical-align: top; margin-left: 0.15em; position: relative; top: 0.25em; }

@media (prefers-reduced-motion: no-preference) {
  .hero-name, .hero-title, .hero-portrait, .hero-intro, .hero-mark { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
  .hero-portrait { animation-delay: 0.08s; }
  .hero-intro { animation-delay: 0.16s; }
  .hero-mark { animation-delay: 0.22s; }
  @keyframes rise { from { transform: translateY(0.8rem); opacity: 0; } }
}

/* Facts strip under the hero */
.facts-row { padding-block: clamp(1.5rem, 3vw, 2.5rem) 0; }
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem var(--gutter);
  margin: 0;
  font-size: var(--step--1);
}
.hero-facts div { padding-top: 0.8rem; border-top: 1px solid var(--ink); }
.hero-facts dt { color: var(--muted); font-size: var(--step--2); }
.hero-facts dd { margin: 0.25rem 0 0; font-weight: 600; }

/* Sections */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section + .section { border-top: 1px solid var(--ink); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}
.section-head h2 { font-size: var(--step-3); line-height: 1; letter-spacing: -0.035em; }
.section-head p { margin: 0; color: var(--muted); font-size: var(--step--1); }

/* Work grid: one colour block per project */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) var(--gutter);
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-card { display: block; text-decoration: none; }
.work-card .cover { display: block; overflow: hidden; border-radius: var(--radius); background: var(--card-tone, var(--peri)); }
.work-card .cover img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1); }
.work-card:hover .cover img, .work-card:focus-visible .cover img { transform: scale(1.02); }
.work-card.tone-peri { --card-tone: var(--peri); }
.work-card.tone-terra { --card-tone: var(--terra); }
.work-card.tone-green { --card-tone: var(--green); }
.work-card.tone-gray { --card-tone: var(--gray); }
.work-meta { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1.5rem; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--ink); align-items: baseline; }
.work-title { font-size: var(--step-2); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.work-year { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.work-summary { grid-column: 1 / -1; margin: 0.15rem 0 0; color: var(--muted); max-width: 36em; }
.work-card:hover .work-title { color: var(--accent); }

/* About */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.about-text { grid-column: 1 / span 7; }
.about-text p { max-width: 32em; font-size: var(--step-1); line-height: 1.42; font-weight: 500; }
.facts { grid-column: 9 / -1; font-size: var(--step--1); }
.fact-group + .fact-group { margin-top: 1.75rem; }
.fact-group h3 { margin: 0 0 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--ink); font-size: var(--step--2); font-weight: 500; color: var(--muted); }
.fact-group ul { list-style: none; margin: 0; padding: 0; }
.fact-group li + li { margin-top: 0.4rem; }
.fact-group strong { font-weight: 600; }
.dim { color: var(--muted); }

.section-head.sub { margin-top: clamp(3rem, 6vw, 5rem); }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(2.5rem, 5vw, 4rem); font-size: var(--step--1); }
.facts-grid .fact-group + .fact-group { margin-top: 0; }
.cv { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.4rem; }
.cv::before { content: ""; position: absolute; left: 0.5rem; top: 1.2rem; bottom: 1.2rem; width: 2px; background: var(--ink); }
.cv li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 13rem;
  grid-template-rows: auto auto;
  column-gap: var(--gutter);
  row-gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 0;
}
.cv li::before {
  content: "";
  position: absolute;
  left: calc(-2.4rem + 0.5rem + 1px - 0.5rem);
  top: 1.95rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--peri);
  border: 2px solid var(--ink);
  transition: background 0.25s ease, transform 0.25s ease;
}
.cv li:hover::before { background: var(--ink); transform: scale(1.15); }
.cv li:first-child { border-top: 0; }
.cv .years { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; color: var(--ink); font-weight: 600; font-size: var(--step--1); padding-top: 0.35rem; font-variant-numeric: tabular-nums; }
.cv-place { grid-column: 2; grid-row: 2; align-self: start; text-align: right; color: var(--muted); font-size: var(--step--1); padding-top: 0; }
.cv-role { grid-column: 1; grid-row: 1; }
.cv-role strong { display: block; font-weight: 700; font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1.05; transition: color 0.2s ease; }
.cv li:hover .cv-role strong { color: var(--cobalt); }
.cv-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; padding: 0; border: 0; }
.cv-step { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.85rem; border: 1px solid var(--ink); border-radius: 999px; font-size: var(--step--1); font-weight: 600; }
.cv-step + .cv-step { margin-top: 0; }
.cv-step::before { content: none; }
.cv-step small { display: inline; color: var(--muted); font-family: var(--cond); font-stretch: 80%; font-weight: 500; font-size: var(--step--2); font-variant-numeric: tabular-nums; }
.cv-note { grid-column: 1; grid-row: 2; color: var(--muted); max-width: 40em; }
#edu .cv-note { color: var(--ink); font-weight: 600; font-family: var(--cond); font-stretch: 85%; }

/* Contact CTA: ink block */
.cta { background: var(--ink); color: var(--white); }
.cta-in { padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 6vw, 5rem); }
.cta h2 { font-size: clamp(3rem, 9.5vw, 9rem); line-height: 0.92; letter-spacing: -0.05em; font-weight: 800; max-width: 8em; text-wrap: balance; text-transform: lowercase; }
.cta h2 em.accent { color: var(--peri); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.5rem; }
.cta-row .pill { font-size: var(--step-0); padding: 0.8rem 1.3rem; }
.cta-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.cta-links a { display: inline-flex; align-items: center; padding: 0.8rem 1.3rem; border: 1px solid rgba(248, 248, 245, 0.4); border-radius: 999px; color: var(--white); font-weight: 600; font-size: var(--step-0); text-decoration: none; transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
.cta-links a:hover { border-color: var(--white); background: var(--white); color: var(--ink); }

/* Footer: continues the ink block */
.foot { background: var(--ink); color: rgba(248, 248, 245, 0.7); font-size: var(--step--1); }
.foot-in {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid rgba(248, 248, 245, 0.2);
}
.foot p { margin: 0; }
.foot .dots { letter-spacing: 0.25em; margin-right: 1rem; color: var(--peri); }
.foot nav { display: flex; gap: 1.5rem; }
.foot a { display: inline-block; padding: 0.3rem 0; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: var(--peri); }

/* Case study header on the project tone */
.case-head { background: var(--tone); color: var(--tone-ink); }
.case-head-in { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.back { display: inline-block; margin-bottom: 1.25rem; font-family: var(--cond); font-stretch: 85%; font-weight: 600; font-size: var(--step--1); color: var(--tone-ink); }
.back::before { content: "←"; margin-right: 0.4em; }
.case-kicker { margin: 0 0 1rem; color: var(--tone-muted); font-size: var(--step--1); }
.case-head h1 { font-size: var(--display); font-weight: 700; line-height: 0.98; letter-spacing: -0.04em; max-width: 11em; text-wrap: balance; }
.case-summary { margin: 1.25rem 0 0; max-width: 30em; font-size: var(--step-1); line-height: 1.4; font-weight: 500; color: var(--tone-muted); }
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--tone-ink);
  font-size: var(--step--1);
}
.case-meta dt { color: var(--tone-muted); font-size: var(--step--2); }
.case-meta dd { margin: 0.3rem 0 0; font-weight: 600; }
.case-cover { margin: clamp(2rem, 4vw, 3rem) 0 0; }
.cover { display: block; }
.cover img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

/* Overview */
.glance {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem var(--gutter);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--ink);
}
.glance h2 { grid-column: 1 / span 3; font-size: var(--step-2); line-height: 1.05; letter-spacing: -0.03em; }
.glance-text { grid-column: 5 / span 7; max-width: 36em; font-size: var(--step-1); line-height: 1.42; font-weight: 500; }
.glance-text p { margin: 0; }
.glance-facts {
  grid-column: 5 / span 7;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  font-size: var(--step--1);
}
.glance-facts dt { color: var(--muted); font-size: var(--step--2); }
.glance-facts dd { margin: 0.3rem 0 0; font-weight: 600; }

/* Case sections */
.case-body { padding-block: 0 2rem; }
.case-section {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.case-lead {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem var(--gutter);
}
.case-h {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: 1.5rem;
}
.case-h .num {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  font-variant-numeric: tabular-nums;
}
.case-section h2 {
  font-size: var(--step-2);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.case-text { grid-column: 5 / span 7; }
.case-text p { max-width: 36em; }
.case-text p:last-child { margin-bottom: 0; }
.case-section figure { margin: 1.5rem 0 0; }
.case-section figcaption { margin-top: 0.8rem; max-width: 50em; color: var(--muted); font-size: var(--step--1); }

.next { display: block; padding-block: 3rem; text-decoration: none; }
.next small { display: block; color: var(--muted); font-size: var(--step--1); }
.next strong { font-weight: 700; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.035em; }
.next:hover strong { color: var(--accent); }

/* Mounted screens: flat tone block, light window */
.mount {
  position: relative;
  display: block;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--tone);
}
.mount.narrow { display: grid; place-items: center; padding-block: clamp(2rem, 5vw, 3.5rem); }
.frame {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.1rem;
  padding: 0 0.9rem;
  background: #e9e9e4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.frame-bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: rgba(17, 18, 20, 0.22); }
.frame-bar b {
  flex: 1;
  margin-left: 0.6rem;
  max-width: 24rem;
  height: 1.2rem;
  border-radius: 5px;
  background: rgba(17, 18, 20, 0.06);
  color: rgba(17, 18, 20, 0.6);
  font-family: var(--cond);
  font-stretch: 85%;
  font-weight: 500;
  font-size: 0.72rem;
  line-height: 1.2rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame-media { display: block; width: 100%; height: auto; }
video.frame-media { background: #fff; aspect-ratio: 1384 / 852; object-fit: cover; cursor: pointer; }
.card {
  display: block;
  width: auto;
  max-width: min(100%, 26rem);
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  color: #1b1d22;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.card .frame-media { width: auto; max-width: 100%; }
.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: var(--step--1);
  background: var(--paper-2);
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: no-preference) {
  .mount, .case-cover .cover { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.1, 1); }
  .mount.in, .case-cover .cover.in { opacity: 1; transform: none; }
}

/* Process visuals */
.visual { margin: 1.5rem 0 0; --design: #1E1F24; --build: #5A54D6; }
.visual-title { margin: 0 0 1rem; font-size: var(--step--1); font-weight: 600; }
.visual-note { margin: 0.75rem 0 0; font-size: var(--step--1); color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.swatch.design { background: var(--design); }
.swatch.build { background: var(--build); }
.swatch.milestone { width: 0.6rem; height: 0.6rem; border-radius: 1px; background: var(--ink); transform: rotate(45deg); }

.gantt { position: relative; font-size: var(--step--1); }
.gantt-axis, .gantt-row { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 1rem; }
.gantt-axis .track { height: 1.5rem; border-bottom: 1px solid var(--ink); }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tick span { position: absolute; top: 0.1rem; left: 0.3rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gantt-body .track { position: relative; }
.gantt-grid { position: absolute; inset: 0; pointer-events: none; }
.gantt-grid .tick { border-left-color: rgba(17, 18, 20, 0.08); }
.gantt-row { align-items: center; min-height: 2.25rem; }
.gantt-row .label { color: var(--ink); line-height: 1.3; }
.gantt-row .track { height: 2.25rem; }
.gbar { position: absolute; top: 50%; height: 0.875rem; margin-top: -0.4375rem; min-width: 4px; border-radius: 3px; cursor: default; }
.gbar::after { content: ""; position: absolute; inset: -0.6rem -0.25rem; }
.gbar.design { background: var(--design); }
.gbar.build { background: var(--build); }
.gbar.milestone { width: 0.75rem; height: 0.75rem; min-width: 0; margin: -0.375rem 0 0 -0.375rem; border-radius: 1px; background: var(--ink); transform: rotate(45deg); }
.gbar:focus-visible { outline-offset: 2px; }
.gbar:hover, .gbar:focus-visible { filter: brightness(1.15); }
.tooltip {
  position: absolute;
  z-index: 2;
  max-width: 18rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-size: var(--step--1);
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
}
.tooltip.on { opacity: 1; }
.tooltip strong { display: block; font-weight: 600; }

.table-view { margin-top: 1rem; font-size: var(--step--1); }
.table-view summary { cursor: pointer; color: var(--muted); }
.table-view table { width: 100%; margin-top: 0.75rem; border-collapse: collapse; }
.table-view th, .table-view td { text-align: left; padding: 0.4rem 0.75rem 0.4rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table-view th { font-weight: 600; }

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 1.5rem var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}
.flow li { position: relative; padding-top: 0.9rem; border-top: 2px solid var(--ink); }
.flow .step { display: block; margin-bottom: 1.6rem; font-family: var(--cond); font-stretch: 80%; font-weight: 600; font-size: var(--step--1); color: var(--ink); font-variant-numeric: tabular-nums; }
.flow strong { display: block; font-weight: 700; font-size: var(--step-0); letter-spacing: -0.01em; line-height: 1.2; }
.flow span:not(.step) { display: block; margin-top: 0.35rem; color: var(--muted); font-size: var(--step--1); line-height: 1.45; }

.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--gutter); }
.compare h4 { margin: 0 0 0.75rem; font-size: var(--step-0); font-weight: 700; letter-spacing: -0.01em; }
.compare p { margin: 0 0 0.75rem; color: var(--muted); font-size: var(--step--1); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: var(--step--1); background: var(--white); }
.compare .accent li { border-color: var(--terra); color: var(--terra); }

.decision { display: grid; gap: 1rem; }
.decision-step { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: 1rem var(--gutter); padding: 1.25rem 0; border-top: 1px solid var(--line); }
.decision-step:last-child { border-bottom: 1px solid var(--line); }
.decision-q { margin: 0; font-weight: 600; }
.decision-q small { display: block; margin-top: 0.25rem; font-weight: 400; color: var(--muted); font-size: var(--step--1); }
.branches { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.branches li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem; align-items: baseline; }
.branches .when { color: var(--muted); font-size: var(--step--1); }
.branches .then { padding: 0.55rem 0.8rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }

.tablist { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line-strong); }
.tablist [role="tab"] {
  margin-bottom: -1px;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
}
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--terra); font-weight: 600; }

/* Interactions: everything here answers a pointer or the scroll */
.pill { transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.25s ease; will-change: transform; }
.bar nav a:not(.pill), .foot a, .table-view summary, .back {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}
.bar nav a:not(.pill):hover, .foot a:hover, .table-view summary:hover, .back:hover, .bar nav a[aria-current="true"] { background-size: 100% 1px; text-decoration: none; }

.hero-mark span { display: inline-block; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.1, 1); }
.hero-mark:hover span { transform: translateY(-0.07em); }
.hero-mark span:nth-child(2) { transition-delay: 0.04s; }
.hero-mark span:nth-child(3) { transition-delay: 0.08s; }
.hero-mark span:nth-child(4) { transition-delay: 0.12s; }
.hero-mark span:nth-child(5) { transition-delay: 0.16s; }
.hero-mark i { display: inline-block; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.1, 1); }
.hero-mark:hover i { transform: rotate(360deg); }

.work-card .cover { position: relative; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 0.5s ease; }
.work-card:hover .cover, .work-card:focus-visible .cover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(17, 18, 20, 0.45); }
.cover-cta {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.work-card:hover .cover-cta, .work-card:focus-visible .cover-cta { opacity: 1; transform: none; }

.case-cover .cover { overflow: hidden; border-radius: var(--radius); }
@supports (animation-timeline: view()) {
  .case-cover .cover img { aspect-ratio: 2 / 1; object-fit: cover; animation: cover-par linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes cover-par { from { transform: translateY(-3%); } to { transform: translateY(3%); } }
}

/* Work stack: one sticky panel per project; the section takes the active project's tone */
.work { background: var(--tone); color: var(--tone-ink); padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); transition: background 0.6s ease, color 0.6s ease; }
.work-stack li:last-child { box-shadow: 0 -12px 40px -24px rgba(17, 18, 20, 0.35), 0 30px 60px -30px rgba(17, 18, 20, 0.35); }
/* The last panel holds for a moment before the section scrolls on */
.work .section-head p { color: var(--tone-muted); }
.work-stack { display: grid; gap: clamp(1rem, 2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.work-stack::after { content: ""; display: block; height: 32vh; }
.work-item { position: sticky; top: calc(4.5rem + var(--i, 0) * 1.25rem); }
.work-panel {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--gutter);
  min-height: 62vh;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 -12px 40px -24px rgba(17, 18, 20, 0.35), 0 0 0 1px rgba(17, 18, 20, 0.06);
}
.work-copy { display: flex; flex-direction: column; min-width: 0; }
.work-index { font-family: var(--cond); font-stretch: 80%; font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.work-panel .work-title { margin-top: auto; padding-top: 2rem; font-size: var(--step-3); font-weight: 700; line-height: 1; letter-spacing: -0.035em; transition: color 0.2s ease; }
.work-panel .work-summary { margin-top: 1rem; color: var(--muted); max-width: 26em; }
.work-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.work-cta { border-color: var(--ink); color: var(--ink); font-size: var(--step--1); }
.work-panel:hover .work-cta, .work-panel:focus-visible .work-cta { background: var(--ink); color: var(--white); }
.work-panel:hover .work-title { color: var(--cobalt); }
.work-media { position: relative; overflow: hidden; border-radius: 6px; background: var(--tone); aspect-ratio: 4 / 3; align-self: center; }
.work-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1); }
.work-panel:hover .work-media img, .work-panel:focus-visible .work-media img { transform: scale(1.03); }

/* Marquee strip under the hero */
.marquee { overflow: hidden; padding-block: 0.9rem; border-bottom: 1px solid var(--ink); font-family: var(--cond); font-stretch: 85%; font-weight: 600; font-size: var(--step-0); white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { padding-right: 2.5rem; }
.marquee-track span::after { content: "●"; margin-left: 2.5rem; font-size: 0.45em; vertical-align: middle; color: var(--terra); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Custom cursor (pointer devices only) */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary, .has-cursor [role="tab"] { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; border-radius: 50%; opacity: 0; mix-blend-mode: difference; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #fff; transition: opacity 0.3s ease; }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid #fff; transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, margin 0.25s ease, background 0.25s ease; }
.cursor-ring.on { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(255, 255, 255, 0.2); }

/* Email pill copies the address on click */
.cta .pill.solid.done { background: var(--white); border-color: var(--white); color: var(--ink); }

/* Gantt bars grow in when the chart scrolls into view */
.gantt .gbar { transform-origin: left center; transform: scaleX(0); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.1, 1) var(--d, 0ms), filter 0.2s ease; }
.gantt .gbar.milestone { transform: rotate(45deg) scale(0); }
.gantt.in .gbar { transform: scaleX(1); }
.gantt.in .gbar.milestone { transform: rotate(45deg) scale(1); }
.gantt.in .gbar:hover, .gantt.in .gbar:focus-visible { transform: scaleX(1) scaleY(1.35); transition-delay: 0ms; }
.gantt.in .gbar.milestone:hover, .gantt.in .gbar.milestone:focus-visible { transform: rotate(45deg) scale(1.25); }

/* Staggered section reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .gantt .gbar, .gantt .gbar.milestone { transform: none; transition: none; }
  .gantt .gbar.milestone { transform: rotate(45deg); }
}

.mount .frame, .mount .card { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 0.5s ease; }
.mount:hover .frame, .mount:hover .card { transform: scale(1.015); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.18); }

.flow li { transition: border-color 0.25s ease; }
.flow li:hover { border-top-color: var(--terra); }
.flow li:hover .step { color: var(--cobalt); }
.chips li { transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.chips li:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.compare .accent li:hover { background: var(--terra); border-color: var(--terra); color: var(--white); }
.branches .then { transition: background 0.2s ease, border-color 0.2s ease; }
.branches li:hover .then { border-color: var(--ink); background: #fff; }
.gantt-row { transition: background 0.2s ease; border-radius: 4px; }
.gantt-row:hover { background: rgba(17, 18, 20, 0.04); }
.gantt-row:hover .label { font-weight: 600; }
.gbar { transition: transform 0.2s ease, filter 0.2s ease; }
.gbar:hover, .gbar:focus-visible { transform: scaleY(1.35); }
.gbar.milestone:hover, .gbar.milestone:focus-visible { transform: rotate(45deg) scale(1.25); }
.tablist [role="tab"] { transition: color 0.2s ease, border-color 0.2s ease; }

.next { position: relative; padding-inline: clamp(1rem, 3vw, 2rem); margin-inline: calc(-1 * clamp(1rem, 3vw, 2rem)); border-radius: var(--radius); transition: background 0.3s ease, color 0.3s ease; }
.next:hover { background: var(--tone); color: var(--tone-ink); }
.next:hover small { color: var(--tone-muted); }
.next:hover strong { color: inherit; }
.next strong::after { content: " →"; display: inline-block; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1); }
.next:hover strong::after { transform: translateX(0.3em); }

.progress { position: fixed; top: 0; left: 0; z-index: 10; width: 100%; height: 3px; background: var(--terra); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark span, .hero-mark i, .work-card .cover, .cover-cta, .mount .frame, .mount .card, .gbar, .next strong::after { transition: none; }
  .progress { display: none; }
}

/* Small screens */
@media (max-width: 56rem) {
  .bar .role { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-name, .hero-title, .hero-intro, .hero-portrait { grid-column: 1 / -1; }
  .hero-portrait { grid-row: 1; justify-self: start; width: 12rem; aspect-ratio: 1; }
  .hero-name { grid-row: 2; }
  .hero-title { grid-row: 3; }
  .hero-intro { grid-row: 4; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .about-text, .facts { grid-column: 1 / -1; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem var(--gutter); margin-top: 1rem; }
  .fact-group + .fact-group { margin-top: 0; }
  .cv { padding-left: 1.8rem; }
  .cv li { grid-template-columns: 1fr; grid-template-rows: auto; }
  .cv .years, .cv-role, .cv-note, .cv-place { grid-column: 1; grid-row: auto; text-align: left; }
  .cv .years { order: -1; padding-top: 0; }
  .case-meta, .glance-facts { grid-template-columns: repeat(2, 1fr); }
  .case-lead { grid-template-columns: 1fr; }
  .case-h, .case-text, .glance h2, .glance-text, .glance-facts { grid-column: 1 / -1; }
  .case-h { position: static; }
  .work-item { position: static; }
  .work-panel { grid-template-columns: 1fr; min-height: 0; }
  .work-panel .work-title { margin-top: 0; padding-top: 1rem; }
  .gantt-axis, .gantt-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .gantt-axis .label { display: none; }
  .gantt-axis .tick:nth-child(even) span { display: none; }
  .gantt-row { padding-top: 0.5rem; }
  .decision-step { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
}
