:root {
  --lav: #ae73ff;
  --lav-soft: #c5a2ff;
  --lav-bright: #d9c2ff;
  --lav-dim: #67459a;
  --lav-glow: rgba(174, 115, 255, 0.18);
  --hero-ai: #a8d5ba;
  --hero-ml: #a9c9ff;
  --hero-location: #c5a2ff;
  --bg: #0a0713;
  --bg-elev: #120e1e;
  --ink: #f1eef8;
  --muted: #aba2be;
  --line: rgba(174, 115, 255, 0.22);
  --boot-fg: #ae73ff;
  --boot-dim: #8a63c9;
  --font-sans: "Sora", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --atmosphere-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 2px;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--lav-dim), var(--lav), #e0cbff);
  box-shadow: 0 0 18px rgba(174, 115, 255, 0.72);
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left center;
  transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* —— Site shell —— */
.site {
  position: relative;
  min-height: 100vh;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, var(--lav-glow), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, rgba(103, 69, 154, 0.16), transparent 50%),
    linear-gradient(180deg, #120816 0%, var(--bg) 40%, #09060d 100%);
  z-index: 0;
  overflow: hidden;
  transform: translate3d(0, var(--atmosphere-y), 0) scale(1.04);
  will-change: transform;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.atmosphere__net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(174, 115, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 115, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, black 20%, transparent 75%);
  animation: grid-drift 36s linear infinite;
}

.mesh {
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.18;
}

.mesh--1 {
  top: 8%;
  left: 8%;
  background: radial-gradient(circle, rgba(174, 115, 255, 0.55) 0%, transparent 70%);
  animation: mesh-float-1 20s ease-in-out infinite;
}

.mesh--2 {
  top: 42%;
  right: 6%;
  background: radial-gradient(circle, rgba(167, 112, 239, 0.45) 0%, transparent 70%);
  animation: mesh-float-2 25s ease-in-out infinite;
}

.mesh--3 {
  bottom: 8%;
  left: 22%;
  background: radial-gradient(circle, rgba(94, 216, 230, 0.3) 0%, transparent 70%);
  animation: mesh-float-3 30s ease-in-out infinite;
}

@keyframes grid-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(56px, 28px, 0);
  }
}

@keyframes mesh-float-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes mesh-float-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-40px, 30px) scale(0.95);
  }
  66% {
    transform: translate(20px, -25px) scale(1.05);
  }
}

@keyframes mesh-float-3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(25px, 35px) scale(1.08);
  }
  66% {
    transform: translate(-30px, -20px) scale(0.92);
  }
}

.nav,
main,
.footer {
  position: relative;
  z-index: 1;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.05rem 1.25rem;
  background: linear-gradient(180deg, rgba(11, 7, 16, 0.38), rgba(11, 7, 16, 0.12));
  border: 1px solid rgba(174, 115, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 1.1rem 1.1rem;
  backdrop-filter: blur(10px) saturate(115%);
}

.nav__brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lav);
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.nav__links a {
  padding: 0.48rem 0.75rem;
  border: 1px solid rgba(174, 115, 255, 0.16);
  border-radius: 999px;
  background: rgba(20, 13, 26, 0.28);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--lav);
  border-color: rgba(174, 115, 255, 0.6);
  background: rgba(174, 115, 255, 0.1);
  transform: translateY(-1px);
  outline: none;
}

/* Tracks the section you're actually in as you scroll. */
.nav__links a.is-current {
  color: var(--ink);
  border-color: rgba(174, 115, 255, 0.55);
  background: rgba(174, 115, 255, 0.16);
  box-shadow: 0 0 20px rgba(174, 115, 255, 0.25);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* —— Hero + terminal —— */
.hero {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 2.5rem 0 3rem;
  /* Break out of main's 1080px so the first screen can breathe. */
  width: min(100vw - 2.5rem, 72rem);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Terminal and hero copy share one grid cell so the crossfade
   happens in place with zero layout shift. */
.hero__stage {
  display: grid;
  width: 100%;
  min-height: min(52vh, 520px);
  align-items: center;
  justify-items: stretch;
}

.hero__stage > * {
  grid-area: 1 / 1;
}

.term {
  --term-bg: #0c0c0c;
  --term-chrome: #1a1a1a;
  --term-border: #2a2a2a;
  --term-fg: #d4d4d4;
  --term-muted: #808080;
  --term-green: #4e9a06;
  --term-green-bright: #8ae234;
  --term-prompt: #729fcf;

  width: min(100%, 46rem);
  height: min(27.5rem, calc(100vh - 7rem));
  height: min(27.5rem, calc(100dvh - 7rem));
  min-height: 20rem;
  justify-self: center;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--term-border);
  border-radius: 0.55rem;
  background: var(--term-bg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  will-change: opacity, transform, filter;
  animation: term-in 0.55s ease both;
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.term.is-out {
  opacity: 0;
  transform: translate3d(0, -40px, 0) scale(0.985);
  filter: blur(6px);
  pointer-events: none;
  animation: none;
}

.term__chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: var(--term-chrome);
  border-bottom: 1px solid var(--term-border);
}

.term__dot {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35) inset;
}

.term__dot--red {
  background: #ff5f57;
}

.term__dot--amber {
  background: #febc2e;
}

.term__dot--green {
  background: #28c840;
}

.term__title {
  margin-left: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--term-muted);
  letter-spacing: 0.01em;
}

.term__skip {
  flex-shrink: 0;
  width: 100%;
  border: none;
  border-top: 1px solid var(--term-border);
  background: var(--term-chrome);
  color: var(--term-muted);
  font: 600 0.82rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.term__skip:hover,
.term__skip:focus-visible {
  background: #232323;
  color: var(--term-fg);
  outline: none;
}

.term__skip:active {
  background: #2a2a2a;
}

.term__skip[hidden] {
  display: none;
}

.term__body {
  flex: 1 1 0;
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  overflow: auto;
  min-height: 0;
  max-height: none;
  background: var(--term-bg);
  scroll-behavior: auto; /* JS eases the scroll; avoid fighting with CSS smooth */
}

.term__log {
  display: grid;
  gap: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--term-fg);
}

.term__line {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

.term__line.is-in {
  opacity: 1;
  transform: translateY(0);
}

.term__line.dim {
  color: var(--term-muted);
}

.term__line.kernel {
  color: #cfcfcf;
}

.term__line.accent {
  color: var(--term-prompt);
}

.term__line.ready {
  color: var(--term-green-bright);
  font-weight: 600;
}

.term__line.blank {
  min-height: 0.55rem;
}

.term__ok {
  color: var(--term-green-bright);
  font-weight: 600;
}

.term__password {
  color: var(--term-fg);
}

.term__load {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.term__load.is-in {
  opacity: 1;
  transform: translateY(0);
}

.term__load-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--term-fg);
}

.term__load-pct {
  color: var(--term-green-bright);
  font-variant-numeric: tabular-nums;
}

.term__load-track {
  width: 100%;
  height: 0.4rem;
  border: 1px solid #333;
  background: #161616;
  overflow: hidden;
}

.term__load-fill {
  height: 100%;
  width: 0%;
  background: var(--term-green);
}

.term__load.is-done .term__load-fill {
  background: var(--term-green-bright);
}

.term__load.is-done .term__load-pct {
  color: var(--term-green-bright);
}

.hero__copy {
  width: 100%;
  align-self: center;
  text-align: center;
}

.hero__copy[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

/* Staggered child reveal, driven by .is-in on the parent. */
.hero__copy > * {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__copy.is-in {
  visibility: visible;
  pointer-events: auto;
}

.hero__copy.is-in > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hero__copy.is-in > .hero__eyebrow {
  transition-delay: 0.08s;
}

.hero__copy.is-in > .hero__name {
  transition-delay: 0.18s;
}

.hero__copy.is-in > .hero__lede {
  transition-delay: 0.3s;
}

.hero__copy.is-in > .hero__actions {
  transition-delay: 0.42s;
}

.hero__eyebrow {
  margin: 0 0 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 1.4vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lav-soft);
}

.hero__eyebrow-sep {
  color: var(--lav-dim);
}

.hero__eyebrow-ai {
  color: var(--hero-ai);
  text-shadow: 0 0 18px rgba(168, 213, 186, 0.18);
}

.hero__eyebrow-ml {
  color: var(--hero-ml);
  text-shadow: 0 0 18px rgba(169, 201, 255, 0.18);
}

.hero__eyebrow-location {
  color: var(--hero-location);
  text-shadow: 0 0 18px rgba(174, 115, 255, 0.2);
}

.hero__name {
  margin: 0 auto;
  font-size: clamp(3.2rem, 9.5vw, 6.75rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 0.98;
  max-width: none;
  color: #d3b6ff;
  white-space: nowrap;
}

/* The name is centred, so a line that grows letter by letter re-centres on
   every keystroke — that sideways shuffle was the jitter. The ghost carries
   the finished width from the start; the live copy is laid over it. */
.hero__name-stage {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero__name-ghost {
  visibility: hidden;
}

.hero__name-live {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
}

/* Blur is expensive to animate on text this large and shows up as dropped
   frames right when the letters start. Opacity and transform only. */
.hero__copy > .hero__name,
.hero__copy.is-in > .hero__name {
  filter: none;
}

.hero__name-text {
  display: inline;
  white-space: nowrap;
}

/* Brief settle — soft enough to feel smooth, short enough not to wave. */
.hero__letter {
  display: inline-block;
  -webkit-text-fill-color: currentColor;
  opacity: 0;
  transform: translate3d(0, 0.04em, 0);
  transition:
    opacity 0.06s ease-out,
    transform 0.06s ease-out;
}

.hero__letter:nth-child(n + 7) {
  color: #c8a3ff;
}

.hero__letter:nth-child(n + 11) {
  color: #bb8bff;
}

.hero__letter:nth-child(n + 14) {
  color: var(--lav);
}

.hero__letter.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Parked on a CSS variable so the JS can move it without stomping the
   translate, and so it trails the typing instead of sitting at the end. */
.hero__cursor {
  position: absolute;
  left: 0;
  bottom: 0.1em;
  width: 0.1em;
  height: 0.74em;
  background: var(--lav);
  box-shadow: 0 0 18px rgba(174, 115, 255, 0.55);
  transform: translate3d(var(--cursor-x, 0px), 0, 0);
  will-change: transform;
  animation: cursor-blink 1.1s steps(2, start) infinite;
}

/* Carets hold solid while keys are actually being struck and only resume
   blinking once the typing stops — a blink mid-word gives the game away. */
.hero__cursor.is-typing {
  animation: none;
  opacity: 1;
}

.hero__name-i {
  display: inline-block;
  margin-left: 0.055em;
}

@keyframes cursor-blink {
  to {
    visibility: hidden;
  }
}

.hero__lede {
  margin: 1.5rem auto 0;
  max-width: 46rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.hero__actions .btn {
  min-height: 3.1rem;
  padding: 0.85rem 1.4rem;
  font-size: 1rem;
}

.social-icon-link {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid rgba(174, 115, 255, 0.32);
  border-radius: 0.9rem;
  color: var(--ink);
  background: rgba(20, 13, 26, 0.44);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.social-icon-link svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
  color: var(--lav);
  border-color: var(--lav);
  background: rgba(174, 115, 255, 0.1);
  box-shadow: 0 10px 28px rgba(174, 115, 255, 0.2);
  transform: translateY(-2px);
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.15rem;
  border-radius: 0;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.btn--primary {
  background: var(--lav);
  color: #150a24;
  box-shadow: 0 0 0 rgba(174, 115, 255, 0);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #c193ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(174, 115, 255, 0.35);
  outline: none;
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--lav);
  color: var(--lav);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(174, 115, 255, 0.16);
  outline: none;
}

/* —— Sections —— */
.section {
  position: relative;
  padding: 6.25rem 0 1.5rem;
  scroll-margin-top: 4.5rem;
}

[data-reveal] {
  opacity: var(--reveal-opacity, 0.16);
  transform:
    perspective(900px)
    translate3d(0, var(--reveal-y, 38px), 0)
    rotateX(var(--reveal-rotate, 2.2deg))
    scale(var(--reveal-scale, 0.985));
  transform-origin: 50% 0;
  will-change: opacity, transform;
}

.section__head {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section__head p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.75rem;
  padding-top: 0.25rem;
}

.focus-item {
  min-height: 10rem;
  padding: 1.4rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(30, 19, 39, 0.76), rgba(14, 9, 19, 0.42));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.14);
}

.focus-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--lav);
}

.focus-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* —— Experience: scroll-driven —— */

/* Sticky live readout that tracks whichever role you're reading. */
.exp-hud {
  position: sticky;
  top: 4.75rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: max-content;
  max-width: 100%;
  margin: 0 0 -2.4rem auto;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(174, 115, 255, 0.32);
  border-radius: 999px;
  background: rgba(14, 9, 22, 0.78);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.exp-hud.is-live {
  opacity: 1;
  transform: translateY(0);
}

.exp-hud__pulse {
  flex: 0 0 auto;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--lav-bright);
  animation: hud-pulse 2.2s ease-out infinite;
}

.exp-hud__org {
  color: var(--lav-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.exp-hud__when {
  color: var(--muted);
  white-space: nowrap;
}

.exp-hud.is-swap .exp-hud__org,
.exp-hud.is-swap .exp-hud__when {
  animation: hud-swap 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hud-swap {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hud-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(174, 115, 255, 0.55);
  }
  55% {
    box-shadow: 0 0 0 7px rgba(174, 115, 255, 0);
  }
}

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 3.5rem;
}

/* Dim track… */
.timeline::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 1.05rem;
  width: 1px;
  background: rgba(174, 115, 255, 0.16);
}

/* …and the lit portion, which grows as you scroll. Sized by height rather
   than scaleY so the glow stays put at the leading edge and reads as a head
   travelling down the spine instead of a stretched smear. */
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(1.05rem - 0.5px);
  width: 2px;
  height: calc(var(--track-progress, 0) * 100%);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lav-dim), var(--lav) 55%, var(--lav-bright));
  box-shadow: 0 0 8px rgba(174, 115, 255, 0.3);
}

.timeline__item {
  /* Defaults to lit: if the scroll loop never runs (JS blocked, script
     error), every card reads normally instead of being stuck dimmed. */
  --activity: 1;
  position: relative;
  padding: 0 0 1.35rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: -2.72rem;
  width: 0.8rem;
  height: 0.8rem;
  z-index: 1;
  border: 2px solid rgba(174, 115, 255, calc(0.35 + var(--activity) * 0.65));
  border-radius: 50%;
  background: var(--bg);
  transform: scale(calc(1 + var(--activity) * 0.32));
  box-shadow:
    0 0 0 calc(4px + var(--activity) * 5px) rgba(174, 115, 255, calc(0.04 + var(--activity) * 0.09)),
    0 0 26px rgba(174, 115, 255, calc(0.12 + var(--activity) * 0.55));
}

.experience-card {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
  /* Border, glow and lift all ride --activity, which the scroll loop sets
     from how close the card is to the reading line. */
  border: 1px solid rgba(174, 115, 255, calc(0.12 + var(--activity, 0) * 0.34));
  border-radius: 1.35rem;
  background:
    linear-gradient(135deg, rgba(32, 20, 46, 0.9), rgba(16, 10, 26, 0.74)),
    radial-gradient(circle at 90% 0%, rgba(174, 115, 255, calc(0.06 + var(--activity, 0) * 0.16)), transparent 42%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.22),
    0 0 calc(var(--activity, 0) * 60px) rgba(174, 115, 255, calc(var(--activity, 0) * 0.18));
  /* The card you're reading is fully lit; the rest sit back. This is the part
     that makes the scroll feel live, so it needs real contrast, not a nudge. */
  opacity: calc(0.42 + var(--activity, 0) * 0.58);
  transform:
    translate3d(0, calc((1 - var(--activity, 0)) * 10px), 0)
    scale(calc(0.978 + var(--activity, 0) * 0.022));
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

/* A spine on the card's leading edge that fills in as it becomes current. */
.experience-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lav-bright), var(--lav));
  box-shadow: 0 0 18px rgba(174, 115, 255, calc(var(--activity, 0) * 0.8));
  transform: scaleY(var(--activity, 0));
  transform-origin: top center;
}

/* Colour drains out of the logo as the card falls away from the reading
   line — the clearest signal that the page is tracking you. */
.experience-card__logo {
  filter:
    grayscale(calc((1 - var(--activity, 0)) * 0.9))
    brightness(calc(0.6 + var(--activity, 0) * 0.4));
}

.experience-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 20%, rgba(255, 255, 255, 0.045) 48%, transparent 72%);
  transform: translateX(-35%);
  transition: opacity 0.28s ease, transform 0.6s ease;
}

.experience-card:hover {
  border-color: rgba(174, 115, 255, 0.5);
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.28), 0 0 44px rgba(174, 115, 255, 0.12);
  transform: translate3d(0, calc((1 - var(--activity, 0)) * 6px - 3px), 0);
}

.experience-card:hover::after {
  opacity: 1;
  transform: translateX(35%);
}

.experience-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
}

.experience-card__identity {
  min-width: 0;
}

.experience-card__logo {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 auto;
  background: transparent;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.experience-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.experience-card__logo--pipe img {
  width: 85%;
  height: 85%;
  transform: translateY(-10px);
  filter:
    brightness(1.65)
    contrast(0.92)
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.experience-card__logo--google img {
  width: 78%;
  height: 78%;
}

.experience-card__logo:hover,
.experience-card__logo:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
}

.timeline__role {
  margin: 0.22rem 0 0;
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  font-weight: 600;
  line-height: 1.3;
}

.timeline__org {
  display: block;
  color: var(--lav-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline__when {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.experience-card__status {
  align-self: start;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(174, 115, 255, 0.32);
  border-radius: 999px;
  background: rgba(174, 115, 255, 0.11);
  color: #dbc2ff;
  font: 600 0.66rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.experience-card__summary {
  max-width: 50rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.72;
}

.experience-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.experience-card__tags li {
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(174, 115, 255, 0.15);
  border-radius: 999px;
  background: rgba(174, 115, 255, 0.06);
  color: #c3b6dd;
  font: 500 0.7rem/1 var(--font-mono);
}

.timeline__item--break {
  padding-block: 0.3rem 1.65rem;
}

.timeline__item--break::before {
  top: 1.35rem;
  border-color: rgba(94, 216, 230, 0.75);
  box-shadow: 0 0 0 5px rgba(94, 216, 230, 0.07), 0 0 22px rgba(94, 216, 230, 0.25);
}

.career-break {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px dashed rgba(94, 216, 230, 0.22);
  border-radius: 1rem;
  background: rgba(94, 216, 230, 0.035);
}

.career-break__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(94, 216, 230, 0.1);
  color: #83dfe8;
  font-size: 1.15rem;
}

.education-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-left: 3.5rem;
}

/* Dim track, same treatment as the experience timeline… */
.education-grid::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 1.05rem;
  width: 1px;
  background: rgba(174, 115, 255, 0.16);
}

/* …and the lit spine that draws itself in as you scroll through. */
.education-grid::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(1.05rem - 0.5px);
  width: 2px;
  height: calc(var(--track-progress, 0) * 100%);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lav-dim), var(--lav) 55%, var(--lav-bright));
  box-shadow: 0 0 8px rgba(174, 115, 255, 0.3);
}

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.education-card,
.contact-card {
  border: 1px solid rgba(174, 115, 255, 0.2);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(30, 19, 39, 0.72), rgba(14, 9, 19, 0.38));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.14);
}

.education-card {
  /* Same live-scroll defaults as the timeline: fully lit if JS never runs. */
  --activity: 1;
  position: relative;
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 9rem;
  padding: 1.5rem 1.65rem;
  border-color: rgba(174, 115, 255, calc(0.12 + var(--activity) * 0.3));
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.14),
    0 0 calc(var(--activity) * 48px) rgba(174, 115, 255, calc(var(--activity) * 0.14));
  /* Merge the reveal transform with a scroll-linked slide-in so the two
     systems don't fight over the transform property. */
  opacity: calc(var(--reveal-opacity, 0.16) * (0.5 + var(--activity) * 0.5));
  transform:
    perspective(900px)
    translate3d(calc((1 - var(--activity)) * 16px), var(--reveal-y, 38px), 0)
    rotateX(var(--reveal-rotate, 2.2deg))
    scale(var(--reveal-scale, 0.985));
  transform-origin: 50% 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease;
}

.education-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -2.72rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid rgba(174, 115, 255, calc(0.35 + var(--activity) * 0.65));
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%) scale(calc(1 + var(--activity) * 0.32));
  box-shadow:
    0 0 0 calc(4px + var(--activity) * 5px) rgba(174, 115, 255, calc(0.04 + var(--activity) * 0.09)),
    0 0 26px rgba(174, 115, 255, calc(0.12 + var(--activity) * 0.55));
  transform: translateY(-50%);
}

.education-card__degree,
.contact-card__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lav-dim);
}

.education-card:hover,
.education-card:focus-visible {
  border-color: rgba(174, 115, 255, 0.58);
  background: linear-gradient(145deg, rgba(38, 23, 49, 0.78), rgba(20, 12, 27, 0.46));
  box-shadow: 0 20px 58px rgba(174, 115, 255, 0.12);
  outline: none;
}

.education-card__logo {
  display: flex;
  align-items: center;
  width: 12rem;
  height: 5rem;
  overflow: hidden;
}

.education-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  /* Colour drains out as the card falls away from the reading line. */
  filter:
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.22))
    grayscale(calc((1 - var(--activity, 1)) * 0.9))
    brightness(calc(0.6 + var(--activity, 1) * 0.4));
  transition: transform 0.25s ease;
}

.education-card__logo--vit img {
  width: auto;
  max-width: none;
  height: 86%;
  object-fit: initial;
}

.education-card:hover .education-card__logo img,
.education-card:focus-visible .education-card__logo img {
  transform: translateY(-2px);
}

.education-card__copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.education-card__degree {
  color: var(--lav-soft);
}

.education-card__school {
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 600;
}

.education-card__arrow {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(174, 115, 255, 0.18);
  border-radius: 50%;
  color: var(--lav);
  background: rgba(174, 115, 255, 0.06);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 1.25rem 1.35rem;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  border-color: rgba(174, 115, 255, 0.58);
  background: rgba(174, 115, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(174, 115, 255, 0.13);
  outline: none;
}

.contact-card__icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  color: var(--lav);
  background: rgba(174, 115, 255, 0.1);
}

.contact-card__icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: currentColor;
}

.contact-card__copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.contact-card__value {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  font-weight: 500;
}

.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer__host {
  font-family: var(--font-mono);
  color: var(--lav-soft);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes term-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    padding: 0.8rem 0.9rem;
  }

  .nav__links {
    width: 100%;
    justify-content: space-between;
    gap: 0.3rem;
    font-size: 0.74rem;
  }

  .nav__links a {
    padding: 0.42rem 0.58rem;
  }

  .focus-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .exp-hud {
    display: none;
  }

  .education-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    padding: 1.3rem;
  }

  .education-grid {
    padding-left: 2.4rem;
  }

  .education-grid::before {
    left: 0.65rem;
  }

  .education-card::before {
    left: -2.12rem;
  }

  .education-card__logo {
    grid-column: 1 / -1;
    width: 10.5rem;
    height: 4.4rem;
  }

  .contact-card {
    padding: 1.1rem;
  }

  .contact-card__value {
    font-size: 0.86rem;
  }

  .section {
    padding-top: 5rem;
  }

  .timeline {
    padding-left: 2.4rem;
  }

  .timeline::before {
    left: 0.65rem;
  }

  .timeline__item::before {
    left: -2.12rem;
  }

  .experience-card__header {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem;
  }

  .experience-card__logo {
    width: 3.5rem;
    height: 3.5rem;
  }

  .experience-card__status {
    grid-column: 2;
    justify-self: start;
  }

  .experience-card__summary {
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3.5rem;
  }

  .hero__name {
    font-size: clamp(2.2rem, 10.5vw, 2.48rem);
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .atmosphere::after,
  .mesh,
  .term,
  .term__line,
  .term.is-out,
  .hero__copy,
  .hero__copy > *,
  .hero__letter,
  .hero__cursor,
  .section,
  [data-reveal],
  .experience-card {
    animation: none !important;
    transition: none !important;
  }

  .term__line,
  .hero__copy.is-in > *,
  .hero__letter,
  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  /* Everything reads as "current" rather than tracking the scroll. */
  .timeline__item,
  .education-card {
    --activity: 1;
  }

  .experience-card,
  .experience-card:hover,
  .education-card {
    transform: none;
  }

  .scroll-progress,
  .exp-hud {
    display: none;
  }
}
