:root {
  /* dark theme (default) */
  --bg: #08090d;
  --bg-rgb: 8 9 13;
  --ink: #f4f1ee;
  --ink-rgb: 244 241 238;
  --hi-rgb: 255 255 255;   /* glass fills and hairlines */
  --muted: rgb(var(--ink-rgb) / 0.55);
  --soft: rgb(var(--ink-rgb) / .75);   /* body copy one step quieter than --ink */
  --accent: #b9c8ff;
  --accent-2: #7f9bff;
  --chip-ink: #cfdcff;
  --glow: #16295e;      /* navy backdrop light */
  color-scheme: dark;
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip, not hidden: keeps the window as the scroller for Lenis */
}
a { color: inherit; text-decoration: none; }

/* ---------- Liquid glass ---------- */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: 999px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, .35),
    0 2px 6px rgba(0, 0, 0, .25);
}
.glass > [class^="glass__"] {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
/* blur + refraction of whatever sits behind */
.glass__refract {
  z-index: -3;
  -webkit-backdrop-filter: blur(10px) saturate(170%);
          backdrop-filter: blur(10px) saturate(170%);
  overflow: hidden;
}
/* Chromium can also bend the backdrop through the SVG filter */
@supports (backdrop-filter: url(#liquid-glass)) {
  .glass__refract { backdrop-filter: blur(4px) saturate(170%) url(#liquid-glass); }
}
.glass__tint {
  z-index: -2;
  background:
    linear-gradient(180deg, rgb(var(--hi-rgb) / .14), rgb(var(--hi-rgb) / .04) 55%, rgb(var(--hi-rgb) / .08));
}
/* specular edges: bright top-left rim, faint bottom-right rim */
.glass__shine {
  z-index: -1;
  box-shadow:
    inset 1.5px 1.5px 1px rgb(var(--hi-rgb) / .45),
    inset -1px -1px 1px rgb(var(--hi-rgb) / .18),
    inset 0 0 18px rgb(var(--hi-rgb) / .06);
}
.glass__shine::before {
  /* curved highlight across the top of the pill */
  content: "";
  position: absolute;
  inset: 1px 8% 55% 8%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(var(--hi-rgb) / .22), transparent);
  filter: blur(1px);
}

/* ---------- Floating nav ---------- */
.nav-wrap {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* logo | links (true centre) | actions */
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100vw - 32px));
  padding: 7px; /* even on both sides so the links sit in the true centre */
  animation: drop .9s .1s var(--ease) both;
  transition: padding .35s var(--ease), gap .35s var(--ease);
}
.nav.is-scrolled { padding: 5px; gap: 20px; }

/* ---------- Nav intro: empty pill → progress fill → full navbar ---------- */
.nav.is-intro { overflow: hidden; }

/* rise from the centre with a soft glide, stretch open with a gentle overshoot */
.nav-wrap { transition: transform 1.1s cubic-bezier(.7, 0, .2, 1); }
.nav-wrap.is-intro { transform: translateY(var(--intro-y, 0)); }
.nav.is-expanding { transition: width 1.15s .12s cubic-bezier(.3, 1.25, .45, 1); }

/* satisfying "click" when the bar hits 100% */
.nav.is-full { animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.045, .9); }
  70%  { transform: scale(.99, 1.03); }
  100% { transform: scale(1); }
}

/* content blurs + floats in, one piece after another */
.nav__logo, .nav__links a, .nav__cta, .nav__menu, .nav__theme, .nav__resume {
  transition:
    opacity .7s var(--ease) var(--d, 0s),
    transform .7s var(--ease) var(--d, 0s),
    filter .7s var(--ease) var(--d, 0s),
    color .25s;
}
.nav.is-intro :is(.nav__logo, .nav__links a, .nav__cta, .nav__menu, .nav__theme, .nav__resume) {
  opacity: 0;
  transform: translateY(10px) scale(.96);
  filter: blur(6px);
  transition-delay: 0s;
}
.nav__links a:nth-of-type(1) { --d: .06s; }
.nav__links a:nth-of-type(2) { --d: .12s; }
.nav__links a:nth-of-type(3) { --d: .18s; }
.nav__links a:nth-of-type(4) { --d: .24s; }
.nav__cta, .nav__menu, .nav__theme, .nav__resume { --d: .32s; }

.nav__progress {
  position: absolute;
  left: 5px; right: 5px; top: 5px; bottom: 5px;
  z-index: -1;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(var(--hi-rgb) / .05), rgba(226, 234, 255, .32));
  box-shadow: inset 1px 1px 1px rgb(var(--hi-rgb) / .4);
  clip-path: inset(0 100% 0 0 round 999px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease), filter .4s;
}
/* light sweeping across the fill */
.nav__progress::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgb(var(--hi-rgb) / .35), transparent);
  animation: sweep 1.3s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes sweep { from { transform: translateX(-120%); } to { transform: translateX(260%); } }
.nav.is-intro .nav__progress { opacity: 1; }
.nav.is-full .nav__progress { filter: brightness(1.6); }
.nav.is-expanding .nav__progress { opacity: 0; }

.nav__logo {
  padding-left: 19px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.nav__links { position: relative; display: flex; gap: 2px; }
.nav__links a {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--soft);
  transition: color .25s;
}
.nav__links a:hover { color: var(--ink); }
/* letter-by-letter swap on hover */
.swap {
  display: inline-flex;
  overflow: hidden;
  height: 1.3em;
  line-height: 1.3;
  vertical-align: middle;
}
.swap > span {
  display: inline-block;
  text-shadow: 0 1.3em 0 currentColor;
  transition: transform .5s cubic-bezier(.7, 0, .2, 1) calc(var(--i) * 22ms);
}
[data-swap]:hover .swap > span { transform: translateY(-1.3em); }

/* small glass droplet that follows the hover */
.nav__blob {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(var(--hi-rgb) / .16), rgb(var(--hi-rgb) / .05));
  box-shadow: inset 1px 1px 1px rgb(var(--hi-rgb) / .35), inset -1px -1px 1px rgb(var(--hi-rgb) / .1);
  opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s;
}
.nav__blob.is-on { opacity: 1; }

.nav__cta {
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(70, 110, 230, .3); }

.nav__menu {
  display: none;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgb(var(--hi-rgb) / .1);
  box-shadow: inset 1px 1px 1px rgb(var(--hi-rgb) / .3);
  cursor: pointer;
  position: relative;
}
.nav__menu span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav__menu span:first-child { top: 16px; }
.nav__menu span:last-child { top: 23px; }
.nav.is-open .nav__menu span:first-child { top: 19.5px; transform: rotate(45deg); }
.nav.is-open .nav__menu span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}

/* Studio lights */
.light { position: absolute; pointer-events: none; z-index: 0; }
.light--back {
  /* backdrop light: soft navy pool behind the subject */
  inset: -15%; /* oversized so it can drift with the mouse */
  background:
    radial-gradient(ellipse 29% 42% at 50% 56%, color-mix(in srgb, var(--glow) 95%, transparent), transparent 70%),
    radial-gradient(ellipse 54% 62% at 50% 65%, rgba(16, 30, 78, .55), transparent 75%);
}
.light--key {
  /* faint top-left softbox spill */
  inset: -20% auto auto -10%;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(190, 210, 255, .06), transparent 60%);
}

.hero__name {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 17.5vh;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 400;
  line-height: .8;
  white-space: nowrap;
  letter-spacing: .005em;
  color: var(--ink);
}
/* hidden until the nav intro finishes; motion.js then rolls the letters in */
body:not(.is-ready) .hero__name { visibility: hidden; }

/* masked letters for split-text reveals */
.char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em; /* room for the Q tail */
  margin-bottom: -.12em;
}
.char__in { display: inline-block; will-change: transform; }

/* Film grain over the background */
.grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(.96); } }

/* ---------- Tablet / Mobile ---------- */
@media (max-width: 900px) {
  .nav {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0;
    padding: 6px 6px 6px 20px;
    border-radius: 26px;
    transition: border-radius .35s var(--ease);
  }
  .nav.is-scrolled { padding: 6px 6px 6px 20px; gap: 0; }
  .nav__cta { display: none; }
  .nav__menu { display: block; }
  .nav__links {
    order: 3;
    width: 100%;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .45s var(--ease), opacity .3s, padding .45s var(--ease);
  }
  .nav__links a { padding: 14px 0; font-size: 13px; border-top: 1px solid rgb(var(--hi-rgb) / .08); }
  .nav__blob { display: none; }
  .nav.is-open .nav__links { max-height: 320px; opacity: 1; padding: 10px 14px 8px 0; }
  /* thicker, darker glass while the menu is open */
  .nav.is-open .glass__refract { -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); }
  .nav.is-open .glass__tint { background: linear-gradient(180deg, rgba(18, 26, 52, .9), rgba(8, 10, 20, .95)); }

  .hero__name { top: 16vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Smooth scroll (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Selected Work ---------- */
.work {
  position: relative;
  padding: 18vh 6vw 16vh;
}
.work__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 24px;
  margin-bottom: 7vh;
}
.work__label, .work__meta {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.work__label { grid-column: 1 / -1; margin-bottom: 18px; }
.work__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 13vw, 240px);
  line-height: .85;
  white-space: nowrap;
}
.work__meta { padding-bottom: 1.2vw; }

.work__list { list-style: none; }
.project { position: relative; transition: opacity .45s var(--ease); }
/* dim the rest of the list while one row is hovered */
.work__list:hover .project:not(:hover) { opacity: .32; }

.project__link {
  display: grid;
  grid-template-columns: 7% 1fr 26% 7% 40px;
  align-items: center;
  gap: 16px;
  padding: 3.4vh 0;
}
.project__num,
.project__year {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--muted);
}
.project__name {
  font-family: var(--display);
  font-size: clamp(42px, 6.2vw, 116px);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .7s var(--ease);
}
.project__link:hover .project__name { transform: translateX(1.6vw); }

.project__info { display: grid; gap: 6px; }
.project__type {
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.project__result {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--chip-ink);
  background: rgba(90, 130, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(140, 170, 255, .25);
}
.project__arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .25);
  transition: transform .6s var(--ease), background .35s, color .35s;
}
.project__link:hover .project__arrow { transform: rotate(45deg); background: var(--ink); color: var(--bg); }

/* row divider: grows in on scroll, brightens on hover */
.project__line {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgb(var(--ink-rgb) / .18);
  transform-origin: left;
}
.project__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease);
}
.project:hover .project__line::after { transform: scaleX(1); }

/* ---------- Floating cover preview (desktop, fine pointer only) ---------- */
.preview {
  position: fixed;
  left: 0; top: 0;
  z-index: 40;
  width: clamp(260px, 24vw, 420px);
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.preview__strip { height: 100%; }
.preview__slide {
  height: 100%;
  background: var(--cover);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .08);
}
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .preview { display: none; }
}

/* ---------- Work on tablet / phone: cover shown inline ---------- */
@media (max-width: 900px) {
  .work { padding: 14vh 16px 12vh; }
  .work__head { grid-template-columns: 1fr; }
  .work__meta { padding-bottom: 0; }
  .project__link {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "cover cover cover"
      "num   name  arrow"
      "info  info  year";
    gap: 12px 14px;
    padding: 28px 0;
  }
  .project__link::before {
    content: "";
    grid-area: cover;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: var(--cover);
  }
  .project__num { grid-area: num; }
  .project__name { grid-area: name; font-size: clamp(36px, 11vw, 64px); white-space: normal; }
  .project__arrow { grid-area: arrow; }
  .project__info { grid-area: info; }
  .project__year { grid-area: year; align-self: end; }
  .work__list:hover .project:not(:hover) { opacity: 1; }
}

/* soft fade so the navy glow melts into the next section */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28vh;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--tone, var(--bg)));
  transition: background 1.2s var(--ease);
}

/* visually hidden, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* ---------- Shared section bits ---------- */
.section-label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 10vw, 180px);
  line-height: .85;
  white-space: nowrap;
}
/* italic serif accent words mixed into the sans copy */
:is(.hero__statement, .about__text, .contact__title) em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: 0;
  color: var(--accent);
}
/* masked words for reveals */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.word__in { display: inline-block; will-change: transform; }

/* hover the whole control, not just the word, to roll the letters */
:is(.project__link, .contact__btn):hover .swap > span { transform: translateY(-1.3em); }

@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drop-arrow { 0% { transform: none; } 45% { transform: translateY(160%); } 46% { transform: translateY(-160%); } 100% { transform: none; } }

/* ---------- Hero: statement, spinning badge, glass info bar ---------- */
.hero__info { z-index: 5; }
body:not(.is-ready) .hero__info { visibility: hidden; }

.hero__statement {
  position: absolute;
  left: 6vw;
  bottom: calc(5vh + 110px);
  max-width: min(640px, 48vw);
  font-size: clamp(26px, 2.6vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
}

.badge {
  position: absolute;
  right: 6vw;
  bottom: calc(5vh + 104px);
  display: grid;
  place-items: center;
  width: clamp(120px, 9.5vw, 160px);
  aspect-ratio: 1;
}
.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}
.badge__ring text {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .18em;
  fill: currentColor;
}
.badge__core {
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  transition: transform .5s var(--ease), background .4s;
}
.badge:hover .badge__core { transform: scale(1.12); background: var(--accent); }
.badge:hover .badge__core svg { animation: drop-arrow .7s var(--ease); }

.bar {
  position: absolute;
  left: 6vw;
  right: 6vw;
  bottom: 5vh;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  align-items: center;
  padding: 12px 12px 12px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(var(--hi-rgb) / .07), rgb(var(--hi-rgb) / .025));
  box-shadow:
    inset 1px 1px 1px rgb(var(--hi-rgb) / .2),
    inset 0 0 0 1px rgb(var(--hi-rgb) / .07),
    0 20px 50px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
}
.bar__cell { display: grid; gap: 3px; font-size: 14px; }
.bar__cell + .bar__cell { padding-left: 24px; border-left: 1px solid rgb(var(--hi-rgb) / .09); }
.bar__label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* rolling job title */
.ticker { display: block; height: 1.4em; line-height: 1.4; overflow: hidden; }
.ticker__list { display: flex; flex-direction: column; animation: ticker 9s var(--ease) infinite; }
@keyframes ticker {
  0%, 28%   { transform: translateY(0); }
  33%, 61%  { transform: translateY(-1.4em); }
  66%, 94%  { transform: translateY(-2.8em); }
  100%      { transform: translateY(-4.2em); }
}

.status { display: inline-flex; align-items: center; gap: 9px; }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}

.bar__socials { display: flex; gap: 8px; justify-self: end; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgb(var(--hi-rgb) / .07);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .12);
  transition: background .3s, color .3s;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); }

/* ---------- About ---------- */
.about { padding: 11vh 6vw 12vh; }
.about__grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) 1.45fr;
  gap: 6vw;
  align-items: start;
  margin-top: 4vh;
}
.about__portrait { position: sticky; top: 14vh; }
.about__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #1d3478, #0b0f1f 75%);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .08);
}
.about__frame img { display: block; width: 100%; height: 118%; object-fit: cover; }
.about__placeholder { display: none; }
.about__portrait.is-missing img { display: none; }
.about__portrait.is-missing .about__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-bottom: 12%;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.about__placeholder code { color: var(--ink); font-size: 12px; }
.about__portrait figcaption {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.about__text {
  font-size: clamp(26px, 2.7vw, 48px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.015em;
}
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8vh;
  padding-top: 4vh;
  border-top: 1px solid rgb(var(--ink-rgb) / .14);
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 110px);
  line-height: .9;
}
.stats li > span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee {
  width: 104%;
  margin-left: -2%;
  padding: 5vh 0;
  overflow: hidden;
  transform: rotate(-2deg);
  border-block: 1px solid rgb(var(--ink-rgb) / .1);
  background: linear-gradient(90deg, rgba(22, 41, 94, .25), rgba(22, 41, 94, .05), rgba(22, 41, 94, .25));
}
.marquee__row { display: flex; white-space: nowrap; }
.marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 3vw;
  padding-right: 3vw;
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 140px);
  line-height: 1.05;
  text-transform: uppercase;
}
.marquee__track i { font-style: normal; font-size: .38em; color: var(--accent-2); }
.marquee__row--outline .marquee__track { color: transparent; -webkit-text-stroke: 1px rgb(var(--ink-rgb) / .45); }
.marquee__row--outline .marquee__track i { -webkit-text-stroke: 0; color: rgba(127, 155, 255, .6); }

/* ---------- Services ---------- */
.services { position: relative; }
.services__pin {
  min-height: 100vh;
  padding: 14vh 0 10vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.services__head { padding: 0 6vw; margin-bottom: 6vh; }
.services__track { display: flex; gap: 2vw; width: max-content; padding: 0 6vw; }
.service {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: clamp(300px, 30vw, 460px);
  min-height: 440px;
  padding: 34px;
  border-radius: 24px;
  overflow: hidden;
  background: rgb(var(--hi-rgb) / .035);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .08);
  transition: box-shadow .4s, transform .6s var(--ease);
}
/* spotlight that follows the cursor inside the card */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(80, 120, 255, .22), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
}
.service:hover::before { opacity: 1; }
.service:hover { box-shadow: inset 0 0 0 1px rgba(140, 170, 255, .35); transform: translateY(-6px); }
.service__num { font-family: var(--display); font-size: 20px; color: var(--muted); }
.service__title {
  margin-top: auto;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 3vw, 54px);
  line-height: .95;
}
.service__text { margin: 16px 0 24px; font-size: 15px; line-height: 1.6; color: var(--soft); }
.service__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.service__tags li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgb(var(--hi-rgb) / .06);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .1);
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6vw;
  padding: 16vh 6vw;
}
.process__head { position: sticky; top: 16vh; align-self: start; }
.process__intro { max-width: 380px; margin-top: 28px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.process__list { position: relative; padding-left: 44px; }
.process__rail { position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: rgb(var(--ink-rgb) / .14); }
.process__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--accent-2), var(--ink));
  transform-origin: top;
  transform: scaleY(0);
}
.process__steps { list-style: none; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 6vh 0;
  border-bottom: 1px solid rgb(var(--ink-rgb) / .1);
}
/* node on the rail */
.step::before {
  content: "";
  position: absolute;
  left: -44px;
  top: calc(6vh + 20px);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgb(var(--ink-rgb) / .4);
  transition: background .5s, box-shadow .5s;
}
.step.is-active::before { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(127, 155, 255, .2), 0 0 18px rgba(127, 155, 255, .6); }
.step__num {
  font-family: var(--display);
  font-size: 64px;
  line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--ink-rgb) / .45);
  transition: color .6s, -webkit-text-stroke-color .6s;
}
.step.is-active .step__num { color: var(--ink); -webkit-text-stroke-color: transparent; }
.step h3 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 3.4vw, 60px); line-height: 1; }
.step p { max-width: 440px; margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Phone / tablet ---------- */
@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 20px;
    padding: 0 16px 4vh;
  }
  .hero__statement, .badge, .bar { position: relative; left: auto; right: auto; bottom: auto; }
  .hero__statement { max-width: none; font-size: clamp(24px, 7vw, 34px); }
  .badge { align-self: flex-end; width: 100px; margin-top: -6px; }
  .bar { grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 18px; border-radius: 22px; }
  .bar__cell + .bar__cell { padding-left: 0; border-left: 0; }
  .bar__socials { grid-column: 1 / -1; justify-self: start; }

  .about { padding: 12vh 16px 8vh; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__portrait { position: relative; top: auto; max-width: 420px; }
  .stats { gap: 12px; }
  .stats strong { font-size: 48px; }

  .services__pin { min-height: 0; padding: 12vh 0 6vh; }
  .services__head { padding: 0 16px; }
  .services__track { flex-direction: column; width: auto; gap: 14px; padding: 0 16px; }
  .service { width: auto; min-height: 300px; padding: 26px; }

  .process { grid-template-columns: 1fr; padding: 12vh 16px; }
  .process__head { position: relative; top: auto; }

  .section-title { font-size: clamp(56px, 16vw, 96px); }
}

/* ---------- Liquid light shader ---------- */
.hero__gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* the shader replaces the CSS lights when WebGL is available */
.hero.has-gl .light { display: none; }

/* ---------- Scroll progress inside the glass nav ---------- */
.nav__scroll {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 2px;
  height: 1.5px;
  z-index: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(127, 155, 255, .2), var(--accent));
  box-shadow: 0 0 10px rgba(127, 155, 255, .6);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  pointer-events: none;
}
.nav.is-intro .nav__scroll { opacity: 0; }

/* ---------- Name reacts to the cursor (motion.js sets --f per letter) ---------- */
.hero__name .char { --f: 0; transform-origin: 50% 100%; }
.hero__name .char__in { color: color-mix(in srgb, var(--accent) calc(var(--f) * 100%), var(--ink)); }

/* ---------- Colour journey: body tone shifts per section ---------- */
body { transition: background-color 1.2s var(--ease); }

/* ---------- Portrait: studio grade + key light ---------- */
.about__frame img {
  object-position: 50% 12%;
  filter: contrast(1.06) saturate(.92) brightness(.96);
  transition: transform 1.2s var(--ease), filter .8s;
}
.about__frame:hover img { transform: scale(1.04); filter: contrast(1.08) saturate(1) brightness(1); }
.about__light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 28% 16%, rgba(255, 240, 230, .16), transparent 60%),
    linear-gradient(to top, rgb(var(--bg-rgb) / .92), rgb(var(--bg-rgb) / .2) 32%, transparent 50%),
    linear-gradient(160deg, rgba(40, 70, 180, .28), rgba(10, 14, 40, .4));
  mix-blend-mode: normal;
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .08), inset 0 0 80px rgb(var(--bg-rgb) / .6);
}
.about__portrait.is-missing .about__light { display: none; }

/* ---------- Avatar in the hero bar ---------- */
.bar__cell--me:has(.bar__avatar) { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.bar__cell--me:has(.bar__avatar) > :not(.bar__avatar) { grid-column: 2; }
.bar__avatar {
  grid-row: 1 / 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 15%;
  box-shadow: 0 0 0 2px rgba(127, 155, 255, .55), 0 0 16px rgba(127, 155, 255, .35);
}

/* ---------- Contact finale ---------- */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20vh 6vw 0;
  text-align: center;
}
/* slowly turning orb of light behind everything; motion.js nudges it toward the cursor */
.contact__glow {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: -2;
  width: min(1100px, 90vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #1d3aa8, #6a4bd6, #0b1a4a, #2c5cff, #1d3aa8);
  filter: blur(110px);
  opacity: .5;
  animation: spin 28s linear infinite;
}
/* faint dot grid that fades out toward the edges */
.contact__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgb(var(--hi-rgb) / .09) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
          mask: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
}
.contact__stage { position: relative; display: grid; justify-items: center; }

.contact__title { display: grid; justify-items: center; gap: 1.2vw; font-weight: 400; margin: 2vh 0 6vh; }
.contact__line {
  display: inline-flex;
  align-items: center;
  gap: .18em;
  font-family: var(--display);
  font-size: clamp(64px, 10.5vw, 196px);
  line-height: .86;
  white-space: nowrap;
}
/* your face set into the headline as a pill */
.contact__face {
  display: inline-block;
  width: 1.55em;
  height: .8em;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 0 0 .03em rgba(185, 200, 255, .5), 0 .1em .4em rgba(44, 92, 255, .35);
  transform: rotate(-4deg);
  transition: transform .8s var(--ease);
}
.contact__face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform 1s var(--ease); }
.contact__line:hover .contact__face { transform: rotate(3deg) scale(1.06); }
.contact__line:hover .contact__face img { transform: scale(1.12); }
.contact__sub {
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 84px);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: rgb(var(--ink-rgb) / .9);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 9vh;
}
/* big glass pill: click to copy the email */
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 18px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: clamp(18px, 1.6vw, 26px);
  color: var(--ink);
  background: linear-gradient(180deg, rgb(var(--hi-rgb) / .1), rgb(var(--hi-rgb) / .03));
  box-shadow:
    inset 1px 1px 1px rgb(var(--hi-rgb) / .25),
    inset 0 0 0 1px rgb(var(--hi-rgb) / .08),
    0 20px 60px rgba(10, 20, 70, .5);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
          backdrop-filter: blur(16px) saturate(160%);
}
.contact__email-hint {
  position: relative;
  display: grid;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgb(var(--hi-rgb) / .1);
}
.contact__email-hint > span { grid-area: 1 / 1; align-self: center; transition: transform .5s var(--ease); }
.contact__email-done { transform: translateY(160%); color: #4ade80; }
.contact__email.is-copied .contact__email-copy { transform: translateY(-160%); }
.contact__email.is-copied .contact__email-done { transform: none; }
.contact__email:hover .contact__email-hint { background: rgb(var(--hi-rgb) / .18); }

.contact__btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 30px;
  height: 76px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, #3b63ff, #6a4bd6);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 18px 50px rgba(59, 99, 255, .45);
  transition: color .5s;
}
.contact__btn-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.contact__btn-arrow { font-size: 20px; transition: transform .6s var(--ease); }
.contact__btn:hover { color: var(--bg); }
.contact__btn:hover .contact__btn-fill { transform: translateY(0); }
.contact__btn:hover .contact__btn-arrow { transform: rotate(45deg); }

/* three quick-contact glass cards */
.contact__cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  gap: 14px;
  justify-content: center;
  width: 100%;
  margin-bottom: 14vh;
}
.ccard {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 20px 22px;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  background: rgb(var(--hi-rgb) / .04);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .08);
  transition: transform .6s var(--ease), box-shadow .4s;
}
.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(80, 120, 255, .25), transparent 65%);
  opacity: 0;
  transition: opacity .4s;
}
.ccard:hover::before { opacity: 1; }
.ccard:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(140, 170, 255, .35); }
.ccard__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ccard__value { grid-column: 1; font-size: 17px; }
.ccard__arrow { grid-row: 1 / 3; grid-column: 2; align-self: center; transition: transform .5s var(--ease); }
.ccard:hover .ccard__arrow { transform: rotate(45deg); }

.contact__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 3vh 0;
  border-top: 1px solid rgb(var(--ink-rgb) / .12);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.contact__links { list-style: none; display: flex; gap: 28px; }
.contact__copy { color: var(--muted); }
.contact__giant {
  margin-bottom: -4.5vw;
  font-family: var(--display);
  font-size: 27vw;
  line-height: .78;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--ink-rgb) / .2);
  user-select: none;
}
.contact__giant .char__in { transition: color .5s var(--ease); }
.contact__giant .char:hover .char__in { color: var(--accent-2); }

@media (max-width: 900px) {
  .contact { padding: 14vh 16px 0; }
  .contact__line { font-size: clamp(48px, 15vw, 84px); }
  .contact__email { gap: 10px; font-size: 15px; padding: 12px 12px 12px 18px; max-width: 100%; }
  .contact__email-text { overflow: hidden; text-overflow: ellipsis; }
  .contact__email-hint { height: 32px; padding: 0 12px; font-size: 11px; }
  .contact__btn { height: 64px; }
  .contact__cards { grid-template-columns: 1fr; }
  .contact__bottom { flex-direction: column; align-items: flex-start; }
  .contact__links { flex-wrap: wrap; gap: 18px; }
}

/* ---------- Hero cut-out portrait: the depth layer in front of the name ---------- */
.hero__me {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  height: 82vh;
  aspect-ratio: 761 / 1099;
  translate: -50% 0; /* `translate`, not transform: GSAP owns transform for the parallax */
  pointer-events: none;
}
body:not(.is-ready) .hero__me { visibility: hidden; }
.hero__me img {
  display: block;
  width: 100%;
  height: 100%;
  /* cool rim light hugging the silhouette, plus a soft navy spill behind */
  filter:
    contrast(1.05) brightness(.95)
    drop-shadow(0 0 1px rgba(170, 190, 255, .6))
    drop-shadow(-12px -6px 28px rgba(70, 110, 255, .3));
  -webkit-mask: linear-gradient(to bottom, #000 70%, transparent 98%);
          mask: linear-gradient(to bottom, #000 70%, transparent 98%);
}
/* key light from the upper left + navy grade, clipped to the silhouette */
.hero__me-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 38% at 34% 16%, rgba(200, 215, 255, .45), transparent 65%),
    linear-gradient(100deg, rgba(60, 100, 255, .3), transparent 45%, rgba(5, 8, 20, .55));
  mix-blend-mode: soft-light;
  -webkit-mask: url("assets/me-cutout.webp") center / 100% 100% no-repeat;
          mask: url("assets/me-cutout.webp") center / 100% 100% no-repeat;
}

/* keep the side copy clear of the portrait */
/* stop the statement where the portrait (82vh tall, ~0.69 wide) begins */
.hero__statement { max-width: max(300px, calc(44vw - 28.5vh - 28px)); font-size: clamp(22px, 2vw, 36px); text-wrap: balance; }

@media (max-width: 900px) {
  /* phones: name, then the photo with the face fully clear, then the copy
     overlapping only the jacket. The hero grows taller than the screen if needed. */
  .hero { height: auto; min-height: 100vh; justify-content: flex-start; padding-top: calc(16vh + 16vw + 18px); }
  .hero__me {
    position: relative;
    left: auto; top: auto; bottom: auto;
    translate: none;
    align-self: center;
    height: 50vh;
    margin-bottom: -17vh; /* the statement slides up over the lower jacket, below the chin */
  }
  /* on narrow screens the name sits in front so it stays readable */
  .hero__name { z-index: 3; text-shadow: 0 6px 30px rgba(5, 8, 20, .45); }
  .hero__statement { max-width: none; font-size: clamp(24px, 7vw, 34px); }
}

/* ---------- Experience timeline ---------- */
.exp { padding: 16vh 6vw 12vh; }
.exp__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 6vw;
  margin-bottom: 7vh;
}
.exp__head .section-label { grid-column: 1 / -1; }
.exp__intro { max-width: 360px; padding-bottom: 1.2vw; font-size: 16px; line-height: 1.6; color: var(--muted); }

.exp__list { list-style: none; border-top: 1px solid rgb(var(--ink-rgb) / .14); }
.job { border-bottom: 1px solid rgb(var(--ink-rgb) / .14); }
.job__row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 17% 1fr 24% 48px;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 3.4vh 1.4vw;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
/* light sweeps across the row on hover */
.job__row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(44, 92, 255, .28), rgba(106, 75, 214, .18) 60%, transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path .8s var(--ease);
}
.job__row:hover::before,
.job.is-open .job__row::before { clip-path: inset(0 0 0 0); }
.job__row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }

.job__period {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.job__role {
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 82px);
  line-height: 1;
  text-transform: uppercase;
  transition: transform .7s var(--ease), color .4s;
}
.job__row:hover .job__role { transform: translateX(1vw); }
.job__company { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; }
.job__logo {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 18px;
  background: linear-gradient(135deg, #2c5cff, #6a4bd6);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .2);
}
/* plus that turns into a cross */
.job__toggle {
  position: relative;
  justify-self: end;
  width: 44px; height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / .25);
  transition: transform .6s var(--ease), background .35s;
}
.job__toggle::before, .job__toggle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.5px;
  background: currentColor;
  translate: -50% -50%;
}
.job__toggle::after { rotate: 90deg; }
.job.is-open .job__toggle { transform: rotate(45deg); background: var(--ink); color: var(--bg); }

/* smooth expand: animate the grid row from 0fr to 1fr */
.job__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .7s var(--ease);
}
.job.is-open .job__panel { grid-template-rows: 1fr; }
.job__panel-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 17% 1fr 24% 48px;
  gap: 20px;
  padding: 0 1.4vw;
}
.job__panel-inner > * { grid-column: 2 / 4; }
.job__panel p {
  max-width: 640px;
  padding-top: 4px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s, transform .7s var(--ease);
}
.job__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 4vh; }
.job__tags li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgb(var(--hi-rgb) / .06);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .1);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s, transform .7s var(--ease);
}
.job.is-open .job__panel p,
.job.is-open .job__tags li { opacity: 1; transform: none; transition-delay: .15s; }
.job.is-open .job__tags li:nth-child(2) { transition-delay: .2s; }
.job.is-open .job__tags li:nth-child(3) { transition-delay: .25s; }

@media (max-width: 900px) {
  .exp { padding: 12vh 16px 8vh; }
  .exp__head { grid-template-columns: 1fr; }
  .exp__intro { padding-bottom: 0; }
  .job__row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "period toggle" "role role" "company company";
    gap: 10px;
    padding: 24px 4px;
  }
  .job__period { grid-area: period; }
  .job__toggle { grid-area: toggle; }
  .job__role { grid-area: role; font-size: clamp(32px, 10vw, 52px); }
  .job__company { grid-area: company; }
  .job__panel-inner { grid-template-columns: 1fr; padding: 0 4px; }
  .job__panel-inner > * { grid-column: 1; }
}

/* "All projects on Behance" link in the work header */
a.work__meta { transition: color .3s; }
a.work__meta:hover { color: var(--ink); }

/* ---------- Page-to-page curtain (site.js) ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 110%, #2c4fd6, #0c1436 55%, #07080c);
  transform: translateY(100%);
}
.curtain.is-enter { transform: translateY(0); transition: transform .65s cubic-bezier(.76, 0, .24, 1); pointer-events: auto; }
.curtain.is-in { transform: translateY(0); }
.curtain.is-in.is-out { transform: translateY(-100%); transition: transform .9s cubic-bezier(.76, 0, .24, 1) .05s; }
.curtain__label {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 96px);
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s .2s, transform .6s var(--ease) .2s;
}
.curtain.is-enter .curtain__label, .curtain.is-in:not(.is-out) .curtain__label { opacity: 1; transform: none; }

/* ---------- Current page in the nav ---------- */
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px; height: 4px;
  border-radius: 50%;
  translate: -50% 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-2);
}

/* ---------- "See more" links from homepage sections to detailed pages ---------- */
.section-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 6vh;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgb(var(--hi-rgb) / .05);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .12);
  transition: background .35s, box-shadow .35s;
}
.section-more__arrow { display: inline-block; transition: transform .5s var(--ease); }
.section-more:hover { background: rgba(80, 120, 255, .16); box-shadow: inset 0 0 0 1px rgba(140, 170, 255, .4); }
.section-more:hover .section-more__arrow { transform: translateX(6px); }
.section-more:hover .swap > span { transform: translateY(-1.3em); }
.services__head .section-more { margin-top: 3vh; }

/* footer without the big call to action (contact page) */
.contact--bare { padding-top: 8vh; }

/* five stats in a row: slightly smaller numbers so they fit */
.stats--5 { grid-template-columns: repeat(5, 1fr); gap: 20px; }
.stats--5 strong { font-size: clamp(44px, 4.4vw, 84px); }
@media (max-width: 900px) {
  .stats--5 { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}

@media (max-width: 900px) {
  /* long section titles wrap on phones instead of running off-screen */
  .section-title { white-space: normal; }
  /* let the project name/info column shrink so the arrow stays on screen */
  .project__link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .project__type { overflow-wrap: anywhere; }
  .project__year { white-space: nowrap; }
}

/* clips the tilted marquee's extra width so the page never scrolls sideways */
.marquee-wrap { overflow: hidden; padding: 3vh 0; margin: -3vh 0; }

/* ======================================================================
   Light theme: warm paper, deep ink, indigo accents, white frosted glass
   ====================================================================== */
:root[data-theme="light"] {
  --bg: #f5f4f0;
  --bg-rgb: 245 244 240;
  --ink: #12141f;
  --ink-rgb: 18 20 31;
  --hi-rgb: 18 20 31;
  --accent: #3a4fd6;
  --accent-2: #4f68f0;
  --chip-ink: #2a3cb0;
  --glow: #c9d3ff;
  --muted: #5d6175;   /* ~5.5:1 on paper */
  --soft: #3c3f50;
  color-scheme: light;
}

/* frosted white glass instead of smoked glass */
[data-theme="light"] .glass__tint { background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5) 55%, rgba(255, 255, 255, .66)); }
[data-theme="light"] .glass__shine {
  box-shadow:
    inset 1.5px 1.5px 1px rgba(255, 255, 255, .95),
    inset -1px -1px 1px rgba(18, 20, 31, .08),
    inset 0 0 0 1px rgba(18, 20, 31, .06);
}
[data-theme="light"] .glass__shine::before { background: linear-gradient(180deg, rgba(255, 255, 255, .9), transparent); }
[data-theme="light"] .glass { box-shadow: 0 12px 34px rgba(30, 40, 90, .14), 0 2px 6px rgba(30, 40, 90, .08); }
[data-theme="light"] .nav__blob { background: rgba(18, 20, 31, .06); box-shadow: inset 0 0 0 1px rgba(18, 20, 31, .06); }
[data-theme="light"] .nav__links a { color: var(--soft); }
[data-theme="light"] .nav__links a:hover,
[data-theme="light"] .nav__links a[aria-current="page"] { color: var(--ink); }
[data-theme="light"] .nav__progress { background: linear-gradient(90deg, rgba(58, 79, 214, .08), rgba(58, 79, 214, .4)); }
[data-theme="light"] .nav.is-open .glass__tint { background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 244, 240, .98)); }

[data-theme="light"] :is(.bar, .contact__email, .glass-card) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .55));
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .95),
    inset 0 0 0 1px rgba(18, 20, 31, .07),
    0 20px 50px rgba(30, 40, 90, .12);
}
[data-theme="light"] .icon-btn { background: rgba(18, 20, 31, .05); }

/* buttons that sit on a blue gradient keep white text */
[data-theme="light"] .contact__btn { color: #fff; }
[data-theme="light"] .contact__btn:hover { color: var(--bg); }

/* hero: name and portrait on the pale shader */
[data-theme="light"] .hero__me img {
  filter:
    contrast(1.04) brightness(1)
    drop-shadow(0 0 1px rgba(58, 79, 214, .35))
    drop-shadow(-12px 10px 30px rgba(40, 60, 160, .22));
}
[data-theme="light"] .hero__me-light { opacity: .5; }
[data-theme="light"] .portrait__keylight { opacity: .4; }
[data-theme="light"] .about__light {
  background:
    radial-gradient(ellipse 60% 40% at 28% 16%, rgba(255, 245, 235, .2), transparent 60%),
    linear-gradient(to top, rgba(245, 244, 240, .55), transparent 30%);
}
[data-theme="light"] .about__frame { background: radial-gradient(ellipse 70% 60% at 50% 35%, #c9d3ff, #e8ebf6 75%); }

[data-theme="light"] .marquee { background: linear-gradient(90deg, rgba(58, 79, 214, .08), rgba(58, 79, 214, .02), rgba(58, 79, 214, .08)); }
[data-theme="light"] .contact { background: radial-gradient(ellipse 60% 55% at 50% 100%, rgba(120, 140, 255, .25), transparent 70%); }
[data-theme="light"] .contact__glow { opacity: .28; }
[data-theme="light"] .preview { box-shadow: 0 30px 80px rgba(30, 40, 90, .25); }
[data-theme="light"] .grain { opacity: .08; mix-blend-mode: multiply; }
[data-theme="light"] .job__row::before { background: linear-gradient(90deg, rgba(58, 79, 214, .12), rgba(106, 75, 214, .07) 60%, transparent); }
[data-theme="light"] .service::before,
[data-theme="light"] .ccard::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(58, 79, 214, .12), transparent 60%); }
[data-theme="light"] .process__fill,
[data-theme="light"] .tl__fill { background: linear-gradient(var(--accent-2), var(--ink)); }
@media (max-width: 900px) {
  [data-theme="light"] .hero__name { text-shadow: 0 6px 30px rgba(245, 244, 240, .6); }
}

/* ---------- Theme toggle in the nav ---------- */
.nav__theme {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  background: rgb(var(--hi-rgb) / .07);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .12);
}
.nav__theme:hover { background: rgb(var(--hi-rgb) / .14); transform: rotate(-20deg); }
.nav__theme svg { position: absolute; transition: transform .6s var(--ease), opacity .35s; }
.nav__moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="light"] .nav__sun { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="light"] .nav__moon { opacity: 1; transform: none; }
.nav__end { display: flex; align-items: center; gap: 10px; justify-self: end; }
@media (max-width: 900px) {
  /* phones keep the flex layout: logo left, toggle + menu right */
  .nav__end { display: contents; }
  .nav__theme { margin-left: auto; margin-right: 8px; }
}

/* the theme switch spreads out as a circle (View Transitions); site.js drives it */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (max-width: 900px) {
  .nav__logo { padding-left: 0; } /* phones keep the nav's own left padding */
}

/* ---------- Logo mark: a breathing orb with a twinkling star ---------- */
.nav__logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex-shrink: 0;
}
.logo-mark__orb {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #3b63ff, #9b7bff, #49d3ff, #6a4bd6, #3b63ff);
  filter: blur(4px) saturate(1.2);
  opacity: .9;
  animation: spin 7s linear infinite, orb-breathe 3.2s ease-in-out infinite;
}
/* a crisp inner core so it reads as an orb, not just a blur */
.logo-mark__orb::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .9), rgba(150, 170, 255, .4) 45%, transparent 70%);
  filter: blur(1px);
}
.logo-mark__star {
  position: relative;
  width: 14px; height: 14px;
  fill: #fff;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .95)) drop-shadow(0 0 8px rgba(140, 170, 255, .9));
  animation: twinkle 3.2s ease-in-out infinite;
  transition: transform .9s cubic-bezier(.3, 1.6, .5, 1);
}
.logo-mark__spark {
  position: absolute;
  left: 50%; top: 50%;
  width: 3px; height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(160, 180, 255, .9);
  opacity: 0;
  pointer-events: none;
}
.nav__logo:hover .logo-mark__star { transform: rotate(180deg) scale(1.3); }
.nav__logo:hover .logo-mark__orb { animation-duration: 2.4s, 3.2s; }
.nav__logo:hover .logo-mark__spark { animation: spark .9s cubic-bezier(.2, .8, .3, 1) forwards; }
.nav__logo:hover .logo-mark__spark:nth-child(4) { animation-delay: .05s; }
.nav__logo:hover .logo-mark__spark:nth-child(5) { animation-delay: .1s; }
.nav__logo:hover .logo-mark__spark:nth-child(6) { animation-delay: .15s; }
.nav__logo:hover .swap > span { transform: translateY(-1.3em); }

@keyframes orb-breathe { 0%, 100% { scale: 1; opacity: .85; } 50% { scale: 1.12; opacity: 1; } }
@keyframes twinkle {
  0%, 100% { scale: 1; opacity: 1; }
  45% { scale: .78; opacity: .8; }
  55% { scale: 1.08; opacity: 1; }
}
@keyframes spark {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); }
}

/* the same star on the page-transition curtain */
.curtain__label { display: inline-flex; align-items: center; gap: .3em; }
.curtain__star {
  width: .62em; height: .62em;
  fill: #fff;
  filter: drop-shadow(0 0 10px rgba(160, 180, 255, .9));
  animation: twinkle 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark__orb, .logo-mark__star, .curtain__star { animation: none; }
}


/* ---------- Browser surfaces in the palette ---------- */
::selection { background: rgb(79 104 240 / .35); color: var(--ink); }
html { scrollbar-color: rgb(var(--ink-rgb) / .28) transparent; scrollbar-width: thin; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.char-word { display: inline-block; white-space: nowrap; }
/* company badges sit on a blue gradient in both themes */
.job__logo { color: #fff; }


/* ---------- Resume download ---------- */
.nav__resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgb(var(--hi-rgb) / .07);
  box-shadow: inset 0 0 0 1px rgb(var(--hi-rgb) / .14);
}
.nav__resume svg { transition: transform .5s var(--ease); }
.nav__resume:hover { background: rgb(var(--hi-rgb) / .14); }
.nav__resume:hover svg { transform: translateY(2px); }
@media (max-width: 900px) {
  /* phones: icon only, next to the theme toggle */
  .nav__resume { width: 40px; padding: 0; justify-content: center; margin-left: auto; }
  .nav__resume-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .nav__resume + .nav__theme { margin-left: 8px; }
}

.section-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.section-actions .section-more { margin-top: 6vh; }
.section-more--ghost { background: none; }
.section-more--ghost svg { transition: transform .5s var(--ease); }
.section-more--ghost:hover svg { transform: translateY(2px); }
@media (min-width: 901px) and (max-width: 1180px) {
  /* mid-size laptops: icon-only resume so the links stay centred */
  .nav__resume { width: 40px; padding: 0; justify-content: center; }
  .nav__resume-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
