/* =========================================================
   Tokens
   ========================================================= */
:root,
:root[data-theme="dark"] {
  --bg: #08090b;
  --bg-2: #0e1013;
  --surface: #111317;
  --fg: #ecebe6;
  --muted: #8b8a84;
  --line: rgba(236, 235, 230, 0.1);
  --accent: #d4ff3f;          /* fills */
  --accent-text: #d4ff3f;     /* accent used as text on --bg */
  --ink: #0a0b0d;             /* text on accent fills */
  --inv-bg: #ecebe6;
  --inv-fg: #0a0b0d;
  --glow: rgba(212, 255, 63, 0.14);
  --grain: 0.06;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #ebe8df;
  --surface: #fbfaf6;
  --fg: #0c0d0f;
  --muted: #67665e;
  --line: rgba(12, 13, 15, 0.12);
  --accent: #c9f227;
  --accent-text: #4a7a0c;
  --ink: #0a0b0d;
  --inv-bg: #0c0d0f;
  --inv-fg: #f3f1ea;
  --glow: rgba(150, 200, 20, 0.28);
  --grain: 0.08;
  color-scheme: light;
}

:root {
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --pad: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 6px; }

.section-label {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted);
  margin: 0 0 clamp(24px, 4vw, 48px);
}
.section-label span { color: var(--accent-text); }
.section-label::after { content: ""; width: 48px; height: 1px; background: var(--line); }

.display {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0;
}
.display em { color: var(--accent-text); }

/* =========================================================
   Loader
   ========================================================= */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--pad);
  background: var(--accent);
  color: var(--ink);
}
.loader__row { display: flex; justify-content: space-between; font: 500 0.8rem var(--mono); text-transform: uppercase; }
.loader__center { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.loader__label { font: italic 400 clamp(1.4rem, 3vw, 2.4rem) var(--serif); }
.loader__num { font-size: clamp(5rem, 18vw, 16rem); font-weight: 700; letter-spacing: -0.06em; line-height: 0.8; font-variant-numeric: tabular-nums; }
.loader__bar { height: 2px; background: rgba(10, 11, 13, 0.15); margin-top: 24px; }
.loader__bar span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }

/* =========================================================
   Cursor + grain
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  pointer-events: none;
  display: grid; place-items: center;
  opacity: 0;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease),
              background-color 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent-text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.cursor.has-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--accent); border-color: var(--accent); }
.cursor__label { font: 500 0.65rem var(--mono); text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 0.2s; }
.cursor.has-label .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Static grain: a small noise tile generated once in main.js, tiled by the GPU. */
.grain {
  position: fixed; inset: 0; z-index: 120; pointer-events: none;
  opacity: var(--grain);
  background-repeat: repeat;
  background-size: 160px 160px;
}

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background-color 0.4s, backdrop-filter 0.4s, transform 0.5s var(--ease);
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.04em; }
.nav__logo span { color: var(--accent-text); }
.nav__links { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav__links a { font-size: 0.88rem; padding: 6px 14px; border-radius: 999px; transition: background-color 0.25s, color 0.25s; }
.nav__links a:hover, .nav__links a.is-active { background: var(--fg); color: var(--bg); }
.nav__right { display: flex; align-items: center; gap: 10px; }
.nav__cta { font-size: 0.88rem; font-weight: 500; padding: 10px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); display: inline-block; }
.nav__cta span { display: inline-block; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle__icon { width: 20px; height: 20px; overflow: visible; }
.theme-toggle__sun, .theme-toggle__moon, .theme-toggle__rays {
  transform-box: fill-box; transform-origin: center;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}
[data-theme="dark"] .theme-toggle__sun { transform: scale(1.55); }
[data-theme="dark"] .theme-toggle__rays { opacity: 0; transform: rotate(-60deg) scale(0.5); }
[data-theme="light"] .theme-toggle__moon { transform: translate(9px, -9px); }

@media (max-width: 860px) { .nav__links { display: none; } }

/* Mobile menu */
.menu-btn {
  display: none; width: 42px; height: 42px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; }
.menu-btn span + span { width: 10px; margin-left: 6px; }
@media (max-width: 860px) { .menu-btn { display: inline-flex; } }

.menu {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 18px var(--pad) 28px; border: 0;
  background: var(--bg); color: var(--fg);
  flex-direction: column; justify-content: space-between;
  clip-path: circle(0 at calc(100% - var(--pad) - 21px) 39px);
  transition: clip-path 0.6s var(--ease), overlay 0.6s allow-discrete, display 0.6s allow-discrete;
}
.menu:popover-open { display: flex; clip-path: circle(150% at calc(100% - var(--pad) - 21px) 39px); }
@starting-style { .menu:popover-open { clip-path: circle(0 at calc(100% - var(--pad) - 21px) 39px); } }
.menu::backdrop { background: transparent; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__close {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--fg); font-size: 1rem; cursor: pointer;
}
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(2.6rem, 12vw, 4.5rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1.1;
  padding: 4px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), color 0.2s;
}
.menu__links a span { font-size: 0.75rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.menu__links a:active, .menu__links a:hover { color: var(--accent-text); }
.menu:popover-open .menu__links a { opacity: 1; transform: none; }
@starting-style { .menu:popover-open .menu__links a { opacity: 0; transform: translateY(24px); } }
.menu__links a:nth-child(2) { transition-delay: 0.04s; }
.menu__links a:nth-child(3) { transition-delay: 0.08s; }
.menu__links a:nth-child(4) { transition-delay: 0.12s; }
.menu__links a:nth-child(5) { transition-delay: 0.16s; }
.menu__foot { display: flex; flex-direction: column; gap: 14px; color: var(--muted); }
.menu__cv {
  align-self: flex-start; padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-weight: 600;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--pad) clamp(24px, 4vh, 48px);
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; width: 60vw; height: 60vw; right: -15vw; top: -20vw;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none; will-change: transform;
  animation: float 14s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translate(-12vw, 14vh) scale(1.15); } }
.hero__inner { position: relative; z-index: 1; pointer-events: none; }
.hero__inner a, .hero__inner p { pointer-events: auto; }

.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(12px, 2vh, 24px); font-size: clamp(0.95rem, 1.4vw, 1.2rem); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.roles { display: inline-block; height: 1.5em; line-height: 1.5em; overflow: hidden; }
.roles__track { display: flex; flex-direction: column; animation: roles 10s var(--ease) infinite; }
@keyframes roles {
  0%, 20% { transform: translateY(0); }
  25%, 45% { transform: translateY(-1.5em); }
  50%, 70% { transform: translateY(-3em); }
  75%, 95% { transform: translateY(-4.5em); }
  100% { transform: translateY(-6em); }
}

.hero__title {
  margin: 0;
  font-size: clamp(4.6rem, 19.5vw, 20rem);
  line-height: 0.8;
  letter-spacing: -0.065em;
  font-weight: 700;
}
.line { display: block; overflow: hidden; padding: 0.04em 0 0.2em; margin-bottom: -0.2em; }
.line--2 { display: flex; align-items: flex-start; padding-left: 14vw; }
.hero__word { display: inline-block; }
.hero__star { font-size: 0.3em; color: var(--accent-text); margin: 0.15em 0 0 0.12em; display: inline-block; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-top: clamp(24px, 4vh, 48px); padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__lead { max-width: 600px; margin: 0; font-size: clamp(1.05rem, 1.55vw, 1.4rem); line-height: 1.45; }
.hero__lead em { color: var(--accent-text); font-size: 1.12em; }
.hero__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--muted); margin: 0; }
.hero__cv { color: var(--fg); border-bottom: 1px solid var(--accent); padding-bottom: 1px; transition: color 0.2s; }
.hero__cv:hover { color: var(--accent-text); }

.scroll-hint {
  position: absolute; right: var(--pad); top: 50%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--muted);
}
.scroll-hint .mono { writing-mode: vertical-rl; }
.scroll-hint__line { width: 1px; height: 64px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint__line::after { content: ""; position: absolute; inset: 0; background: var(--fg); animation: drip 2s var(--ease) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

@media (max-width: 720px) {
  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__meta { align-items: flex-start; }
  .scroll-hint { display: none; }
  .line--2 { padding-left: 8vw; }
}

/* =========================================================
   Manifesto
   ========================================================= */
.manifesto { padding: clamp(100px, 20vh, 220px) var(--pad); }
.manifesto__text {
  margin: 0; max-width: 1400px;
  font-size: clamp(1.9rem, 4.6vw, 4.4rem);
  line-height: 1.1; letter-spacing: -0.035em; font-weight: 500;
}
.manifesto__text em { color: var(--accent-text); }

.manifesto__grid { display: grid; grid-template-columns: minmax(240px, 0.8fr) 2fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.manifesto__grid .manifesto__text { font-size: clamp(1.8rem, 3.6vw, 3.6rem); }

.portrait { margin: 0; position: sticky; top: 110px; }
.portrait__frame {
  position: relative; overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 4 / 5;
  background: var(--surface);
}
.portrait__frame img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  transform: scale(1.12);
  transition: filter 0.8s var(--ease);
  will-change: transform;
}
/* Lime wash that lifts off on hover, revealing the colour photo */
.portrait__frame::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply; opacity: 0.35;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.portrait:hover img { filter: grayscale(0) contrast(1) brightness(1); }
.portrait:hover .portrait__frame::after { opacity: 0; }
/* Touch screens can't hover, so show the colour photo there */
@media (hover: none) {
  .portrait__frame img { filter: none; }
  .portrait__frame::after { opacity: 0; }
}
.portrait figcaption { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); }
.portrait .pulse { width: 8px; height: 8px; }

@media (max-width: 800px) {
  .manifesto__grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: auto; max-width: 320px; }
}

.hero__open {
  margin-left: 8px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--accent-text); color: var(--accent-text);
  font-size: 0.7rem; white-space: nowrap;
}
@media (max-width: 520px) { .hero__eyebrow { flex-wrap: wrap; } .hero__open { margin-left: 22px; } }

/* =========================================================
   Expertise (four pillars)
   ========================================================= */
.expertise { padding: clamp(60px, 10vh, 120px) var(--pad) clamp(40px, 8vh, 100px); }
.expertise .display { max-width: 14ch; margin-bottom: clamp(40px, 7vh, 80px); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--line); border-radius: 24px; background: var(--surface);
  transition: translate 0.5s var(--ease), border-color 0.3s;
}
.pillar:hover { translate: 0 -6px; border-color: var(--accent-text); }
.pillar__num { color: var(--accent-text); }
.pillar h3 { margin: 0; font-size: clamp(1.3rem, 1.8vw, 1.7rem); letter-spacing: -0.03em; line-height: 1.1; font-weight: 600; }
.pillar > p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.pillar .pillar__proof { color: var(--fg); padding-top: 14px; border-top: 1px dashed var(--line); }
.pillar__proof .mono { display: block; color: var(--accent-text); margin-bottom: 4px; font-size: 0.7rem; }
.pillar .chips { margin-top: auto; padding-top: 8px; }
.pillar--accent { background: var(--accent); color: var(--ink); border-color: transparent; }
.pillar--accent > p, .pillar--accent .pillar__proof { color: rgba(10, 11, 13, 0.75); }
.pillar--accent .pillar__num, .pillar--accent .pillar__proof .mono { color: var(--ink); }
.pillar--accent .pillar__proof { border-top-color: rgba(10, 11, 13, 0.2); }
.pillar--accent:hover { border-color: transparent; }
@media (max-width: 1100px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }

/* =========================================================
   Big number
   ========================================================= */
.bignum { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 0 var(--pad); }
.bignum__inner { width: 100%; }
.bignum__kicker { color: var(--muted); margin: 0 0 16px; }
.bignum__value {
  margin: 0;
  font-size: clamp(3.3rem, 15vw, 16rem);
  font-weight: 700; letter-spacing: -0.06em; line-height: 0.9;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--fg) 30%, color-mix(in srgb, var(--fg) 35%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bignum__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(32px, 6vh, 64px); border-top: 1px solid var(--line); }
.bignum__stats > div { display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 0 0; }
.bignum__stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.bignum__n { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.bignum__stats .mono { color: var(--muted); text-transform: none; font-size: 0.82rem; }
@media (max-width: 720px) {
  .bignum__stats { grid-template-columns: 1fr 1fr; }
  .bignum__stats > div { padding: 20px 12px 20px 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--line); }
}

/* =========================================================
   Journey (horizontal on desktop)
   ========================================================= */
.journey { position: relative; padding: clamp(80px, 12vh, 140px) var(--pad); }
.journey__track { display: flex; flex-direction: column; gap: 20px; }
.journey__intro { margin-bottom: 24px; }
.journey__intro .display { max-width: 12ch; }
.journey__hint { color: var(--muted); margin-top: 32px; display: none; }
.journey__progress { display: none; }

.panel {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: 28px;
  background: var(--surface);
  overflow: hidden;
}
.panel__year {
  font-size: clamp(5rem, 11vw, 10.5rem); font-weight: 700; letter-spacing: -0.06em; line-height: 0.85;
  color: transparent; -webkit-text-stroke: 1.5px var(--fg);
}
.panel__tag { color: var(--accent-text); margin: 0 0 12px; }
.panel h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 12px; font-weight: 600; }
.panel p:last-child { margin: 0; color: var(--muted); }
.panel--now { background: var(--accent); color: var(--ink); border-color: transparent; }
.panel--now .panel__year { -webkit-text-stroke-color: var(--ink); }
.panel--now .panel__tag, .panel--now p:last-child { color: rgba(10, 11, 13, 0.7); }

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .journey { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
  .journey__track {
    flex-direction: row; align-items: center; gap: 3vw;
    height: 100%; width: max-content;
    padding: 0 var(--pad);
    will-change: transform;
  }
  .journey__intro { width: 42vw; margin: 0 4vw 0 0; }
  .journey__hint { display: block; }
  .panel { width: clamp(340px, 32vw, 520px); height: 64vh; flex-shrink: 0; }
  .journey__progress { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 6vh; height: 2px; background: var(--line); }
  .journey__progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
}

/* =========================================================
   Work (stacking cards)
   ========================================================= */
.work { padding: clamp(100px, 16vh, 180px) var(--pad) 10vh; }
.work__head { margin-bottom: clamp(40px, 8vh, 96px); }
.work__head .display { max-width: 14ch; }

.card {
  position: sticky;
  top: calc(96px + var(--i) * 14px);
  min-height: min(76vh, 720px);
  margin-bottom: 10vh;
  display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 44px);
  border-radius: 32px;
  border: 1px solid var(--line);
  background: var(--surface);
  transform-origin: center top;
  will-change: transform;
}
.card:last-child { margin-bottom: 0; }
.card__top { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 15%, transparent); opacity: 0.75; flex-wrap: wrap; }
.card__main { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; padding-top: 32px; }
.card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  background: var(--bg); opacity: var(--dim, 0); pointer-events: none;
}
.card .card__metric {
  margin: 0; opacity: 1; max-width: none;
  font-size: clamp(4.5rem, 13vw, 12.5rem); font-weight: 700; letter-spacing: -0.065em; line-height: 0.82;
}
.card__metric small { display: block; font: italic 400 clamp(1.3rem, 2.4vw, 2.2rem)/1.2 var(--serif); letter-spacing: 0; margin-top: 0.4em; opacity: 0.8; }
.card h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 16px; font-weight: 600; }
.card p { margin: 0 0 24px; opacity: 0.8; font-size: clamp(0.98rem, 1.2vw, 1.12rem); max-width: 48ch; }
.card--lime { background: var(--accent); color: var(--ink); border-color: transparent; }
.card--light { background: var(--inv-bg); color: var(--inv-fg); border-color: transparent; }

.case { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 24px; font-size: clamp(0.95rem, 1.15vw, 1.08rem); line-height: 1.45; }
.case dt { font: 500 0.72rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.6; }
.case dd { margin: 0; opacity: 0.88; }
.case dd:last-of-type { opacity: 1; font-weight: 600; }

/* =========================================================
   Principles
   ========================================================= */
.principles { padding: clamp(80px, 14vh, 160px) var(--pad) clamp(40px, 8vh, 100px); }
.principles .display { margin-bottom: clamp(32px, 6vh, 72px); }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rules li {
  display: grid; grid-template-columns: 80px 1.3fr 1fr; gap: 24px; align-items: baseline;
  padding: clamp(24px, 4vh, 40px) 0; border-bottom: 1px solid var(--line);
  transition: padding 0.5s var(--ease);
}
.rules li:hover { padding-left: 16px; }
.rules__n { font: 500 0.85rem var(--mono); color: var(--accent-text); }
.rules h3 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 3rem); letter-spacing: -0.04em; line-height: 1.02; font-weight: 600; }
.rules h3 em { color: var(--accent-text); }
.rules p { margin: 0; color: var(--muted); font-size: clamp(0.98rem, 1.2vw, 1.12rem); }
@media (max-width: 800px) { .rules li { grid-template-columns: 1fr; gap: 10px; } }

/* =========================================================
   Testimonial
   ========================================================= */
.quote { padding: clamp(80px, 14vh, 160px) var(--pad); }
.quote__body { margin: 0; max-width: 1200px; }
.quote__text {
  margin: 0;
  font: italic 400 clamp(2rem, 4.6vw, 4.4rem)/1.08 var(--serif);
  letter-spacing: -0.015em;
}
.quote__text em { font-style: normal; font-family: var(--sans); font-weight: 600; letter-spacing: -0.04em; color: var(--accent-text); font-size: 0.86em; }
.quote__by { display: flex; flex-direction: column; gap: 6px; margin-top: clamp(28px, 5vh, 56px); padding-left: 20px; border-left: 2px solid var(--accent); }
.quote__name { font-weight: 600; font-size: 1.15rem; }
.quote__by .mono { color: var(--muted); text-transform: none; }
.quote__link { margin-top: 6px; }
.quote__link:hover { color: var(--accent-text) !important; }

/* =========================================================
   Side project
   ========================================================= */
.side {
  position: relative; display: grid; grid-template-columns: 220px 1fr auto; gap: 24px 40px; align-items: center;
  margin: clamp(40px, 8vh, 80px) var(--pad) 0;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: 28px; background: var(--surface);
  transition: border-color 0.3s, translate 0.5s var(--ease);
}
.side + .side { margin-top: 16px; }
.side:hover { border-color: var(--accent-text); translate: 0 -4px; }
.side__tag { color: var(--accent-text); margin: 0; }
.side h3 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.04em; font-weight: 600; }
.side__body p { margin: 0; color: var(--muted); max-width: 60ch; }
.side__arrow { position: absolute; top: 20px; right: 24px; font-size: 1.4rem; color: var(--accent-text); transition: transform 0.4s var(--ease); }
.side:hover .side__arrow { transform: translate(4px, -4px); }
@media (max-width: 900px) { .side { grid-template-columns: 1fr; } }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 0.75rem var(--mono); text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }

@media (max-width: 800px) {
  .card { min-height: 0; top: calc(80px + var(--i) * 10px); }
  .card__main { grid-template-columns: 1fr; }
}

/* =========================================================
   Reach (globe)
   ========================================================= */
.reach {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 4vw; align-items: center;
  padding: clamp(100px, 16vh, 180px) var(--pad);
}
.reach .display { max-width: 12ch; margin-bottom: 20px; }
.reach__note { margin: 0 0 36px; color: var(--muted); max-width: 44ch; }
.reach__note strong { color: var(--fg); }
.deploys {
  list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line);
  /* Rows share one set of columns (subgrid) so every column lines up */
  display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: 32px;
}
.deploys li {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding 0.4s var(--ease), color 0.3s;
}
.deploys li:hover, .deploys li.is-active { padding-left: 16px; }
.deploys li:hover .deploys__name, .deploys li.is-active .deploys__name { color: var(--accent-text); }
.deploys__name { font-weight: 600; font-size: 1.1rem; transition: color 0.3s; }
.deploys__where { color: var(--muted); }
.deploys .mono { color: var(--muted); }
.reach { align-items: start; }
.reach__globe { position: sticky; top: max(72px, 10vh); }
#globe { width: min(100%, 68vh); aspect-ratio: 1; display: block; margin: 0 auto; cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
.reach__caption { min-height: 4.8em; max-width: 520px; margin: 8px auto 0; text-align: center; }
.reach__hint { color: var(--muted); margin: 0; }
.reach__desc { margin: 0; font-size: 0.98rem; line-height: 1.5; color: var(--muted); animation: caption-in 0.4s var(--ease); }
.reach__desc strong { color: var(--accent-text); font-weight: 600; }
@keyframes caption-in { from { opacity: 0; transform: translateY(8px); } }
.deploys a.mono { color: var(--muted); transition: color 0.2s; }
.deploys a.mono:hover { color: var(--accent-text); }
@media (max-width: 900px) {
  .reach { grid-template-columns: 1fr; }
  .reach__globe { position: relative; top: auto; order: -1; max-width: 520px; margin: 0 auto; width: 100%; }
  .reach__caption { display: none; }
  /* Touch screens: name + tag on one line, place below, description always visible */
  .deploys { display: block; }
  .deploys li { grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 2px; padding: 16px 0; }
  .deploys li:hover, .deploys li.is-active { padding-left: 0; }
  .deploys__where { grid-column: 1 / -1; grid-row: 2; font-size: 0.9rem; }
  .deploys li::after {
    content: attr(data-desc);
    grid-column: 1 / -1;
    margin-top: 6px;
    font-size: 0.88rem; line-height: 1.45; color: var(--muted);
  }
}

/* =========================================================
   Toolkit (marquee)
   ========================================================= */
.toolkit { padding: clamp(60px, 10vh, 120px) 0; overflow: hidden; }
.toolkit__label { padding: 0 var(--pad); }
.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); padding: 1.5vh 0; }
.marquee:last-child { border-bottom: 1px solid var(--line); }
.marquee__inner { display: inline-flex; align-items: center; will-change: transform; }
.marquee__inner span, .marquee__inner i { padding: 0 1.6vw; }
.marquee__inner span { font-size: clamp(2.6rem, 7.5vw, 7rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.marquee__inner i { font-style: normal; color: var(--accent-text); font-size: clamp(1.4rem, 3.5vw, 3.2rem); }
.marquee--serif .marquee__inner span { font: italic 400 clamp(2.8rem, 8vw, 7.6rem)/1.05 var(--serif); letter-spacing: -0.01em; color: var(--muted); }
.marquee__inner span:hover { color: var(--accent-text); }

/* =========================================================
   Contact
   ========================================================= */
.contact { padding: clamp(100px, 18vh, 200px) var(--pad) clamp(60px, 10vh, 120px); }
.contact__title { margin: 0; font-size: clamp(3rem, 10.5vw, 11rem); line-height: 0.9; letter-spacing: -0.06em; font-weight: 700; max-width: 12ch; }
.contact__title em { color: var(--accent-text); }
.contact__lead { margin: clamp(24px, 4vh, 40px) 0 20px; font-size: clamp(1.1rem, 1.8vw, 1.5rem); max-width: 40ch; }
.contact__roles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contact__roles li { font: 500 0.8rem var(--mono); text-transform: uppercase; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); }
.contact__row { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-top: clamp(40px, 8vh, 96px); }
.contact__btn {
  position: relative; overflow: hidden;
  width: clamp(160px, 16vw, 220px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--ink);
  font-weight: 600; font-size: 1.05rem;
}
.contact__btn::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--fg); transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.contact__btn:hover::before { transform: translateY(0); }
.contact__btn span { position: relative; transition: color 0.3s; }
.contact__btn:hover span { color: var(--bg); }
.contact__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.contact__links a {
  font-size: clamp(1.15rem, 2.2vw, 1.9rem); letter-spacing: -0.02em; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.contact__links a:hover { background-size: 100% 1px; background-position: 0 100%; color: var(--accent-text); }
@media (max-width: 720px) { .contact__links { align-items: flex-start; } }
.contact__cv {
  margin-right: auto; padding: 14px 24px; border-radius: 999px;
  border: 1px solid var(--line); font-weight: 500;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.contact__cv:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
@media (max-width: 720px) { .contact__cv { margin-right: 0; } }

.contact__btn.is-pulse { animation: btn-pulse 1.2s var(--ease) 2; }
@keyframes btn-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  100% { box-shadow: 0 0 0 28px transparent; }
}

/* =========================================================
   "Let's talk" popover
   ========================================================= */
.talk {
  position: fixed; inset: auto; margin: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 20px; border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--fg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  /* enter / exit animation */
  opacity: 0; transform: translateY(12px) scale(0.96);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
.talk:popover-open { opacity: 1; transform: none; }
@starting-style { .talk:popover-open { opacity: 0; transform: translateY(12px) scale(0.96); } }
.talk::backdrop { background: rgba(0, 0, 0, 0); transition: background 0.35s, overlay 0.35s allow-discrete, display 0.35s allow-discrete; }
.talk:popover-open::backdrop { background: rgba(0, 0, 0, 0.25); }
@starting-style { .talk:popover-open::backdrop { background: rgba(0, 0, 0, 0); } }

.talk__head { padding: 4px 36px 14px 6px; }
.talk__title { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.04em; }
.talk__sub { margin: 2px 0 0; color: var(--muted); text-transform: none; }
.talk__item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: 16px; border: 0;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.2s;
}
.talk__item + .talk__item { margin-top: 4px; }
.talk__item:hover, .talk__item:focus-visible { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.talk__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--ink);
}
.talk__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.talk__icon--in { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.talk__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.talk__text strong { font-weight: 600; }
.talk__text small { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk__arrow { color: var(--muted); transition: transform 0.3s var(--ease), color 0.2s; }
.talk__item:hover .talk__arrow { transform: translate(3px, -3px); color: var(--accent-text); }
.talk__state { font: 500 0.75rem var(--mono); text-transform: uppercase; color: var(--accent-text); white-space: nowrap; }
.talk__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.talk__close:hover { color: var(--fg); border-color: var(--fg); }

/* Phones: bottom sheet */
@media (max-width: 640px) {
  .talk { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; transform: translateY(40px); }
  @starting-style { .talk:popover-open { transform: translateY(40px); } }
}

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--pad); border-top: 1px solid var(--line); color: var(--muted);
}
.footer a:hover { color: var(--fg); }

/* =========================================================
   Theme switch (View Transitions)
   ========================================================= */
.no-trans, .no-trans * { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .loader { display: none; }
  .card { position: relative; top: auto; }
}
