/* ============================================================
   Jayant Singh — portfolio
   Multi-hue: indigo → blue → cyan, with pink/amber/emerald accents.
   Dark-first, light theme via [data-theme="light"].
   ============================================================ */

:root {
  /* brand hues */
  --indigo:  #6366f1;
  --blue:    #3b82f6;
  --cyan:    #22d3ee;
  --pink:    #ec4899;
  --violet:  #a78bfa;
  --amber:   #f59e0b;
  --emerald: #10b981;

  --brand-grad: linear-gradient(115deg, var(--indigo) 0%, var(--blue) 42%, var(--cyan) 100%);

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --max: 1180px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- dark (default) ---------- */
[data-theme="dark"] {
  --bg:        #0a0a12;
  --bg-alt:    #0e0e1a;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.045);
  --grid:      rgba(255, 255, 255, 0.028);

  --text:     #eef1f8;
  --text-mid: #a9b1c7;
  --muted:    #6f7793;

  --nav-bg:   rgba(10, 10, 18, 0.72);
  --shadow:   0 24px 60px -18px rgba(0, 0, 0, 0.7);
}

/* ---------- light ---------- */
[data-theme="light"] {
  --bg:        #fbfbfe;
  --bg-alt:    #f3f4fb;
  --surface:   #ffffff;
  --surface-2: #f6f7fd;
  --line:      rgba(15, 23, 42, 0.1);
  --line-soft: rgba(15, 23, 42, 0.06);
  --grid:      rgba(15, 23, 42, 0.035);

  --text:     #0f172a;
  --text-mid: #475569;
  --muted:    #7b879c;

  --nav-bg:   rgba(251, 251, 254, 0.78);
  --shadow:   0 20px 48px -20px rgba(15, 23, 42, 0.22);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
svg { width: 100%; height: 100%; display: block; }

::selection { background: var(--indigo); color: #fff; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mt { margin-top: 26px; }

.grad {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 300;
  background: var(--indigo); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 100%;
  background: var(--brand-grad);
  transform: scaleX(0); transform-origin: left;
  will-change: transform;
}

/* ---------- cursor glow ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 1;
  width: 460px; height: 460px; border-radius: 50%;
  pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, rgba(34,211,238,0.05) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity .5s;
}
[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, rgba(34,211,238,0.06) 45%, transparent 70%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s, backdrop-filter .35s;
}
.nav.is-stuck {
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line-soft);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__logo {
  font-weight: 900; font-size: 1.35rem; letter-spacing: -0.04em;
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav__logo span { -webkit-text-fill-color: var(--cyan); }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  position: relative; padding: 9px 15px; border-radius: 9px;
  font-size: 0.92rem; font-weight: 500; color: var(--text-mid);
  transition: color .25s, background .25s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(34,211,238,0.10));
}
.nav__links a.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: 3px;
  width: 16px; height: 2px; margin-left: -8px;
  background: var(--brand-grad); border-radius: 2px;
}

.nav__right { display: flex; align-items: center; gap: 10px; }

.nav__cv {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: #fff;
  background: var(--brand-grad); background-size: 180% auto;
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.7);
  transition: transform .25s var(--ease), background-position .4s var(--ease), box-shadow .3s;
}
.nav__cv svg { width: 14px; height: 14px; flex: none; }
.nav__cv:hover {
  transform: translateY(-2px); background-position: right center;
  box-shadow: 0 10px 26px -6px rgba(99, 102, 241, 0.85);
}

.theme-btn {
  position: relative; width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-mid);
  transition: transform .4s var(--ease), color .25s, border-color .25s;
}
.theme-btn:hover { transform: rotate(90deg) scale(1.08); color: var(--cyan); border-color: var(--cyan); }
.theme-btn svg { width: 17px; height: 17px; position: absolute; transition: opacity .3s, transform .4s var(--ease); }
[data-theme="dark"]  .ico-sun  { opacity: 1; transform: scale(1); }
[data-theme="dark"]  .ico-moon { opacity: 0; transform: scale(0.4) rotate(-90deg); }
[data-theme="light"] .ico-sun  { opacity: 0; transform: scale(0.4) rotate(90deg); }
[data-theme="light"] .ico-moon { opacity: 1; transform: scale(1); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span {
  width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- aurora blobs ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* PERF: these deliberately use NO filter: blur(). Animating transform on a
   blurred element re-rasterizes the blur every frame — measured at 20fps with
   blur(90px) vs 58fps without, for no visible difference. The multi-stop
   radial-gradients below supply the soft falloff instead. Don't add blur back. */
.blob {
  position: absolute; border-radius: 50%;
  opacity: .5;
  will-change: transform;
}
[data-theme="light"] .blob { opacity: .34; }

.blob--1 {
  width: 500px; height: 500px; top: -12%; left: -8%;
  background: radial-gradient(circle closest-side, var(--indigo), transparent 72%);
  animation: drift1 20s var(--ease) infinite alternate;
}
.blob--2 {
  width: 440px; height: 440px; top: 16%; right: -6%;
  background: radial-gradient(circle closest-side, var(--cyan), transparent 72%);
  animation: drift2 24s var(--ease) infinite alternate;
}
.blob--3 {
  width: 400px; height: 400px; bottom: -14%; left: 32%;
  background: radial-gradient(circle closest-side, var(--pink), transparent 72%);
  animation: drift3 28s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate(120px, 70px) scale(1.18); } }
@keyframes drift2 { to { transform: translate(-100px, 90px) scale(0.86); } }
@keyframes drift3 { to { transform: translate(80px, -70px) scale(1.14); } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 130px 0 90px; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 25%, transparent 78%);
}
.hero__canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 60px; align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  color: var(--violet);
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(167,139,250,0.08));
  border: 1px solid rgba(139,120,250,0.3);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16,185,129,0.7);
  animation: ping 2.2s infinite;
}
@keyframes ping {
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.hero__title { margin-bottom: 10px; }
.hero__hi {
  display: block; font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
}
.hero__name {
  display: block; font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 900; letter-spacing: -0.045em; line-height: 1.05;
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
  padding-bottom: 6px;
  border-bottom: 3px solid transparent;
  border-image: var(--brand-grad) 1;
  width: fit-content;
}
@keyframes shimmer { to { background-position: 200% center; } }

.typer {
  font-family: var(--mono); font-size: clamp(1rem, 2.1vw, 1.35rem);
  color: var(--text-mid); margin: 16px 0 22px; min-height: 1.9em;
}
.caret { color: var(--cyan); animation: blink 1s step-end infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  color: var(--muted); font-size: 0.88rem; margin-bottom: 32px;
}
.hero__meta li { display: flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 15px; height: 15px; color: var(--indigo); flex: none; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 54px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 30px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .3s, border-color .25s, color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary {
  background: var(--brand-grad); color: #fff;
  background-size: 180% auto;
  box-shadow: 0 10px 32px -8px rgba(99,102,241,0.65);
}
.btn--primary:hover {
  transform: translateY(-3px); background-position: right center;
  box-shadow: 0 16px 40px -8px rgba(99,102,241,0.8);
}
.btn--ghost { border: 1.5px solid rgba(139,120,250,0.45); color: var(--violet); }
.btn--ghost:hover {
  transform: translateY(-3px); border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 10px 30px -10px rgba(34,211,238,0.5);
}

.hero__stats { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.stat { display: flex; flex-direction: column; }
.stat dd {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 900;
  letter-spacing: -0.04em; line-height: 1.15;
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat dt {
  font-size: 0.7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500;
}

/* ---------- orbital visual ---------- */
.hero__right { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.orb {
  position: relative; width: min(380px, 78vw); aspect-ratio: 1;
  display: grid; place-items: center;
}
.orb__ring {
  position: absolute; border-radius: 50%;
  border: 1px solid transparent;
  will-change: transform;
}
.orb__ring--1 {
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0%, var(--indigo) 18%, var(--cyan) 38%, transparent 55%, var(--pink) 78%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  animation: spin 12s linear infinite;
  filter: blur(0.4px);
}
.orb__ring--2 {
  inset: 9%;
  border: 1px dashed var(--line);
  animation: spin 26s linear infinite reverse;
}
.orb__ring--3 {
  inset: 17%;
  border: 1px solid transparent;
  background: conic-gradient(from 180deg, transparent 40%, var(--violet) 60%, transparent 80%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.orb__core {
  position: relative; width: 58%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(99,102,241,0.28), transparent 60%),
    var(--bg-alt);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 60px rgba(99,102,241,0.16), var(--shadow);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  50% { transform: translateY(-12px); }
}
.orb__initials {
  font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 900; letter-spacing: -0.05em;
  background: var(--brand-grad); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}

.orb__dot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  top: 50%; left: 50%; margin: -4.5px;
  transform-origin: center;
  will-change: transform;
}
.orb__dot--a { background: var(--indigo);  box-shadow: 0 0 12px var(--indigo);  animation: orbit 9s linear infinite; }
.orb__dot--b { background: var(--cyan);    box-shadow: 0 0 12px var(--cyan);    animation: orbit 9s linear infinite -2.25s; }
.orb__dot--c { background: var(--pink);    box-shadow: 0 0 12px var(--pink);    animation: orbit 9s linear infinite -4.5s; }
.orb__dot--d { background: var(--emerald); box-shadow: 0 0 12px var(--emerald); animation: orbit 9s linear infinite -6.75s; }
@keyframes orbit {
  from { transform: rotate(0deg)   translateX(min(178px, 36vw)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(min(178px, 36vw)) rotate(-360deg); }
}

.badge-ico {
  position: absolute; width: 46px; height: 46px; padding: 12px;
  display: grid; place-items: center;
  border-radius: 14px; color: var(--c);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px -8px color-mix(in srgb, var(--c) 55%, transparent);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.badge-ico:hover { transform: scale(1.18) rotate(-8deg); }
.badge-ico--tl { top: 6%;  left: 2%;   animation: bob 5.5s ease-in-out infinite; }
.badge-ico--tr { top: 6%;  right: 2%;  animation: bob 5.5s ease-in-out infinite -1.4s; }
.badge-ico--bl { bottom: 12%; left: -2%; animation: bob 5.5s ease-in-out infinite -2.8s; }
.badge-ico--br { bottom: 12%; right: -2%; animation: bob 5.5s ease-in-out infinite -4.2s; }
.badge-ico--l  { top: 46%; left: -8%;  animation: bob 6.5s ease-in-out infinite -1s; }
@keyframes bob { 50% { transform: translateY(-14px); } }

.socials { display: flex; gap: 14px; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px; padding: 11px;
  border-radius: 12px; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .28s var(--ease), color .25s, border-color .25s, box-shadow .3s;
}
.socials a:hover {
  transform: translateY(-5px); color: var(--c); border-color: var(--c);
  box-shadow: 0 12px 26px -10px var(--c);
}

/* ---------- scroll hint ---------- */
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; opacity: .6; transition: opacity .3s;
}
.scroll-hint:hover { opacity: 1; }
.mouse {
  display: block; width: 24px; height: 38px;
  border: 2px solid var(--muted); border-radius: 13px;
  position: relative;
}
.wheel {
  position: absolute; top: 7px; left: 50%; margin-left: -2px;
  width: 4px; height: 7px; border-radius: 2px; background: var(--cyan);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(13px); }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: 16px 0;
  border-block: 1px solid var(--line-soft);
  background: var(--bg-alt);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 22px; width: max-content;
  animation: scroll-x 42s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--mono); font-size: 0.86rem; color: var(--text-mid);
  white-space: nowrap;
}
.marquee__track i { color: var(--indigo); font-size: 0.55rem; font-style: normal; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 118px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

/* NOTE: content-visibility: auto was tried here and removed. Offscreen sections
   render lazily, so their height changes mid-flight during a smooth-scroll to an
   anchor — nav links overshot their target by ~1500px. Not worth it on a page
   this size. */

.section__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--cyan);
  letter-spacing: 0.08em; margin-bottom: 14px;
}
.section__eyebrow span {
  background: var(--brand-grad); color: #fff;
  padding: 2px 9px; border-radius: 6px; font-weight: 500;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.15; margin-bottom: 16px; max-width: 20ch;
}
.section__lede { color: var(--muted); max-width: 58ch; margin-bottom: 52px; }
.section__title + .about,
.section__title + .timeline,
.section__title + .edu { margin-top: 52px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about__body > p { color: var(--text-mid); margin-bottom: 20px; max-width: 60ch; }
.about__body strong { color: var(--text); font-weight: 600; }
.about__body em { color: var(--text); font-style: italic; }

.about__highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-top: 34px;
}
.hl {
  padding: 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.hl:hover {
  transform: translateY(-5px); border-color: var(--c);
  box-shadow: 0 16px 34px -14px var(--c);
}
.hl__ico { color: var(--c); font-size: 1.1rem; }
.hl h4 { font-size: 0.94rem; font-weight: 600; margin: 8px 0 3px; }
.hl p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

.about__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  position: sticky; top: 104px;
  box-shadow: var(--shadow);
}
.about__card h3 {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--muted); font-weight: 600; margin-bottom: 14px;
}
.ilink {
  color: var(--cyan); font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  transition: color .2s, border-color .2s;
}
.ilink:hover { color: var(--emerald); border-bottom-color: var(--emerald); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  font-size: 0.75rem; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-mid); border: 1px solid var(--line);
  transition: color .2s, border-color .2s, transform .2s;
}
.tags span:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.skill {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.skill::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--c), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.skill:hover {
  transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 22px 48px -20px color-mix(in srgb, var(--c) 60%, transparent);
}
.skill:hover::before { transform: scaleX(1); }

.skill__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.skill__ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 10px;
  border-radius: 11px; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
}
.skill h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }

.skill ul { display: flex; flex-wrap: wrap; gap: 7px; }
.skill li {
  font-family: var(--mono); font-size: 0.73rem;
  padding: 5px 10px; border-radius: 7px;
  background: var(--surface-2); color: var(--text-mid);
  border: 1px solid var(--line);
  transition: color .2s, border-color .2s, transform .2s;
}
.skill li:hover { color: var(--c); border-color: var(--c); transform: translateY(-2px); }

/* ---------- timeline ---------- */
.tl { position: relative; padding-left: 46px; padding-bottom: 40px; }
.tl:last-child { padding-bottom: 0; }
.tl::before {
  content: ''; position: absolute; left: 8px; top: 24px; bottom: -4px;
  width: 2px; background: linear-gradient(var(--c), transparent);
  opacity: .4;
}
.tl:last-child::before { display: none; }

.tl__marker {
  position: absolute; left: 0; top: 15px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 0 16px var(--c);
}
.tl__pulse {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--c); opacity: .55;
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
  0%   { transform: scale(0.9); opacity: .6; }
  100% { transform: scale(2.1); opacity: 0; }
}

.tl__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.tl__card:hover {
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  transform: translateX(6px);
  box-shadow: 0 22px 46px -22px color-mix(in srgb, var(--c) 65%, transparent);
}

.tl__date {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.badge {
  background: var(--brand-grad); color: #fff;
  padding: 2px 10px; border-radius: 999px; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.04em;
}
.tl__role { font-size: 1.24rem; font-weight: 700; letter-spacing: -0.025em; }
.tl__at { color: var(--c); font-weight: 500; }
.tl__sub { color: var(--muted); font-size: 0.86rem; margin-bottom: 18px; }
.tl__card ul { margin-bottom: 18px; }
.tl__card li {
  position: relative; padding-left: 21px; margin-bottom: 9px;
  color: var(--text-mid); font-size: 0.91rem;
}
.tl__card li::before {
  content: '▸'; position: absolute; left: 0; top: 1px;
  color: var(--c); font-size: 0.75rem;
}
.tl__card strong { color: var(--text); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-family: var(--mono); font-size: 0.71rem;
  padding: 4px 10px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.proj {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 11px;
  transform-style: preserve-3d;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.proj::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 20%, transparent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.proj:hover {
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
  box-shadow: 0 26px 54px -22px color-mix(in srgb, var(--c) 65%, transparent);
}
.proj:hover::before { transform: scaleX(1); }

/* pointer-tracked sheen */
.proj__shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--c) 16%, transparent),
    transparent 62%
  );
  transition: opacity .4s;
}
.proj:hover .proj__shine { opacity: 1; }

.proj--feature {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb, var(--c) 32%, transparent);
}
.proj--feature::before { transform: scaleX(1); }
.proj--feature h3 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); }
.proj--feature p { max-width: 68ch; }

.proj__tag {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 0.71rem; color: var(--c);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}

/* live project treatment */
.proj__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.proj--live { border-color: color-mix(in srgb, var(--c) 40%, transparent); }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--emerald) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--emerald) 40%, transparent);
  color: var(--emerald); font-weight: 600; letter-spacing: 0.06em;
}
.live-badge__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: ping 2.2s infinite;
}

.proj__visit {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 11px 20px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: #fff;
  background: linear-gradient(115deg, var(--emerald), var(--cyan));
  background-size: 180% auto;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--emerald) 80%, transparent);
  transition: transform .25s var(--ease), background-position .4s var(--ease), box-shadow .3s;
}
.proj__visit svg { width: 14px; height: 14px; flex: none; }
.proj__visit:hover {
  transform: translateY(-2px); background-position: right center;
  box-shadow: 0 14px 32px -8px color-mix(in srgb, var(--emerald) 90%, transparent);
}

.proj__points { display: flex; flex-direction: column; gap: 9px; }
.proj__points li {
  position: relative; padding-left: 21px;
  color: var(--text-mid); font-size: 0.88rem; line-height: 1.6;
}
.proj__points li::before {
  content: '▸'; position: absolute; left: 0; top: 1px;
  color: var(--c); font-size: 0.75rem;
}
.proj__points strong { color: var(--text); font-weight: 600; }

.proj__also {
  font-size: 0.82rem !important; color: var(--muted) !important;
  padding-top: 4px; border-top: 1px solid var(--line-soft); margin-top: 4px;
  line-height: 1.7;
}
.proj__also strong { color: var(--text-mid); font-weight: 600; }
.proj h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; }
.proj > p { color: var(--text-mid); font-size: 0.91rem; }
.proj em { color: var(--text); }
.proj .chips { margin-top: auto; padding-top: 8px; }

/* ---------- education ---------- */
.edu { display: flex; flex-direction: column; gap: 16px; }
.edu__item {
  display: grid; grid-template-columns: 88px 1fr; gap: 24px; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 28px;
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.edu__item:hover {
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  transform: translateX(6px);
  box-shadow: 0 20px 42px -22px color-mix(in srgb, var(--c) 60%, transparent);
}
.edu__year {
  font-family: var(--mono); font-size: 1rem; font-weight: 500;
  color: var(--c); padding-top: 2px;
}
.edu__item h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; }
.edu__school { color: var(--text-mid); font-size: 0.89rem; }
.edu__item .muted { font-size: 0.84rem; }

/* ---------- contact ---------- */
.section--contact {
  background: var(--bg-alt); border-top: 1px solid var(--line-soft);
  position: relative; overflow: hidden;
}
.aurora--contact .blob { opacity: .28; }
[data-theme="light"] .aurora--contact .blob { opacity: .18; }
.section--contact .container { position: relative; z-index: 2; }

/* recruiter CV banner */
.resume {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  padding: 30px 34px; margin-bottom: 22px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--indigo) 34%, transparent);
  background:
    radial-gradient(circle at 8% 0%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(circle at 92% 100%, rgba(34, 211, 238, 0.12), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}
.resume__text h3 {
  font-size: 1.28rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 4px;
}
.resume__text p { color: var(--muted); font-size: 0.88rem; }
.resume__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.resume__actions .btn { padding: 12px 24px; font-size: 0.9rem; }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact__card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  backdrop-filter: blur(8px);
  transition: transform .32s var(--ease), border-color .3s, box-shadow .3s;
}
.contact__card:not(.contact__card--static):hover {
  transform: translateY(-7px); border-color: var(--c);
  box-shadow: 0 24px 48px -20px var(--c);
}
.contact__ico {
  display: grid; place-items: center;
  width: 42px; height: 42px; padding: 11px;
  border-radius: 12px; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  margin-bottom: 10px;
}
.contact__label {
  font-size: 0.71rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--muted);
}
.contact__val { font-size: 0.9rem; color: var(--text); font-weight: 500; word-break: break-word; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 32px 0; }
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--muted);
}
.footer__note { font-family: var(--mono); font-size: 0.75rem; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; padding: 13px;
  display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 50%; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 12px 30px -8px rgba(99,102,241,0.7);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.85);
  transition: opacity .35s, transform .35s var(--ease), visibility .35s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px) scale(1.06); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero__left { display: flex; flex-direction: column; align-items: center; }
  .hero__name { margin-inline: auto; }
  .hero__meta, .hero__actions, .hero__stats { justify-content: center; }
  .hero__stats { gap: 14px 32px; }
  .hero__right { order: -1; }
  .section__title { max-width: none; }
}

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 30px; }
  .about__card { position: static; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 70px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform .38s var(--ease), opacity .25s;
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 13px 15px; font-size: 0.98rem; }
  .nav__links a.is-active::after { display: none; }

  .section { padding: 80px 0; }
  .hero { padding: 118px 0 76px; }
  .btn { flex: 1 1 auto; }
  .edu__item { grid-template-columns: 1fr; gap: 8px; }
  .tl { padding-left: 34px; }
  .tl__card { padding: 22px; }
  .cursor-glow { display: none; }
  .to-top { right: 16px; bottom: 16px; }
  .footer__inner { justify-content: center; text-align: center; }
  .badge-ico { width: 40px; height: 40px; padding: 10px; }

  .nav__cv span { display: none; }
  .nav__cv { padding: 9px 12px; }
  .nav__cv svg { width: 16px; height: 16px; }

  .resume { flex-direction: column; align-items: stretch; text-align: center; padding: 26px 22px; }
  .resume__actions { justify-content: center; }

  .proj__head { flex-direction: column; gap: 14px; }
  .proj__visit { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero__stats { gap: 14px 24px; }
  .stat dd { font-size: 1.5rem; }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas, .cursor-glow { display: none; }
}

@media print {
  .nav, .aurora, .hero__canvas, .cursor-glow, .marquee, .to-top,
  .scroll-hint, .hero__actions, .footer__note, .orb, .socials, .progress,
  .resume__actions { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
  .section, .hero { padding: 22px 0; min-height: auto; }
  .resume { border-color: #ccc; background: #fff; box-shadow: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .skill, .tl__card, .proj, .edu__item, .about__card, .contact__card, .hl {
    border-color: #ccc; background: #fff; break-inside: avoid; box-shadow: none;
  }
  .grad, .hero__name, .stat dd, .orb__initials {
    -webkit-text-fill-color: #000; color: #000; background: none;
  }
}
