/* =========================================================
   BURNING EMBER PORTFOLIO
   ========================================================= */

:root {
  --bg: #090304;
  --bg-2: #120507;
  --crimson: #dc143c;
  --magma: #ff4500;
  --ember: #ff6b35;
  --incandescent: #ff5722;
  --gold: #ffb347;

  --text: #f5e6e0;
  --muted: #b89a92;

  --card-bg: rgba(20, 6, 8, 0.86); /* slightly denser glass replaces the old backdrop blur */
  --card-border: rgba(255, 69, 0, 0.35);

  --grad-fire: linear-gradient(135deg, var(--crimson) 0%, var(--magma) 55%, var(--ember) 100%);
  --nav-h: 72px;

  /* Driven by JS: 0 (calm) → 1 (flaring) based on scroll velocity */
  --flare: 0;

  /* Multiplier for every 3D tilt angle (halved on mobile below) */
  --tilt-k: 1;

  color-scheme: dark;
}

/* Scroll-choreography variables. Registered as non-inheriting so a per-frame
   write on a section or card doesn't restyle its whole subtree. */
@property --sec-progress { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --sec-tilt     { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --sec-yaw      { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --sec-z        { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --sec-scale    { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --card-y       { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-z       { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-rx      { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --card-ry      { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --card-skew    { syntax: "<angle>";  inherits: false; initial-value: 0deg; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Fixed glow backdrop on its own composited layer. (background-attachment: fixed
   forces mobile browsers to repaint the whole page on every scroll frame.) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(255, 69, 0, 0.14), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(220, 20, 60, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 30%, rgba(255, 107, 53, 0.06), transparent 70%);
  transform: translateZ(0);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ---------- Ember canvas ---------- */
#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  perspective: 1100px;
  transform-style: preserve-3d;
  /* perspective-origin is pinned to the viewport centre by JS (main is many
     screens tall, so a static 50% 50% would sit far below the viewer) */
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1180px, calc(100% - 32px));
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  background:
    linear-gradient(rgba(14, 4, 6, 0.82), rgba(14, 4, 6, 0.82)) padding-box,
    linear-gradient(90deg, rgba(220, 20, 60, 0.7), rgba(255, 69, 0, 0.5), rgba(255, 107, 53, 0.7)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(220, 20, 60, 0.18);
}

/* page scroll-progress bar along the bottom edge (--scroll-pct: 0 → 1) */
.navbar::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--magma), var(--ember));
  box-shadow: 0 0 8px rgba(255, 69, 0, 0.8), 0 0 16px rgba(220, 20, 60, 0.5);
  transform: scaleX(var(--scroll-pct, 0));
  transform-origin: left center;
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: "Outfit", sans-serif; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-fire);
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.6);
}
.brand-text { letter-spacing: 0.02em; }

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: #fff; }

.nav-pill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 36px;
  width: 0;
  transform: translate(var(--pill-x, 0), -50%);
  width: var(--pill-w, 0);
  border-radius: 999px;
  background: var(--grad-fire);
  box-shadow:
    0 0 16px rgba(255, 69, 0, 0.6),
    0 0 32px rgba(220, 20, 60, 0.35),
    inset 0 1px 0 rgba(255, 220, 180, 0.35);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 69, 0, 0.12);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ember);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* sit the links right next to the theme switch */
.navbar nav { margin-left: auto; }

/* ---------------------------------------------------------
   FIRE ↔ ICE THEME SWITCH
   Knob motion is transform-only; icon swap is opacity + transform.
   --------------------------------------------------------- */
.theme-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tt-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, rgba(44, 9, 12, 0.96), rgba(18, 4, 6, 0.96)) padding-box,
    linear-gradient(90deg, var(--crimson), var(--magma), var(--gold)) border-box;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.75),
    inset 0 -1px 0 rgba(255, 140, 70, 0.25),
    0 0 12px rgba(255, 69, 0, 0.35);
  transition: box-shadow 0.45s ease;
}
.theme-toggle:hover .tt-track {
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.75),
    inset 0 -1px 0 rgba(255, 140, 70, 0.35),
    0 0 20px rgba(255, 69, 0, 0.6);
}
.tt-hint {
  font-size: 12px;
  line-height: 1;
  opacity: 0.5;
  filter: saturate(0.7);
  transition: opacity 0.45s ease;
}
.tt-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd6a0 0%, var(--magma) 45%, var(--crimson) 80%, #6b0718 100%);
  box-shadow:
    0 0 10px rgba(255, 69, 0, 0.85),
    0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 240, 210, 0.85),
    inset 0 -2px 3px rgba(110, 8, 24, 0.7);
  transform: translateX(0);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), scale 0.15s ease, box-shadow 0.45s ease;
}
/* ice glaze over the knob: gradients can't transition, opacity can */
.tt-knob::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bae6fd 35%, #38bdf8 70%, #0077b6 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.theme-toggle:active .tt-knob { scale: 0.88; }
.tt-icon {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 13px;
  line-height: 1;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt-fire { animation: ttFlicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.tt-ice  { opacity: 0; transform: rotate(-180deg) scale(0.3); animation: ttSpin 9s linear infinite; }

/* ice state */
[data-theme="ice"] .tt-knob { transform: translateX(30px); }
[data-theme="ice"] .tt-knob::before { opacity: 1; }
[data-theme="ice"] .tt-fire { opacity: 0; transform: rotate(180deg) scale(0.3); }
[data-theme="ice"] .tt-ice  { opacity: 1; transform: none; }
[data-theme="ice"] .tt-hint-ice { opacity: 0; }
.tt-hint-fire { opacity: 0; }
[data-theme="ice"] .tt-hint-fire { opacity: 0.5; }

@keyframes ttFlicker {
  0%, 100% { scale: 1 1; }
  35%      { scale: 0.92 1.1; }
  65%      { scale: 1.06 0.95; }
}
@keyframes ttSpin { to { rotate: 360deg; } }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.btn-primary {
  background: var(--grad-fire);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.45), 0 0 40px rgba(220, 20, 60, 0.25);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255, 69, 0, 0.7), 0 0 60px rgba(220, 20, 60, 0.45);
}
.btn-ghost {
  border: 1px solid rgba(255, 107, 53, 0.6);
  color: var(--ember);
  background: rgba(255, 69, 0, 0.06);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  background: rgba(255, 69, 0, 0.16);
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 69, 0, 0.45);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  max-width: 1200px;
  margin: 0 auto;

  /* 3D stage: outgoing sections pitch back, incoming ones swing up flat.
     No perspective of its own: main's camera (pinned to the viewport centre)
     reaches all the way down through preserve-3d. A local 50% 50% origin sits
     in the middle of tall sections like Projects and skews their outer cards. */
  transform-style: preserve-3d;
  transform-origin: 50% var(--sec-origin, 50%);
  transform:
    translateZ(var(--sec-z))
    rotateX(calc(var(--sec-tilt) * var(--tilt-k)))
    rotateY(calc(var(--sec-yaw) * var(--tilt-k)))
    scale(var(--sec-scale));
}

/* GPU layer hints only inside JS's active viewport buffer */
.section.is-live,
.section-title.is-live,
.card-grid.is-live,
.burn-card.is-live { will-change: transform; }

/* edge glow on moving sections, scaled by scroll velocity (--flare) */
.section::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border-radius: 32px;
  border: 1px solid rgba(255, 69, 0, 0.55);
  box-shadow:
    inset 0 0 40px rgba(255, 69, 0, 0.3),
    0 0 40px rgba(220, 20, 60, 0.35);
  opacity: min(1, calc(var(--flare) * var(--sec-glow, 0) * 1.6));
  pointer-events: none;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}

.section-title {
  position: relative;
  text-align: center;
  margin-bottom: 56px;
  transform: translate3d(0, var(--py-title, 0px), 0);
}
/* velocity heat behind the heading: a static gradient whose opacity follows
   --flare, so scrolling never re-runs the h2's filter */
.section-title::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, 90%);
  height: 140px;
  z-index: -1;
  transform: translate(-50%, -60%);
  background: radial-gradient(ellipse at center, rgba(255, 69, 0, 0.45), rgba(220, 20, 60, 0.2) 45%, transparent 70%);
  opacity: calc(var(--flare) * 0.9);
  pointer-events: none;
}
.section-title h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 8px;
  background: linear-gradient(180deg, #fff1e6 0%, var(--ember) 55%, var(--crimson) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* static glow; the velocity boost lives on .section-title::before */
  filter:
    drop-shadow(0 0 12px rgba(255, 69, 0, 0.4))
    drop-shadow(0 0 28px rgba(220, 20, 60, 0.2));
}
.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 3px;
  background: var(--grad-fire);
  box-shadow: 0 0 12px var(--magma);
}

/* =========================================================
   HERO / ABOUT
   ========================================================= */
.hero { align-items: center; }
.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
  transform-style: preserve-3d; /* profile + copy separate in the section's 3D space */
}

/* 3D depth separation as the hero scrolls away (--hero-p: 0 → 1).
   Uses the individual `translate` / `rotate` properties so it never fights
   the heroIn entrance animation, which owns `transform`. */
.hero .profile {
  translate: 0 calc(var(--hero-p, 0) * 50px) calc(var(--hero-p, 0) * 60px);
  rotate: y calc(var(--hero-p, 0) * 16deg * var(--tilt-k));
}
.hero .hero-copy {
  translate: 0 calc(var(--hero-p, 0) * -90px) calc(var(--hero-p, 0) * 25px);
}

.profile {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
  height: 280px;
  display: grid;
  place-items: center;
}
.aura-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--crimson), var(--magma), var(--gold), var(--ember), var(--crimson));
  animation: spin 6s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%);
          mask: radial-gradient(circle, transparent 62%, #000 63%);
}
.aura-glow {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 69, 0, 0.45) 0%, rgba(220, 20, 60, 0.2) 45%, transparent 70%);
  filter: blur(18px);
  animation: auraPulse 3.2s ease-in-out infinite;
  z-index: -1;
}
.avatar {
  position: relative;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Outfit", sans-serif;
  font-size: 4.2rem;
  font-weight: 800;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 107, 53, 0.55), transparent 60%),
    radial-gradient(circle at 70% 85%, rgba(220, 20, 60, 0.6), transparent 60%),
    #1a0709;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7);
  text-shadow: 0 0 22px rgba(255, 107, 53, 0.8);
}

.hero-copy { flex: 1; }
.hero-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 6px 0 10px;
}
.fire-text {
  background: linear-gradient(90deg, var(--crimson), var(--magma), var(--gold), var(--magma), var(--crimson));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 48 steps over 4s = 12 repaints/s of the glowing gradient instead of 60 */
  animation: fireShift 4s steps(48) infinite;
  filter: drop-shadow(0 0 18px rgba(255, 69, 0, 0.45));
}
/* hero loops pause once the hero has scrolled out of view (JS toggles .on-screen) */
.hero:not(.on-screen) .fire-text,
.hero:not(.on-screen) .aura-ring,
.hero:not(.on-screen) .aura-glow,
.hero:not(.on-screen) .scroll-hint span { animation-play-state: paused; }
.hero-role { font-size: 1.25rem; font-weight: 600; color: var(--ember); margin-bottom: 18px; }
.hero-bio { color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 107, 53, 0.55);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 8px var(--magma);
  animation: scrollDot 1.8s ease-in-out infinite;
}

/* Hero entrance */
.hero .profile,
.hero .hero-copy > * { opacity: 0; transform: translateY(24px); }
.hero.in-view .profile,
.hero.in-view .hero-copy > * {
  animation: heroIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hero.in-view .hero-copy > *:nth-child(1) { animation-delay: 0.15s; }
.hero.in-view .hero-copy > *:nth-child(2) { animation-delay: 0.25s; }
.hero.in-view .hero-copy > *:nth-child(3) { animation-delay: 0.35s; }
.hero.in-view .hero-copy > *:nth-child(4) { animation-delay: 0.45s; }
.hero.in-view .hero-copy > *:nth-child(5) { animation-delay: 0.55s; }
.hero.in-view .hero-copy > *:nth-child(6) { animation-delay: 0.65s; }

/* =========================================================
   BURNING CARDS
   Layering keeps transforms independent:
   .burn-card   → continuous scroll-linked 3D (--card-*) + one-time ignite fade
   .card-float  → continuous levitation
   .card-inner  → hover lift / aura
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  transform: translate3d(0, var(--py-grid, 0px), 0);
  transform-style: preserve-3d; /* cards share main's viewport-centred camera */
}

.burn-card {
  position: relative;
  opacity: 0;
  transform:
    translate3d(0, var(--card-y), var(--card-z))
    rotateX(calc(var(--card-rx) * var(--tilt-k)))
    rotateY(calc(var(--card-ry) * var(--tilt-k)))
    skewY(var(--card-skew));
}
/* reveal animates opacity only, so scroll keeps full control of transform */
.burn-card.in-view {
  animation: cardIgnite 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 150ms);
}
/* ignite flash: a pre-painted glow whose opacity flares once */
.burn-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 20px;
  box-shadow: 0 0 28px rgba(220, 20, 60, 0.85), 0 0 60px rgba(255, 69, 0, 0.45);
  opacity: 0;
  pointer-events: none;
}
.burn-card.in-view::before {
  animation: emberFlash 0.9s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 150ms);
}

.card-float {
  position: relative;
  height: 100%;
  animation: levitate 6s ease-in-out infinite;
}
.burn-card:nth-child(1) .card-float { animation-duration: 6s;   animation-delay: 0s; }
.burn-card:nth-child(2) .card-float { animation-duration: 7.2s; animation-delay: -2.4s; }
.burn-card:nth-child(3) .card-float { animation-duration: 6.6s; animation-delay: -4.1s; }
.burn-card:nth-child(4) .card-float { animation-duration: 7.6s; animation-delay: -1.3s; }

/* ---------------------------------------------------------
   MOLTEN FIRE FRAME
   Rim colours are registered so hover can cross-fade them
   (gradients themselves can't transition).
   --------------------------------------------------------- */
@property --rim-1 { syntax: "<color>"; inherits: false; initial-value: #dc143c; }
@property --rim-2 { syntax: "<color>"; inherits: false; initial-value: #ff4500; }
@property --rim-3 { syntax: "<color>"; inherits: false; initial-value: #ffb347; }
@property --rim-4 { syntax: "<color>"; inherits: false; initial-value: #ff6b35; }

.card-inner {
  --mx: 50%;
  --my: 50%;
  --rim-1: var(--crimson);
  --rim-2: var(--magma);
  --rim-3: var(--gold);
  --rim-4: var(--ember);
  position: relative;
  height: 100%;
  padding: 34px 30px;
  border-radius: 20px;
  /* thick ring of fire: dark glass masked to padding-box, conic plasma in the border-box.
     The second padding layer darkens the glass so the ring doesn't bleed through it. */
  border: 3.5px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(rgba(12, 3, 5, 0.72), rgba(12, 3, 5, 0.72)) padding-box,
    conic-gradient(from var(--angle, 0deg), var(--rim-1), var(--rim-2), var(--rim-3), var(--rim-4), var(--rim-1)) border-box;
  /* no backdrop-filter: the glass is ~95% opaque, and a blur over the animated
     particle canvas was re-rendered on every frame for every visible card */
  box-shadow:
    inset 0 2px 3px rgba(255, 225, 175, 0.55),   /* top hot specular */
    inset 2px 0 4px rgba(255, 140, 70, 0.35),    /* left hot specular */
    inset 0 -3px 6px rgba(110, 8, 24, 0.85),     /* bottom ember shadow */
    0 4px 0 rgba(130, 14, 30, 0.9),              /* 3D extrusion lip */
    0 0 18px rgba(255, 69, 0, 0.55),             /* corona */
    0 0 42px rgba(220, 20, 60, 0.35),            /* corona, wide */
    0 18px 40px rgba(0, 0, 0, 0.5);              /* floor shadow */
  animation: fireOrbit 6s linear infinite;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s ease,
    --rim-1 0.45s ease, --rim-2 0.45s ease, --rim-3 0.45s ease, --rim-4 0.45s ease;
  isolation: isolate;
}

/* Flowing plasma halo. It lives on .card-float (no filter on that wrapper — the blur
   is on the pseudo only) so it sits *behind* the glass slab: a ::before on .card-inner
   would paint over the card's own background because `isolation: isolate` makes
   .card-inner a stacking context. */
.card-float::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 24px;
  background: conic-gradient(from var(--angle, 0deg), var(--crimson), var(--magma), var(--gold), var(--ember), var(--crimson));
  filter: blur(12px);
  opacity: 0.55;
  pointer-events: none;
  /* blurred halo: 72 steps over 6s (12 repaints/s) looks identical to 60fps
     but costs a fifth of the blur work */
  animation: fireOrbit 6s steps(72) infinite;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* every looping card animation runs only while the card is actually on screen
   (JS toggles .on-screen), so off-screen cards cost nothing */
.burn-card:not(.on-screen) .card-inner,
.burn-card:not(.on-screen) .card-float,
.burn-card:not(.on-screen) .card-float::before { animation-play-state: paused; }

/* cursor heat spotlight */
.card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 17px;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 107, 53, 0.22), rgba(220, 20, 60, 0.08) 25%, transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card-inner:hover {
  --rim-1: var(--incandescent);
  --rim-2: var(--gold);
  --rim-3: #ffe2b0;
  --rim-4: var(--gold);
  transform: translateY(-10px) scale(1.03);
  box-shadow:
    inset 0 2px 4px rgba(255, 240, 205, 0.8),
    inset 2px 0 5px rgba(255, 179, 71, 0.55),
    inset 0 -4px 8px rgba(110, 8, 24, 0.95),
    0 7px 0 rgba(150, 22, 30, 0.95),
    0 0 28px rgba(255, 87, 34, 0.85),
    0 0 64px rgba(255, 179, 71, 0.45),
    0 26px 50px rgba(0, 0, 0, 0.6);
}
.card-float:hover::before { opacity: 0.95; transform: translateY(-10px) scale(1.03); }
.card-inner:hover::after { opacity: 1; }

/* ---------------------------------------------------------
   FLAME TONGUES (injected by fire-fx.js)
   Behind the slab, bases tucked under the rim. transform/opacity only.
   Shown only for cards in the live scroll buffer.
   --------------------------------------------------------- */
.card-flames {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.burn-card.on-screen .card-flames { display: block; }
.card-float:hover .card-flames { transform: translateY(-10px) scale(1.03); }

.card-flames i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: calc(var(--w) * 2.2);
  margin-left: calc(var(--w) / -2);
  margin-top: calc(var(--w) * -2.2);
  border-radius: 50% 50% 46% 46% / 72% 72% 28% 28%;
  background: radial-gradient(ellipse 50% 62% at 50% 80%,
    #fff6d0 0%, #ffd27a 14%, #ff8a2b 34%, var(--magma) 52%,
    rgba(220, 20, 60, 0.75) 68%, rgba(220, 20, 60, 0) 82%);
  transform-origin: 50% 100%;
  rotate: var(--r);
  opacity: 0.9;
  animation: flameLick var(--d) ease-in-out var(--dl) infinite;
}

@keyframes flameLick {
  0%, 100% { transform: translateY(0)    scale(1, 1)       skewX(0deg);  opacity: 0.85; }
  25%      { transform: translateY(-3px) scale(0.86, 1.2)  skewX(5deg);  opacity: 1; }
  50%      { transform: translateY(-1px) scale(1.08, 0.88) skewX(-4deg); opacity: 0.7; }
  75%      { transform: translateY(-5px) scale(0.9, 1.3)   skewX(3deg);  opacity: 0.95; }
}

/* ---------------------------------------------------------
   FIRE CURSOR (mouse / trackpad only)
   --------------------------------------------------------- */
#fireCursor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  html,
  body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23dc143c'/%3E%3Cstop offset='.5' stop-color='%23ff4500'/%3E%3Cstop offset='1' stop-color='%23ffb347'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M16 1c1 6 8 9 8 18a8 8 0 0 1-16 0c0-5 3-7 4-11 1 3 3 4 3 4 0-4 0-8 1-11z' fill='url(%23g)' stroke='%233a0508' stroke-width='1.3'/%3E%3Cpath d='M16 14c.5 3 4 5 4 9a4 4 0 0 1-8 0c0-2.5 2-4 4-9z' fill='%23ffe6a8'/%3E%3C/svg%3E") 16 1, auto;
  }
  a,
  button,
  [role="button"],
  .nav-toggle,
  .to-top {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23ff4500'/%3E%3Cstop offset='.5' stop-color='%23ffb347'/%3E%3Cstop offset='1' stop-color='%23fff1c9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M16 1c1 6 8 9 8 18a8 8 0 0 1-16 0c0-5 3-7 4-11 1 3 3 4 3 4 0-4 0-8 1-11z' fill='url(%23g)' stroke='%23ffb347' stroke-width='1.3'/%3E%3Cpath d='M16 14c.5 3 4 5 4 9a4 4 0 0 1-8 0c0-2.5 2-4 4-9z' fill='%23ffffff'/%3E%3C/svg%3E") 16 1, pointer;
  }
}

/* card content */
.card-inner > * { position: relative; z-index: 1; }
.card-inner h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff3ec;
}
.card-inner p { color: var(--muted); font-size: 0.95rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 14px;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.25), rgba(255, 69, 0, 0.18));
  border: 1px solid rgba(255, 107, 53, 0.35);
  box-shadow: 0 0 18px rgba(255, 69, 0, 0.25);
}

.stat-num {
  font-family: "Outfit", sans-serif;
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 14px;
  background: var(--grad-fire);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 69, 0, 0.5));
}
.stat-num::after { content: attr(data-suffix); }

.card-meta {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ember);
  background: rgba(255, 69, 0, 0.1);
  border: 1px solid rgba(255, 69, 0, 0.3);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #ffd7c4;
  background: rgba(255, 69, 0, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.28);
}

.card-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.card-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ember);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.card-links .card-link { margin-top: 0; }
.card-link:hover { color: #ffd0b5; text-shadow: 0 0 10px var(--magma); }

.footer {
  margin-top: 72px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* =========================================================
   SCROLL REVEAL — headings ignite
   ========================================================= */
.section:not(.hero) .section-title > * { opacity: 0; }
.section.in-view .section-title .eyebrow {
  animation: fadeUp 0.7s ease forwards;
}
.section.in-view .section-title h2 {
  animation: ignite 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

/* =========================================================
   SCROLL-TO-TOP ORB
   ========================================================= */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ff9a6b 0%, var(--magma) 35%, var(--crimson) 70%, #6b0718 100%);
  box-shadow:
    0 0 18px rgba(255, 69, 0, 0.7),
    0 0 40px rgba(220, 20, 60, 0.45),
    inset 0 -4px 10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s, box-shadow 0.3s ease;
}
.to-top::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 53, 0.5);
  animation: orbPulse 2.4s ease-out infinite;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 28px rgba(255, 69, 0, 0.9), 0 0 60px rgba(220, 20, 60, 0.6), inset 0 -4px 10px rgba(0, 0, 0, 0.35);
}

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

/* =========================================================
   KEYFRAMES
   ========================================================= */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes auraPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

@keyframes fireShift { to { background-position: 200% center; } }

@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes heroIn { to { opacity: 1; transform: none; } }

@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@keyframes fireOrbit { to { --angle: 360deg; } }

@keyframes cardIgnite {
  0%   { opacity: 0; }
  60%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes emberFlash {
  0%   { opacity: 0; }
  55%  { opacity: 1; }
  100% { opacity: 0; }
}

/* transform + opacity only (letter-spacing / filter would re-layout / re-raster mid-scroll) */
@keyframes ignite {
  0%   { opacity: 0; transform: translateY(18px) scale(0.92, 0.96); }
  45%  { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes orbPulse {
  0%   { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links a { padding: 8px 9px; font-size: 0.82rem; }
  .hero-inner { gap: 40px; }
  .profile { width: 230px; height: 230px; }
}

/* room for the theme switch between the hamburger breakpoint and 1024px */
@media (min-width: 881px) and (max-width: 1024px) {
  .navbar { gap: 10px; }
  .nav-links a { padding: 8px 7px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; order: 3; }
  .theme-toggle { order: 2; margin-left: auto; }
  .navbar nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    border-radius: 20px;
    background: rgba(14, 4, 6, 0.95);
    border: 1px solid rgba(255, 69, 0, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(220, 20, 60, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  .navbar.open nav { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-links a { padding: 12px 16px; font-size: 0.95rem; }
  .nav-links a.active { background: var(--grad-fire); box-shadow: 0 0 16px rgba(255, 69, 0, 0.5); }
  .nav-pill { display: none; }

  .hero-inner { flex-direction: column; text-align: center; }
  .hero-bio { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 767.98px) {
  :root { --tilt-k: 0.45; } /* cut every 3D angle by 55% so nothing clips sideways */
}

@media (max-width: 680px) {
  .card-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: calc(var(--nav-h) + 32px) 16px 64px; }
  .navbar { width: calc(100% - 32px); }
  .profile { width: 200px; height: 200px; }
  .avatar { font-size: 3.2rem; }
  .card-inner { padding: 28px 24px; }
  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

/* =========================================================
   HERO: greeting pill, bio separators, avatar photo slot
   ========================================================= */
.greet-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  margin-bottom: 18px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: #ffe2cf;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.18), rgba(255, 69, 0, 0.12));
  border: 1px solid rgba(255, 107, 53, 0.45);
  box-shadow:
    0 0 18px rgba(255, 69, 0, 0.3),
    0 0 40px rgba(220, 20, 60, 0.15),
    inset 0 1px 0 rgba(255, 210, 160, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.greet-text { font-weight: 700; color: #fff3ec; }
.greet-sep {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--magma);
  box-shadow: 0 0 8px var(--magma);
}
.greet-date { color: var(--muted); }
.greet-clock {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 140, 50, 0.7);
}
.bio-sep { color: var(--magma); margin: 0 4px; text-shadow: 0 0 8px rgba(255, 69, 0, 0.7); }

.avatar { overflow: hidden; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* =========================================================
   SECTION GRIDS
   ========================================================= */
.card-grid.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 26px; }

.section-sub {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--muted);
  opacity: 0;
}
.section.in-view .section-title .section-sub { animation: fadeUp 0.7s ease 0.25s forwards; }

/* =========================================================
   SKILL BARS
   ========================================================= */
.skill-bars { display: grid; gap: 13px; margin-top: 6px; }
.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: #ffe6d8;
}
.skill-pct {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 69, 0, 0.12);
  border: 1px solid rgba(255, 140, 60, 0.35);
}
.skill-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 69, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.skill-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--crimson), var(--magma) 55%, var(--gold));
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.8);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(0.35s + var(--k, 0) * 90ms);
}
.burn-card.in-view .skill-fill { transform: scaleX(var(--p, 0)); }

/* =========================================================
   EDUCATION
   ========================================================= */
.card-org { color: var(--ember) !important; font-weight: 600; margin-bottom: 8px; }
.card-list { display: grid; gap: 8px; margin-top: 16px; }
.card-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: #ffe0d0;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  background: linear-gradient(135deg, var(--gold), var(--magma));
  box-shadow: 0 0 8px var(--magma);
}

/* =========================================================
   ACHIEVEMENTS
   ========================================================= */
.achieve-feature { grid-column: span 2; }
.achieve-head { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.achieve-head .card-icon { margin-bottom: 0; flex: 0 0 auto; }
.achieve-head h3 { margin-bottom: 6px; }
.achieve-head .card-meta { margin-bottom: 0; }

.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.grade-grid li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.12), rgba(255, 69, 0, 0.06));
  border: 1px solid rgba(255, 107, 53, 0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.grade-grid li:hover { border-color: rgba(255, 179, 71, 0.7); box-shadow: 0 0 16px rgba(255, 69, 0, 0.35); }
.grade-name { font-size: 0.86rem; color: #ffe6d8; line-height: 1.35; }
.grade-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff9a6b 0%, var(--magma) 45%, var(--crimson) 100%);
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.6), inset 0 -3px 6px rgba(110, 8, 24, 0.7);
}
.grade-badge[data-grade="A+"] {
  color: #3a0a00;
  background: radial-gradient(circle at 35% 30%, #fff1c9 0%, var(--gold) 45%, var(--magma) 100%);
  box-shadow: 0 0 18px rgba(255, 179, 71, 0.8), inset 0 -3px 6px rgba(160, 50, 0, 0.6);
}

.achieve-soon .card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.soon-flame { display: flex; gap: 10px; margin-top: 22px; }
.soon-flame span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--magma);
  box-shadow: 0 0 12px var(--magma);
  animation: auraPulse 1.4s ease-in-out infinite;
}
.soon-flame span:nth-child(2) { animation-delay: 0.2s; }
.soon-flame span:nth-child(3) { animation-delay: 0.4s; }

/* =========================================================
   CONTACT
   ========================================================= */
.card-grid.contact-grid {
  grid-template-columns: 1fr 1fr 1.5fr;
  grid-template-areas:
    "email  phone  form"
    "loc    social form";
  gap: 26px;
}
.c-email  { grid-area: email; }
.c-phone  { grid-area: phone; }
.c-loc    { grid-area: loc; }
.c-social { grid-area: social; }
.c-form   { grid-area: form; }
.contact-grid .card-link { overflow-wrap: anywhere; }

.contact-form { display: grid; gap: 16px; margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 0.82rem; font-weight: 600; color: var(--ember); letter-spacing: 0.02em; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(8, 2, 3, 0.65);
  border: 1px solid rgba(255, 107, 53, 0.3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  outline: none;
  cursor: text;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(184, 154, 146, 0.6); }
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 69, 0, 0.22), 0 0 18px rgba(255, 69, 0, 0.35);
}
.field .invalid { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.25); }
.contact-form .btn { justify-self: start; border: 0; font-family: inherit; }

.form-status { min-height: 1.4em; font-size: 0.9rem; font-weight: 600; }
.form-status.ok,
.form-status.err { animation: fadeUp 0.45s ease both; }
.form-status.ok  { color: var(--gold); text-shadow: 0 0 10px rgba(255, 140, 50, 0.6); }
.form-status.err { color: #ff7a8f; }

/* =========================================================
   NEW-SECTION RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .card-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
  .achieve-feature,
  .achieve-soon { grid-column: 1 / -1; }
  .card-grid.contact-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "email  phone"
      "loc    social"
      "form   form";
  }
}
@media (max-width: 680px) {
  .card-grid.grid-4 { grid-template-columns: 1fr; }
  .grade-grid { grid-template-columns: 1fr; }
  .achieve-head { flex-direction: column; align-items: flex-start; }
  .card-grid.contact-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "email" "phone" "loc" "social" "form";
    gap: 24px;
  }
  .contact-form .btn { justify-self: stretch; }
  .greet-pill { border-radius: 18px; }
}
@media (min-width: 681px) and (max-width: 1024px) {
  .grade-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   ICE SNOWFALL THEME  (html[data-theme="ice"])
   Paint-only overrides: nothing here changes layout, so a
   theme switch never triggers a reflow of the 3D scene.
   ========================================================= */
[data-theme="ice"] {
  color-scheme: light;

  --bg: #e3f1ff;
  --bg-2: #f4f9ff;
  --crimson: #00b4d8;   /* arctic cyan */
  --magma: #0077b6;     /* glacier blue */
  --ember: #38bdf8;     /* frost sky */
  --gold: #bae6fd;      /* crystalline white-blue */
  --incandescent: #7dd3fc;

  --text: #0b1f3a;      /* deep arctic navy */
  --muted: #3b5978;     /* cool slate-blue */
  --ice-ink: #0369a1;   /* accent text that stays legible on white */

  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(56, 189, 248, 0.45);
  --grad-fire: linear-gradient(135deg, #00b4d8 0%, #0077b6 50%, #075985 100%);
}

[data-theme="ice"] body { background-color: var(--bg); }
[data-theme="ice"] body::before {
  background-image:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(255, 255, 255, 0.95), transparent 70%),
    radial-gradient(ellipse 55% 40% at 90% 25%, rgba(186, 230, 253, 0.6), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(125, 211, 252, 0.35), transparent 70%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.5), transparent 35%),
    linear-gradient(180deg, #f4f9ff 0%, #e3f1ff 50%, #d2e8ff 100%);
}
[data-theme="ice"] ::selection { background: #0077b6; color: #fff; }
[data-theme="ice"] :focus-visible { outline-color: #0077b6; }

/* ---------- navbar ---------- */
[data-theme="ice"] .navbar {
  background:
    linear-gradient(rgba(248, 252, 255, 0.82), rgba(248, 252, 255, 0.82)) padding-box,
    linear-gradient(90deg, rgba(0, 180, 216, 0.7), rgba(255, 255, 255, 0.9), rgba(56, 189, 248, 0.7)) border-box;
  box-shadow:
    0 8px 30px rgba(11, 31, 58, 0.12),
    0 0 24px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
[data-theme="ice"] .navbar::after { box-shadow: 0 0 8px rgba(0, 180, 216, 0.7), 0 0 16px rgba(56, 189, 248, 0.45); }
[data-theme="ice"] .brand-mark { box-shadow: 0 0 14px rgba(0, 180, 216, 0.55); }
[data-theme="ice"] .nav-links a:hover { color: var(--text); }
[data-theme="ice"] .nav-pill {
  box-shadow:
    0 0 16px rgba(0, 180, 216, 0.5),
    0 0 32px rgba(56, 189, 248, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
[data-theme="ice"] .nav-toggle { background: rgba(56, 189, 248, 0.14); }
[data-theme="ice"] .nav-toggle span { background: #0077b6; }

[data-theme="ice"] .tt-track {
  background:
    linear-gradient(180deg, #ffffff, #e0f2fe) padding-box,
    linear-gradient(90deg, #7dd3fc, #ffffff, #0284c7) border-box;
  box-shadow:
    inset 0 2px 4px rgba(2, 132, 199, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.9),
    0 0 12px rgba(56, 189, 248, 0.4);
}
[data-theme="ice"] .theme-toggle:hover .tt-track {
  box-shadow:
    inset 0 2px 4px rgba(2, 132, 199, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.9),
    0 0 20px rgba(0, 180, 216, 0.6);
}
[data-theme="ice"] .tt-knob {
  box-shadow:
    0 0 10px rgba(0, 180, 216, 0.75),
    0 2px 4px rgba(2, 132, 199, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -2px 3px rgba(7, 89, 133, 0.45);
}

/* ---------- buttons ---------- */
[data-theme="ice"] .btn-primary {
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.4), 0 0 40px rgba(56, 189, 248, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="ice"] .btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.65), 0 0 60px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="ice"] .btn-ghost {
  border-color: rgba(0, 119, 182, 0.55);
  color: var(--ice-ink);
  background: rgba(255, 255, 255, 0.55);
}
[data-theme="ice"] .btn-ghost:hover {
  background: #0077b6;
  color: #fff;
  box-shadow: 0 0 22px rgba(0, 180, 216, 0.5);
}

/* ---------- section chrome & headings ---------- */
[data-theme="ice"] .section::before {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: inset 0 0 40px rgba(125, 211, 252, 0.3), 0 0 40px rgba(0, 180, 216, 0.3);
}
[data-theme="ice"] .eyebrow { color: var(--ice-ink); }
[data-theme="ice"] .section-title::before {
  background: radial-gradient(ellipse at center, rgba(125, 211, 252, 0.55), rgba(0, 180, 216, 0.18) 45%, transparent 70%);
}
[data-theme="ice"] .section-title h2 {
  background: linear-gradient(180deg, #0b1f3a 0%, #0077b6 60%, #00b4d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 0 12px rgba(56, 189, 248, 0.35))
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.9));
}
[data-theme="ice"] .section-title::after { box-shadow: 0 0 12px rgba(0, 180, 216, 0.7); }
[data-theme="ice"] .section-sub { color: var(--muted); }

/* ---------- hero ---------- */
[data-theme="ice"] .aura-glow {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(0, 180, 216, 0.18) 45%, transparent 70%);
}
[data-theme="ice"] .avatar {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(circle at 70% 85%, rgba(0, 119, 182, 0.55), transparent 60%),
    #7dd3fc;
  box-shadow: inset 0 0 40px rgba(2, 132, 199, 0.45);
  text-shadow: 0 0 18px rgba(2, 132, 199, 0.9), 0 2px 2px rgba(7, 89, 133, 0.5);
}
[data-theme="ice"] .fire-text {
  background-image: linear-gradient(90deg, #075985, #0077b6, #00b4d8, #0077b6, #075985);
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.45));
}
[data-theme="ice"] .hero-role { color: var(--ice-ink); }
[data-theme="ice"] .scroll-hint { border-color: rgba(0, 119, 182, 0.5); }
[data-theme="ice"] .scroll-hint span { background: #0077b6; box-shadow: 0 0 8px #38bdf8; }

[data-theme="ice"] .greet-pill {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(224, 242, 254, 0.75));
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.25),
    0 0 40px rgba(0, 180, 216, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="ice"] .greet-text { color: var(--text); }
[data-theme="ice"] .greet-clock { color: var(--ice-ink); text-shadow: 0 0 10px rgba(56, 189, 248, 0.55); }
[data-theme="ice"] .bio-sep { color: #00b4d8; text-shadow: 0 0 8px rgba(0, 180, 216, 0.6); }

/* ---------- frosted glass cards with a sculpted glacier rim ---------- */
[data-theme="ice"] .burn-card::before {
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.85), 0 0 60px rgba(0, 180, 216, 0.45);
}
[data-theme="ice"] .card-inner {
  --rim-1: #38bdf8;
  --rim-2: #0284c7;
  --rim-3: #ffffff;
  --rim-4: #7dd3fc;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(224, 242, 254, 0.35)) padding-box,
    conic-gradient(from var(--angle, 0deg), var(--rim-1), var(--rim-2), var(--rim-3), var(--rim-4), var(--rim-1)) border-box;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 1),      /* crisp white top bevel */
    inset 2px 0 3px rgba(255, 255, 255, 0.7),    /* left specular */
    inset 0 -3px 6px rgba(2, 132, 199, 0.22),    /* bottom cold shade */
    0 4px 0 rgba(2, 132, 199, 0.45),             /* 3D arctic extrusion */
    0 0 18px rgba(56, 189, 248, 0.45),           /* cyan corona */
    0 0 42px rgba(0, 180, 216, 0.22),            /* corona, wide */
    0 18px 40px rgba(11, 31, 58, 0.16);          /* floor shadow */
}
[data-theme="ice"] .card-inner:hover {
  --rim-1: #ffffff;
  --rim-2: #7dd3fc;
  --rim-3: #e0f2fe;
  --rim-4: #00b4d8;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 1),
    inset 2px 0 4px rgba(255, 255, 255, 0.85),
    inset 0 -4px 8px rgba(2, 132, 199, 0.3),
    0 7px 0 rgba(2, 132, 199, 0.5),
    0 0 28px rgba(0, 180, 216, 0.6),
    0 0 64px rgba(125, 211, 252, 0.45),
    0 26px 50px rgba(11, 31, 58, 0.2);
}
/* arctic-cyan shimmer spotlight */
[data-theme="ice"] .card-inner::after {
  background:
    radial-gradient(circle at var(--mx) var(--my),
      rgba(255, 255, 255, 0.75), rgba(125, 211, 252, 0.28) 20%, rgba(0, 180, 216, 0.08) 36%, transparent 50%);
}
[data-theme="ice"] .card-float::before { opacity: 0.45; }
[data-theme="ice"] .card-float:hover::before { opacity: 0.8; }

[data-theme="ice"] .card-inner h3 { color: var(--text); }
[data-theme="ice"] .card-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(186, 230, 253, 0.6));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.3), inset 0 1px 0 #fff;
}
[data-theme="ice"] .stat-num {
  background-image: linear-gradient(135deg, #0b1f3a 0%, #0077b6 50%, #00b4d8 100%);
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.45));
}
[data-theme="ice"] .card-meta {
  color: var(--ice-ink);
  background: rgba(186, 230, 253, 0.45);
  border-color: rgba(56, 189, 248, 0.5);
}
[data-theme="ice"] .tags li {
  color: #0c4a6e;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(186, 230, 253, 0.5));
  border-color: rgba(56, 189, 248, 0.45);
}
[data-theme="ice"] .card-link { color: var(--ice-ink); }
[data-theme="ice"] .card-link:hover { color: #00b4d8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }

/* frost wisps / crystalline spikes replace the flame tongues */
[data-theme="ice"] .card-flames i {
  height: calc(var(--w) * 2.6);
  margin-top: calc(var(--w) * -2.6);
  border-radius: 0;
  clip-path: polygon(50% 0, 66% 62%, 50% 100%, 34% 62%);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%, #ffffff 18%, #e0f2fe 42%, #7dd3fc 68%, rgba(2, 132, 199, 0.75) 100%);
  opacity: 0.85;
  animation-name: frostRise;
}
@keyframes frostRise {
  0%, 100% { transform: translateY(0)    scale(1, 1);    opacity: 0.55; }
  30%      { transform: translateY(-4px) scale(0.9, 1.18); opacity: 1; }
  60%      { transform: translateY(-2px) scale(1.05, 0.92); opacity: 0.7; }
  80%      { transform: translateY(-6px) scale(0.85, 1.25); opacity: 0.95; }
}

/* ---------- skills / education / achievements ---------- */
[data-theme="ice"] .skill-head { color: var(--text); }
[data-theme="ice"] .skill-pct {
  color: var(--ice-ink);
  background: rgba(186, 230, 253, 0.5);
  border-color: rgba(56, 189, 248, 0.5);
}
[data-theme="ice"] .skill-track {
  background: rgba(186, 230, 253, 0.45);
  box-shadow: inset 0 1px 2px rgba(2, 132, 199, 0.25);
}
[data-theme="ice"] .skill-fill {
  background: linear-gradient(90deg, #0077b6, #00b4d8 55%, #7dd3fc);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.6);
}
[data-theme="ice"] .card-org { color: var(--ice-ink) !important; }
[data-theme="ice"] .card-list li { color: var(--text); }
[data-theme="ice"] .card-list li::before {
  background: linear-gradient(135deg, #ffffff, #00b4d8);
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.7);
}
[data-theme="ice"] .grade-grid li {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(224, 242, 254, 0.55));
  border-color: rgba(56, 189, 248, 0.4);
}
[data-theme="ice"] .grade-grid li:hover { border-color: #00b4d8; box-shadow: 0 0 16px rgba(0, 180, 216, 0.35); }
[data-theme="ice"] .grade-name { color: var(--text); }
[data-theme="ice"] .grade-badge {
  background: radial-gradient(circle at 35% 30%, #7dd3fc 0%, #0077b6 50%, #075985 100%);
  box-shadow: 0 0 14px rgba(0, 180, 216, 0.5), inset 0 -3px 6px rgba(7, 89, 133, 0.6);
}
[data-theme="ice"] .grade-badge[data-grade="A+"] {
  color: #0b1f3a;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bae6fd 45%, #38bdf8 100%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.75), inset 0 -3px 6px rgba(2, 132, 199, 0.4);
}

/* ---------- contact form ---------- */
[data-theme="ice"] .field span { color: var(--ice-ink); }
[data-theme="ice"] .field input,
[data-theme="ice"] .field textarea {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 1px 3px rgba(2, 132, 199, 0.15);
}
[data-theme="ice"] .field input::placeholder,
[data-theme="ice"] .field textarea::placeholder { color: rgba(59, 89, 120, 0.6); }
[data-theme="ice"] .field input:focus,
[data-theme="ice"] .field textarea:focus {
  border-color: #00b4d8;
  box-shadow: inset 0 1px 3px rgba(2, 132, 199, 0.15), 0 0 0 3px rgba(0, 180, 216, 0.2), 0 0 18px rgba(56, 189, 248, 0.35);
}
[data-theme="ice"] .field .invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
[data-theme="ice"] .form-status.ok  { color: var(--ice-ink); text-shadow: 0 0 10px rgba(56, 189, 248, 0.45); }
[data-theme="ice"] .form-status.err { color: #b91c1c; }

/* ---------- glacier orb ---------- */
[data-theme="ice"] .to-top {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bae6fd 22%, #38bdf8 52%, #0077b6 82%, #075985 100%);
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.75),
    0 0 40px rgba(0, 180, 216, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    inset 0 -4px 10px rgba(7, 89, 133, 0.4);
}
[data-theme="ice"] .to-top svg { filter: drop-shadow(0 1px 1px rgba(7, 89, 133, 0.6)); }
[data-theme="ice"] .to-top::before { border-color: rgba(0, 180, 216, 0.6); }
[data-theme="ice"] .to-top::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(125, 211, 252, 0.6);
  animation: orbPulse 2.4s ease-out 1.2s infinite;
  opacity: 0;
}
[data-theme="ice"] .to-top:hover {
  box-shadow:
    0 0 28px rgba(0, 180, 216, 0.85),
    0 0 60px rgba(56, 189, 248, 0.55),
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    inset 0 -4px 10px rgba(7, 89, 133, 0.4);
}

/* ---------- glowing ice-shard cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  [data-theme="ice"],
  [data-theme="ice"] body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.45' stop-color='%23bae6fd'/%3E%3Cstop offset='1' stop-color='%230284c7'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M3 3l9 25 3.5-9.5L25 15z' fill='url(%23g)' stroke='%230b3a5e' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M4 4l11.5 14.5' stroke='%23ffffff' stroke-width='1'/%3E%3Cpath d='M26 21v7M22.5 24.5h7' stroke='%2300b4d8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 3 3, auto;
  }
  [data-theme="ice"] a,
  [data-theme="ice"] button,
  [data-theme="ice"] [role="button"],
  [data-theme="ice"] .nav-toggle,
  [data-theme="ice"] .to-top {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.4' stop-color='%237dd3fc'/%3E%3Cstop offset='1' stop-color='%2300b4d8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M3 3l9 25 3.5-9.5L25 15z' fill='url(%23g)' stroke='%230369a1' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M4 4l11.5 14.5' stroke='%23ffffff' stroke-width='1.2'/%3E%3Cpath d='M26 19v10M21 24h10M22.5 20.5l7 7M29.5 20.5l-7 7' stroke='%2300b4d8' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='26' cy='24' r='1.6' fill='%23ffffff'/%3E%3C/svg%3E") 3 3, pointer;
  }
  [data-theme="ice"] .field input,
  [data-theme="ice"] .field textarea { cursor: text; }
}

/* ---------- mobile dropdown ---------- */
@media (max-width: 880px) {
  [data-theme="ice"] .navbar nav {
    background: rgba(248, 252, 255, 0.96);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 20px 40px rgba(11, 31, 58, 0.14), 0 0 24px rgba(56, 189, 248, 0.2);
  }
  [data-theme="ice"] .nav-links a.active { box-shadow: 0 0 16px rgba(0, 180, 216, 0.45); }
}

/* ---------- theme cross-fade ----------
   Preferred path: View Transitions snapshot the page and cross-fade it,
   so no gradient or shadow has to animate and the rAF loop keeps running.
   Fallback: a short colour transition on the big surfaces only. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: ease;
}
html.theme-fading body,
html.theme-fading .navbar,
html.theme-fading .navbar nav {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

/* =========================================================
   LITE TIER (html.lite: weak phones, set in index.html head or
   by the frame-time probe in script.js). Every effect stays; only
   its cost drops.
   ========================================================= */
html.lite .navbar,
html.lite .navbar nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.lite .navbar {
  background:
    linear-gradient(rgba(14, 4, 6, 0.93), rgba(14, 4, 6, 0.93)) padding-box,
    linear-gradient(90deg, rgba(220, 20, 60, 0.7), rgba(255, 69, 0, 0.5), rgba(255, 107, 53, 0.7)) border-box;
}
html.lite[data-theme="ice"] .navbar {
  background:
    linear-gradient(rgba(248, 252, 255, 0.94), rgba(248, 252, 255, 0.94)) padding-box,
    linear-gradient(90deg, rgba(0, 180, 216, 0.7), rgba(255, 255, 255, 0.9), rgba(56, 189, 248, 0.7)) border-box;
}
/* rim orbit at ~15 repaints/s, halo at ~10 */
html.lite .card-inner { animation-timing-function: steps(90); }
html.lite .card-float::before { animation-timing-function: steps(60); filter: blur(10px); }
/* half the flame tongues (9 per card instead of 18) */
html.lite .card-flames i:nth-child(even) { display: none; }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .card-float,
  .aura-ring,
  .aura-glow,
  .card-inner,
  .card-float::before,
  .fire-text,
  .scroll-hint span,
  .to-top::before,
  .to-top::after,
  .tt-fire,
  .tt-ice { animation: none !important; }

  .burn-card,
  .hero .profile,
  .hero .hero-copy > *,
  .section:not(.hero) .section-title > * { opacity: 1 !important; transform: none !important; }

  .section-title,
  .card-grid,
  .section { transform: none !important; }
  .is-live { will-change: auto !important; }
  .section::before,
  .section-title::before,
  .burn-card::before { display: none; }
  .hero .profile,
  .hero .hero-copy { translate: none !important; rotate: none !important; }
  .card-inner:hover,
  .card-float:hover::before { transform: none; }
  .card-flames { display: none !important; }
  .skill-fill { transform: scaleX(var(--p, 0)) !important; }
  .section-sub { opacity: 1 !important; }
  .soon-flame span { animation: none !important; }
}
