/* ───────────── Theme tokens ───────────── */
:root {
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --pixel: "Press Start 2P", ui-monospace, monospace;  /* retro dot-matrix display */
  --crt: "VT323", "Press Start 2P", monospace;          /* CRT terminal (readable) */
  --maxw: 920px;

  /* type scale — one ladder, used everywhere */
  --fs-micro: 11px;   /* tag chips */
  --fs-label: 12px;   /* eyebrows · section numbers · meta · mono captions */
  --fs-sm:    13px;   /* links, fine print, captions */
  --fs-body:  15px;   /* ALL body copy (hero text, cards, ticker, journey) */
  --fs-title: 16px;   /* card / stop titles */
  --lh-body:  1.6;
  --track-label: 0.14em; /* one tracking for all uppercase mono labels */

  /* heading sizes (fluid) */
  --fs-h-xl: clamp(30px, 7vw, 52px);  /* name */
  --fs-h-lg: clamp(24px, 5vw, 34px);  /* now activity */
  --fs-h-md: clamp(22px, 4vw, 30px);  /* section titles */

  /* radii — sm/md/lg/pill, nothing in between */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* vertical rhythm */
  --space-section: clamp(48px, 8vw, 80px);
  --space-title: 26px;
}

html[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-soft: #121214;
  --card: #141417;
  --card-border: #232327;
  --text: #ededf0;
  --text-dim: #a2a2ab;
  --text-faint: #6b6b75;
  --accent: #34d399;        /* online green */
  --accent-soft: rgba(52, 211, 153, 0.12);
  --busy: #f59e0b;
  --away: #38bdf8;
  --sleep: #818cf8;
  --offline: #6b7280;
  --ring: rgba(255, 255, 255, 0.06);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] {
  --bg: #faf9f7;
  --bg-soft: #f1f0ec;
  --card: #ffffff;
  --card-border: #e4e2db;
  --text: #1a1a1d;
  --text-dim: #55555f;
  --text-faint: #8a8a92;
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.10);
  --busy: #b45309;
  --away: #0369a1;
  --sleep: #4f46e5;
  --offline: #9ca3af;
  --ring: rgba(0, 0, 0, 0.05);
  --shadow: 0 12px 40px rgba(20, 20, 30, 0.10);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  transition: background 0.35s ease;
}
body {
  margin: 0;
  background: transparent; /* let the .bg-fx glow layer (z-index:-1) show through */
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  transition: color 0.35s ease;
}

a { color: inherit; }

/* ───────────── Top bar ───────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ring);
}

.sys {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

.theme-toggle {
  font-family: var(--mono);
  font-size: 16px;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.35s ease;
}
.theme-toggle:hover { transform: rotate(-12deg); border-color: var(--accent); }
html[data-theme="dark"] .theme-toggle .t-light { display: none; }
html[data-theme="light"] .theme-toggle .t-dark { display: none; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  color: var(--text-faint);
  padding: 2px;
  transition: color 0.2s ease;
}
.lang-btn:hover { color: var(--text-dim); }
.lang-btn.is-active { color: var(--accent); }
.lang-sep { color: var(--text-faint); opacity: 0.5; }

/* ───────────── Layout ───────────── */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 48px);
}

/* ───────────── Hero ───────────── */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  padding: 40px 0 32px;
}

/* ── iPhone-17 titanium back panel (compact status widget) ── */
.now-card {
  width: min(420px, 100%);
  position: relative;
  border-radius: 26px;
  padding: 14px 18px 13px;
  color: var(--text);
  /* brushed-titanium body */
  background: linear-gradient(150deg, #3b3e44 0%, #24272c 26%, #181a1e 60%, #282b30 100%);
  /* embossed / chamfered metal edge */
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
    inset 1.5px 0 0 rgba(255, 255, 255, 0.07),
    inset -1.5px 0 0 rgba(0, 0, 0, 0.45),
    inset 0 -2px 3px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}
/* polished rim — bright top-left, dark bottom-right (catches the light) */
.now-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255,255,255,0.55), rgba(255,255,255,0.06) 32%, rgba(0,0,0,0.45) 78%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
/* faint state-tinted wash from the camera corner */
.now-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(75% 55% at 20% 4%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.now-card > * { position: relative; z-index: 1; }

/* camera plateau — raised island holding the "lens" + sensor LEDs */
.now-plateau {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  padding: 7px 10px;
  border-radius: 15px;
  background: linear-gradient(155deg, #2e3137, #191b1f);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.55),
    0 1px 2px rgba(0,0,0,0.45);
}
/* triple-lens camera cluster — main lens holds the status emoji */
.now-cams { display: flex; align-items: center; gap: 6px; }
.now-lens {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #3d424a, #0d0f12 72%);
  box-shadow:
    inset 0 0 0 1.5px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.04);
}
.now-lens.main {
  width: 24px; height: 24px;
  font-size: 12px; line-height: 1;
  background: radial-gradient(circle at 32% 26%, #41464d, #0e1013 72%);
  box-shadow:
    inset 0 0 0 1.5px rgba(0,0,0,0.65),
    inset 0 0 0 3px color-mix(in srgb, var(--accent) 55%, #2a2d31),
    inset 0 1px 3px rgba(0,0,0,0.7),
    0 0 8px color-mix(in srgb, var(--accent) 32%, transparent);
}
/* sensor LEDs (live pulse + amber flash) */
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-left: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: pulse 2s infinite;
}
.led-flash {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde68a, #92400e);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  opacity: 0.85;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.now-state {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
  text-shadow: 0 1px 0 rgba(255,255,255,0.08);  /* engraved */
}

/* state-driven accent (lens ring, LED, wash) */
.now-card[data-state="busy"]    { --accent: var(--busy); }
.now-card[data-state="away"]    { --accent: var(--away); }
.now-card[data-state="sleeping"]{ --accent: var(--sleep); }
.now-card[data-state="offline"] { --accent: var(--offline); }
.now-card[data-state="offline"] .dot { animation: none; opacity: .6; }

/* engraved status text on the metal */
.now-activity {
  font-family: var(--mono);
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 3px;
  color: #e9ebee;
  text-shadow: 0 1px 0 rgba(0,0,0,0.6);
}
.now-detail {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.35;
}
.now-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
}
.now-playing::before { content: "♫ "; color: var(--accent); }
.now-speed::before   { content: "🚗 "; }
.now-battery::before { content: "▮ "; color: var(--accent); }
.hidden { display: none; }

/* live feed: GDL clock + rotating markets (engraved ticker tape on the device) */
.now-feed {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(233, 235, 238, 0.55);
}
.feed-clock {
  color: rgba(233, 235, 238, 0.82);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.feed-sep { opacity: 0.35; }
.feed-mkt {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-mkt .feed-k { color: rgba(233, 235, 238, 0.45); }
.feed-mkt .feed-chg.up   { color: #34d399; }
.feed-mkt .feed-chg.down { color: #f87171; }
.feed-mkt .muted { opacity: 0.5; }
.feed-in { animation: feedIn 0.45s ease; }
@keyframes feedIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* identity */
.identity { max-width: 560px; }
.name {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.role {
  font-family: var(--mono);
  color: var(--accent);
  font-size: var(--fs-body);
  margin: 0 0 10px;
}
.caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.subrole { color: var(--text-dim); margin: 0 0 16px; font-size: var(--fs-body); }

.nickname {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--mono);
  font-size: clamp(12px, 2vw, 16px);
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 2px 9px;
  letter-spacing: 0.08em;
  vertical-align: middle;
  opacity: 0.85;
}
/* the wry, self-deprecating setup — now a quiet aside */
.tagline {
  color: var(--text-faint);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  max-width: 46ch;
  margin: 0 auto 14px;
  text-wrap: pretty;
}
/* the positive payoff — the line that actually leads, bright + bold */
.bio {
  color: var(--text);
  font-size: clamp(15px, 2.1vw, 19px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  max-width: 46ch;
  margin: 0 auto 26px;
  text-wrap: balance;
}
/* accent the closing positive note */
.bio .pay { color: var(--accent); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.links a {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-pill);
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.links a:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* ───────────── Ticker ───────────── */
.ticker-wrap { margin: 0 0 var(--space-section); }
.ticker-label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  text-align: center;
}
.ticker {
  position: relative;
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track {
  display: inline-flex;
  align-items: stretch;
  gap: 16px;
  white-space: nowrap;
  will-change: transform;
  animation: scroll 64s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  white-space: normal;
  width: 380px;
  padding: 14px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--card) 65%, transparent);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.ticker-item:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.ticker-item.muted { color: var(--text-faint); border: none; background: none; width: auto; }
.ticker-item .li-mark {
  color: #fff;
  background: #0a66c2; /* LinkedIn blue */
  font-family: var(--mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
  letter-spacing: -0.02em;
}
.ticker-item .li-date { color: var(--text-faint); font-family: var(--mono); font-size: var(--fs-label); }
.ticker-item a { text-decoration: none; }
.ticker-item:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .dot { animation: none; }
  .now-card::after { animation: none; }
  .feed-in { animation: none; }
}

/* ───────────── By the numbers ───────────── */
.stats-band {
  margin: 0 0 var(--space-section);
  text-align: center;
}
.stats-label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.stat {
  flex: 1 1 130px;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  background: var(--card);
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-n {
  font-family: var(--mono);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.stat-label {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

/* ───────────── Content blocks ───────────── */
.block { padding: var(--space-section) 0; border-top: 1px solid var(--ring); }
.block-num {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.block-title {
  font-size: var(--fs-h-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--space-title);
}

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card .tags {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--mono); font-size: var(--fs-micro); color: var(--text-faint);
  margin-bottom: 14px; text-transform: lowercase;
}
.badge {
  padding: 2px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--card-border); color: var(--text-dim);
}
.badge.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.card h4 { margin: 0 0 8px; font-size: var(--fs-title); letter-spacing: -0.01em; }
.card p { margin: 0 0 16px; color: var(--text-dim); font-size: var(--fs-body); line-height: 1.6; }
.card .cta { font-family: var(--mono); font-size: var(--fs-label); color: var(--accent); text-decoration: none; }

/* ───────────── Journey: India ↔ Mexico flight path ───────────── */
.flight-legend {
  font-family: var(--mono);
  font-size: var(--fs-label);
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin: -14px 0 20px;
}
.flight-legend .legend-arrow { color: var(--accent); }

.flightmap { position: relative; width: 100%; }

.flight-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.flight-route {
  stroke: var(--card-border);
  stroke-width: 2;
  stroke-dasharray: 2 8;       /* dotted airline-route look */
  stroke-linecap: round;
}
.flight-trail {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 60%, transparent));
  transition: stroke-dashoffset 0.08s linear;
}

.flight-plane {
  position: absolute;
  top: 0; left: 0;
  width: 26px; height: 26px;
  z-index: 2;
  color: var(--accent);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 0.08s linear;
  will-change: transform;
}
.flight-plane svg { width: 100%; height: 100%; fill: currentColor; }

.stops { position: relative; z-index: 1; }
.stop {
  position: relative;
  min-height: 168px;
  display: flex;
  align-items: center;
}
.stop-card {
  width: min(330px, 40%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stop-left  { justify-content: flex-start; }
.stop-right { justify-content: flex-end; }

/* waypoint dots sit in two "lanes" so the path weaves between countries */
.stop-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  z-index: 2;
}
.stop-left  .stop-dot { left: 40%; }
.stop-right .stop-dot { left: 60%; }

.stop-era {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.stop-move {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--r-pill);
  padding: 2px 9px;
  margin-bottom: 10px;
}
.stop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.stop-loc  { font-family: var(--mono); font-size: var(--fs-label); color: var(--text-dim); }
.stop-year { font-family: var(--mono); font-size: var(--fs-label); color: var(--text-faint); }
.stop-card h5 { margin: 2px 0 6px; font-size: var(--fs-title); letter-spacing: -0.01em; }
.stop-card p  { margin: 0; color: var(--text-dim); font-size: var(--fs-body); line-height: 1.6; }

/* one column on small screens: path runs down the left, cards on the right */
@media (max-width: 640px) {
  .stop { min-height: 0; margin-bottom: 22px; }
  .stop-left, .stop-right { justify-content: flex-end; }
  .stop-card { width: calc(100% - 44px); }
  .stop-left .stop-dot, .stop-right .stop-dot { left: 12px; }
}

/* connect */
.connect-line { color: var(--text-dim); max-width: 50ch; font-size: var(--fs-body); margin: 0 0 18px; }
.email-big {
  display: inline-block;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin: 0 0 22px;
  border-bottom: 2px solid var(--accent);
}
.connect .links { justify-content: flex-start; }

.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px clamp(18px, 5vw, 48px) 60px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.02em;
  color: var(--text-faint);
  border-top: 1px solid var(--ring);
}

@media (max-width: 560px) {
  .now-card { padding: 26px 20px 22px; }
}

/* ───────────── Ambient background that trails the cursor ─────────────
   A soft aurora glow + a fine dot-grid live behind everything. The glow
   lags the real cursor with spring physics (santisiordia-style): the
   actual system cursor is untouched, the background just breathes toward it. */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* fine dot grid — barely-there texture so the canvas isn't flat */
.bg-fx::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image: radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0);
  background-size: 30px 30px;
  -webkit-mask: radial-gradient(120% 120% at 50% 40%, #000 35%, transparent 100%);
  mask: radial-gradient(120% 120% at 50% 40%, #000 35%, transparent 100%);
  opacity: 0.5;
}

/* the glow blob — positioned via CSS vars set from JS */
.bg-glow {
  position: absolute;
  top: 0; left: 0;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  transform: translate(calc(var(--gx, 50vw) - 30vmax), calc(var(--gy, 40vh) - 30vmax));
  background: radial-gradient(circle at center,
              var(--glow-a) 0%, var(--glow-b) 35%, transparent 70%);
  filter: blur(40px);
  opacity: 0.9;
  transition: opacity 0.6s ease;
  will-change: transform;
}

/* a second, slower, offset glow for depth */
.bg-glow.alt {
  width: 42vmax; height: 42vmax;
  transform: translate(calc(var(--gx2, 50vw) - 21vmax), calc(var(--gy2, 40vh) - 21vmax));
  background: radial-gradient(circle at center,
              var(--glow-c) 0%, transparent 65%);
  filter: blur(60px);
  opacity: 0.7;
}

html[data-theme="dark"] {
  --grid-dot: rgba(255, 255, 255, 0.05);
  --glow-a: rgba(52, 211, 153, 0.28);
  --glow-b: rgba(56, 189, 248, 0.18);
  --glow-c: rgba(129, 140, 248, 0.26);
}
html[data-theme="light"] {
  --grid-dot: rgba(20, 20, 40, 0.06);
  --glow-a: rgba(5, 150, 105, 0.22);
  --glow-b: rgba(3, 105, 161, 0.15);
  --glow-c: rgba(79, 70, 229, 0.20);
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow { transition: none; }
}
