/* =========================================================================
   Sonu Kumar — portfolio stylesheet
   Dark-first, responsive, no framework. Light theme via [data-theme="light"].
   ========================================================================= */

/* ---------- Design tokens --------------------------------------------- */
:root {
  /* Palette — dark (default) */
  --bg: #0a0e1a;
  --bg-elev: #0f1424;
  --bg-card: #111830;
  --bg-code: #0b1020;
  --border: #1e2944;
  --border-soft: #172036;
  --text: #e4e8f1;
  --text-mute: #8b93a7;
  --text-dim: #5b6483;
  --nav-link: #ffffff;

  --accent: #64ffda;
  --accent-2: #bb86fc;
  --accent-glow: rgba(100, 255, 218, 0.18);
  --accent-soft: rgba(100, 255, 218, 0.08);

  --tag-bg: rgba(100, 255, 218, 0.08);
  --tag-fg: #64ffda;

  --danger: #ff6b6b;
  --warn: #ffd166;
  --ok: #64ffda;

  /* Scale */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-md: 0 8px 24px rgba(2, 6, 23, 0.4);
  --shadow-lg: 0 20px 60px rgba(2, 6, 23, 0.55);

  --nav-h: 72px;
  --container: 1160px;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-code: #f2f4f8;
  --border: #e4e9f1;
  --border-soft: #ecf0f7;
  --text: #0d1628;
  --text-mute: #50607d;
  --text-dim: #8a97b1;
  --nav-link: #0d1628;

  --accent: #0ea5a5;
  --accent-2: #7c3aed;
  --accent-glow: rgba(14, 165, 165, 0.14);
  --accent-soft: rgba(14, 165, 165, 0.08);

  --tag-bg: rgba(14, 165, 165, 0.08);
  --tag-fg: #0a8888;

  --shadow-md: 0 6px 20px rgba(13, 22, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(13, 22, 40, 0.10);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

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

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover {
  color: var(--accent-2);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0;
}

.dim {
  color: var(--text-dim);
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Background art -------------------------------------------- */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, rgba(0, 0, 0, 0.5), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgba(0, 0, 0, 0.5), transparent 75%);
  opacity: 0.45;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}

[data-theme="light"] .bg-glow {
  opacity: 0.6;
}

/* ---------- Navigation ------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled {
  border-color: var(--border-soft);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 1px 0 var(--border-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav__brand:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.nav__monogram {
  display: inline-block;
  transform: translateY(1px);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  position: relative;
  color: var(--nav-link);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav__num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  margin-right: 6px;
  font-weight: 600;
}
.nav__resume {
  margin-left: 8px;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 8px 14px !important;
}
.nav__resume:hover {
  background: var(--accent-soft) !important;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-mute);
  background: var(--bg-card);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ------------------------------------------------------ */
.hero {
  position: relative;
  padding: clamp(60px, 10vw, 120px) 0 clamp(60px, 8vw, 110px);
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.hero__eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  margin: 0 0 16px;
  letter-spacing: 0.04em;
}

.hero__name {
  font-size: clamp(42px, 9vw, 92px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
  color: var(--text);
}

.hero__role {
  font-size: clamp(28px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-mute);
  margin: 0 0 24px;
}

.hero__rotator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  margin: 0 0 28px;
}
.hero__rotator .cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero__bio {
  max-width: 720px;
  color: var(--text-mute);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  margin: 0 0 36px;
}
.hero__bio strong {
  color: var(--text);
  font-weight: 600;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn svg { flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--accent);
  color: #0a0e1a;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent);
  color: #0a0e1a;
  box-shadow: 0 10px 28px var(--accent-glow);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg-card);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--lg {
  padding: 16px 26px;
  font-size: 15px;
  border-radius: 12px;
}

.hero__stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
}
.hero__stats li {
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero__stats strong {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.1;
}
.hero__stats span {
  font-size: 12.5px;
  color: var(--text-mute);
}

.hero__scroll {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- Sections -------------------------------------------------- */
.section {
  padding: clamp(60px, 8vw, 110px) 0;
  position: relative;
}

.section__title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 18px;
}
.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 8px;
  max-width: 280px;
  transform: translateY(-6px);
}
.section__title--center {
  justify-content: center;
  text-align: center;
}
.section__title--center::after { display: none; }

.section__num {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
}

.section__lede {
  max-width: 640px;
  color: var(--text-mute);
  margin: 0 0 44px;
  font-size: 16px;
}

/* ---------- About ----------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 42px;
  align-items: start;
}

.about__text p {
  color: var(--text-mute);
  font-size: 16px;
  margin: 0 0 16px;
  line-height: 1.8;
}
.about__text strong {
  color: var(--text);
  font-weight: 600;
}
.about__hook {
  color: var(--accent) !important;
  font-family: var(--mono);
  font-size: 14px !important;
  margin-top: 22px !important;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
}

.about__card {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  box-shadow: var(--shadow-lg);
}
.about__card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.about__card-title {
  margin-left: 12px;
  color: var(--text-dim);
  font-size: 12.5px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot--g { background: #62c370; }
.dot--y { background: #ffd166; }
.dot--r { background: #ff6b6b; }

.about__code {
  padding: 20px 22px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.tok-k { color: var(--accent-2); }
.tok-s { color: var(--accent); }
.tok-p { color: var(--text-mute); }

/* ---------- Expertise cards ------------------------------------------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid--cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, transparent, var(--accent) 50%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card__icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-size: 17px;
  margin: 0 0 10px;
}
.card p {
  color: var(--text-mute);
  font-size: 14.5px;
  margin: 0 0 16px;
  line-height: 1.7;
}
.card code {
  font-family: var(--mono);
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
}
.card__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card__tags li {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  border: 1px solid transparent;
}

/* ---------- Timeline -------------------------------------------------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-left: 58px;
  margin-bottom: 32px;
}

.timeline__marker {
  position: absolute;
  left: 0;
  top: 8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border-radius: 50%;
}
.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.tcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.tcard:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}

.tcard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tcard__title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}
.tcard__sub {
  color: var(--accent);
  font-weight: 500;
  font-size: 16px;
}
.tcard__meta {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
}
.tcard__date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-mute);
  background: var(--bg-code);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.tcard__lead {
  color: var(--text-mute);
  font-size: 14.5px;
  margin: 8px 0 12px;
  line-height: 1.7;
}

.tcard__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tcard__bullets li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 8px;
  color: var(--text-mute);
  font-size: 14.5px;
  line-height: 1.7;
}
.tcard__bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: var(--mono);
  line-height: 1.7;
}
.tcard__bullets code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  padding: 0 5px;
  border-radius: 4px;
  color: var(--accent);
}
.tcard__bullets em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

/* ---------- Stack ----------------------------------------------------- */
.stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stack__group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
}
.stack__group h4 {
  font-size: 14px;
  color: var(--accent);
  font-family: var(--mono);
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-weight: 500;
  transition: transform 0.2s var(--ease), border-color 0.2s, color 0.2s;
}
.chips li:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Education ------------------------------------------------- */
.edu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.edu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s var(--ease);
  flex-wrap: wrap;
}
.edu__item:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.edu__left h3 {
  font-size: 16px;
  margin: 0 0 4px;
}
.edu__org {
  color: var(--text-mute);
  margin: 0;
  font-size: 14px;
}
.edu__right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 13px;
}
.edu__grade {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.edu__date {
  color: var(--text-mute);
}

/* ---------- Contact --------------------------------------------------- */
.section--contact {
  text-align: center;
}
.contact__lede {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1.7;
}
.contact__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}
.contact__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  color: var(--text-mute);
  font-size: 14px;
}
.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
  padding: 8px 4px;
}
.contact__links a:hover {
  color: var(--accent);
}
.contact__links svg {
  flex-shrink: 0;
}

/* ---------- Footer ---------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0 36px;
  margin-top: 20px;
  background: var(--bg-elev);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-mute);
  font-size: 13px;
  flex-wrap: wrap;
}
.footer__inner strong { color: var(--text); font-weight: 600; }
.footer__meta {
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Reveal-on-scroll ----------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Selection ------------------------------------------------- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Scrollbar ------------------------------------------------- */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- Responsive ------------------------------------------------ */
@media (max-width: 980px) {
  .grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about__card {
    position: static;
  }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px 24px 24px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s;
  }
  .nav__links.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a {
    padding: 12px 14px;
    font-size: 15px;
  }
  .nav__resume {
    margin-left: 0;
    text-align: center;
  }
  .nav__burger { display: flex; }

  .section__title::after { max-width: 100px; }

  .grid--cards { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr; }

  .timeline::before { left: 12px; }
  .timeline__item { padding-left: 44px; }
  .timeline__marker { width: 26px; height: 26px; }
  .timeline__dot { width: 10px; height: 10px; }

  .tcard__head { flex-direction: column; gap: 6px; }
  .edu__item { flex-direction: column; align-items: flex-start; }
  .edu__right { align-self: flex-start; }

  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
}
