/* Tokens ------------------------------------------------------------------ */
:root {
  --night: #070a18;
  --night-2: #0d1230;
  --night-3: #151b42;
  --line: #242b55;
  --text: #e8ecff;
  --muted: #8e97bd;
  --blue: #3d5afe;
  --blue-soft: #8093ff;     /* blue that stays readable at text sizes */
  --pink: #ff3d9a;
  --pink-soft: #ff7ab8;

  /* glass: translucent fills + a bright top rim read as a frosted edge on the dark ground */
  --glass-fill: linear-gradient(180deg, rgba(210, 218, 255, 0.11), rgba(210, 218, 255, 0.035));
  --glass-border: rgba(210, 218, 255, 0.14);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --glass-blur: blur(18px) saturate(170%);

  --font-display: 'Anybody', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-body: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-code: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.35rem;
  --step-2: clamp(1.6rem, 2.4vw, 2.1rem);
  --step-3: clamp(2.2rem, 4.6vw, 3.9rem);
  --step-4: clamp(2.8rem, 7vw, 6.4rem);

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --header-h: 4.25rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { background: var(--night); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--pink); color: var(--night); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 200;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--night);
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: 92rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* slow aurora behind the whole page; gives the glass something to frost.
   The keyframes own `transform`; the pointer lean (useGlassFx) uses xPercent via GSAP on the wrapper. */
.ambient {
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
}
.ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(26% 30% at 24% 30%, rgba(61, 90, 254, 0.46), transparent 70%),
    radial-gradient(22% 26% at 76% 60%, rgba(255, 61, 154, 0.34), transparent 70%),
    radial-gradient(28% 24% at 52% 86%, rgba(128, 147, 255, 0.28), transparent 70%),
    radial-gradient(18% 20% at 70% 18%, rgba(255, 122, 184, 0.22), transparent 70%);
  animation: aurora 32s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  33% { transform: translate3d(7%, -5%, 0) rotate(10deg) scale(1.1); }
  66% { transform: translate3d(-4%, 6%, 0) rotate(-4deg) scale(0.95); }
  100% { transform: translate3d(-6%, -3%, 0) rotate(-10deg) scale(1.05); }
}

/* Glass surfaces ---------------------------------------------------------- */
.glass {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass-fill);
  box-shadow: var(--glass-rim), 0 30px 60px -40px rgba(0, 0, 0, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: border-color 0.4s, box-shadow 0.4s;
}
/* pointer sheen + a lit rim that fades in on hover */
.glass::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(16rem circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.10), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s;
}
.glass[data-tilt]:hover {
  border-color: rgba(210, 218, 255, 0.28);
  box-shadow: var(--glass-rim), 0 40px 70px -40px rgba(61, 90, 254, 0.55);
}
.glass:hover::after { opacity: 1; }

/* Floating glass shapes */
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow-x: clip; }
.hero .floaters { z-index: 3; }
.floater {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(var(--s), 40vw);
  will-change: transform;
}
.floater > i {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  rotate: var(--r);
  background:
    radial-gradient(120% 80% at 30% 12%, rgba(255, 255, 255, 0.30), transparent 42%),
    radial-gradient(90% 60% at 72% 105%, rgba(255, 122, 184, 0.26), transparent 62%),
    radial-gradient(70% 50% at 10% 90%, rgba(128, 147, 255, 0.22), transparent 60%),
    rgba(210, 218, 255, 0.035);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1.5px 0 rgba(255, 180, 215, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 -20px 34px -14px rgba(128, 147, 255, 0.45),
    0 50px 90px -40px rgba(0, 0, 0, 0.85);
  /* gentle boost only: over the aurora's bright spots a stronger one turns the glass into solid plastic */
  backdrop-filter: blur(12px) saturate(140%) brightness(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(140%) brightness(1.08);
  animation: bob var(--dur, 9s) ease-in-out infinite alternate;
}
.floater--pill > i { aspect-ratio: 2.7; border-radius: 999px; }
.floater--tile > i { border-radius: 30%; }
/* the mask cuts away most of the fill, so the ring gets a denser body and a lit edge to stay visible */
.floater--ring > i {
  background:
    conic-gradient(from 210deg, rgba(255, 255, 255, 0.34), rgba(255, 122, 184, 0.22) 25%, rgba(128, 147, 255, 0.08) 50%, rgba(128, 147, 255, 0.3) 75%, rgba(255, 255, 255, 0.34)),
    rgba(210, 218, 255, 0.07);
  -webkit-mask: radial-gradient(circle, transparent 36%, #000 37%);
  mask: radial-gradient(circle, transparent 36%, #000 37%);
}
@keyframes bob {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(0, -22px, 0) rotate(9deg); }
}

/* film grain keeps the large dark fields from looking flat */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Type -------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 850;
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.025em;
  line-height: 0.92;
}

.section { position: relative; padding-block: clamp(6rem, 14vw, 11rem) 0; }

.section__title { font-size: var(--step-4); max-width: 17ch; text-wrap: balance; }
.section__lede {
  margin-top: 1.5rem;
  max-width: 54ch;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
  text-wrap: pretty;
}

.text-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--line);
  transition: color 0.25s, text-decoration-color 0.25s;
}
.text-link:hover { color: var(--pink); text-decoration-color: currentColor; }

.button {
  --tint: 210, 218, 255;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--tint), 0.18);
  background:
    linear-gradient(180deg, rgba(var(--tint), 0.16), rgba(var(--tint), 0.04));
  box-shadow: var(--glass-rim), 0 10px 30px -14px rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s, border-color 0.3s;
}
/* light that follows the pointer across the glass (--mx/--my set in Cursor) */
.button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(7rem circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
/* gradient rim that lights up on hover */
.button::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--pink-soft), rgba(255, 255, 255, 0.5) 45%, var(--blue-soft));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.button:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--glass-rim), 0 16px 40px -14px rgba(var(--tint), 0.45);
}
.button:hover::before, .button:hover::after { opacity: 1; }
.button:active { transform: translateY(0) scale(0.97); transition-duration: 0.15s; }

.button--solid { --tint: 128, 147, 255; background: linear-gradient(180deg, rgba(128, 147, 255, 0.42), rgba(61, 90, 254, 0.22)); border-color: rgba(128, 147, 255, 0.5); }
.button--pink { --tint: 255, 122, 184; background: linear-gradient(180deg, rgba(255, 122, 184, 0.38), rgba(255, 61, 154, 0.18)); border-color: rgba(255, 122, 184, 0.5); }

code { font-family: var(--font-code); font-size: 0.8em; }

/* Split text: each char sits in a clipping line */
.split-line { display: block; overflow: hidden; padding-block: 0.06em; margin-block: -0.06em; }
.split-char { display: inline-block; will-change: transform; }

/* FuzzText (project names scramble into homoglyphs on hover) */
.fz-word { display: inline-block; white-space: nowrap; }
.fz-char { position: relative; display: inline-block; }
.fz-orig { display: inline-block; }
.fz-mut {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-weight: 500;
  font-size: 0.62em;
  font-variation-settings: normal;
  letter-spacing: 0;
  color: var(--pink);
  pointer-events: none;
}
.fz-mask {
  position: absolute;
  inset: 0.1em -0.02em 0.06em;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.fz-char.is-mutated .fz-orig { visibility: hidden; }
.fz-char.is-mutated .fz-mut { display: flex; }

/* Cursor: a glass lens. Fixed size so the SVG lens map lines up; `scale` on the inner <i> does the growing. */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 150;
  width: 5rem; height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cursor > i {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  scale: 0.42;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: radial-gradient(90% 70% at 30% 20%, rgba(255, 255, 255, 0.22), transparent 55%);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.45), inset 0 -6px 14px rgba(128, 147, 255, 0.3), 0 10px 30px -8px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(1.5px) saturate(180%) brightness(1.15);
  -webkit-backdrop-filter: blur(1.5px) saturate(180%) brightness(1.15);
  transition: scale 0.5s var(--ease-out), border-color 0.35s, border-width 0.35s;
}
.fx-lens .cursor > i { backdrop-filter: url(#lens) saturate(170%) brightness(1.12); }
.cursor[data-state='hover'] > i {
  scale: 1;
  border-width: 1px;
  border-color: rgba(255, 122, 184, 0.6);
}
.cursor[data-hidden='true'] { opacity: 0; }
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.4s, backdrop-filter 0.4s;
}
/* once scrolled, the wordmark and nav float as separate glass islands over a frosted band
   that fades out downward, so headings dissolve under the header instead of colliding with it */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 -2.5rem;
  z-index: -1;
  background: linear-gradient(rgba(7, 10, 24, 0.82), rgba(7, 10, 24, 0.45) 60%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  -webkit-mask: linear-gradient(#000 55%, transparent);
  mask: linear-gradient(#000 55%, transparent);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.site-header[data-scrolled='true']::before { opacity: 1; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}
.wordmark, .site-nav ul {
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.site-header[data-scrolled='true'] .wordmark,
.site-header[data-scrolled='true'] .site-nav ul {
  background: var(--glass-fill);
  border-color: var(--glass-border);
  box-shadow: var(--glass-rim), 0 10px 30px -16px rgba(0, 0, 0, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.wordmark {
  padding: 0.45rem 1rem;
  margin-left: -1rem;
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: 'wdth' 130;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav ul { display: flex; align-items: center; gap: 0.15rem; padding: 0.3rem; margin-right: -0.3rem; }
.site-nav a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.site-nav a:hover { color: var(--text); background: rgba(210, 218, 255, 0.06); }
.site-nav a[aria-current='true'] {
  color: var(--text);
  background: linear-gradient(180deg, rgba(210, 218, 255, 0.18), rgba(210, 218, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(210, 218, 255, 0.12);
}

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}
.orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* keeps the name readable where it crosses the orb */
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(7, 10, 24, 0.75) 5%, transparent);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + clamp(2rem, 6vh, 4rem)) clamp(1.5rem, 4vh, 2.5rem);
  pointer-events: none;
}
.hero__content a, .hero__content button { pointer-events: auto; }

.hero__statement {
  max-width: 19ch;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__now { margin-top: 1.25rem; max-width: 40ch; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero__name {
  font-weight: 900;
  /* sized to the wrap's content width (the name is ~8.4em wide at wdth 150): the split-line
     clips overflow for the reveal, so anything wider loses its last letters on big screens */
  font-size: clamp(3rem, calc((min(100vw, 92rem) - 2 * var(--gutter)) / 8.6), 12rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
  white-space: nowrap;
  pointer-events: auto;
  touch-action: pan-y;
}
.hero__name .split-char {
  font-variation-settings: 'wdth' var(--w, 150), 'wght' var(--g, 900);
  color: var(--c, var(--text));
}

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 0.75rem; }
.scroll-cue__bar { position: relative; width: 3.5rem; height: 1px; background: var(--line); overflow: hidden; }
.scroll-cue__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* About ------------------------------------------------------------------- */
.about__big {
  max-width: 30ch;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.about__rest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.about__rest p { color: var(--muted); max-width: 52ch; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.facts div { padding: 1.4rem 1.5rem; }
.facts dt { font-size: 0.9rem; color: var(--muted); }
.facts dd { margin-top: 0.25rem; font-weight: 600; }

/* Stack chain ------------------------------------------------------------- */
.chain {
  display: grid;
  grid-template-columns: auto minmax(min-content, 1fr) auto minmax(min-content, 1fr) auto minmax(min-content, 1fr) auto;
  align-items: center;
  margin-top: clamp(3.5rem, 7vw, 6rem);
}
.chain__node { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; padding: 1.1rem 1.2rem 1.25rem; border-radius: 24px; }
.chain__role { font-size: 0.95rem; color: var(--blue-soft); font-weight: 600; }
.chain__node[data-side='adversary'] .chain__role { color: var(--pink); }
.chain__name {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: 'wdth' 120;
  font-size: clamp(1.4rem, 2.55vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.3s;
}
.chain__node:hover .chain__name { color: var(--pink); }
.chain__edge { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding-inline: 0.45rem; }
.chain__edge span { font-size: 0.85rem; color: #a9b1d6; white-space: nowrap; }
.chain__line { width: 100%; height: 2px; border-radius: 2px; background: rgba(210, 218, 255, 0.12); position: relative; }
.chain__line i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--blue-soft));
  box-shadow: 0 0 12px 1px rgba(255, 61, 154, 0.45);
  transform-origin: left;
}
/* a spark running along each link, so the chain reads as live */
.chain__line::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 2.5rem; height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, #fff);
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
  animation: spark 2.8s var(--ease-out) infinite;
}
.chain__edge:nth-child(4) .chain__line::after { animation-delay: 0.9s; }
.chain__edge:nth-child(6) .chain__line::after { animation-delay: 1.8s; }
@keyframes spark {
  from { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  to { left: calc(100% - 2.5rem); opacity: 0; }
}
@keyframes spark-y {
  from { top: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  to { top: calc(100% - 1rem); opacity: 0; }
}
.chain__note { margin-top: 2.5rem; max-width: 60ch; color: var(--muted); }

/* Horizontal projects ----------------------------------------------------- */
.hscroll { position: relative; margin-top: clamp(4rem, 8vw, 7rem); }
.hscroll__viewport { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hscroll__track {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  padding-inline: var(--gutter);
  width: max-content;
  will-change: transform;
}
.hscroll__hud {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: calc(min(92rem, 100%) - 2 * var(--gutter));
  margin: 0 auto 1.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.hscroll__progress { flex: 1; height: 2px; background: var(--line); overflow: hidden; }
.hscroll__progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-soft), var(--blue-soft)); transform-origin: left; transform: scaleX(0); }

.panel {
  position: relative;
  flex: none;
  width: min(84vw, 74rem);
  height: min(74svh, 46rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  padding: clamp(1.5rem, 3.5vw, 3.25rem);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(128, 147, 255, 0.12), rgba(13, 18, 48, 0.5) 38%, rgba(13, 18, 48, 0.32));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-rim), 0 50px 90px -50px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  overflow: hidden;
  isolation: isolate;
}
/* soft sheen that tracks the pointer over the card */
.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(34rem circle at var(--mx, 30%) var(--my, -20%), rgba(210, 218, 255, 0.07), transparent 60%);
  pointer-events: none;
}
/* per-panel glow, colored by which side of the stack the system is on */
.panel::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 38rem; height: 38rem;
  right: -12rem; bottom: -16rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 65%);
}
.panel[data-accent='pink'] { --accent: var(--pink); --accent-soft: var(--pink-soft); }
.panel[data-accent='blue'] { --accent: var(--blue); --accent-soft: var(--blue-soft); }

.panel__ghost {
  position: absolute;
  z-index: -1;
  left: 0; bottom: -0.12em;
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: 'wdth' 150;
  font-size: clamp(8rem, 20vw, 20rem);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(210, 218, 255, 0.09);
  pointer-events: none;
}

.panel__top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; color: var(--muted); font-size: 0.95rem; }
/* status chip: neutral glass, the accent lives only in the glowing dot */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  box-shadow: var(--glass-rim);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}
.pill::before {
  content: '';
  flex: none;
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-soft, var(--blue-soft));
  box-shadow: 0 0 10px 1px var(--accent-soft, var(--blue-soft));
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; box-shadow: 0 0 4px 0 var(--accent-soft, var(--blue-soft)); } }

.panel__main { display: flex; flex-direction: column; min-height: 0; }
.panel__name {
  font-size: clamp(2.8rem, 6.6vw, 6.8rem);
  font-variation-settings: 'wdth' 130;
  line-height: 0.9;
}
.panel__sub { margin-top: 0.9rem; font-size: var(--step-1); line-height: 1.3; max-width: 26ch; }
.panel__text { margin-top: 1.25rem; color: var(--muted); max-width: 52ch; font-size: 0.98rem; text-wrap: pretty; }
.panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: auto; padding-top: 1.5rem; }

.panel__side { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.75rem; min-height: 0; }
.stats { display: grid; gap: 1.1rem; }
.stats div { display: flex; flex-direction: column; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.stats dd {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stats dt { order: 2; margin-top: 0.3rem; color: var(--muted); font-size: 0.92rem; }

/* last card in the track: the smaller builds */
.panel--builds { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.panel--builds .panel__name { color: var(--text); }
.builds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; align-content: end; }
.build h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.2; }
.build p { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }
.build__tags { margin-top: 0.75rem; font-size: 0.85rem; color: var(--blue-soft); }

/* Lethe terminal (panel visual) ------------------------------------------- */
/* the visual takes the side column's free height; the stats shrink to one row under it */
.panel--visual .panel__side { justify-content: stretch; gap: 1.25rem; }
.panel--visual .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.panel--visual .stats div { padding-bottom: 0; border-bottom: 0; }
.panel--visual .stats dd { font-size: clamp(1.6rem, 2.4vw, 2.4rem); }
.panel--visual .stats dt { font-size: 0.82rem; line-height: 1.35; }

.panel.is-breached { animation: breach 0.9s var(--ease-out); }
@keyframes breach {
  from { border-color: var(--pink-soft); box-shadow: var(--glass-rim), 0 0 0 1px var(--pink), 0 0 60px -6px rgba(255, 61, 154, 0.55); }
}

.term {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(210, 218, 255, 0.12);
  background: linear-gradient(180deg, rgba(3, 5, 14, 0.62), rgba(3, 5, 14, 0.42));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  font-family: var(--font-code);
  font-size: 0.72rem;
  line-height: 1.5;
  overflow: hidden;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(210, 218, 255, 0.08);
  color: #a9b1d6;
}
.term__bar code { flex: 1; min-width: 0; font-size: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term__dots { display: flex; gap: 0.35rem; }
.term__dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: rgba(210, 218, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.term__dots i:first-child { background: rgba(255, 61, 154, 0.55); }
.term__tag { padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid rgba(210, 218, 255, 0.14); font-size: 0.64rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* newest line at the bottom; older ones scroll off the top and fade */
.term__log {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: 0.6rem 0.5rem;
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 28%);
  mask: linear-gradient(transparent, #000 28%);
}
.term__line {
  flex: none;
  display: grid;
  gap: 0.1rem;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  animation: term-in 0.45s var(--ease-out);
  transition: background-color 0.4s;
}
@keyframes term-in { from { opacity: 0; transform: translateY(10px); } }
.term__meta { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.term__gen { color: rgba(210, 218, 255, 0.4); }
.term__family { color: var(--blue-soft); }
.term__verdict {
  margin-left: auto;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.term__payload { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term__mut { color: var(--pink-soft); }
.term__op { color: var(--blue-soft); }
.term__sep { color: rgba(210, 218, 255, 0.35); }

.term__line[data-verdict='pending'] .term__verdict { color: var(--muted); animation: probing 0.8s ease-in-out infinite alternate; }
@keyframes probing { to { opacity: 0.35; } }
.term__line[data-verdict='blocked'] .term__verdict { color: var(--blue-soft); border-color: rgba(128, 147, 255, 0.35); background: rgba(128, 147, 255, 0.1); }
.term__line[data-verdict='partial'] .term__verdict { color: var(--pink-soft); border-color: rgba(255, 122, 184, 0.4); }
.term__line[data-verdict='bypass'] { background: rgba(255, 61, 154, 0.12); }
.term__line[data-verdict='bypass'] .term__verdict {
  color: #fff;
  border-color: var(--pink-soft);
  background: linear-gradient(180deg, rgba(255, 122, 184, 0.6), rgba(255, 61, 154, 0.35));
  box-shadow: 0 0 14px 1px rgba(255, 61, 154, 0.55);
  animation: stamp 0.45s var(--ease-out);
}
.term__line[data-verdict='blocked'] .term__verdict,
.term__line[data-verdict='partial'] .term__verdict { animation: stamp 0.45s var(--ease-out); }
@keyframes stamp { from { transform: scale(1.5); opacity: 0; } }

.term__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid rgba(210, 218, 255, 0.08);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.term__foot b { font-weight: 500; color: var(--text); }
.term__foot b.is-blocked { color: var(--blue-soft); }
.term__foot b.is-partial, .term__foot b.is-bypass { color: var(--pink-soft); }
.term__fitness { flex: 1; min-width: 3rem; height: 3px; border-radius: 3px; background: rgba(210, 218, 255, 0.1); overflow: hidden; }
.term__fitness i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-soft), var(--pink-soft)); transform-origin: left; transition: transform 0.6s var(--ease-out); }

/* Drawer ------------------------------------------------------------------ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3, 5, 14, 0.5);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 130;
  width: min(44rem, 100vw);
  padding: calc(env(safe-area-inset-top, 0px) + 1.5rem) clamp(1.25rem, 4vw, 3rem) calc(env(safe-area-inset-bottom, 0px) + 3rem);
  background: linear-gradient(170deg, rgba(128, 147, 255, 0.1), rgba(13, 18, 48, 0.72) 30%);
  border-left: 1px solid var(--glass-border);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06), -40px 0 80px -40px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; color: var(--muted); }
.drawer__close {
  position: relative;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  box-shadow: var(--glass-rim);
  color: var(--text);
  transition: transform 0.4s var(--ease-out), border-color 0.3s, background-color 0.3s;
}
.drawer__close:hover { transform: rotate(90deg); border-color: rgba(210, 218, 255, 0.35); background-color: rgba(210, 218, 255, 0.08); }
.drawer__close::before, .drawer__close::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1.1rem; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.drawer__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.drawer h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.drawer__sub { margin-top: 0.6rem; color: var(--muted); font-size: var(--step-1); }
.drawer h3 { margin-top: 2.25rem; margin-bottom: 0.6rem; font-size: 1rem; font-weight: 700; }
.drawer p { color: var(--muted); max-width: 60ch; }
.drawer__features { display: grid; gap: 1.25rem; }
.drawer__features h4 { font-weight: 600; margin-bottom: 0.2rem; }
.drawer .pipeline { counter-reset: step; display: grid; gap: 0.5rem; }
.drawer .pipeline li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: rgba(210, 218, 255, 0.05);
  border: 1px solid rgba(210, 218, 255, 0.08);
}
.drawer .pipeline li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--blue-soft);
}
.drawer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.install { display: inline-flex; align-items: stretch; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass-fill); box-shadow: var(--glass-rim); overflow: hidden; }
.install code { display: flex; align-items: center; padding: 0.6rem 0.9rem 0.6rem 1.1rem; }
.install button { padding-inline: 0.9rem; min-width: 5.5rem; border-left: 1px solid var(--glass-border); font-size: 0.85rem; font-weight: 600; transition: background-color 0.2s; }
.install button:hover { background: rgba(210, 218, 255, 0.12); }

/* Skills marquee ---------------------------------------------------------- */
.marquee { position: relative; margin-top: clamp(3rem, 6vw, 5rem); display: grid; gap: 0.5rem; overflow: hidden; }
.marquee__row { display: flex; width: max-content; will-change: transform; }
.marquee__set { display: flex; align-items: center; flex: none; }
.marquee__item {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(2.4rem, 6.5vw, 6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  padding-inline: 0.35em;
}
.marquee__item.is-outline { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.marquee__star { color: var(--pink); font-size: clamp(1.4rem, 3vw, 2.6rem); }
.marquee__row:nth-child(2) .marquee__star { color: var(--blue-soft); }

.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.skills > div { padding: 1.5rem 1.6rem 1.7rem; }
.skills h3 { font-size: 1rem; font-weight: 700; padding-bottom: 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid rgba(210, 218, 255, 0.12); }
.skills p { color: var(--muted); font-size: 0.95rem; }

/* Record ------------------------------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.split__title { position: sticky; top: calc(var(--header-h) + 2rem); font-size: var(--step-3); }

.timeline { position: relative; padding-left: 2.25rem; }
.timeline__rail { position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0; width: 1px; background: var(--line); }
.timeline__rail i { position: absolute; inset: 0; background: linear-gradient(var(--pink), var(--blue)); transform-origin: top; transform: scaleY(0); }
.timeline__group + .timeline__group { margin-top: 4rem; }
.timeline__group > h3 { font-size: var(--step-2); font-family: var(--font-display); font-weight: 800; font-variation-settings: 'wdth' 115; margin-bottom: 1rem; }
.entry { position: relative; padding: 1.5rem 1.75rem; }
.entry + .entry { margin-top: 0.9rem; }
.entry::before {
  content: '';
  position: absolute;
  left: calc(-2.25rem + 0.45rem - 0.45rem + 0.5px); top: 1.95rem;
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  background: var(--night);
  border: 1px solid var(--muted);
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.entry.is-lit::before { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pink) 20%, transparent); }
.entry__when { color: var(--muted); font-size: 0.95rem; }
.entry h4 { margin-top: 0.25rem; font-size: var(--step-1); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.entry__role { margin-top: 0.15rem; }
.entry ul { margin-top: 0.85rem; display: grid; gap: 0.45rem; }
.entry li, .entry__note { color: var(--muted); max-width: 64ch; }
.entry li { padding-left: 1.1rem; position: relative; }
.entry li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 0.45rem; height: 1px; background: var(--muted); }
.entry__note { margin-top: 0.6rem; }

/* Contact ----------------------------------------------------------------- */
.contact { padding-bottom: 2rem; }
.contact__title { font-size: var(--step-3); max-width: 20ch; text-wrap: balance; }
.contact__lede { margin-top: 1.25rem; max-width: 54ch; color: var(--muted); }

.email {
  display: block;
  margin-top: clamp(3rem, 7vw, 6rem);
  font-size: clamp(1.35rem, 5.9vw, 6.6rem);
  font-variation-settings: 'wdth' 112;
  text-decoration: none;
  white-space: nowrap;
}
.email .split-char { transition: color 0.3s; }
.email:hover .split-char { color: var(--pink); }

.contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  border-radius: 28px;
}
.magnetic { display: inline-block; }
.channels { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.channels dt { font-size: 0.9rem; color: var(--muted); }
.channels dd { margin-top: 0.15rem; font-weight: 600; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(5rem, 10vw, 8rem);
  padding-block: 1.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .panel__side { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats dd { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
  .panel__text { display: none; }
  .builds { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .build p { display: none; }
  /* fixed-height single-column panels have no room for the terminal */
  .panel--visual .term { display: none; }
}

/* keep in sync with HSCROLL_QUERY in projects.jsx */
@media (max-width: 900px) {
  .hscroll__viewport { height: auto; overflow: visible; }
  .hscroll__track { flex-direction: column; width: 100%; }
  .hscroll__hud { display: none; }
  .panel { width: 100%; height: auto; }
  .panel__text, .build p { display: block; }
  .panel--visual .term { display: flex; flex: none; height: 21rem; }
  .chain { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .chain__edge { flex-direction: row-reverse; padding: 0.5rem 0 0.5rem 0.25rem; }
  .chain__line { width: 2px; height: 2.25rem; }
  .chain__line i { background: linear-gradient(var(--pink), var(--blue-soft)); transform-origin: top; }
  .chain__line::after { top: 0; left: 50%; width: 4px; height: 1rem; margin: 0 0 0 -2px; background: linear-gradient(transparent, #fff); animation-name: spark-y; }
  .about__rest, .split { grid-template-columns: minmax(0, 1fr); }
  .split__title { position: static; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email { white-space: normal; overflow-wrap: anywhere; }
  .floater--desktop { display: none; }
  .chain__edge { padding-left: 1.5rem; }
  .contact__row { padding: 1.25rem 1.4rem; }
}

@media (max-width: 560px) {
  .site-nav a { padding-inline: 0.55rem; font-size: 0.88rem; }
  .site-nav li:nth-child(2) { display: none; }
  .wordmark { font-size: 0.95rem; margin-left: -0.5rem; padding-inline: 0.6rem; }
  .hero__name { font-size: 17vw; white-space: normal; line-height: 0.92; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .facts, .skills { grid-template-columns: minmax(0, 1fr); }
  .panel { border-radius: 20px; }
  .panel__name { font-size: 11vw; font-variation-settings: 'wdth' 100; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue__bar::after, .ambient::before, .pill::before, .floater > i, .chain__line::after, .term__line, .term__verdict, .panel.is-breached { animation: none !important; }
  .chain__line::after { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
