/* ============================================================
   Dwarka Prasad Bairwa — resume site v2
   Modern, colorful: gradient identity over a calm ground,
   per-project accent hues, spotlight cards, animated hero mesh.
   ============================================================ */

:root {
  --ground: #f6f8f6;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --ink: #16211d;
  --ink-soft: #43524b;
  --muted: #66766e;
  --line: #dbe2dc;
  --line-soft: #e7ece7;

  /* hue system */
  --c-emerald: #0d9668;
  --c-sky: #0779c4;
  --c-violet: #7440e0;
  --c-amber: #c47b06;
  --c-rose: #d63862;
  --c-orange: #dd5b14;
  --c-teal: #0d9488;

  --accent: var(--c-emerald);
  --gradient: linear-gradient(92deg, #0d9668 0%, #0779c4 55%, #7440e0 100%);

  --chip-bg: #f0f3f0;
  --chip-ink: #3d4c46;
  --shadow: 0 1px 2px rgb(22 33 29 / 0.05), 0 10px 30px -12px rgb(22 33 29 / 0.16);
  --spot-alpha: 0.08;

  --display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --ground: #0d1412;
  --surface: #141d1a;
  --surface-2: #101815;
  --ink: #e7ede9;
  --ink-soft: #b4c1ba;
  --muted: #8b9c93;
  --line: #263129;
  --line-soft: #1e2a24;

  --c-emerald: #34d399;
  --c-sky: #38bdf8;
  --c-violet: #a78bfa;
  --c-amber: #fbbf24;
  --c-rose: #fb7185;
  --c-orange: #fb923c;
  --c-teal: #2dd4bf;

  --gradient: linear-gradient(92deg, #34d399 0%, #38bdf8 55%, #a78bfa 100%);

  --chip-bg: #1c2823;
  --chip-ink: #b7c8bf;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  --spot-alpha: 0.14;
}

/* per-card accent: --hue resolves from data-hue */
[data-hue="emerald"] { --hue: var(--c-emerald); }
[data-hue="sky"]     { --hue: var(--c-sky); }
[data-hue="violet"]  { --hue: var(--c-violet); }
[data-hue="amber"]   { --hue: var(--c-amber); }
[data-hue="rose"]    { --hue: var(--c-rose); }
[data-hue="orange"]  { --hue: var(--c-orange); }
[data-hue="teal"]    { --hue: var(--c-teal); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  overflow-x: clip; /* nothing may force sideways scroll */
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  /* fluid type: scales gently with viewport width */
  font-size: clamp(15.5px, 0.35vw + 14px, 17.5px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--c-emerald); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-emerald);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- sticky nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.25s ease;
}
.site-nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  max-width: min(1480px, 94vw);
  margin: 0 auto;
  padding: 13px clamp(16px, 2.5vw, 40px);
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.nav-brand span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.nav-links a.active {
  color: var(--c-emerald);
  background: color-mix(in srgb, var(--c-emerald) 12%, transparent);
}

.theme-toggle, .menu-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  width: 38px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--c-emerald); color: var(--c-emerald); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* hamburger (mobile only) */
.menu-toggle { display: none; flex-direction: column; gap: 4px; padding: 0; }
.menu-toggle span {
  display: block;
  width: 16px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- page shell ---------- */
.page {
  max-width: min(1480px, 94vw);
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 40px) 48px;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.title-accent {
  width: 34px; height: 5px;
  border-radius: 3px;
  background: var(--gradient);
  flex: none;
}
section { margin-top: clamp(64px, 8vw, 120px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  margin-top: 0;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  padding: 48px 0 32px;
}
#meshCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

/* aurora glow behind the hero */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  width: 46vw; height: 46vw;
  max-width: 620px; max-height: 620px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  mix-blend-mode: normal;
}
.aurora span:nth-child(1) {
  background: radial-gradient(circle, var(--c-emerald), transparent 65%);
  top: -18%; right: -6%;
  animation: drift1 16s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  background: radial-gradient(circle, var(--c-sky), transparent 65%);
  bottom: -25%; right: 20%;
  animation: drift2 20s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  background: radial-gradient(circle, var(--c-violet), transparent 65%);
  top: 15%; left: -18%;
  opacity: 0.22;
  animation: drift3 24s ease-in-out infinite alternate;
}
[data-theme="dark"] .aurora span { opacity: 0.2; }
[data-theme="dark"] .aurora span:nth-child(3) { opacity: 0.14; }
@keyframes drift1 { to { transform: translate(-8%, 12%) scale(1.15); } }
@keyframes drift2 { to { transform: translate(10%, -10%) scale(0.9); } }
@keyframes drift3 { to { transform: translate(12%, 8%) scale(1.1); } }
.hero-content {
  position: relative;
  max-width: min(900px, 74vw);
  /* inner breathing room so text never touches the hero's visual edge */
  padding-inline: clamp(16px, 2.5vw, 40px);
}
@media (max-width: 720px) { .hero-content { max-width: none; } }
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}
.kicker .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-rose);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-rose) 50%, transparent); }
  55% { box-shadow: 0 0 0 8px transparent; }
}
h1 {
  font-family: var(--display);
  font-size: clamp(42px, 6.5vw, 96px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.gradient-text {
  background: var(--gradient);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientPan 9s ease-in-out infinite alternate;
}
@keyframes gradientPan {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
.typed-line {
  font-family: var(--display);
  font-size: clamp(17px, 2.6vw, 22px);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 20px;
  min-height: 1.6em;
}
.typed-wrap { color: var(--c-emerald); }
/* keep the typed phrase on one line only where it can't overflow */
@media (min-width: 900px) { .typed-wrap { white-space: nowrap; } }
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--c-emerald);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.summary {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 16.5px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
}
[data-theme="dark"] .btn-primary { color: #0b1210; }
.btn-primary:hover { box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--c-emerald) 55%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--c-emerald); color: var(--c-emerald); }

/* ---------- facts ---------- */
.facts {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--hue, var(--c-emerald));
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.fact:hover { transform: translateY(-3px); }
.fact b {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hue, var(--ink));
}
.fact small {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- experience ---------- */
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.job-head h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.job-org {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--c-emerald);
  margin: 4px 0 0;
}
.job-dates {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 14px;
}
.job-sub { color: var(--ink-soft); max-width: 68ch; margin: 14px 0 40px; }

/* experience cards: role header inside a card */
.project .job-head { margin-bottom: 12px; }
.project .job-head h4 { margin: 0; }
.project .job-org { margin: 4px 0 0; font-size: 12.5px; color: var(--hue); }

/* project cards: tag + dates row */
.proj-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.proj-head .repo-tag { margin-bottom: 0; }
.proj-dates {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* background cards (education / awards / certifications) */
.bg-main { font-weight: 600; margin: 0 0 4px; }
.bg-sub { color: var(--ink-soft); margin: 0 0 8px; font-size: 14.5px; }
.bg-dates {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.bg-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.bg-list li { margin: 7px 0; }
.bg-list li::marker { color: var(--hue); }
.bg-list b { color: var(--ink); }

/* timeline rail */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--c-emerald), var(--c-violet), var(--c-amber), var(--c-sky), var(--c-rose), var(--c-orange));
  opacity: 0.5;
}
.timeline-node {
  position: absolute;
  left: -29px; top: 30px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--hue);
  border: 3px solid var(--ground);
  box-shadow: 0 0 0 2px var(--hue);
}

/* project cards */
.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px 22px;
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.18s ease-out, border-color 0.2s ease;
  overflow: hidden;
}
.project:hover {
  --lift: -4px;
  border-color: color-mix(in srgb, var(--hue) 45%, var(--line));
}
.project + .project { margin-top: 26px; }

/* cursor spotlight (JS sets --mx / --my) */
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%),
              color-mix(in srgb, var(--hue, var(--c-emerald)) calc(var(--spot-alpha) * 100%), transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; }

.repo-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--hue);
  background: color-mix(in srgb, var(--hue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hue) 25%, transparent);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
}
.project h4 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.project .blurb {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 12px;
  max-width: 68ch;
}
.project ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.project li { margin: 7px 0; max-width: 70ch; }
.project li::marker { color: var(--hue); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--chip-ink);
  background: var(--chip-bg);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.chip:hover {
  border-color: var(--hue, var(--c-emerald));
  color: var(--hue, var(--c-emerald));
  transform: translateY(-1px);
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(270px, 22vw, 340px), 1fr));
  gap: clamp(14px, 1.4vw, 24px);
}
.skill-group {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.18s ease-out, border-color 0.2s ease;
  overflow: hidden;
}
.skill-group:hover {
  --lift: -4px;
  border-color: color-mix(in srgb, var(--hue) 45%, var(--line));
}
.skill-group h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--hue);
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-group h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--hue);
  flex: none;
}

/* ---------- contact ---------- */
.contact-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 38px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
}
.contact-title { margin-bottom: 16px; }
.contact-lede {
  font-family: var(--display);
  font-size: clamp(19px, 3vw, 26px);
  font-weight: 600;
  max-width: 34ch;
  margin: 0 0 24px;
  text-wrap: balance;
}
.contact-lede em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  font-family: var(--mono);
  font-size: 13.5px;
}
.contact-row .label {
  color: var(--muted);
  margin-right: 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ---------- footer ---------- */
.site-footer {
  max-width: min(1480px, 94vw);
  margin: 0 auto;
  padding: 22px clamp(16px, 2.5vw, 40px) 44px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 40;
}
[data-theme="dark"] .back-to-top { color: #0b1210; }
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--stagger, 0ms);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .kicker .dot, .caret, .gradient-text, .aurora span { animation: none; }
  .btn:hover, .chip:hover, .fact:hover { transform: none; }
  .project, .skill-group { transform: none; }
  #meshCanvas { display: none; }
}

/* ---------- responsive ---------- */

/* very wide screens: projects and experience flow in two columns,
   the timeline rail steps aside */
@media (min-width: 1460px) {
  .timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    padding-left: 0;
    align-items: start;
  }
  .timeline::before, .timeline-node { display: none; }
  .project + .project { margin-top: 0; }
  .work .section-title { margin-bottom: 34px; }
  /* an odd card count leaves no orphan: the last card goes full-width */
  .timeline > .project:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 400px) {
  .hero-actions .btn { flex: 1 1 44%; text-align: center; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 16px;
    background: color-mix(in srgb, var(--ground) 96%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; font-size: 14px; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-inner { gap: 12px; }
  .theme-toggle { margin-left: auto; }

  .hero { min-height: 0; padding: 44px 0 12px; }
  section { margin-top: 64px; }
  .timeline { padding-left: 20px; }
  .timeline::before { left: 3px; }
  .timeline-node { left: -22px; width: 10px; height: 10px; }
  .project { padding: 20px 18px 16px; }
  .contact-card { padding: 26px 22px; }
}

/* ---------- print ---------- */
@media print {
  .site-nav, .hero-actions, .theme-toggle, .menu-toggle,
  .scroll-progress, .back-to-top, #meshCanvas { display: none; }
  body { background: #fff; color: #111; }
  .page { padding: 0; max-width: none; }
  .hero { min-height: 0; padding: 0; }
  .gradient-text, .contact-lede em { background: none; color: #111; -webkit-text-fill-color: #111; }
  .reveal { opacity: 1; transform: none; }
  .project, .skill-group, .fact, .contact-card { break-inside: avoid; box-shadow: none; }
  .caret { display: none; }
  a { color: #111; }
}

/* ============================================================
   v3 additions (Sep 2026): motion module, open-source cards with
   live GitHub stats, project filters, tech marquee, split hero.
   ============================================================ */
.kicker-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.kicker-link:hover { text-decoration: underline; }
.hero .summary a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.hero .summary a:hover { border-bottom-color: var(--accent); }

/* split-text hero: each word animates in. The gradient must live on the word spans:
   a transformed child breaks background-clip:text on the parent and the text turns invisible. */
[data-split].ready { background: none; animation: none; color: inherit; -webkit-text-fill-color: initial; }
[data-split] .w { display: inline-block; opacity: 0; transform: translateY(0.35em) rotate(1.5deg); will-change: transform, opacity;
  background: var(--gradient); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: gradientPan 9s ease-in-out infinite alternate; padding-right: 0.02em; }
[data-split].ready .w { opacity: 1; transform: none; }

/* section lede + live pill */
.section-lede { color: var(--ink-soft); max-width: 60ch; margin: -6px 0 22px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; vertical-align: middle; font: 600 11px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--c-emerald); background: color-mix(in srgb, var(--c-emerald) 12%, transparent); border-radius: 999px; padding: 6px 10px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-emerald) 30%, transparent); animation: livepulse 2s infinite; }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-emerald) 30%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

/* open-source cards */
.oss-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.oss-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .25s, box-shadow .35s; }
.oss-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--hue) 14%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.oss-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--hue) 45%, var(--line)); }
.oss-card:hover::before { opacity: 1; }
.oss-head { display: flex; align-items: flex-start; gap: 12px; }
.oss-head h4 { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.01em; }
.oss-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--hue) 14%, transparent); color: var(--hue); flex: none; }
.oss-icon svg { width: 20px; height: 20px; }
.oss-tag { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.oss-arrow { margin-left: auto; color: var(--muted); transition: transform .25s, color .25s; }
.oss-card:hover .oss-arrow { transform: translate(3px, -3px); color: var(--hue); }
.oss-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; flex: 1; }
.oss-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line-soft); }
.oss-stats span { display: inline-flex; align-items: center; gap: 6px; }
.oss-stats svg { width: 14px; height: 14px; }
.oss-stats b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.oss-site { margin-left: auto; color: var(--hue); cursor: pointer; }
.oss-site:hover { text-decoration: underline; }

/* marquee */
.marquee { margin-top: 22px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { flex: none; font: 500 12.5px/1 var(--mono); color: var(--chip-ink); background: var(--chip-bg); border: 1px solid var(--line-soft); border-radius: 999px; padding: 8px 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* project filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.filters button { font: 600 13px/1 var(--body); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .15s; }
.filters button:hover { color: var(--ink); transform: translateY(-1px); }
.filters button.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.project.filtered-out { display: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--ground); font: 500 13px/1 var(--body); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; pointer-events: none; transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) { .oss-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { [data-split] .w { opacity: 1; transform: none; animation: none; } .marquee-track { animation: none; } }
