/* ============================================================
   Kyaw Zay Ya Hein — Portfolio
   Direction: "Dream Gradient" — Memoora-inspired dawn sky.
   Lavender → sky surfaces, rounded geometry, glassy cards.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  /* Color — from Memoora's palette */
  --ink: #211d3a;            /* primary text */
  --ink-soft: #565170;       /* secondary text */
  --purple-900: #38327d;
  --purple-700: #4a44c6;     /* primary accent */
  --purple-500: #6c63e0;
  --purple-300: #a9a3f0;
  --purple-100: #e4e1fa;
  --sky-300: #a8d8ff;
  --pink-200: #f7c8e8;
  --cloud: #fbfaff;          /* card surface */
  --cloud-dim: #f1eefb;

  --grad-hero: linear-gradient(160deg, #e9e6fb 0%, #dcd6f9 34%, #cfe4fc 68%, #fbe9f6 100%);
  --grad-accent: linear-gradient(120deg, var(--purple-700), var(--purple-500) 55%, #8f7ae8);
  --gradient-brand: linear-gradient(120deg, var(--purple-700), var(--purple-500) 55%, #8f7ae8);

  /* SVG Logo Stops */
  --logo-stop-1: #1b0e38;
  --logo-stop-2: #3e1e78;
  --logo-stop-3: #5833b0;
  --logo-stop-4: #4b2da6;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.75rem, 3.2vw, 2.5rem);
  --text-hero: clamp(2.75rem, 6.5vw, 4.75rem);

  /* Motion & Easing Design Tokens */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-quick: 200ms;
  --dur-norm: 350ms;
  --dur-slow: 600ms;

    /* Space (8px rhythm) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 2.5rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-10: 5rem;
  --s-12: 6rem;

  /* Shape & elevation */
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;
  --shadow-soft: 0 10px 30px -12px rgba(74, 68, 198, 0.25);
  --shadow-card: 0 24px 60px -24px rgba(56, 50, 125, 0.28);

  /* Celestial Ambient Tokens (Light Theme: Rich royal violet & amethyst) */
  --celestial-orbit-stroke: rgba(74, 68, 198, 0.26);
  --celestial-grid-stroke: rgba(74, 68, 198, 0.32);
  --celestial-star-fill: #5A4CE8;
  --celestial-star-core: #211D3A;
  --celestial-glow: rgba(74, 68, 198, 0.38);
  --celestial-bg-opacity: 0.88;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cloud);
  overflow-x: clip;
  max-width: 100%;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--s-2);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--s-2);
  text-wrap: pretty;
}

a { color: var(--purple-700); }

:focus-visible {
  outline: 3px solid var(--purple-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(251, 250, 255, 0.72);
  border-bottom: 1px solid rgba(74, 68, 198, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

/* ---------- Navigation Logo & Brand Signature ---------- */
.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  user-select: none;
  transition: transform var(--dur-quick) var(--ease-spring);
}

.nav-logo:hover {
  transform: translateY(-1px);
}

.nav-brand-desktop {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-brand-mobile {
  display: none;
}

.nav-mark-svg {
  forced-color-adjust: none;
}

.nav-mark-desktop {
  width: 60px;
  height: 36px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  transition: transform var(--dur-norm) var(--ease-spring), filter var(--dur-norm) var(--ease-out-expo);
}

.nav-mark-mobile {
  width: 44px;
  height: 34px;
  display: block;
  overflow: visible;
}

.nav-logo:hover .nav-mark-svg {
  transform: scale(1.05);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}

/* Light Theme: Rich royal violet brand identity with crisp contrast */
.nav-logo #navMarkGrad .stop-1,
.nav-logo #navMarkGradMobile .stop-1 { stop-color: var(--logo-stop-1, #1b0e38); }
.nav-logo #navMarkGrad .stop-2,
.nav-logo #navMarkGradMobile .stop-2 { stop-color: var(--logo-stop-2, #3e1e78); }
.nav-logo #navMarkGrad .stop-3,
.nav-logo #navMarkGradMobile .stop-3 { stop-color: var(--logo-stop-3, #5833b0); }
.nav-logo #navMarkGrad .stop-4,
.nav-logo #navMarkGradMobile .stop-4 { stop-color: var(--logo-stop-4, #4b2da6); }

.nav-logo .kz-orbit {
  stroke: #5833b0;
  stroke-width: 10px;
  opacity: 1;
}
.nav-logo .kz-star,
.nav-logo .kz-star-core {
  fill: #3e1e78;
}

/* Dark Theme: Luminous starlight & vivid lavender */
html[data-theme="dark"] .nav-logo #navMarkGrad .stop-1,
html[data-theme="dark"] .nav-logo #navMarkGradMobile .stop-1 { stop-color: #ffffff; }
html[data-theme="dark"] .nav-logo #navMarkGrad .stop-2,
html[data-theme="dark"] .nav-logo #navMarkGradMobile .stop-2 { stop-color: #f4ecff; }
html[data-theme="dark"] .nav-logo #navMarkGrad .stop-3,
html[data-theme="dark"] .nav-logo #navMarkGradMobile .stop-3 { stop-color: #d0b3ff; }
html[data-theme="dark"] .nav-logo #navMarkGrad .stop-4,
html[data-theme="dark"] .nav-logo #navMarkGradMobile .stop-4 { stop-color: #a879ff; }

html[data-theme="dark"] .nav-logo .kz-orbit {
  stroke: #d0b3ff;
  stroke-width: 10px;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(168, 121, 255, 0.7));
}
html[data-theme="dark"] .nav-logo .kz-star,
html[data-theme="dark"] .nav-logo .kz-star-core {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95));
}
html[data-theme="dark"] .nav-logo:hover .nav-mark-svg {
  filter: drop-shadow(0 0 16px rgba(168, 121, 255, 0.85));
}

.nav-links {
  display: flex;
  gap: var(--s-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--purple-700); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  padding-top: var(--s-8);
  padding-bottom: calc(var(--s-6) + var(--s-4));
}

/* dreamy floating blobs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.hero::before {
  width: 420px; height: 420px;
  background: var(--purple-300);
  top: -140px; left: -120px;
}
.hero::after {
  width: 380px; height: 380px;
  background: var(--sky-300);
  bottom: -160px; right: -100px;
}

/* ---------- Ambient Celestial Canvas (Laptop-Inspired Brand Treatment) ---------- */
.hero-celestial-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.1s;
  will-change: opacity, transform;
}

body.is-loaded .hero-celestial-canvas {
  opacity: var(--celestial-bg-opacity, 0.88);
  transform: scale(1);
}

.celestial-svg-bg {
  width: 100%;
  height: 100%;
  display: block;
}

.celestial-orbit-macro,
.celestial-sphere,
.celestial-tech-line {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.18s;
  will-change: opacity;
}

body.is-loaded .celestial-orbit-macro,
body.is-loaded .celestial-sphere,
body.is-loaded .celestial-tech-line {
  opacity: 1;
}

.celestial-orbit-macro,
.celestial-sphere circle,
.celestial-sphere ellipse,
.celestial-tech-line {
  stroke: var(--celestial-orbit-stroke) !important;
  transition: stroke var(--dur-norm) var(--ease-out-expo);
}

.celestial-sphere line {
  stroke: var(--celestial-grid-stroke) !important;
  transition: stroke var(--dur-norm) var(--ease-out-expo);
}

/* Star Entrance: Fades in synchronized with Hero Entrance */
.celestial-star {
  opacity: 0;
  transition: opacity 0.85s ease-out;
  will-change: opacity;
}

body.is-loaded .celestial-star {
  opacity: 1;
}

body.is-loaded .star-1 { transition-delay: 0.22s; }
body.is-loaded .star-2 { transition-delay: 0.36s; }
body.is-loaded .star-3 { transition-delay: 0.50s; }
body.is-loaded .star-4 { transition-delay: 0.28s; }
body.is-loaded .star-5 { transition-delay: 0.42s; }
body.is-loaded .star-6 { transition-delay: 0.56s; }

/* Continuous gentle shimmer: Stars ALWAYS stay visible, NEVER disappearing */
.celestial-star path {
  fill: var(--celestial-star-fill) !important;
  filter: drop-shadow(0 0 6px var(--celestial-glow));
  transition: fill var(--dur-norm) var(--ease-out-expo);
  will-change: opacity;
}

.star-1 path { animation: celestialShimmer 4.8s ease-in-out infinite 1.0s; }
.star-2 path { animation: celestialShimmer 5.6s ease-in-out infinite 1.4s; }
.star-3 path { animation: celestialShimmer 4.2s ease-in-out infinite 2.2s; }
.star-4 path { animation: celestialShimmer 6.0s ease-in-out infinite 0.8s; }
.star-5 path { animation: celestialShimmer 5.1s ease-in-out infinite 2.8s; }
.star-6 path { animation: celestialShimmer 4.5s ease-in-out infinite 1.6s; }

.celestial-star circle {
  fill: var(--celestial-star-core) !important;
  transition: fill var(--dur-norm) var(--ease-out-expo);
}

@keyframes celestialShimmer {
  0%, 100% {
    opacity: 0.90;
  }
  50% {
    opacity: 1;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: var(--s-6);
  position: relative;
  z-index: 2;
  margin-bottom: var(--s-2);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: var(--s-2);
}

.hero-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: rgba(74, 68, 198, 0.08);
  border: 1px solid rgba(74, 68, 198, 0.22);
  color: var(--purple-700);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45em 1.1em;
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.hero-brand-tag .brand-sparkle {
  color: var(--purple-500);
  font-size: 0.9em;
  line-height: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(74, 68, 198, 0.18);
  color: var(--purple-900);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45em 1.1em;
  border-radius: var(--r-pill);
}
.hero-badge .status-indicator {
  width: 7px;
  height: 7px;
  margin-right: 2px;
}
.badge-text-mobile { display: none; }

.hero h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.3rem);
  line-height: 1.14;
  margin-bottom: var(--s-2);
  letter-spacing: -0.025em;
}

.hero h1 em,
.gradient-text {
  font-style: italic;
  color: var(--purple-700); /* Accessible fallback for engines without background-clip */
  background: var(--gradient-brand, var(--grad-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  forced-color-adjust: none; /* Protect against mobile browser auto-dark distortion */
}

.hero-sub {
  max-width: 31em;
  color: var(--ink-soft);
  font-size: var(--text-md);
  line-height: 1.55;
  margin-bottom: var(--s-4);
  margin-inline: 0;
}

.hero-ctas {
  display: flex;
  gap: var(--s-2);
  justify-content: flex-start;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 290px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 20px 40px -10px rgba(74, 68, 198, 0.2),
    0 4px 16px rgba(28, 23, 64, 0.06),
    0 0 0 1px rgba(74, 68, 198, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}


/* Hero Entrance Sequence & Editorial Mask Reveal */
.hero-headline {
  margin: 0 0 var(--s-3);
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  line-height: 1.08;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero-line-inner {
  display: inline-block;
  transform: translateY(115%) rotate(1.2deg);
  opacity: 0;
  transition: transform 1.05s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease;
  will-change: transform, opacity;
}

body.is-loaded .hero-line:nth-child(1) .hero-line-inner {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
  transition-delay: 0.16s;
}

body.is-loaded .hero-line:nth-child(2) .hero-line-inner {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
  transition-delay: 0.34s;
}

.hero-badge-wrap {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out-expo);
  transition-delay: 0.06s;
  will-change: transform, opacity;
}
body.is-loaded .hero-badge-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-sub {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-out-expo);
  transition-delay: 0.46s;
  will-change: transform, opacity;
}
body.is-loaded .hero-sub {
  opacity: 1;
  transform: translateY(0);
}

.hero-ctas {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-out-expo);
  transition-delay: 0.58s;
  will-change: transform, opacity;
}
body.is-loaded .hero-ctas {
  opacity: 1;
  transform: translateY(0);
}

.hero-card {
  opacity: 0;
  transform: translateY(32px) scale(0.94);
  filter: blur(5px);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.15s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.15s ease,
              box-shadow 0.35s ease;
  transition-delay: 0.25s;
  will-change: transform, opacity, filter;
}
body.is-loaded .hero-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero-card-img {
  transform: scale(1.08);
  transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.25s;
  will-change: transform;
}
body.is-loaded .hero-card-img {
  transform: scale(1);
}

@keyframes ambientBlobPulse {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }
  50% {
    transform: translate(18px, -14px) scale(1.1);
    opacity: 0.65;
  }
  100% {
    transform: translate(-12px, 12px) scale(0.94);
    opacity: 0.45;
  }
}

.hero::before {
  animation: ambientBlobPulse 16s ease-in-out infinite alternate;
}

.hero::after {
  animation: ambientBlobPulse 22s ease-in-out infinite alternate-reverse;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 26px 50px -12px rgba(74, 68, 198, 0.25),
    0 6px 20px rgba(28, 23, 64, 0.1),
    0 0 0 1px rgba(74, 68, 198, 0.12);
}

.hero-card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.hero-card-chip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(74, 68, 198, 0.16);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(28, 23, 64, 0.08);
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.chip-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* ---------- Proof at a glance ---------- */
.proof {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--s-4) * -1);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid rgba(74, 68, 198, 0.12);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.proof-item {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-3);
  border-right: 1px solid rgba(74, 68, 198, 0.12);
}
.proof-item:last-child { border-right: 0; }
.proof-item strong {
  font-family: var(--font-display);
  color: var(--purple-700);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.proof-item span { color: var(--ink-soft); font-size: var(--text-xs); font-weight: 700; line-height: 1.45; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.8em;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(74, 68, 198, 0.45); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--purple-900);
  border: 1.5px solid rgba(74, 68, 198, 0.25);
}
.btn-ghost:hover {
  background: #ffffff;
  border-color: var(--purple-500);
  box-shadow: var(--shadow-soft);
}

/* ---------- What I do ---------- */
.skills {
  padding-block: var(--s-8);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}

.skill-card {
  background: var(--cloud-dim);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.skill-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(74, 68, 198, 0.14);
  margin-bottom: var(--s-2);
}

.skill-card h3 { font-size: var(--text-lg); }
.skill-card p { color: var(--ink-soft); font-size: var(--text-sm); margin: 0; }

/* ---------- Section headers ---------- */
.section-head {
  text-align: center;
  max-width: 40em;
  margin: 0 auto var(--s-6);
}

.section-eyebrow {
  color: var(--purple-700);
  font-weight: 800;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--s-1);
}

.section-head h2 { font-size: var(--text-xl); }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- Case studies ---------- */
.work { padding-block: var(--s-8) var(--s-6); }

.case {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-6);
  align-items: center;
  padding: var(--s-6);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-6);
}
.case:nth-child(even) .case-media { order: 2; }

.case-memoora  { background: linear-gradient(150deg, #edeafc, #e3f1fe 70%, #fdeef8); }
.case-matchguard { background: linear-gradient(150deg, #edf4fd, #e0edfc 65%, #dce8fa); }
.case-matchguard .case-role { color: #1e5ba8; }
.case-matchguard .case-proof strong { color: #0d2845; }
.case-matchguard .case-proof li::before { background: #1e5ba8; }
.case-baganetic { background: linear-gradient(150deg, #fdf3e3, #fbe8d8 70%, #f7ddca); }
.case-mobile   { background: linear-gradient(150deg, #fbf4e8, #f3e4cc 60%, #ead3b7); }
.case-mobile, .case-mobile h3 { color: #33251d; }
.case-mobile .case-desc { color: #6c5b4d; }

.case-media img {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

/* phone screenshot strip (Memoora) */
.phone-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.phone-strip img {
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}
.phone-strip img:nth-child(2) { transform: translateY(-14px); }

/* current Baganetic Mobile build */
.mobile-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  align-items: end;
}
.mobile-strip img {
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.case-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--s-2);
}

.tag {
  font-size: var(--text-xs);
  font-weight: 800;
  padding: 0.3em 0.95em;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(33, 29, 58, 0.12);
  color: var(--ink);
}

.case h3 { font-size: var(--text-xl); }

.case-role {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--purple-700);
  margin-bottom: var(--s-1);
}
.case-baganetic .case-role { color: #a3611f; }
.case-mobile .case-role { color: #a5522d; }

.case-desc { color: var(--ink-soft); }

.case-proof {
  display: grid;
  gap: 0.55rem;
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.case-proof li {
  position: relative;
  padding-left: 1.25rem;
}
.case-proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--purple-500);
}
.case-proof strong { color: var(--ink); }
.case-mobile .case-proof { color: #6c5b4d; }
.case-mobile .case-proof strong { color: #33251d; }
.case-mobile .case-proof li::before { background: #a5522d; }

.case-links { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }

.case-award {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--purple-900);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.45em 1em;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--s-2);
}
.case-mobile .case-award { background: rgba(255,255,255,0.78); color: #6c3c20; box-shadow: none; }


/* ---------- Project Showcase Interactions & Micro-elevations ---------- */
.case {
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo), border-color 0.35s ease;
}

.case:hover {
  transform: translateY(-3px);
}

.case:hover .case-links .btn-ghost {
  transform: translateY(-1px);
}

.case-links .btn-ghost {
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.case-links .btn-ghost:hover {
  transform: translateX(3px);
}



/* ---------- Baganetic Signature Experience: Interactive A* Engine ---------- */
.case-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-2);
  gap: var(--s-2);
  flex-wrap: wrap;
}

.case-view-label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.bagan-tabs {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px;
  border-radius: var(--r-pill);
  gap: 3px;
}

.bagan-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
}

.bagan-mode-tab:hover {
  color: var(--ink);
}

.bagan-mode-tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bagan-engine-container {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.engine-map-wrapper {
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.02) 70%, transparent 100%);
  padding: 12px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  position: relative;
}

#bagan-svg-map {
  width: 100%;
  height: auto;
  max-height: 250px;
  display: block;
}

/* Roads & Edges */
.bagan-edge {
  stroke: rgba(163, 97, 31, 0.3);
  stroke-width: 2.2;
  stroke-dasharray: 4 3;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.bagan-edge.active {
  stroke: #f59e0b;
  stroke-width: 4.5;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
  animation: edgePulse 2s infinite alternate;
}

@keyframes edgePulse {
  0% { stroke-width: 3.8; filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  100% { stroke-width: 5; filter: drop-shadow(0 0 9px rgba(245, 158, 11, 0.8)); }
}

/* Nodes */
.bagan-node {
  cursor: pointer;
}

.bagan-node .node-ring {
  fill: transparent;
  stroke: transparent;
  transition: all 0.25s var(--ease-out-expo);
}

.bagan-node .node-core {
  fill: #8c5b23;
  stroke: #ffffff;
  stroke-width: 2;
  transition: all 0.25s var(--ease-out-expo);
}

.bagan-node .node-label {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 800;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
  transition: fill 0.2s ease;
}

.bagan-node:hover .node-core {
  fill: #f59e0b;
  transform: scale(1.25);
  transform-origin: 0 0;
}

.bagan-node:hover .node-ring {
  stroke: rgba(245, 158, 11, 0.4);
  stroke-width: 1.5;
}

.bagan-node.in-path .node-core {
  fill: #f59e0b;
  stroke: #ffffff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
}

.bagan-node.is-start .node-core {
  fill: #10b981;
  stroke: #ffffff;
}

.bagan-node.is-goal .node-core {
  fill: #ef4444;
  stroke: #ffffff;
}

/* Engine HUD */
.engine-hud {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.engine-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.engine-hud-tag {
  font-weight: 800;
  text-transform: uppercase;
  color: #a3611f;
  letter-spacing: 0.06em;
}

.engine-hud-status {
  color: #10b981;
  font-weight: 700;
  font-size: 0.68rem;
}

.engine-selectors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.selector-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.selector-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.engine-select {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--r-md);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
}

.selector-arrow {
  font-weight: 800;
  color: #f59e0b;
}

.btn-engine {
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  background: linear-gradient(120deg, #d97706, #f59e0b);
  color: #ffffff;
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-engine:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.engine-metrics-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-dist .metric-value {
  color: #d97706;
  font-weight: 800;
}

/* ---------- Additional work ---------- */
.other-work { padding-block: var(--s-6) var(--s-8); }
.other-work .section-head { margin-bottom: var(--s-4); }
.mini-case-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.mini-case {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border: 1px solid rgba(74, 68, 198, 0.14);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.mini-case h3 { font-size: var(--text-xl); }
.mini-case p:last-child { color: var(--ink-soft); margin: 0; max-width: 48rem; }
.mini-case-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(145deg, #38327d, #6c63e0);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-soft);
}
.mini-case-mark.geo {
  background: linear-gradient(145deg, #0369a1, #0d9488);
}
.mini-case-action { align-self: center; }

/* ---------- Recognition & Credentials ---------- */
.recognition {
  padding-block: var(--s-4) var(--s-10);
}
.recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-3);
}
.recognition-card {
  background: #fff;
  border: 1px solid rgba(74, 68, 198, 0.12);
  border-radius: var(--r-md);
  padding: var(--s-3);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.recognition-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.25;
}
.recognition-meta {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--purple-700);
}
.recognition-card p {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Process ---------- */
.process {
  background: var(--grad-hero);
  padding-block: var(--s-8);
  border-top: 1px solid rgba(74, 68, 198, 0.08);
  border-bottom: 1px solid rgba(74, 68, 198, 0.08);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  counter-reset: step;
}

.process-step {
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  counter-increment: step;
}

.process-step::before {
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--purple-300);
  display: block;
  margin-bottom: var(--s-1);
}

.process-step h3 { font-size: var(--text-lg); }
.process-step p { color: var(--ink-soft); font-size: var(--text-sm); margin: 0; }

/* ---------- Contact / footer ---------- */
.contact {
  padding-block: var(--s-12);
}

.contact-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(74, 68, 198, 0.14);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: 0 20px 48px -12px rgba(28, 23, 64, 0.08);
  max-width: 980px;
  margin-inline: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--s-6);
  align-items: center;
  text-align: left;
}

.contact-portrait-col {
  display: flex;
  justify-content: center;
}

.contact-portrait {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: calc(var(--r-lg) - 6px);
  object-fit: cover;
  aspect-ratio: 3/4;
  box-shadow: 0 12px 32px -8px rgba(28, 23, 64, 0.16);
  border: 1px solid rgba(74, 68, 198, 0.1);
  display: block;
}

.contact-content-col h2 {
  font-size: var(--text-xl);
  margin-top: 0;
  margin-bottom: var(--s-2);
}

.contact-content-col p {
  color: var(--ink-soft);
  margin-inline: 0;
  max-width: 100%;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-block: var(--s-4);
  padding-block: var(--s-3);
  border-top: 1px solid rgba(74, 68, 198, 0.1);
  border-bottom: 1px solid rgba(74, 68, 198, 0.1);
}

.contact-detail-item {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-size: var(--text-sm);
}

.detail-label {
  min-width: 85px;
  font-weight: 800;
  color: var(--purple-900);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.detail-val {
  color: var(--ink);
  font-weight: 500;
}

.detail-val a {
  color: var(--purple-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: flex-start;
  margin-top: var(--s-3);
}

.contact-ctas .btn {
  padding: 0.75em 1.4em;
  font-size: var(--text-sm);
}

.footer {
  border-top: 1px solid rgba(74, 68, 198, 0.1);
  padding-block: var(--s-3);
  text-align: center;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-motto {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--purple-700);
  letter-spacing: 0.02em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.footer-sparkle {
  color: var(--purple-500);
  font-size: 0.85em;
  line-height: 1;
}

.footer-copy {
  color: var(--ink-soft);
  font-size: var(--text-xs);
  margin: 0;
}

/* ---------- Motion & Distinctive Scroll Reveal System ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Section Head Reveal */
.reveal-head {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition: opacity 0.85s ease, transform 0.85s var(--ease-out-expo), filter 0.85s ease;
  will-change: transform, opacity, filter;
}
.reveal-head.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered Grid Reveal */
.reveal-stagger .reveal-child {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out-expo);
  will-change: transform, opacity;
}
.reveal-stagger.in > .reveal-child:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > .reveal-child:nth-child(2) { transition-delay: 0.16s; }
.reveal-stagger.in > .reveal-child:nth-child(3) { transition-delay: 0.28s; }
.reveal-stagger.in > .reveal-child:nth-child(4) { transition-delay: 0.40s; }
.reveal-stagger.in > .reveal-child:nth-child(5) { transition-delay: 0.52s; }
.reveal-stagger.in > .reveal-child:nth-child(6) { transition-delay: 0.64s; }

.reveal-stagger.in .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

/* Project Card Hover & Depth */
.case {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease, border-color 0.4s ease;
}
.case:hover {
  transform: translateY(-5px);
}
.case-matchguard:hover {
  box-shadow: 0 24px 56px -12px rgba(74, 68, 198, 0.22);
  border-color: rgba(74, 68, 198, 0.45);
}
.case-memoora:hover {
  box-shadow: 0 24px 56px -12px rgba(192, 132, 252, 0.24);
  border-color: rgba(192, 132, 252, 0.45);
}
.case-baganetic:hover {
  box-shadow: 0 24px 56px -12px rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.42);
}
.case-mobile:hover {
  box-shadow: 0 24px 56px -12px rgba(249, 115, 22, 0.22);
  border-color: rgba(249, 115, 22, 0.42);
}
.case-media img {
  transition: transform 0.5s var(--ease-out-expo);
}
.case:hover .case-media img {
  transform: scale(1.025);
}

/* Accessibility Focus States */
.bagan-mode-tab:focus-visible,
.engine-select:focus-visible,
.btn-engine:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--purple-400);
  outline-offset: 2px;
}

/* ---------- Desktop Custom Cursor System ---------- */
@media (pointer: fine) and (min-width: 901px) {
  html.has-custom-cursor,
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor .case-media,
  html.has-custom-cursor .bagan-node,
  html.has-custom-cursor #bagan-svg-map {
    cursor: none !important;
  }

  /* Preserve native text selection cursor */
  html.has-custom-cursor p,
  html.has-custom-cursor h1,
  html.has-custom-cursor h2,
  html.has-custom-cursor h3,
  html.has-custom-cursor h4,
  html.has-custom-cursor li,
  html.has-custom-cursor input,
  html.has-custom-cursor textarea,
  html.has-custom-cursor select {
    cursor: auto !important;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 99999;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (pointer: fine) and (min-width: 901px) {
  .custom-cursor {
    display: block;
  }
}

/* Center Dot: 0ms transform latency (hardware synchronized) */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  margin-left: -2.5px;
  background-color: var(--purple-700);
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  z-index: 100000;
  will-change: transform;
}

/* Outer Ring: Smooth Spring Lerp Tracking */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border: 1.5px solid rgba(74, 68, 198, 0.4);
  background: rgba(142, 137, 246, 0.04);
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
  transition: width 0.22s var(--ease-out-expo),
              height 0.22s var(--ease-out-expo),
              margin 0.22s var(--ease-out-expo),
              border-color 0.2s ease,
              background-color 0.2s ease,
              box-shadow 0.2s ease,
              opacity 0.2s ease;
  will-change: transform;
}

/* State 1: Clickable / Interactive Elements (Links, Buttons, Tabs, Nodes, Media) */
.cursor-hover .cursor-dot {
  transform: scale(0.6);
  opacity: 0.5;
}

.cursor-hover .cursor-ring {
  width: 46px;
  height: 46px;
  margin-top: -23px;
  margin-left: -23px;
  border-color: rgba(74, 68, 198, 0.75);
  background: rgba(74, 68, 198, 0.09);
  box-shadow: 0 0 16px rgba(74, 68, 198, 0.15);
}

/* State 2: Over Text Content (fade ring out, subtle dot for comfortable reading) */
.cursor-text .cursor-ring {
  opacity: 0;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
}
.cursor-text .cursor-dot {
  opacity: 0.35;
  transform: scale(0.75);
}

/* Dark Mode Cursor Adjustments */
[data-theme="dark"] .cursor-dot {
  background-color: var(--purple-300);
}

[data-theme="dark"] .cursor-ring {
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(192, 132, 252, 0.05);
}

[data-theme="dark"] .cursor-hover .cursor-ring {
  border-color: rgba(192, 132, 252, 0.85);
  background: rgba(192, 132, 252, 0.14);
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  html.has-custom-cursor,
  html.has-custom-cursor * {
    cursor: auto !important;
  }
  .custom-cursor {
    display: none !important;
  }
  .hero-celestial-canvas,
  .celestial-orbit-macro,
  .celestial-sphere,
  .celestial-tech-line,
  .celestial-star {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .celestial-star path {
    animation: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .hero-content {
    align-items: flex-start;
    text-align: left;
  }
  .hero-content h1 { text-align: left; }
  .hero-content .hero-sub { text-align: left; margin-inline: 0; }
  .hero-badge-wrap { align-self: flex-start; }
  .hero-visual {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .hero-card {
    max-width: 320px;
    width: 100%;
    margin-inline: auto;
  }
  
  .section-head {
    text-align: left;
    margin-inline: 0;
    margin-bottom: var(--s-4);
  }
  
  .case { grid-template-columns: 1fr; gap: var(--s-4); padding: var(--s-4); }
  .case:nth-child(even) .case-media { order: 0; }
  .skills-grid, .process-grid { grid-template-columns: 1fr; }
  
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-item {
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: var(--s-3);
  }
  .proof-item:nth-child(2) { border-right: 0; }
  .proof-item:nth-child(-n+2) { border-bottom: 1px solid rgba(74, 68, 198, 0.12); }
  
  .mini-case { grid-template-columns: auto 1fr; }
  .mini-case-action { grid-column: 2; }
  
  .contact-grid {
    grid-template-columns: 1fr;
    text-align: left;
    gap: var(--s-4);
  }
  .contact-content-col {
    order: 1;
    text-align: left;
    width: 100%;
  }
  .contact-portrait-col {
    order: 2;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .contact-portrait {
    max-width: 250px;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--r-md);
    margin-inline: auto;
  }
  .contact-detail-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-2);
  }
  .contact-detail-item .detail-label { text-align: left; flex-shrink: 0; }
  .contact-detail-item .detail-val { text-align: right; }
  .contact-ctas { justify-content: flex-start; }
}

/* Responsive Breakpoint for Brand Lockup (<= 680px) */
@media (max-width: 680px) {
  .nav-brand-desktop {
    display: none !important;
  }
  .nav-brand-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .nav-mark-mobile {
    width: 44px;
    height: 34px;
    display: block !important;
  }
  .celestial-orbit-macro,
  .celestial-sphere,
  .celestial-tech-line {
    opacity: 0.35;
  }
  .star-4, .star-5, .star-6 {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-links { gap: var(--s-3); }
  .nav-links li:nth-child(2) { display: none; } /* Hide Process on mobile to give Work & Contact breathing room */
  .nav-links li:nth-child(n+4) { display: none; }
  
  .badge-text-full { display: none; }
  .badge-text-mobile { display: inline; }
  
  .hero {
    padding-top: 14px;
    padding-bottom: 28px;
  }
  .hero-grid {
    gap: 16px;
  }
  .hero-badge-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
  }
  .hero-brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 5px 13px;
    border-radius: var(--r-pill);
    white-space: nowrap;
  }
  .hero-badge {
    display: none !important;
  }
  .hero h1 {
    font-size: clamp(1.68rem, 6.8vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .hero-line {
    padding-right: 4px;
    overflow: visible;
  }
  .hero-line-inner {
    max-width: 100%;
    white-space: normal;
  }
  .hero-sub {
    font-size: 0.90rem;
    line-height: 1.5;
    margin-bottom: 14px;
    text-wrap: pretty;
  }
  .hero-ctas {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 330px;
    gap: 10px;
    margin-inline: 0;
    margin-bottom: 0;
  }
  .hero-ctas .btn {
    flex: 1;
    width: auto;
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
    border-radius: var(--r-pill);
    font-weight: 600;
  }
  .hero-visual {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .hero-card {
    max-width: 275px;
    width: 100%;
    margin-inline: auto;
    border-radius: 20px;
  }
  .hero-card-chip {
    padding: 5px 10px;
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
  .hero-card-chip .chip-text {
    font-size: 0.70rem;
  }
  
  /* Harmonized section vertical rhythm on mobile to eliminate giant voids */
  .skills { padding-block: var(--s-4) var(--s-4); }
  .skills-grid { gap: var(--s-3); }
  .skill-card { padding: var(--s-3); }

  .work { padding-block: var(--s-4) var(--s-4); }
  .case {
    padding: var(--s-4) var(--s-3);
    gap: var(--s-3);
    margin-bottom: var(--s-4);
  }
  .case-links .btn {
    min-height: 46px;
  }

  .other-work { padding-block: var(--s-4) var(--s-4); }
  .mini-case-list { gap: var(--s-3); }
  .mini-case {
    grid-template-columns: 1fr;
    gap: var(--s-3);
    padding: var(--s-3);
  }
  .mini-case-action { grid-column: auto; }
  .mini-case-action .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .recognition { padding-block: var(--s-4) var(--s-4); }
  .recognition-grid { gap: var(--s-3); }
  .recognition-card { padding: var(--s-3); }

  .process { padding-block: var(--s-4) var(--s-4); }
  .process .section-head { margin-bottom: var(--s-2); }
  .process .section-head p {
    text-wrap: pretty;
    margin-bottom: 0;
  }
  .process-grid { gap: var(--s-2); }
  .process-step { padding: var(--s-3); }
  .process-step::before {
    font-size: 1.65rem;
    margin-bottom: 4px;
  }

  .contact { padding-block: var(--s-4) var(--s-6); }
  .contact-card { padding: var(--s-4) var(--s-3); }
  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
  }
  .contact-portrait-col {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: var(--s-1);
  }
  .contact-portrait {
    max-width: 270px;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--r-md);
    margin-inline: auto;
  }
  .contact-content-col {
    order: 2;
    text-align: left;
    width: 100%;
  }
  .contact-details {
    margin-top: var(--s-3);
  }
  .contact-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .contact-detail-item .detail-val { text-align: left; }
  .contact-ctas {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--s-2);
    margin-top: var(--s-3);
  }
  .contact-ctas .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* Engine responsive controls on mobile */
  .engine-metrics-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 4px;
  }
  .engine-metrics-row .metric-box {
    padding: 4px 6px;
  }
  .engine-metrics-row .metric-label {
    font-size: 0.58rem;
  }
  .engine-metrics-row .metric-value {
    font-size: 0.72rem;
  }
  .engine-selectors {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .selector-group {
    justify-content: space-between;
  }
  .selector-arrow {
    display: none;
  }
  .btn-engine {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

}

/* ---------- Theme toggle button ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(74, 68, 198, 0.2);
  color: var(--purple-900);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.08);
  background: #ffffff;
  border-color: var(--purple-500);
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }

/* ---------- Explicit Light Theme ---------- */
:root[data-theme="light"],
html[data-theme="light"] {
  color-scheme: light;
  --ink: #211d3a;
  --ink-soft: #565170;
  --purple-900: #38327d;
  --purple-700: #4a44c6;
  --purple-500: #6c63e0;
  --purple-300: #a9a3f0;
  --purple-100: #e4e1fa;
  --sky-300: #a8d8ff;
  --pink-200: #f7c8e8;
  --cloud: #fbfaff;
  --cloud-dim: #f1eefb;

  --grad-hero: linear-gradient(160deg, #e9e6fb 0%, #dcd6f9 34%, #cfe4fc 68%, #fbe9f6 100%);
  --grad-accent: linear-gradient(120deg, var(--purple-700), var(--purple-500) 55%, #8f7ae8);
  --gradient-brand: linear-gradient(120deg, var(--purple-700), var(--purple-500) 55%, #8f7ae8);

  --logo-stop-1: #1b0e38;
  --logo-stop-2: #3e1e78;
  --logo-stop-3: #5833b0;
  --logo-stop-4: #4b2da6;
}

/* ---------- Brand-Aligned Dark Theme ---------- */
:root[data-theme="dark"],
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f2fc;
  --ink-soft: #a8a3c7;
  --purple-900: #c8c4fa;
  --purple-700: #8a83f5;
  --purple-500: #746bee;
  --purple-300: #433678;
  --purple-100: #26204a;
  --sky-300: #1a3b5c;
  --pink-200: #3b1b36;
  --cloud: #0d0b1a;
  --cloud-dim: #16132b;

  --grad-hero: linear-gradient(160deg, #181432 0%, #15112d 34%, #121631 68%, #1a122e 100%);
  --grad-accent: linear-gradient(120deg, #b8b3ff 0%, #c4b5fd 40%, #e0e7ff 100%);
  --gradient-brand: linear-gradient(120deg, #b8b3ff 0%, #c4b5fd 40%, #e0e7ff 100%);

  --logo-stop-1: #ffffff;
  --logo-stop-2: #f4ecff;
  --logo-stop-3: #d0b3ff;
  --logo-stop-4: #a879ff;

  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.65);

  /* Celestial Ambient Tokens (Dark Theme: Luminous starlight & cosmic lavender) */
  --celestial-orbit-stroke: rgba(168, 121, 255, 0.38);
  --celestial-grid-stroke: rgba(220, 197, 255, 0.45);
  --celestial-star-fill: #FFFFFF;
  --celestial-star-core: #FFFFFF;
  --celestial-glow: rgba(168, 121, 255, 0.85);
  --celestial-bg-opacity: 0.95;
}

html[data-theme="dark"] .hero h1 em,
html[data-theme="dark"] .gradient-text {
  color: #c4b5fd;
  background: var(--gradient-brand, var(--grad-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  forced-color-adjust: none;
}

html[data-theme="dark"] .nav {
  background: rgba(13, 11, 26, 0.85);
  border-bottom: 1px solid rgba(138, 131, 245, 0.15);
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(138, 131, 245, 0.3);
  color: #c8c4fa;
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(138, 131, 245, 0.2);
  border-color: #8a83f5;
}

html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="dark"] .theme-icon-moon { display: none; }

html[data-theme="dark"] .hero::before { background: #3b2d71; opacity: 0.45; }
html[data-theme="dark"] .hero::after { background: #1a3b5c; opacity: 0.4; }

html[data-theme="dark"] .hero-brand-tag {
  background: rgba(116, 71, 200, 0.22);
  border-color: rgba(168, 121, 255, 0.4);
  color: #DCC5FF;
  box-shadow: 0 0 16px -4px rgba(168, 121, 255, 0.25);
}

html[data-theme="dark"] .hero-brand-tag .brand-sparkle {
  color: #FFFFFF;
  text-shadow: 0 0 8px rgba(168, 121, 255, 0.9);
}

html[data-theme="dark"] .hero-badge {
  background: rgba(26, 22, 48, 0.85);
  border-color: rgba(138, 131, 245, 0.28);
  color: #c8c4fa;
}

html[data-theme="dark"] .hero-card {
  background: #17142d;
  border-color: rgba(138, 131, 245, 0.25);
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(138, 131, 245, 0.15);
}

html[data-theme="dark"] .hero-card-chip {
  background: rgba(21, 18, 41, 0.94);
  border-color: rgba(138, 131, 245, 0.28);
  color: #f3f2fc;
}

html[data-theme="dark"] .proof-grid {
  background: rgba(21, 18, 41, 0.85);
  border-color: rgba(138, 131, 245, 0.2);
  box-shadow: var(--shadow-card);
}

html[data-theme="dark"] .proof-item { border-right-color: rgba(138, 131, 245, 0.16); border-bottom-color: rgba(138, 131, 245, 0.16); }
html[data-theme="dark"] .proof-item strong { color: #a39cf8; }

html[data-theme="dark"] .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f2fc;
  border-color: rgba(138, 131, 245, 0.35);
}

html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(138, 131, 245, 0.22);
  border-color: #a39cf8;
  color: #ffffff;
}

html[data-theme="dark"] .skill-card {
  background: #16132b;
  border: 1px solid rgba(138, 131, 245, 0.15);
}

html[data-theme="dark"] .skill-icon {
  background: #211c42;
  box-shadow: inset 0 0 0 1.5px rgba(138, 131, 245, 0.25);
}

html[data-theme="dark"] .skill-icon svg { stroke: #a39cf8; }

/* Projects in Dark Mode */
html[data-theme="dark"] .case-matchguard {
  background: linear-gradient(150deg, #0e1b2d, #12243b);
  border: 1px solid rgba(56, 189, 248, 0.22);
}
html[data-theme="dark"] .case-matchguard .case-role { color: #38bdf8; }
html[data-theme="dark"] .case-matchguard .case-proof strong { color: #e0f2fe; }
html[data-theme="dark"] .case-matchguard .case-proof li::before { background: #38bdf8; }

html[data-theme="dark"] .case-memoora {
  background: linear-gradient(150deg, #1b1433, #24163d);
  border: 1px solid rgba(192, 132, 252, 0.22);
}
html[data-theme="dark"] .case-memoora .case-role { color: #c084fc; }

html[data-theme="dark"] .case-baganetic {
  background: linear-gradient(150deg, #251912, #2f1d14);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
html[data-theme="dark"] .case-baganetic .case-role { color: #fbbf24; }
html[data-theme="dark"] .case-baganetic .case-proof strong { color: #fef3c7; }
html[data-theme="dark"] .case-baganetic .case-proof li::before { background: #f59e0b; }

html[data-theme="dark"] .case-mobile {
  background: linear-gradient(150deg, #25150f, #2e1a12);
  border: 1px solid rgba(249, 115, 22, 0.22);
  color: #f5ede6;
}
html[data-theme="dark"] .case-mobile h3 { color: #fff1ee; }
html[data-theme="dark"] .case-mobile .case-role { color: #fb923c; }
html[data-theme="dark"] .case-mobile .case-desc { color: #d4beab; }
html[data-theme="dark"] .case-mobile .case-proof { color: #d4beab; }
html[data-theme="dark"] .case-mobile .case-proof strong { color: #fed7aa; }
html[data-theme="dark"] .case-mobile .case-proof li::before { background: #f97316; }

html[data-theme="dark"] .case-award {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f3f2fc;
}

html[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e4e1fa;
}

html[data-theme="dark"] .mini-case {
  background: #16132b;
  border-color: rgba(138, 131, 245, 0.18);
}

html[data-theme="dark"] .recognition-card {
  background: #16132b;
  border-color: rgba(138, 131, 245, 0.16);
}
html[data-theme="dark"] .recognition-card h4 { color: #f3f2fc; }

html[data-theme="dark"] .process {
  background: linear-gradient(180deg, #131027 0%, #171333 50%, #131027 100%);
  border-top: 1px solid rgba(138, 131, 245, 0.12);
  border-bottom: 1px solid rgba(138, 131, 245, 0.12);
}
html[data-theme="dark"] .process-step {
  background: rgba(21, 18, 41, 0.78);
  border: 1px solid rgba(138, 131, 245, 0.16);
}
html[data-theme="dark"] .process-step::before { color: #6357a8; }

html[data-theme="dark"] .contact-card {
  background: rgba(21, 18, 41, 0.88);
  border-color: rgba(138, 131, 245, 0.22);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .contact-portrait {
  border-color: rgba(138, 131, 245, 0.25);
}
html[data-theme="dark"] .detail-label { color: #a39cf8; }
html[data-theme="dark"] .detail-val { color: #f3f2fc; }
html[data-theme="dark"] .detail-val a { color: #c4b5fd; }
html[data-theme="dark"] .contact-details {
  border-color: rgba(138, 131, 245, 0.18);
}
html[data-theme="dark"] .footer {
  border-top-color: rgba(138, 131, 245, 0.14);
}

html[data-theme="dark"] .footer-motto {
  color: #DCC5FF;
}

html[data-theme="dark"] .footer-sparkle {
  color: #A879FF;
  text-shadow: 0 0 8px rgba(168, 121, 255, 0.8);
}


/* Dark Theme Scrolled Nav & Baganetic Engine */
html[data-theme="dark"] .nav.nav-scrolled {
  background: rgba(13, 11, 26, 0.94);
  border-bottom: 1px solid rgba(138, 131, 245, 0.22);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .nav-links a::after {
  background: var(--purple-500);
}

html[data-theme="dark"] .bagan-tabs {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .bagan-mode-tab.active {
  background: var(--purple-700);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .bagan-engine-container {
  background: rgba(26, 18, 14, 0.92);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .bagan-edge {
  stroke: rgba(251, 191, 36, 0.25);
}

html[data-theme="dark"] .bagan-node .node-core {
  fill: #b45309;
  stroke: #251912;
}

html[data-theme="dark"] .bagan-node .node-label {
  fill: #fef3c7;
}

html[data-theme="dark"] .engine-hud-tag {
  color: #fbbf24;
}

html[data-theme="dark"] .engine-select {
  background: #2b1f18;
  border-color: rgba(245, 158, 11, 0.35);
  color: #fef3c7;
}

html[data-theme="dark"] .metric-box {
  background: rgba(37, 25, 18, 0.75);
  border-color: rgba(245, 158, 11, 0.2);
}

html[data-theme="dark"] .metric-value {
  color: #fef3c7;
}

html[data-theme="dark"] .metric-dist .metric-value {
  color: #fbbf24;
}

/* System dark mode preference fallback when no manual theme is selected */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f3f2fc;
    --ink-soft: #a8a3c7;
    --purple-900: #c8c4fa;
    --purple-700: #8a83f5;
    --purple-500: #746bee;
    --purple-300: #433678;
    --purple-100: #26204a;
    --sky-300: #1a3b5c;
    --pink-200: #3b1b36;
    --cloud: #0d0b1a;
    --cloud-dim: #16132b;

    --grad-hero: linear-gradient(160deg, #181432 0%, #15112d 34%, #121631 68%, #1a122e 100%);
    --grad-accent: linear-gradient(120deg, #b8b3ff 0%, #c4b5fd 40%, #e0e7ff 100%);
    --gradient-brand: linear-gradient(120deg, #b8b3ff 0%, #c4b5fd 40%, #e0e7ff 100%);
    --logo-stop-1: #ffffff;
    --logo-stop-2: #f4ecff;
    --logo-stop-3: #d0b3ff;
    --logo-stop-4: #a879ff;
    --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.65);

    /* Celestial Ambient Tokens (Dark Theme) */
    --celestial-orbit-stroke: rgba(168, 121, 255, 0.38);
    --celestial-grid-stroke: rgba(220, 197, 255, 0.45);
    --celestial-star-fill: #FFFFFF;
    --celestial-star-core: #FFFFFF;
    --celestial-glow: rgba(168, 121, 255, 0.85);
    --celestial-bg-opacity: 0.95;
  }

  html:not([data-theme="light"]) .hero h1 em,
  html:not([data-theme="light"]) .gradient-text {
    color: #c4b5fd;
    background: var(--gradient-brand, var(--grad-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    forced-color-adjust: none;
  }

  html:not([data-theme="light"]) .nav-logo #navMarkGrad .stop-1,
  html:not([data-theme="light"]) .nav-logo #navMarkGradMobile .stop-1 { stop-color: #ffffff; }
  html:not([data-theme="light"]) .nav-logo #navMarkGrad .stop-2,
  html:not([data-theme="light"]) .nav-logo #navMarkGradMobile .stop-2 { stop-color: #f4ecff; }
  html:not([data-theme="light"]) .nav-logo #navMarkGrad .stop-3,
  html:not([data-theme="light"]) .nav-logo #navMarkGradMobile .stop-3 { stop-color: #d0b3ff; }
  html:not([data-theme="light"]) .nav-logo #navMarkGrad .stop-4,
  html:not([data-theme="light"]) .nav-logo #navMarkGradMobile .stop-4 { stop-color: #a879ff; }

  html:not([data-theme="light"]) .nav.nav-scrolled {
    background: rgba(13, 11, 26, 0.94);
    border-bottom: 1px solid rgba(138, 131, 245, 0.22);
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.6);
  }

  html:not([data-theme="light"]) .bagan-tabs {
    background: rgba(255, 255, 255, 0.08);
  }

  html:not([data-theme="light"]) .bagan-mode-tab.active {
    background: var(--purple-700);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }

  html:not([data-theme="light"]) .bagan-engine-container {
    background: rgba(26, 18, 14, 0.92);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  }

  html:not([data-theme="light"]) .bagan-edge {
    stroke: rgba(251, 191, 36, 0.25);
  }

  html:not([data-theme="light"]) .bagan-node .node-core {
    fill: #b45309;
    stroke: #251912;
  }

  html:not([data-theme="light"]) .bagan-node .node-label {
    fill: #fef3c7;
  }

  html:not([data-theme="light"]) .engine-hud-tag {
    color: #fbbf24;
  }

  html:not([data-theme="light"]) .engine-select {
    background: #2b1f18;
    border-color: rgba(245, 158, 11, 0.35);
    color: #fef3c7;
  }

  html:not([data-theme="light"]) .metric-box {
    background: rgba(37, 25, 18, 0.75);
    border-color: rgba(245, 158, 11, 0.2);
  }

  html:not([data-theme="light"]) .metric-value {
    color: #fef3c7;
  }

  html:not([data-theme="light"]) .metric-dist .metric-value {
    color: #fbbf24;
  }

  html:not([data-theme="light"]) .nav {
    background: rgba(13, 11, 26, 0.85);
    border-bottom: 1px solid rgba(138, 131, 245, 0.15);
  }

  html:not([data-theme="light"]) .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(138, 131, 245, 0.3);
    color: #c8c4fa;
  }

  html:not([data-theme="light"]) .theme-icon-sun { display: block; }
  html:not([data-theme="light"]) .theme-icon-moon { display: none; }

  html:not([data-theme="light"]) .hero::before { background: #3b2d71; opacity: 0.45; }
  html:not([data-theme="light"]) .hero::after { background: #1a3b5c; opacity: 0.4; }

  html:not([data-theme="light"]) .hero-brand-tag {
    background: rgba(116, 71, 200, 0.22);
    border-color: rgba(168, 121, 255, 0.4);
    color: #DCC5FF;
    box-shadow: 0 0 16px -4px rgba(168, 121, 255, 0.25);
  }

  html:not([data-theme="light"]) .hero-brand-tag .brand-sparkle {
    color: #FFFFFF;
    text-shadow: 0 0 8px rgba(168, 121, 255, 0.9);
  }

  html:not([data-theme="light"]) .hero-badge {
    background: rgba(26, 22, 48, 0.85);
    border-color: rgba(138, 131, 245, 0.28);
    color: #c8c4fa;
  }

  html:not([data-theme="light"]) .hero-card {
    background: #17142d;
    border-color: rgba(138, 131, 245, 0.25);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(138, 131, 245, 0.15);
  }

  html:not([data-theme="light"]) .hero-card-chip {
    background: rgba(21, 18, 41, 0.94);
    border-color: rgba(138, 131, 245, 0.28);
    color: #f3f2fc;
  }

  html:not([data-theme="light"]) .proof-grid {
    background: rgba(21, 18, 41, 0.85);
    border-color: rgba(138, 131, 245, 0.2);
    box-shadow: var(--shadow-card);
  }

  html:not([data-theme="light"]) .proof-item { border-right-color: rgba(138, 131, 245, 0.16); border-bottom-color: rgba(138, 131, 245, 0.16); }
  html:not([data-theme="light"]) .proof-item strong { color: #a39cf8; }

  html:not([data-theme="light"]) .btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #f3f2fc;
    border-color: rgba(138, 131, 245, 0.35);
  }

  html:not([data-theme="light"]) .btn-ghost:hover {
    background: rgba(138, 131, 245, 0.22);
    border-color: #a39cf8;
    color: #ffffff;
  }

  html:not([data-theme="light"]) .skill-card {
    background: #16132b;
    border: 1px solid rgba(138, 131, 245, 0.15);
  }

  html:not([data-theme="light"]) .skill-icon {
    background: #211c42;
    box-shadow: inset 0 0 0 1.5px rgba(138, 131, 245, 0.25);
  }

  html:not([data-theme="light"]) .skill-icon svg { stroke: #a39cf8; }

  html:not([data-theme="light"]) .case-matchguard {
    background: linear-gradient(150deg, #0e1b2d, #12243b);
    border: 1px solid rgba(56, 189, 248, 0.22);
  }
  html:not([data-theme="light"]) .case-matchguard .case-role { color: #38bdf8; }
  html:not([data-theme="light"]) .case-matchguard .case-proof strong { color: #e0f2fe; }
  html:not([data-theme="light"]) .case-matchguard .case-proof li::before { background: #38bdf8; }

  html:not([data-theme="light"]) .case-memoora {
    background: linear-gradient(150deg, #1b1433, #24163d);
    border: 1px solid rgba(192, 132, 252, 0.22);
  }
  html:not([data-theme="light"]) .case-memoora .case-role { color: #c084fc; }

  html:not([data-theme="light"]) .case-baganetic {
    background: linear-gradient(150deg, #251912, #2f1d14);
    border: 1px solid rgba(245, 158, 11, 0.22);
  }
  html:not([data-theme="light"]) .case-baganetic .case-role { color: #fbbf24; }
  html:not([data-theme="light"]) .case-baganetic .case-proof strong { color: #fef3c7; }
  html:not([data-theme="light"]) .case-baganetic .case-proof li::before { background: #f59e0b; }

  html:not([data-theme="light"]) .case-mobile {
    background: linear-gradient(150deg, #25150f, #2e1a12);
    border: 1px solid rgba(249, 115, 22, 0.22);
    color: #f5ede6;
  }
  html:not([data-theme="light"]) .case-mobile h3 { color: #fff1ee; }
  html:not([data-theme="light"]) .case-mobile .case-role { color: #fb923c; }
  html:not([data-theme="light"]) .case-mobile .case-desc { color: #d4beab; }
  html:not([data-theme="light"]) .case-mobile .case-proof { color: #d4beab; }
  html:not([data-theme="light"]) .case-mobile .case-proof strong { color: #fed7aa; }
  html:not([data-theme="light"]) .case-mobile .case-proof li::before { background: #f97316; }

  html:not([data-theme="light"]) .case-award {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f3f2fc;
  }

  html:not([data-theme="light"]) .tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e4e1fa;
  }

  html:not([data-theme="light"]) .mini-case {
    background: #16132b;
    border-color: rgba(138, 131, 245, 0.18);
  }

  html:not([data-theme="light"]) .recognition-card {
    background: #16132b;
    border-color: rgba(138, 131, 245, 0.16);
  }
  html:not([data-theme="light"]) .recognition-card h4 { color: #f3f2fc; }

    html:not([data-theme="light"]) .process {
    background: linear-gradient(180deg, #131027 0%, #171333 50%, #131027 100%);
    border-top: 1px solid rgba(138, 131, 245, 0.12);
    border-bottom: 1px solid rgba(138, 131, 245, 0.12);
  }
html:not([data-theme="light"]) .process-step {
    background: rgba(21, 18, 41, 0.78);
    border: 1px solid rgba(138, 131, 245, 0.16);
  }
  html:not([data-theme="light"]) .process-step::before { color: #6357a8; }

  html:not([data-theme="light"]) .contact-card {
    background: rgba(21, 18, 41, 0.88);
    border-color: rgba(138, 131, 245, 0.22);
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.6);
  }
  html:not([data-theme="light"]) .contact-portrait {
    border-color: rgba(138, 131, 245, 0.25);
  }
  html:not([data-theme="light"]) .detail-label { color: #a39cf8; }
  html:not([data-theme="light"]) .detail-val { color: #f3f2fc; }
  html:not([data-theme="light"]) .detail-val a { color: #c4b5fd; }
  html:not([data-theme="light"]) .contact-details {
    border-color: rgba(138, 131, 245, 0.18);
  }
  html:not([data-theme="light"]) .footer {
    border-top-color: rgba(138, 131, 245, 0.14);
  }

  html:not([data-theme="light"]) .footer-motto {
    color: #DCC5FF;
  }

  html:not([data-theme="light"]) .footer-sparkle {
    color: #A879FF;
    text-shadow: 0 0 8px rgba(168, 121, 255, 0.8);
  }
}
