/* Inter is self-hosted (latin subset, variable 100-900) so the page no longer
   waits on the fonts.googleapis.com -> fonts.gstatic.com chain. The fallback
   face is metric-matched so the 7rem headline does not reflow on font swap. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107.12%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #6b6b70;
  --line: rgba(29, 29, 31, 0.1);
  --line-strong: rgba(29, 29, 31, 0.16);
  --blue: #0066cc;
  --indigo: #5e5ce6;
  --peach: #c93400;
  --gold: #b54400;
  --teal: #0f766e;
  --chip: rgba(255, 255, 255, 0.82);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  --radius: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-1: 0.16s;
  --dur-2: 0.28s;
  --dur-3: 0.5s;
  --press: 0.12s;
  --stagger: 45ms;
  --nav-h: 72px;
  --max: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.92), transparent 42%);
  content: "";
  pointer-events: none;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #fff;
  transition: opacity 0.34s var(--ease), visibility 0.34s var(--ease);
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.loader-copy span {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 650;
  letter-spacing: -0.05em;
}

.loader-copy strong {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav {
  position: fixed;
  top: 14px;
  right: 18px;
  left: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  transition: transform var(--dur-2) var(--ease-soft), opacity var(--dur-2) var(--ease-soft);
}

/* Scrolling down tucks the bar away, scrolling up brings it back. */
.site-nav.is-tucked {
  transform: translateY(calc(-100% - 24px));
  opacity: 0;
}

.site-nav a,
.site-nav button {
  pointer-events: auto;
}

.nav-pill,
.nav-cta,
.menu-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  transition: background var(--dur-2) var(--ease-soft), box-shadow var(--dur-2) var(--ease-soft),
    transform var(--press) var(--ease-soft);
}

/* Real glass only where the GPU can afford it - phones get a solid pill, which
   keeps scrolling compositing-free on mid-range Android. */
@media (min-width: 1024px) and (hover: hover) {
  .nav-pill,
  .nav-cta,
  .menu-toggle {
    background: var(--chip);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
  }
}

.nav-pill {
  gap: 4px;
  padding: 4px;
}

.nav-pill a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}

.nav-pill a:hover,
.nav-pill a.is-active {
  background: #fff;
  color: var(--ink);
}

.nav-cta {
  font-size: 0.9rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--chip);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: calc(88px + env(safe-area-inset-top)) 22px 32px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  /* visibility is only delayed on the way out, so opening is instant even if
     transitions are skipped. */
  transition: opacity var(--dur-2) var(--ease-soft), transform var(--dur-2) var(--ease-soft),
    visibility 0s linear var(--dur-2);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--dur-2) var(--ease-soft), transform var(--dur-2) var(--ease-soft),
    visibility 0s linear 0s;
}

/* Staggered rows make the sheet feel like it is unfolding rather than appearing. */
.mobile-menu a {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-2) var(--ease-soft), transform var(--dur-2) var(--ease-soft);
}

.mobile-menu.open a {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 40ms + 60ms);
}

.mobile-menu nav {
  display: grid;
  gap: 8px;
}

.mobile-menu a {
  display: flex;
  min-height: 54px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: calc(108px + env(safe-area-inset-top)) 20px calc(88px + env(safe-area-inset-bottom));
}

/* Slow, blurred colour field behind the headline: ambient motion that costs one
   composited layer and never repaints. */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(720px, 92vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  background:
    radial-gradient(circle at 32% 34%, rgba(94, 92, 230, 0.3), transparent 58%),
    radial-gradient(circle at 68% 42%, rgba(201, 52, 0, 0.2), transparent 56%),
    radial-gradient(circle at 52% 70%, rgba(15, 118, 110, 0.24), transparent 58%);
  filter: blur(52px);
  opacity: 0.72;
  pointer-events: none;
  animation: glowDrift 26s var(--ease-soft) infinite alternate;
}

@keyframes glowDrift {
  0% { translate: -52% -50%; scale: 1; }
  50% { translate: -46% -47%; scale: 1.06; }
  100% { translate: -50% -53%; scale: 0.98; }
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  text-align: center;
}

/* Chips live in their own layer so their drift + pointer parallax never
   interferes with the headline's own animation. */
.chip-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.chip-layer > .chip {
  pointer-events: auto;
}

/* Entrance choreography. Deferred until html.is-ready, i.e. after the preloader
   is gone and the font has settled, so nothing animates against a font swap. */
/* No blur here on purpose: a blurred 7rem headline both reads as "slow" and
   costs real paint time on phones. A short rise is enough to feel alive. */
.js .hero-rise {
  opacity: 0;
  transform: translateY(0.3em);
}

.js.is-ready .hero-rise {
  animation: riseIn 0.5s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* The résumé pill is centred with transform, so it gets an opacity-only
   entrance and keeps its position. */
.js .hero-fade {
  opacity: 0;
}

.js.is-ready .hero-fade {
  animation: fadeIn var(--dur-3) var(--ease) forwards;
  animation-delay: 180ms;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.hero-line {
  display: block;
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.line-eng { color: var(--indigo); }
.line-lead { color: var(--gold); }
.line-prod { color: var(--ink); }
.line-and { color: var(--ink); }
.line-strat { color: var(--teal); }

.hero-sub {
  max-width: 34rem;
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 550;
  letter-spacing: -0.02em;
}

.hero-sub em {
  font-style: italic;
  font-weight: 500;
}

.em-blue { color: var(--blue); }
.em-gold { color: var(--gold); }
.em-teal { color: var(--teal); }

.chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: box-shadow var(--dur-2) var(--ease-soft), border-color var(--dur-2) var(--ease-soft);
  animation: chipDrift var(--drift-dur, 22s) ease-in-out infinite alternate;
  animation-delay: var(--drift-delay, 0s);
}

.chip:hover {
  border-color: rgba(29, 29, 31, 0.3);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.1);
}

/* Ambient drift uses transform; the JS pointer parallax uses the separate
   `translate` property, so the two motions add up instead of fighting. */
@keyframes chipDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drift-x, 5px), var(--drift-y, -6px), 0); }
}

.chip-tag { --drift-dur: 23s; --drift-x: -5px; --drift-y: 6px; --drift-delay: -6s; }
.chip-hello { --drift-dur: 19s; --drift-x: 6px; --drift-y: -7px; --drift-delay: -2s; }
.chip-place { --drift-dur: 27s; --drift-x: 5px; --drift-y: 5px; --drift-delay: -11s; }
.chip-connect { --drift-dur: 21s; --drift-x: -6px; --drift-y: -5px; --drift-delay: -4s; }
.chip-gmail { --drift-dur: 25s; --drift-x: 4px; --drift-y: -4px; --drift-delay: -8s; }
.chip-dev { --drift-dur: 29s; --drift-x: -4px; --drift-y: -6px; --drift-delay: -14s; }

/* Chips fade in once the headline has started to land. */
.js .chip {
  opacity: 0;
  scale: 0.94;
}

.js.is-ready .chip {
  animation:
    chipDrift var(--drift-dur, 22s) ease-in-out infinite alternate,
    chipIn 0.45s var(--ease) forwards;
  animation-delay: var(--drift-delay, 0s), calc(var(--i, 0) * 40ms + 150ms);
}

@keyframes chipIn {
  to {
    opacity: 1;
    scale: 1;
  }
}

.chip small {
  display: block;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Chips are placed in the headline's side gutters - one band per line - so they
   never cover the letterforms. Keep each chip's vertical band inside the line it
   sits beside (see .hero-line ink bands). The greeting chip is the exception: it
   sits directly above the headline as a kicker. */
.chip-tag {
  top: 3%;
  right: 4%;
  left: auto;
  background: #ede9fe;
  color: #5b21b6;
  border-color: transparent;
  font-size: 0.75rem;
}
.chip-hello { top: -3.4rem; left: 0; }
.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #ececef;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
}
.chip-place { top: 48%; left: 0; right: auto; text-align: left; gap: 5px; }
.chip-flag { margin-left: 2px; font-size: 0.8em; }
.chip-connect { top: 48%; right: 0; }
.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.16);
}
.chip-gmail { top: -3.4rem; right: 0; background: #ece9ff; color: #4c1d95; }
/* Résumé sits centred directly under the hero copy. Absolute, so it does not
   change .hero-stage's height - every chip's top: N% is measured against it. */
.hero-cv {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  display: inline-flex;
  transform: translateX(-50%);
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.chip-aside {
  top: 70%;
  left: 0;
  max-width: 9.5rem;
  white-space: normal;
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 550;
}
.chip-dev {
  top: 70%;
  right: 0;
  left: auto;
  bottom: auto;
  background: var(--blue);
  color: #fff;
  border-color: transparent;
  font-size: 0.72rem;
}

.hero-rail {
  position: absolute;
  right: 24px;
  bottom: 28px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Live readout in the hero rail: local time plus a breathing status dot. */
.rail-readout {
  display: grid;
  gap: 3px;
  text-align: left;
}

.rail-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.rail-live .live {
  width: 6px;
  height: 6px;
}

.socials,
.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transition: background var(--dur-2) var(--ease-soft), color var(--dur-2) var(--ease-soft),
    transform var(--press) var(--ease-soft);
}

/* The glyph is drawn from data-icon so the link's accessible name stays a real
   word ("LinkedIn") instead of the two-letter abbreviation. */
.social::before {
  content: attr(data-icon);
}

/* Keeps the 38px circle but gives it a 44px tap target. */
.social::after {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  content: "";
}

.social:hover {
  background: var(--ink);
  color: #fff;
}

.section {
  padding: 72px 0;
}

.intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
}

.kicker {
  margin-bottom: 12px;
  color: var(--indigo);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker.gold { color: var(--gold); }
.kicker.teal { color: var(--teal); }
.kicker.peach { color: var(--peach); }

.intro h2,
.page-hero h1,
.help-title,
.work-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.accent-green {
  color: #248a3d;
}

.intro-copy {
  display: grid;
  gap: 22px;
  max-width: 34rem;
  color: var(--muted);
}

.rule-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rule-row::before,
.rule-row::after {
  height: 1px;
  flex: 1;
  background: var(--line-strong);
  content: "";
}

.icon-bubble {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  min-height: 46px;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 18px;
  background: #fff;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--ink);
  color: #fff;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-dark:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.what {
  padding-top: 24px;
}

.what-title {
  margin-bottom: 22px;
  color: var(--indigo);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.do-card {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 18%, rgba(94, 92, 230, 0.08), transparent 28%),
    #fafafa;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.do-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.do-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.do-card svg {
  margin-bottom: auto;
}

.c2 { background: radial-gradient(circle at 20% 18%, rgba(0, 113, 227, 0.1), transparent 28%), #fafafa; }
.c3 { background: radial-gradient(circle at 20% 18%, rgba(15, 118, 110, 0.1), transparent 28%), #fafafa; }
.c4 { background: radial-gradient(circle at 20% 18%, rgba(201, 52, 0, 0.1), transparent 28%), #fafafa; }

.skills-head {
  margin-bottom: 28px;
  color: var(--gold);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.skill-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(240px, 0.9fr);
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line-strong);
  padding: 28px 0;
}

.skill-row:last-of-type {
  border-bottom: 1px solid var(--line-strong);
}

.skill-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.skill-name span {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 650;
}

.n1 { color: var(--indigo); }
.n2 { color: var(--gold); }
.n3 { color: var(--teal); }
.n4 { color: #7c3aed; }

.skill-row p {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 0.84rem;
}

.case-head,
.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.case-item,
.project-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line-strong);
  padding: 28px 4px;
  transition: background var(--dur-2) var(--ease-soft), translate var(--dur-2) var(--ease-soft);
}

.case-stat strong,
.project-meta {
  transition: color var(--dur-2) var(--ease-soft);
}

.case-item:hover,
.project-item:hover {
  background: rgba(255, 255, 255, 0.7);
}

.case-item h3,
.project-item h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.04em;
}

.case-item p,
.project-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

.case-stat {
  text-align: right;
}

.case-stat strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.case-stat span,
.project-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.center-btn {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}

.footnote {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.8rem;
}

.site-footer {
  width: min(var(--max), calc(100% - 24px));
  margin: 24px auto 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 28px 18px;
  background: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.9fr;
  gap: 24px;
}

.footer-grid h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.footer-grid a,
.footer-grid p {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

/* 24px minimum tap target for the footer link stacks. */
.footer-grid a {
  padding: 3px 0;
}

.footer-grid a:hover {
  color: var(--ink);
}

.giant-name {
  margin: 28px 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(3.4rem, 16vw, 11rem);
  font-weight: 750;
  letter-spacing: -0.07em;
  line-height: 0.82;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 0.82rem;
}

.footer-base a,
.footer-base span {
  overflow-wrap: anywhere;
}

.page-hero {
  padding: 140px 0 36px;
}

.lede {
  max-width: 46rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.help-list {
  display: grid;
  gap: 0;
}

.help-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line-strong);
  padding: 32px 0;
}

/* Deep links from the project directory must clear the fixed nav bar. */
.help-item[id],
.project-item[id] {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.help-item strong {
  color: var(--indigo);
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.job {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line-strong);
  padding: 28px 0;
}

.job time {
  color: var(--muted);
  font-weight: 650;
}

.job ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.job .tags {
  justify-content: flex-start;
  margin-top: 14px;
}

.study {
  padding: 132px 0 80px;
}

.study-kicker {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.study h1 {
  max-width: 18ch;
  margin: 10px 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.study-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
}

.study-grid .study-kicker {
  margin-top: 24px;
}

.study-grid .tags {
  justify-content: flex-start;
}

.study-grid p + p {
  margin-top: 14px;
}

.outcome-list {
  display: grid;
  gap: 12px;
}

.outcome-list div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.contact-hero h1 {
  max-width: 16ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
}

/* The hidden state above exists only for the no-JS animation. Once script.js
   runs it must explicitly clear it: hiding is then handled by .ts-reveal, which
   is added only when an IntersectionObserver is actually wired up. */
.js .reveal {
  animation: none;
  opacity: 1;
  transform: none;
}

/* Transform only, never opacity: body copy stays at full contrast while it
   slides into place, which also keeps contrast audits honest. */
.ts-reveal .reveal {
  transform: translateY(24px);
  transition: transform var(--dur-3) var(--ease);
}

.ts-reveal .reveal.is-visible {
  transform: none;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* The wordmark is gone, so the nav pill holds the centre of the bar and the
   CTA stays pinned right. Grid, not flex, so the pill sits on the true centre
   line rather than being offset by the CTA's width. */
@media (min-width: 981px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-pill { grid-column: 2; }
  .nav-cta { grid-column: 3; justify-self: end; }
}

@media (max-width: 980px) {
  .nav-pill {
    display: none;
  }

  /* No wordmark on mobile either: menu on the left, contact on the right. */
  .nav-cta {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
    order: -1;
  }

  .intro,
  .skill-row,
  .study-grid,
  .footer-grid,
  .job,
  .help-item {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  /* Chips stop floating and become a wrapping strip above the headline. This
     replaces four hand-tuned per-chip overrides with one rule that cannot
     collide with the letterforms at any width. */
  .chip-layer {
    position: static;
    display: flex;
    max-width: 32rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 22px;
    pointer-events: auto;
  }

  .chip {
    position: static;
    inset: auto;
    transform: none;
    animation: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  }

  .chip-aside {
    display: none;
  }

  .chip-place small { display: none; }

  .tags { justify-content: flex-start; }
  .case-item, .project-item { grid-template-columns: 1fr; }
  .case-stat { text-align: left; }
  .hero-rail { position: static; margin-top: 36px; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .card-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .wrap {
    width: min(var(--max), calc(100% - 28px));
  }

  .chip-tag,
  .chip-dev {
    display: none;
  }

  .do-card {
    min-height: 180px;
  }
}

/* Short laptop viewports: the hero copy and the rail would otherwise crowd the
   centred résumé link, so give the rail a little more room at the bottom. */
@media (max-height: 780px) {
  .hero-rail { bottom: 12px; }
}

/* ---------------------------------------------------------------------------
   Live console - the "pick a lens" panel. Keeps the page feeling like a running
   product instead of a static brochure.
   --------------------------------------------------------------------------- */
.console {
  padding-top: 16px;
}

.console-top {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 18px;
}

.console-top .kicker {
  margin-bottom: 0;
}

.console-top h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.console-panel {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.console-tabs {
  display: grid;
  align-content: start;
  gap: 4px;
}

.console-tab {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  transition: background var(--dur-2) var(--ease-soft), color var(--dur-2) var(--ease-soft),
    transform var(--press) var(--ease-soft);
}

.console-tab::after {
  content: "→";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-2) var(--ease-soft), transform var(--dur-2) var(--ease-soft);
}

.console-tab:hover {
  background: #fff;
  color: var(--ink);
}

.console-tab[aria-selected="true"] {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.console-tab[aria-selected="true"]::after {
  opacity: 1;
  transform: none;
}

.console-pane[hidden] {
  display: none;
}

.console-pane {
  animation: paneIn 0.36s var(--ease) both;
}

@keyframes paneIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.console-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.console-stats li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.console-stats strong {
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.console-stats span {
  color: var(--muted);
  font-size: 0.84rem;
}

.console-log {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.94);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.76rem;
  letter-spacing: 0;
}

.console-log .prompt {
  margin-right: 8px;
  color: #9ae6b4;
}

.console-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  flex: none;
  margin-left: 3px;
  background: currentColor;
  animation: caret 1.05s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

/* ---------------------------------------------------------------------------
   Marquee - a continuous keyword band under the hero.
   --------------------------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  flex: none;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  animation: marquee 46s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  white-space: nowrap;
}

.marquee-track .sep {
  color: var(--indigo);
}

@keyframes marquee {
  to { transform: translate3d(-100%, 0, 0); }
}

/* ---------------------------------------------------------------------------
   Interaction layer: press physics, live indicators, scroll instruments.
   --------------------------------------------------------------------------- */
/* Tactile press - the surface sinks and the shadow tightens (HUD's trick,
   adapted to this palette's soft shadows). */
:is(.btn, .social, .hero-cv, .nav-cta, .menu-toggle, .tag, .console-tab):active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.live {
  position: relative;
}

.live::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(52, 199, 89, 0.55);
  border-radius: 50%;
  content: "";
  animation: livePulse 2.8s var(--ease-soft) infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.55); opacity: 0.9; }
  70%, 100% { transform: scale(1.65); opacity: 0; }
}

/* Injected by script.js; purely decorative instrumentation. */
.scroll-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--indigo), var(--blue), var(--teal));
  pointer-events: none;
}

/* Rows nudge toward you on hover; touch devices get press feedback instead. */
@media (hover: hover) {
  .case-item:hover,
  .project-item:hover {
    translate: 6px 0;
  }

  .case-item:hover .case-stat strong,
  .project-item:hover .project-meta {
    color: var(--ink);
  }
}

@media (hover: none) {
  .case-item:active,
  .project-item:active {
    background: #fff;
  }
}

/* Off-screen sections skip layout and paint entirely. */
@supports (content-visibility: auto) {
  .section {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
  }
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* Cross-document view transitions: page changes cross-fade and the nav pill
   stays put, so navigation reads as continuous rather than a reload. */
@view-transition {
  navigation: auto;
}

.nav-pill {
  view-transition-name: nav-pill;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

@media (max-width: 980px) {
  .console-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .console-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .console-tab::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .console-stats {
    grid-template-columns: 1fr;
  }

  .hero-glow {
    filter: blur(34px);
    opacity: 0.7;
  }
}

/* Everything above is decoration: with reduced motion on, all of it collapses
   back to the static layout, and no state is left invisible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .js .reveal,
  .js .hero-rise,
  .js .hero-fade,
  .js .chip,
  .mobile-menu a {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    scale: 1 !important;
    translate: none !important;
  }

  .hero-glow,
  .marquee-track,
  .console-caret,
  .live::after {
    animation: none !important;
  }

  .marquee-track {
    transform: none !important;
  }
}
