/* ==================================================================
   Mohammed Zareef — zareef.top
   Dark, lime-accented design system. 3D hero lives in #webgl (three.js)
   and is interacted with through the transparent #stage overlay.
   ================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('../fonts/syne-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #07070b;
  --bg-elev: #0c0d13;
  --ink: #f4f4f6;
  --ink-2: #c9c9d4;
  --muted: #8d8d9c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #c8ff4a;
  --accent-2: #6ef0d0;
  --accent-ink: #0a0c04;
  --accent-glow: rgba(200, 255, 74, 0.45);

  --font-display: 'Syne', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 20px;
  --radius-lg: 28px;
  --nav-h: 72px;
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 0.55, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  scrollbar-color: #2a2a34 var(--bg);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  /* ambient glow behind the globe, visible before WebGL paints */
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 42% at 71% 48%, rgba(200, 255, 74, 0.07), transparent 70%),
    radial-gradient(30% 30% at 12% 90%, rgba(110, 240, 208, 0.05), transparent 70%);
}

body::after {
  /* fine grain so the dark surfaces don't band */
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: #2a2a34;
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-track {
  background: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Inline <use> icons pick up the stroke from their parent's colour */
.btn svg,
.hero__meta svg,
.footer__top svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  position: relative;
  z-index: 1;
}

/* ---------- Type helpers ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

.section__title {
  margin-top: 20px;
  font: 700 clamp(2.1rem, 4.4vw, 3.6rem) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(92deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.muted {
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  --tx: 0px;
  --ty: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transform: translate(var(--tx), var(--ty));
  transition:
    transform 0.35s var(--ease),
    background-color 0.3s,
    color 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    0 0 0 1px rgba(200, 255, 74, 0.35),
    0 12px 40px -12px var(--accent-glow);
}
.btn--primary:hover {
  box-shadow:
    0 0 0 1px var(--accent),
    0 18px 50px -12px rgba(200, 255, 74, 0.7);
}
.btn--ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip--accent {
  border-color: rgba(200, 255, 74, 0.4);
  color: var(--accent);
}
.chip--ghost {
  border-color: transparent;
  color: var(--muted);
}

/* ---------- Cards ---------- */
.card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: block;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition:
    transform 0.25s ease-out,
    border-color 0.35s;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(200, 255, 74, 0.11), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  opacity: 0.6;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(200, 255, 74, 0.35);
}
.card:hover::before {
  opacity: 1;
}
.card__index {
  position: absolute;
  top: 16px;
  right: 22px;
  font: 700 44px/1 var(--font-display);
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}
.card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding-right: 56px;
}
.card__title {
  font: 700 clamp(1.25rem, 1.6vw, 1.45rem) / 1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.card__org {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.bullets {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

/* ==================================================================
   WebGL canvas + interaction stage
   ================================================================== */
#webgl {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage {
  position: absolute;
  inset: var(--nav-h) 0 0 36%;
  z-index: 1;
  cursor: grab;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.stage.is-grabbing {
  cursor: grabbing;
}
.stage__hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 11, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  animation: fade-in 1s var(--ease) 2.2s forwards;
}
.stage__hint::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* No WebGL → a static CSS orb in its place */
.no-webgl #webgl {
  display: none;
}
.no-webgl .stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(56vh, 46vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 255, 74, 0.22), transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(200, 255, 74, 0.25) 59%, transparent 61%);
  box-shadow: inset 0 0 80px rgba(200, 255, 74, 0.08);
}

/* ==================================================================
   Navigation
   ================================================================== */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  height: 2px;
  pointer-events: none;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled,
.nav.is-open {
  background: rgba(7, 7, 11, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}
.nav__brand {
  font: 800 22px/1 var(--font-display);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}
.nav__brand i {
  font-style: normal;
  color: var(--accent);
  transition: transform 0.4s var(--ease);
  display: inline-block;
}
.nav__brand:hover i {
  transform: translateY(-3px);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font: 500 14px/1 var(--font-body);
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav__link::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}
.nav__link:hover,
.nav__link.is-active {
  color: var(--ink);
}
.nav__link:hover::before,
.nav__link.is-active::before {
  transform: none;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav__toggle span::before {
  top: -6px;
}
.nav__toggle span::after {
  top: 6px;
}
.nav.is-open .nav__toggle span {
  background: transparent;
}
.nav.is-open .nav__toggle span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav.is-open .nav__toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ==================================================================
   Hero
   ================================================================== */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: var(--nav-h);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  pointer-events: none;
}
.hero__inner a {
  pointer-events: auto;
}
.hero > .container {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0;
  animation: fade-in 0.9s var(--ease) 0.15s forwards;
}
.eyebrow__sep {
  color: var(--muted);
}
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero__title {
  margin-top: 26px;
  font: 800 clamp(2.7rem, 7.2vw, 6.5rem) / 0.96 var(--font-display);
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero__title .line {
  display: block;
  padding-block: 0.06em;
  margin-block: -0.06em;
}
/* The rise-in reveal needs clipping, but only when JS is running:
   without JS the title must never be cut off. */
html.js .hero__title .line {
  overflow: hidden;
}
html.js .hero__title .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease) forwards;
}
.hero__title .line:nth-child(1) > span {
  animation-delay: 0.05s;
}
.hero__title .line:nth-child(2) > span {
  animation-delay: 0.15s;
}
.hero__title .dot {
  color: var(--accent);
}

.hero__role {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 28px;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 500;
  color: var(--ink-2);
  opacity: 0;
  animation: fade-in 0.9s var(--ease) 0.5s forwards;
}
.rotator {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.25;
}
.rotator > span {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  will-change: transform, filter;
}

.hero__lede {
  max-width: 540px;
  margin-top: 18px;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--muted);
  opacity: 0;
  animation: fade-in 0.9s var(--ease) 0.65s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  opacity: 0;
  animation: fade-in 0.9s var(--ease) 0.8s forwards;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0;
  animation: fade-in 0.9s var(--ease) 0.95s forwards;
}
.hero__meta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.hero__meta a:hover {
  color: var(--accent);
}
.hero__meta svg {
  width: 15px;
  height: 15px;
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fade-in 1s var(--ease) 1.6s forwards;
}
.hero__scroll::before {
  content: '';
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 2s var(--ease) infinite;
}

/* ==================================================================
   Marquee
   ================================================================== */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee__group {
  display: flex;
  flex: none;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 56px;
}
.marquee__item::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-left: 28px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ==================================================================
   Sections
   ================================================================== */
.section {
  position: relative;
  padding-block: clamp(80px, 11vw, 140px);
}
.section__head {
  display: grid;
  gap: 0;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* --- About --- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.about__text {
  display: grid;
  gap: 20px;
  font-size: 1.05rem;
  color: var(--ink-2);
}
.about__text .muted {
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 44px;
  border-block: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse; /* value above its label, semantics unchanged */
  padding: 24px 20px 22px;
  border-left: 1px solid var(--line);
}
.stat:first-child {
  border-left: 0;
  padding-left: 0;
}
.stat__num {
  display: block;
  font: 700 clamp(2rem, 3.4vw, 2.9rem) / 1 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__num sup {
  font-size: 0.55em;
  color: var(--accent);
  vertical-align: 0.45em;
  margin-left: 2px;
}
.stat__label {
  display: block;
  margin-top: 12px;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Experience --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.timeline .card {
  height: 100%;
}

/* --- Skills --- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.skills .card {
  min-height: 100%;
}
.skills .card__index {
  top: auto;
  bottom: 18px;
  right: 22px;
  font-size: 40px;
}
.skills .card__title {
  margin-top: 14px;
}

/* --- Education --- */
.edu {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.edu__card {
  padding: 32px;
}
.edu__year {
  font: 500 13px/1 var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* --- Contact --- */
.contact__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(200, 255, 74, 0.14), transparent 50%),
    radial-gradient(60% 90% at 0% 100%, rgba(110, 240, 208, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}
.contact__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 90% at 100% 0%, #000, transparent 70%);
  mask-image: radial-gradient(70% 90% at 100% 0%, #000, transparent 70%);
  pointer-events: none;
}
.contact__title {
  position: relative;
  max-width: 16ch;
  font: 700 clamp(2.3rem, 5.2vw, 4.4rem) / 1.02 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.contact__text {
  position: relative;
  max-width: 52ch;
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--muted);
}
.contact__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ==================================================================
   Footer
   ================================================================== */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  font: 500 13px/1.5 var(--font-mono);
  color: var(--muted);
}
.footer__inner a {
  color: var(--ink-2);
  transition: color 0.2s;
}
.footer__inner a:hover {
  color: var(--accent);
}
.footer__brand {
  font: 800 18px/1 var(--font-display);
  color: var(--ink) !important;
  letter-spacing: -0.02em;
}
.footer__brand i {
  font-style: normal;
  color: var(--accent);
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer__top svg {
  width: 14px;
  height: 14px;
}

/* ==================================================================
   404
   ================================================================== */
.error {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-block: 48px;
}
.error .section__title {
  max-width: 14ch;
}
.error__text {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.05rem;
}
.error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ==================================================================
   Motion
   ================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.delay-1 {
  --d: 0.08s;
}
.delay-2 {
  --d: 0.16s;
}
.delay-3 {
  --d: 0.24s;
}

@keyframes rise {
  to {
    transform: none;
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
@keyframes drip {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

html.menu-open {
  overflow: hidden;
}

/* ==================================================================
   Responsive
   ================================================================== */
@media (max-width: 1023px) {
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    align-items: flex-end;
    padding-bottom: 72px;
  }
  .stage {
    inset: 0 0 44% 0;
  }
  .stage__hint,
  .hero__scroll {
    display: none;
  }
  .about__grid,
  .edu {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --nav-h: 64px;
  }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: rgba(7, 7, 11, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-110%);
    visibility: hidden;
    transition:
      transform 0.45s var(--ease),
      visibility 0s 0.45s;
  }
  .nav.is-open .nav__links {
    transform: none;
    visibility: visible;
    transition:
      transform 0.45s var(--ease),
      visibility 0s;
  }
  .nav__link {
    padding: 14px 6px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav__link:last-child {
    border-bottom: 0;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .nav__cta {
    display: none;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 22px;
  }
  .card__index {
    font-size: 36px;
    top: 14px;
    right: 18px;
  }
  .card__top {
    padding-right: 0;
    margin-bottom: 18px;
  }
  .skills {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 20px 16px;
  }
  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .hero__actions .btn {
    flex: 1 1 auto;
  }
  .contact__panel {
    border-radius: var(--radius);
  }
}

@media (max-height: 700px) and (max-width: 900px) {
  .hero {
    padding-bottom: 40px;
  }
  .hero__title {
    margin-top: 18px;
  }
  .hero__role,
  .hero__lede {
    margin-top: 14px;
  }
  .hero__actions {
    margin-top: 24px;
  }
  .hero__meta {
    margin-top: 20px;
  }
}

/* ==================================================================
   Reduced motion
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__title .line > span {
    transform: none;
  }
  .eyebrow,
  .hero__role,
  .hero__lede,
  .hero__actions,
  .hero__meta,
  .hero__scroll,
  .stage__hint {
    opacity: 1;
  }
  .card {
    transform: none;
  }
  .marquee__track {
    animation: none;
  }
}
