/* ==========================================================================
   pruthvip.tech: Pruthvi means Earth, so the site is a small planet.
   Night (dark) is the default; data-theme="light" on <html> switches to day.
   main.js draws the stars, the Earth and the projects' orbits.
   ========================================================================== */

:root {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  --deva: "Noto Sans Devanagari", "Nirmala UI", Mangal, "Kohinoor Devanagari", sans-serif;

  color-scheme: dark;
  --bg: #04060d;
  --surface: rgba(17, 25, 48, .55);
  --surface-2: rgba(28, 40, 74, .7);
  --line: rgba(140, 170, 255, .12);
  --line-2: rgba(140, 170, 255, .24);
  --text: #eef2ff;
  --text-2: #aab5d1;
  --text-3: #7682a1;
  --blue: #5aa9ff;
  --blue-2: #9ccfff;
  --blue-soft: rgba(90, 169, 255, .13);
  --amber: #ffb547;
  --amber-2: #ffc96e;
  --amber-ink: #1d1404;
  --amber-text: #ffb547;
  --amber-soft: rgba(255, 181, 71, .13);
  --green: #4ade9b;
  --green-soft: rgba(74, 222, 155, .13);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, .13);

  --bar-bg: rgba(4, 6, 13, .74);
  --bar-solid: rgba(4, 6, 13, .96);
  --hover: rgba(255, 255, 255, .05);
  --ghost: rgba(255, 255, 255, .03);
  --chip-strong: rgba(8, 12, 26, .8);
  --tip-bg: rgba(8, 12, 26, .95);
  --band: linear-gradient(180deg, rgba(14, 22, 44, .45), rgba(10, 16, 32, .25));
  --card-bg: linear-gradient(180deg, rgba(24, 36, 70, .52), rgba(12, 18, 36, .52));
  --card-glow: rgba(40, 110, 255, .55);
  --node-fill: #0d1530;
  --queue-fill: #1a0d14;
  --dot-fill: #0b1224;
  --foot-bg: #061024;
  --dialog-bg: #0a1022;
  --hero-glow: rgba(52, 120, 255, .17);
  --horizon: radial-gradient(closest-side, #061024 90%, #13386f 96.5%, #6fb4ff 99.4%, rgba(160, 210, 255, .9) 100%);
  --horizon-glow: rgba(90, 169, 255, .28);

  --bar-h: 64px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Day: the same planet in daylight. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fc;
  --surface: rgba(255, 255, 255, .82);
  --surface-2: #ffffff;
  --line: rgba(22, 44, 96, .1);
  --line-2: rgba(22, 44, 96, .2);
  --text: #0b1530;
  --text-2: #42506f;
  --text-3: #5d6987;
  --blue: #1f6fe0;
  --blue-2: #1557c4;
  --blue-soft: rgba(31, 111, 224, .1);
  --amber-text: #a35a00;
  --amber-soft: rgba(255, 166, 40, .16);
  --green: #0e9a60;
  --green-soft: rgba(14, 154, 96, .12);
  --red: #d33a3a;
  --red-soft: rgba(211, 58, 58, .1);

  --bar-bg: rgba(243, 246, 252, .82);
  --bar-solid: rgba(243, 246, 252, .97);
  --hover: rgba(22, 44, 96, .05);
  --ghost: rgba(255, 255, 255, .7);
  --chip-strong: rgba(255, 255, 255, .94);
  --tip-bg: rgba(255, 255, 255, .98);
  --band: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .45));
  --card-bg: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, .86));
  --card-glow: rgba(31, 111, 224, .28);
  --node-fill: #ffffff;
  --queue-fill: #fff1f1;
  --dot-fill: #ffffff;
  --foot-bg: #e7eef9;
  --dialog-bg: #ffffff;
  --hero-glow: rgba(80, 140, 255, .16);
  --horizon: radial-gradient(closest-side, #dce9ff 88%, #a3c6ff 96%, #4f93f5 99.3%, rgba(120, 170, 255, .7) 100%);
  --horizon-glow: rgba(79, 147, 245, .25);
}
/* No stars in daylight. */
:root[data-theme="light"] .stars { display: none; }

/* Base ------------------------------------------------------------------ */

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 650; text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 1200px); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(100% - 56px, 1200px); } }
@media (min-width: 1100px) { .wrap { width: min(100% - 96px, 1200px); } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
/* Interactive extras only make sense when main.js runs (the head script adds .js). */
html:not(.js) .js-only { display: none !important; }

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

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.4;
}

/* Stars behind everything (drawn once per resize by main.js) */
.stars { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }

/* Icons and buttons ------------------------------------------------------- */

.icon {
  width: 18px; height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 104%;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .25s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--amber-ink); box-shadow: 0 10px 30px -12px rgba(255, 181, 71, .6); }
.btn-primary:hover { background: var(--amber-2); box-shadow: 0 16px 38px -12px rgba(255, 181, 71, .8); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); background: var(--ghost); color: var(--text); }
.btn-ghost:hover { border-color: rgba(90, 169, 255, .55); background: var(--blue-soft); }
.btn-square { width: 50px; padding: 0; }
.btn-small { height: 38px; padding: 0 14px; border-radius: 11px; font-size: .9rem; }
.btn-small .icon { width: 16px; height: 16px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  color: var(--text-2);
  transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: rgba(90, 169, 255, .55); background: var(--blue-soft); }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 181, 71, .45);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.link-btn:hover { text-decoration-color: var(--amber); }
.link-btn .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-btn:hover .icon { transform: translateX(3px); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-text);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 181, 71, .8);
}

.lead { max-width: 36em; margin-top: 18px; color: var(--text-2); font-size: clamp(1.06rem, 1rem + .25vw, 1.18rem); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--ghost);
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.3;
}
.chips li.is-key { border-color: rgba(255, 181, 71, .45); background: var(--amber-soft); color: var(--text); }

/* Header -------------------------------------------------------------- */

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: var(--bar-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
html:not(.js) .bar, .bar.is-scrolled, .bar[data-menu-open] {
  border-bottom-color: var(--line);
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.bar-inner { display: flex; align-items: center; gap: 28px; height: 100%; }

.mark { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.mark-svg { width: 32px; height: 32px; overflow: visible; }
.mark-orbit { fill: none; stroke: var(--text-3); stroke-width: 1.1; }
.mark-earth { fill: var(--blue); }
.mark-moon { fill: var(--amber); }
.mark-name { font-size: 1.02rem; font-weight: 700; font-stretch: 110%; letter-spacing: -.01em; white-space: nowrap; }

.nav ul { display: flex; gap: 6px; }
.nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: .94rem;
  font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a[aria-current] { color: var(--text); background: var(--blue-soft); }

.bar-actions { display: flex; align-items: center; gap: 8px; }
.icon-close, .icon-moon { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: none; }
.menu-toggle { display: none; }
.bar[data-menu-open] .icon-menu { display: none; }
.bar[data-menu-open] .icon-close { display: block; }

@media (max-width: 999.98px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    border-bottom: 1px solid var(--line);
    background: var(--bar-solid);
  }
  .bar[data-menu-open] .nav { display: block; }
  .nav ul { flex-direction: column; gap: 2px; width: min(100% - 32px, 1200px); margin: 0 auto; padding: 10px 0 18px; }
  .nav a { padding: 13px 12px; font-size: 1.08rem; }
}
@media (max-width: 999.98px) and (min-width: 640px) { .nav ul { width: min(100% - 56px, 1200px); } }
@media (max-width: 519.98px) { .bar-resume { display: none; } }

/* Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: max(640px, min(100svh, 1000px));
  padding: calc(var(--bar-h) + 28px) 0 76px;
  overflow: hidden;
}
/* A soft blue glow where the Earth sits */
.hero::before {
  content: "";
  position: absolute;
  top: 6%; right: -18%;
  width: min(1100px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 72%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 12px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; } }

.hero-kicker { animation: fade-up .9s .05s var(--ease) both; }
@media (max-width: 479.98px) { .hero-kicker { letter-spacing: .07em; } }
.hero-title {
  margin-top: 20px;
  font-size: clamp(3.3rem, 1.1rem + 7.4vw, 7rem);
  font-weight: 720;
  font-stretch: 112%;
  line-height: .9;
  letter-spacing: -.04em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .05em; }
.hero-title .line > span { display: block; animation: rise 1s .1s var(--ease) both; }
.hero-title .line + .line > span { animation-delay: .2s; }
.hero-lead {
  max-width: 28em;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(1.12rem, 1rem + .4vw, 1.32rem);
  line-height: 1.55;
  animation: fade-up .9s .35s var(--ease) both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; animation: fade-up .9s .45s var(--ease) both; }
@media (max-width: 479.98px) {
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr 46px 46px; gap: 8px; }
  .hero-actions .btn { padding: 0 10px; }
  .hero-actions .btn-square { width: 46px; }
}

@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

/* The Earth (main.js draws it on the canvas) */
.hero-earth { position: relative; height: clamp(360px, 96vw, 560px); }
@media (min-width: 1000px) {
  .hero-earth { width: calc(100% + 8vw); height: min(780px, calc(100svh - 110px)); min-height: 560px; margin-right: -8vw; }
}
.earth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.earth-canvas.is-dragging { cursor: grabbing; }
.earth-canvas.is-over-moon { cursor: pointer; }

.earth-pin {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: -9px 0 0 -9px;
  white-space: nowrap;
  transition: opacity .35s;
}
.earth-pin.is-flip { flex-direction: row-reverse; }
.pin-dot { position: relative; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, var(--amber) 0 3.5px, rgba(255, 181, 71, .3) 4.5px, transparent 9px); }
.pin-dot::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--amber); border-radius: 50%; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(2.8); opacity: 0; } }
.pin-label {
  padding: 6px 12px;
  border: 1px solid rgba(255, 181, 71, .4);
  border-radius: 999px;
  background: var(--chip-strong);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: .84rem;
  font-weight: 600;
  transition: border-color .2s, background-color .2s;
}
.pin-label b { color: var(--amber-text); font-weight: 600; }
.earth-pin:hover .pin-label, .earth-pin[aria-expanded="true"] .pin-label { border-color: var(--amber); background: var(--chip-strong); }
.pin-tip {
  position: absolute;
  left: 0; top: 0;
  width: max-content;
  max-width: min(270px, 80vw);
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--tip-bg);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.5;
  pointer-events: none;
}

.earth-hint {
  position: absolute;
  left: 50%; bottom: 2%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92%;
  color: var(--text-3);
  font-size: .9rem;
  text-align: center;
}
.earth-hint b { color: var(--text); font-weight: 600; }
.deva { color: var(--amber-text); font-family: var(--deva); font-weight: 600; }

/* Without JavaScript, a plain painted planet stands in. */
.earth-fallback { display: none; }
html:not(.js) .earth-fallback {
  display: block;
  position: absolute;
  top: 50%; left: 50%;
  width: min(70%, 420px);
  aspect-ratio: 1;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a6ad0, #0b2350 58%, #050b19 100%);
  box-shadow: 0 0 80px 10px rgba(90, 169, 255, .25);
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 22px;
  width: 26px; height: 40px;
  margin-left: -13px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--amber); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }
@media (max-width: 999.98px), (max-height: 700px) { .scroll-cue { display: none; } }

/* At a glance ----------------------------------------------------------- */

.stats { border-block: 1px solid var(--line); background: var(--band); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: 30px 16px 32px 0; }
.stat:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
.stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(n) { padding: 36px 24px 38px; border-top: 0; }
  .stat:first-child { padding-left: 0; }
  .stat + .stat { border-left: 1px solid var(--line); }
}
.stat-num {
  font-size: clamp(2.3rem, 1.6rem + 2.2vw, 3.4rem);
  font-weight: 720;
  font-stretch: 110%;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.stat-num i { margin-left: 3px; color: var(--amber-text); font-size: .55em; font-style: normal; letter-spacing: 0; }
.stat-label { max-width: 16em; margin-top: 10px; color: var(--text-2); font-size: .95rem; line-height: 1.5; }

/* Sections ------------------------------------------------------------ */

.section { position: relative; padding-top: clamp(100px, 12vw, 150px); }
.section h2 {
  max-width: 18ch;
  margin-top: 16px;
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem);
  font-weight: 680;
  font-stretch: 108%;
  line-height: 1.04;
  letter-spacing: -.03em;
}
.section-head { margin-bottom: 44px; }

/* About */
.about-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; } }
.focus { display: grid; gap: 12px; }
.focus li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s, transform .3s var(--ease);
}
.focus li:hover { border-color: rgba(90, 169, 255, .4); transform: translateX(4px); }
.focus-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--blue-soft); color: var(--blue-2); }
.focus-icon .icon { width: 22px; height: 22px; }
.focus h3 { font-size: 1.08rem; font-weight: 650; }
.focus p { margin-top: 2px; color: var(--text-2); font-size: .96rem; line-height: 1.5; }

/* Experience: a timeline */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 10px; bottom: 30px;
  width: 2px;
  background: linear-gradient(var(--green), var(--blue) 30%, rgba(90, 169, 255, .08));
}
.tl-item { position: relative; display: grid; gap: 10px; padding: 0 0 26px 38px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--bg);
}
.tl-item.is-now::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
@media (min-width: 900px) {
  .timeline::before { left: 207px; }
  .tl-item { grid-template-columns: 172px minmax(0, 1fr); gap: 64px; padding-left: 0; }
  .tl-item::before { left: 200px; }
  .tl-when { text-align: right; }
}
.tl-when { padding-top: 1px; color: var(--text-3); font-family: var(--mono); font-size: .82rem; }
.tl-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .72rem; }
.tl-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s;
}
.tl-card:hover { border-color: rgba(90, 169, 255, .35); }
.company { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.company h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.55rem); font-weight: 700; font-stretch: 106%; line-height: 1.2; letter-spacing: -.015em; }
.tl-org { margin-top: 4px; color: var(--amber-text); font-size: .95rem; font-weight: 500; }
.tl-org span { white-space: nowrap; }
@media (max-width: 479.98px) { .tl-card { padding: 20px 18px 22px; } }

/* Roles at one company hang on one thread inside its card, newest first. */
.roles { display: grid; gap: 26px; margin-top: 20px; }
.role { position: relative; padding-left: 28px; }
.role::before {
  content: "";
  position: absolute;
  left: 0; top: .4em;
  width: 12px; height: 12px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--dot-fill);
}
.role.is-now::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.role:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px; top: calc(.4em + 16px); bottom: -28px;
  width: 2px;
  background: linear-gradient(var(--green), var(--blue));
  opacity: .55;
}
.role-when { color: var(--text-3); font-family: var(--mono); font-size: .8rem; line-height: 1.6; }
.role h4 { margin: 2px 0 0; font-size: 1.1rem; font-weight: 650; line-height: 1.35; text-wrap: balance; }
.role ul { display: grid; gap: 8px; margin-top: 12px; }
.role ul li { position: relative; padding-left: 18px; color: var(--text-2); line-height: 1.55; }
.role ul li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.role b { color: var(--text); font-weight: 600; }

.edu { margin-top: 18px; }
@media (min-width: 900px) { .edu { margin-left: 236px; } }
.edu-title { color: var(--text-3); font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.edu ul { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 640px) { .edu ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.edu li { padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.edu b { display: block; font-weight: 600; }
.edu span { display: block; margin-top: 2px; color: var(--text-2); font-size: .92rem; }

/* Work: what I've built */
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  position: relative;
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(90, 169, 255, .45); box-shadow: 0 26px 60px -30px var(--card-glow); }
.card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--blue-soft); color: var(--blue-2); }
.card-icon .icon { width: 22px; height: 22px; }
.card-num { margin-top: 24px; font-size: clamp(2.2rem, 1.9rem + 1vw, 2.7rem); font-weight: 720; font-stretch: 110%; line-height: 1; letter-spacing: -.035em; }
.card-unit { margin-top: 6px; color: var(--amber-text); font-size: .92rem; font-weight: 500; }
.card h3 { margin-top: 20px; font-size: 1.16rem; font-weight: 650; }
.card > p:not([class]) { margin-top: 6px; color: var(--text-2); font-size: .98rem; line-height: 1.55; }
.card .link-btn { margin-top: 16px; }

/* See how it works: the platform diagram */
.how { display: grid; gap: 28px; margin-top: 72px; }
@media (min-width: 1000px) { .how { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 56px; align-items: center; } }
.how h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 680; font-stretch: 108%; letter-spacing: -.025em; }
.how-copy > p:not([class]) { margin-top: 14px; color: var(--text-2); font-size: 1.05rem; }
.how-try {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 181, 71, .3);
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--text);
  font-size: .98rem;
  line-height: 1.5;
}
.how-try .icon { margin-top: 2px; color: var(--amber-text); }
.how-try b { color: var(--amber-text); }

.topo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
}
.topo-svg { width: 100%; height: auto; padding: 22px 18px 14px; }
.topo-svg text { font-family: var(--mono); text-anchor: middle; }
.t-links path { fill: none; stroke: rgba(140, 170, 255, .28); stroke-width: 1; }
.t-links .t-fan { stroke-dasharray: 2 3; }
.t-ext rect { fill: var(--ghost); stroke: rgba(140, 170, 255, .3); stroke-dasharray: 3 3; }
.t-ext text { fill: var(--text-2); font-size: 10.5px; }
.t-bus { fill: rgba(90, 169, 255, .06); stroke: rgba(90, 169, 255, .35); }
.t-bus-label { fill: var(--blue-2); font-size: 9.5px; letter-spacing: .1em; opacity: .75; }
.t-lane { fill: none; stroke: rgba(90, 169, 255, .3); stroke-dasharray: 2 5; }
.t-node rect { fill: var(--node-fill); stroke: rgba(140, 170, 255, .35); stroke-width: 1; transition: stroke .35s, fill .35s; }
.t-node.is-hit rect { stroke: var(--amber); fill: rgba(255, 181, 71, .16); transition-duration: .05s; }
.t-node.is-hit.ev rect { stroke: var(--green); fill: var(--green-soft); }
.t-name { fill: var(--text); font-size: 12.5px; font-weight: 500; }
.t-sub { fill: var(--text-3); font-size: 9.5px; }
.t-ok { fill: var(--green); }
.pk-md circle { fill: var(--amber); }
.pk-ev circle { fill: var(--green); }
.pk .pk-halo { opacity: .3; }

/* Services can be switched off (main.js makes them buttons). */
.t-node[role="button"] { cursor: pointer; outline: none; }
.t-node[role="button"]:hover rect { stroke: var(--blue-2); }
.t-node[role="button"]:focus-visible rect { stroke: var(--amber); stroke-width: 2; }
.t-node.is-down rect, .t-node[role="button"].is-down:hover rect { fill: var(--red-soft); stroke: var(--red); stroke-dasharray: 4 3; }
.t-node.is-down .t-name, .t-node.is-down .t-sub, .t-node.is-down .t-ok { fill: var(--red); }
.t-queue rect { fill: var(--queue-fill); stroke: var(--red); }
.t-queue text { fill: var(--red); font-size: 9px; font-weight: 600; }

.topo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .74rem;
}
.topo-note { margin-left: auto; color: var(--text-2); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 8px; height: 8px; border-radius: 50%; }
.lg-md { background: var(--amber); }
.lg-ev { background: var(--green); }

.topo-tip {
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--tip-bg);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  color: var(--text-2);
  font-size: .84rem;
  line-height: 1.45;
  pointer-events: none;
}
.topo-tip b { display: block; margin-bottom: 3px; color: var(--text); font-family: var(--mono); font-size: .76rem; font-weight: 500; }
.tip-state { display: block; margin-top: 6px; color: var(--text-3); font-family: var(--mono); font-size: .7rem; }
.tip-state.is-down { color: var(--red); }

@media (max-width: 559.98px) {
  .t-sub { display: none; }
  .t-name { font-size: 13.5px; transform: translateY(9px); }
  .t-ext text { font-size: 12px; }
  .t-bus-label { font-size: 11px; }
  .t-queue text { font-size: 11px; }
  .topo-note { flex-basis: 100%; margin-left: 0; }
}

/* Skills */
.skills { display: grid; gap: 14px; }
@media (min-width: 640px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skill-group { padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skill-group h3 { margin-bottom: 14px; color: var(--text); font-size: 1rem; font-weight: 650; }

/* Pruthvi's Universe: side projects orbit the Earth */
.universe::before {
  content: "";
  position: absolute;
  top: 18%; left: -20%;
  width: min(1000px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(120, 90, 255, .12), transparent 72%);
  pointer-events: none;
}
.uni { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1000px) { .uni { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; } }
.uni-main { min-width: 0; }
.orbit-stage { position: relative; aspect-ratio: 4 / 3; }
.orbit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit-labels { position: absolute; inset: 0; pointer-events: none; }
.orbit-label {
  position: absolute;
  left: 0; top: 0;
  padding: 4px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--chip-strong);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: color .2s, border-color .2s, background-color .2s, opacity .3s;
}
.orbit-label:hover { color: var(--text); border-color: rgba(90, 169, 255, .55); }
.orbit-label[aria-pressed="true"] { border-color: var(--amber); background: var(--amber); color: var(--amber-ink); }

.tabs {
  display: flex;
  gap: 4px;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--chip-strong);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .tabs { width: fit-content; margin-inline: auto; } }
.tabs button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.tab-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-moon { background: radial-gradient(circle at 35% 35%, #f0f2f6, #8d93a2); }
.dot-star { background: #e6f2ff; box-shadow: 0 0 8px #9ccfff; }
.dot-nebula { background: radial-gradient(circle, #ff9ad5, #8d6bff); }
.dot-hole { background: #000; box-shadow: 0 0 0 2px #ff9a3c; }
.dot-quasar { background: #fff; box-shadow: 0 0 8px #7fe3ff; }
:root[data-theme="light"] .dot-star { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, .6); }
:root[data-theme="light"] .dot-quasar { background: #0ea5e9; box-shadow: 0 0 6px rgba(14, 165, 233, .6); }

.project {
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
}
/* Without JavaScript there's no orbit or tabs: every project shows, two to a row. */
html:not(.js) .uni { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .uni-main { display: none; }
html:not(.js) .panels { display: grid; gap: 16px; }
@media (min-width: 900px) { html:not(.js) .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.project.is-entering { animation: fade-up .45s var(--ease); }
.project-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.project h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); font-weight: 720; font-stretch: 110%; letter-spacing: -.025em; line-height: 1.1; }
.status { padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-family: var(--mono); font-size: .74rem; }
.status.is-live { border-color: rgba(74, 222, 155, .4); background: var(--green-soft); color: var(--green); }
.named { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--amber-soft); color: var(--text); font-size: 1rem; line-height: 1.55; }
.named span { color: var(--amber-text); font-weight: 600; }
.project > p:not([class]) { margin-top: 16px; color: var(--text-2); }
.fun { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 14px; padding: 6px 12px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--text-2); font-family: var(--mono); font-size: .8rem; }
.fun b { color: var(--amber-text); font-size: 1rem; }
.project .chips { margin-top: 18px; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; }
.project-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-2); font-weight: 600; transition: color .2s; }
.project-links a:hover { color: var(--amber-text); }
.project-links .icon { width: 16px; height: 16px; }
.project-note { margin-top: 18px; color: var(--text-3); font-size: .92rem; }
.project-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.project-note a:hover { text-decoration-color: var(--amber); }

/* Contact, above the curve of the Earth */
.contact { padding-bottom: clamp(180px, 24vw, 300px); overflow: hidden; }
.contact-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact h2 { margin-inline: auto; max-width: 16ch; }
.contact .lead { margin-inline: auto; }
.contact-email { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 36px; }
.email-link {
  font-size: clamp(1.45rem, .5rem + 4.2vw, 3.2rem);
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.1;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(255, 181, 71, .5);
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
  transition: text-decoration-color .2s, color .2s;
}
.email-link:hover { color: var(--amber-text); text-decoration-color: var(--amber); }
@media (max-width: 639.98px) { .email-link { font-size: clamp(1.15rem, 5.6vw, 2rem); font-stretch: 100%; } }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.contact-clock { margin-top: 28px; color: var(--text-3); font-family: var(--mono); font-size: .84rem; }
.horizon {
  position: absolute;
  left: 50%; bottom: 0;
  width: max(1500px, 170vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--horizon);
  box-shadow: 0 0 90px 24px var(--horizon-glow);
  transform: translate(-50%, 89%);
  pointer-events: none;
}

/* Footer -------------------------------------------------------------- */

.foot { position: relative; border-top: 1px solid var(--line); background: var(--foot-bg); color: var(--text-3); font-size: .88rem; }
.foot-inner { display: grid; gap: 8px; padding: 26px 0 32px; }
@media (min-width: 900px) { .foot-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: center; } }
.foot-small { font-size: .82rem; }
.to-top { color: var(--text-2); transition: color .2s; }
.to-top:hover { color: var(--amber-text); }

/* Dialogs: command palette and the 250µs race --------------------------- */

.palette, .race {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.palette::backdrop, .race::backdrop { background: rgba(2, 4, 10, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.palette-box, .race-box {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--dialog-bg);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8);
}
@media (prefers-reduced-motion: no-preference) {
  .palette[open] .palette-box, .race[open] .race-box { animation: dialog-in .2s var(--ease); }
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }

.palette { width: min(620px, 100% - 32px); margin: min(14vh, 120px) auto auto; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-input input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; }
.palette-input input::placeholder { color: var(--text-3); }
.palette-msg { padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--amber-soft); color: var(--text); font-size: .95rem; }
.palette-list { max-height: min(52vh, 400px); overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.palette-group { padding: 12px 12px 4px; color: var(--text-3); font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; }
.palette-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.palette-opt[aria-selected="true"] { background: var(--blue-soft); }
.palette-hint { overflow: hidden; color: var(--text-3); font-family: var(--mono); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.palette-empty { padding: 18px 12px; color: var(--text-3); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .78rem; }
.palette-psst { margin-left: auto; font-family: var(--mono); }
@media (max-width: 559.98px) { .palette-psst { display: none; } }

.race { width: min(460px, 100% - 32px); }
.race-box { padding: 24px; }
.race-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.race-head h2 { font-size: 1.45rem; font-weight: 700; font-stretch: 108%; letter-spacing: -.02em; }
.race-lead { margin-top: 8px; color: var(--text-2); font-size: .98rem; }
.race-pad {
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  height: 210px;
  margin-top: 18px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--ghost);
  text-align: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color .15s, border-color .15s;
}
.race-pad[data-state="wait"] { border-color: rgba(255, 181, 71, .5); background: var(--amber-soft); }
.race-pad[data-state="go"] { border-color: var(--green); background: var(--green); color: #03140b; }
.race-pad[data-state="early"] { border-color: var(--red); background: var(--red-soft); }
.race-pad-big { font-size: 2.4rem; font-weight: 720; font-stretch: 110%; line-height: 1.05; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.race-pad-small { color: var(--text-3); font-family: var(--mono); font-size: .76rem; }
.race-pad[data-state="go"] .race-pad-small { color: rgba(3, 20, 11, .7); }
.race-verdict { min-height: 3em; margin-top: 14px; color: var(--text-2); font-size: .95rem; }
.race-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.race-stats dt { color: var(--text-3); font-size: .76rem; }
.race-stats dd { margin-top: 2px; font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* In daylight, white cards get a soft shadow so they lift off the page. */
:root[data-theme="light"] :is(.card, .tl-card, .project, .focus li, .skill-group, .edu li, .topo, .tabs) {
  box-shadow: 0 1px 2px rgba(15, 30, 70, .04), 0 14px 32px -20px rgba(15, 30, 70, .22);
}

/* Theme switch: main.js grows the new theme out of the toggle as a circle. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Scroll reveal (added by main.js, only to content that starts below the fold) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* Motion preferences ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Print --------------------------------------------------------------- */

@media print {
  html { background: #fff; }
  body { color: #000; }
  .stars, .bar, .skip-link, .hero-earth, .scroll-cue, .hero-actions, .orbit-stage, .tabs, .how, .horizon, .foot-tip, [data-copy], dialog { display: none !important; }
  .project[hidden] { display: block !important; }
  .section { padding-top: 32px; }
  .card, .tl-item, .project, .skill-group { break-inside: avoid; }
}
