/* ============================================================
   CARLOS VILLANUEVA — Portfolio Redesign v2
   Fonts: Bricolage Grotesque (display) + Plus Jakarta Sans (body)
   Effects: 3D tilt, spotlight border, magnetic, text scramble,
            animated mesh gradients, Three.js background
   ============================================================ */

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

/* === TOKENS ================================================ */
:root {
  --bg:    #07070a;
  --s1:    rgba(255,255,255,0.03);
  --s2:    rgba(255,255,255,0.06);
  --b1:    rgba(255,255,255,0.07);
  --b2:    rgba(255,255,255,0.14);
  --t1:    #f0f0f4;
  --t2:    rgba(240,240,244,0.52);
  --t3:    rgba(240,240,244,0.26);
  --p:     #7c5af6;   /* indigo, less "AI slop" than pure #8b5cf6 */
  --pl:    #a990ff;
  --c:     #0ea5c4;
  --cl:    #5eead4;
  --green: #34d399;
  --spring:  cubic-bezier(0.32,0.72,0,1);
  --bounce:  cubic-bezier(0.34,1.56,0.64,1);
  --ease-out: cubic-bezier(0.16,1,0.3,1);

  /* Animated gradient blob positions (driven by JS) */
  --gx1: 18%; --gy1: 22%;
  --gx2: 82%; --gy2: 78%;
  --gx3: 50%; --gy3: 10%;
}

/* === BASE ================================================== */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === ANIMATED MESH GRADIENT BACKGROUND ==================== */
/* Lives on body::before — fixed, never on scrolling containers */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at var(--gx1) var(--gy1),
      rgba(124,90,246,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at var(--gx2) var(--gy2),
      rgba(14,165,196,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at var(--gx3) var(--gy3),
      rgba(90,50,180,0.06) 0%, transparent 70%);
  transition: background 0.05s linear;
}

/* === GRAIN OVERLAY ======================================== */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 997; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.032;
}

/* === SECTION GRADIENT TINTS ============================== */
/* Subtle per-section gradient washes to create visual rhythm */
.sg-violet {
  background: radial-gradient(ellipse 110% 70% at 0% 60%,
    rgba(124,90,246,0.07) 0%, transparent 65%);
}
.sg-teal {
  background: radial-gradient(ellipse 110% 70% at 100% 40%,
    rgba(14,165,196,0.065) 0%, transparent 65%);
}
.sg-center {
  background: radial-gradient(ellipse 80% 90% at 50% 0%,
    rgba(100,60,200,0.08) 0%, transparent 70%);
}

/* === LAYOUT =============================================== */
.wrap  { max-width: 1200px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
section { padding: 7rem 0; position: relative; z-index: 1; }

/* === NAV — Floating Glass Pill ============================ */
.nav-outer {
  position: fixed; top: 1.5rem; left: 0; right: 0;
  z-index: 100; display: flex; justify-content: center;
  pointer-events: none;
}
nav {
  pointer-events: all;
  display: flex; align-items: center;
  background: rgba(7,7,10,0.78);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--b2);
  border-radius: 9999px;
  padding: 0.375rem 0.375rem 0.375rem 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.025),
    0 12px 48px rgba(0,0,0,0.7),
    0 2px 8px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 0.9375rem;
  color: var(--t1); text-decoration: none;
  margin-right: 1.5rem; letter-spacing: -0.02em; white-space: nowrap;
}
.nav-list { display: flex; align-items: center; gap: 0.125rem; list-style: none; }
.nav-list a {
  font-size: 0.8125rem; font-weight: 500; color: var(--t2);
  text-decoration: none; padding: 0.5rem 1rem; border-radius: 9999px;
  white-space: nowrap;
  transition: color 0.3s var(--spring), background 0.3s var(--spring);
}
.nav-list a:hover  { color: var(--t1); background: rgba(255,255,255,0.08); }
.nav-list a.here   { color: var(--t1); background: rgba(255,255,255,0.07); }
.nav-cta {
  background: var(--t1) !important; color: #07070a !important;
  font-weight: 600 !important; padding: 0.5625rem 1.375rem !important;
  transition: all 0.4s var(--spring) !important;
}
.nav-cta:hover { transform: scale(0.97) !important; opacity: 0.9 !important; }

/* Hamburger */
.hamburger {
  display: none; width: 2.375rem; height: 2.375rem;
  border-radius: 9999px; background: rgba(255,255,255,0.08);
  border: 1px solid var(--b1); cursor: pointer; position: relative; flex-shrink: 0;
  align-items: center; justify-content: center;
}
.hamburger span {
  display: block; width: 15px; height: 1.5px; background: var(--t1);
  position: absolute; left: 50%; top: 50%;
  transition: all 0.42s var(--spring);
}
.hamburger span:first-child { transform: translate(-50%, -5px); }
.hamburger span:last-child  { transform: translate(-50%,  4px); }
.hamburger.open span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.hamburger.open span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Mobile overlay */
.mob-menu {
  display: none; position: fixed; inset: 0; z-index: 95;
  background: rgba(7,7,10,0.97);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  flex-direction: column; align-items: center; justify-content: center; gap: 2.25rem;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 2.75rem; font-weight: 800;
  color: var(--t2); text-decoration: none;
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.55s var(--spring), transform 0.55s var(--spring), color 0.3s;
}
.mob-menu.open a { opacity: 1; transform: translateY(0); }
.mob-menu.open a:nth-child(1) { transition-delay: 0.06s; }
.mob-menu.open a:nth-child(2) { transition-delay: 0.12s; }
.mob-menu.open a:nth-child(3) { transition-delay: 0.18s; }
.mob-menu.open a:nth-child(4) { transition-delay: 0.24s; }
.mob-menu a:hover { color: var(--t1); }

/* === DOUBLE-BEZEL CARD (Doppelrand) ====================== */
.card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: 2rem; padding: 0.375rem;
  position: relative; overflow: hidden;
  transition: border-color 0.5s var(--spring), transform 0.5s var(--spring), box-shadow 0.5s var(--spring);
  transform-style: preserve-3d;   /* enables JS 3D tilt */
  will-change: transform;
}
.card:hover {
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
}
.card-in {
  background: rgba(255,255,255,0.018);
  border-radius: calc(2rem - 6px);
  padding: 2rem; height: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  position: relative; z-index: 1;
}

/* === SPOTLIGHT OVERLAY (injected via JS) ================= */
.spotlight-overlay {
  position: absolute; inset: 0;
  border-radius: inherit; z-index: 2; pointer-events: none;
  background: transparent;
  transition: background 0.15s ease;
}

/* === EYEBROW BADGE ======================================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--b1);
  border-radius: 9999px; padding: 0.3rem 0.875rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 1.25rem;
}
.pulse {
  width: 6px; height: 6px; background: var(--green);
  border-radius: 50%; box-shadow: 0 0 8px rgba(52,211,153,0.9);
  animation: pls 2s ease-in-out infinite;
}
@keyframes pls {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}

/* === TYPOGRAPHY — Bricolage Grotesque =================== */
.display {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(3.25rem, 7vw, 6.5rem);
  font-weight: 800; line-height: 0.93; letter-spacing: -0.04em;
}
.h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.375rem; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 0.75rem;
}
/* Italic accent — replaces gradient-text cliché */
.italic-accent { font-style: italic; color: var(--pl); }

.body-lg { font-size: 1.0625rem; font-weight: 300; color: var(--t2); line-height: 1.75; }
.body-sm { font-size: 0.875rem;  color: var(--t2); line-height: 1.65; }
.label   {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 0.5rem;
}

/* Text scramble chars */
.sc-char { color: var(--pl); opacity: 0.7; }

/* === BUTTONS — Magnetic wrappers ========================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  border-radius: 9999px; font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  cursor: pointer; border: none; line-height: 1;
  transition: all 0.4s var(--spring);
}
.btn-solid {
  background: var(--t1); color: #07070a;
  padding: 0.9375rem 1rem 0.9375rem 1.625rem;
}
.btn-solid:hover { transform: scale(0.97); background: rgba(240,240,244,0.88); }
.btn-solid:active { transform: scale(0.95); }
.btn-icon {
  width: 2rem; height: 2rem; background: rgba(0,0,0,0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; transition: transform 0.4s var(--bounce);
}
.btn-solid:hover .btn-icon { transform: translate(2px,-1px) scale(1.1); }

.btn-outline {
  background: transparent; color: var(--t1); font-weight: 500;
  padding: 0.9375rem 1.5rem; border: 1px solid var(--b1);
}
.btn-outline:hover { background: var(--s1); border-color: var(--b2); transform: scale(0.97); }

/* Magnetic wrapper — JS adds inline translate */
.magnetic { transition: transform 0.6s var(--bounce) !important; }
.magnetic.snapping { transition: transform 0.6s var(--bounce) !important; }

/* === TAGS ================================================ */
.tag {
  display: inline-block; background: rgba(255,255,255,0.05);
  border: 1px solid var(--b1); border-radius: 9999px;
  padding: 0.275rem 0.75rem; font-size: 0.75rem; font-weight: 500;
  color: var(--t2); transition: all 0.3s var(--spring);
}
.tag:hover  { background: rgba(124,90,246,0.12); border-color: rgba(124,90,246,0.3); color: var(--pl); }
.tag-p { background: rgba(124,90,246,0.09); border-color: rgba(124,90,246,0.22); color: var(--pl); }
.tag-c { background: rgba(14,165,196,0.08);  border-color: rgba(14,165,196,0.22);  color: var(--cl); }
.tech  {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--t3); background: rgba(255,255,255,0.04); border: 1px solid var(--b1);
  border-radius: 9999px; padding: 0.25rem 0.625rem;
}

/* === ICON BOX ============================================ */
.ib {
  width: 3rem; height: 3rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; flex-shrink: 0;
}
.ib svg { width: 1.25rem; height: 1.25rem; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ib-p { background: rgba(124,90,246,0.1); border: 1px solid rgba(124,90,246,0.2); }
.ib-p svg { stroke: var(--pl); }
.ib-c { background: rgba(14,165,196,0.08); border: 1px solid rgba(14,165,196,0.2); }
.ib-c svg { stroke: var(--cl); }
.ib-g { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); }
.ib-g svg { stroke: #6ee7b7; }
.ib-o { background: rgba(251,146,60,0.08); border: 1px solid rgba(251,146,60,0.2); }
.ib-o svg { stroke: #fdba74; }

/* === 12-COL GRID ========================================= */
.grid12 { display: grid; grid-template-columns: repeat(12,1fr); gap: 1rem; }
.g4  { grid-column: span 4; }
.g5  { grid-column: span 5; }
.g6  { grid-column: span 6; }
.g7  { grid-column: span 7; }
.g8  { grid-column: span 8; }
.g12 { grid-column: span 12; }

/* === METRIC ============================================== */
.met-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--t1); line-height: 1; }
.met-lbl { font-size: 0.6875rem; color: var(--t3); font-weight: 500; margin-top: 0.2rem; }

hr.dim { border: none; border-top: 1px solid var(--b1); margin: 1.75rem 0; }

/* === FOOTER ============================================== */
footer { border-top: 1px solid var(--b1); padding: 2.5rem 0; position: relative; z-index: 1; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.foot-brand { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.9375rem; }
.foot-copy  { font-size: 0.8125rem; color: var(--t3); margin-top: 0.2rem; }
.foot-links { display: flex; gap: 1.5rem; }
.foot-links a { font-size: 0.8125rem; color: var(--t3); text-decoration: none; transition: color 0.3s; }
.foot-links a:hover { color: var(--t1); }

/* === SCROLL REVEAL ======================================= */
.rv {
  opacity: 0; transform: translateY(1.75rem); filter: blur(6px);
  transition: opacity 0.85s var(--spring), transform 0.85s var(--spring), filter 0.85s var(--spring);
}
.rv.in { opacity: 1; transform: translateY(0); filter: blur(0); }
.rv.d1 { transition-delay: 0.1s; }
.rv.d2 { transition-delay: 0.2s; }
.rv.d3 { transition-delay: 0.3s; }
.rv.d4 { transition-delay: 0.4s; }

/* === FLOATING ANIMATION ================================== */
@keyframes float {
  0%,100% { transform: translateY(0px) rotateX(0deg); }
  50%      { transform: translateY(-10px) rotateX(1deg); }
}

/* === SHIMMER (loading / decorative) ====================== */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.shimmer-line {
  background: linear-gradient(90deg, var(--b1) 25%, rgba(255,255,255,0.12) 50%, var(--b1) 75%);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
  border-radius: 9999px; height: 2px;
}

/* === SOCIAL PROOF ROW ==================================== */
.hero-proof {
  display: flex; align-items: center; gap: 0.875rem; flex-wrap: wrap;
  margin-top: 2rem; padding-top: 1.5rem;
}
.proof-lbl { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); white-space: nowrap; }
.proof-logos { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.proof-logo { font-size: 0.8125rem; font-weight: 600; color: var(--t2); white-space: nowrap; transition: color 0.3s; }
.proof-logo:hover { color: var(--t1); }
.proof-sep { color: var(--t3); font-size: 0.5rem; }

/* CV download link */
.btn-link {
  font-size: 0.8125rem; font-weight: 600; color: var(--t2);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.3s var(--spring);
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.btn-link:hover { color: var(--t1); }

/* === SCROLL DEVICE REVEAL ================================ */
.scroll-device-section {
  height: 280vh;
  position: relative; z-index: 1;
}
.scroll-device-sticky {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sdr-label-top {
  position: absolute; top: 11vh; left: 50%;
  transform: translateX(-50%);
  text-align: center; pointer-events: none;
  z-index: 2; white-space: nowrap;
  transition: opacity 0.15s linear;
}
.sdr-label-top .h2 { text-align: center; }

.device-scaler {
  width: min(1100px, 94vw);
  transform-origin: center center;
  will-change: transform;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative; z-index: 1;
}

/* Browser chrome */
.device-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dev-dots { display: flex; gap: 5px; }
.dev-dots span { width: 9px; height: 9px; border-radius: 50%; }
.dev-dots span:nth-child(1) { background: rgba(239,68,68,0.55); }
.dev-dots span:nth-child(2) { background: rgba(251,191,36,0.55); }
.dev-dots span:nth-child(3) { background: rgba(52,211,153,0.55); }
.dev-url {
  flex: 1; font-size: 0.625rem; color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 5px; padding: 0.2rem 0.625rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Plus Jakarta Sans', monospace;
}

/* Dashboard screen */
.device-screen { padding: 1rem; background: #0b0b10; }
.mock-dash { display: flex; flex-direction: column; gap: 0.875rem; }
.mock-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.625rem; }
.mock-stat {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.625rem; padding: 0.75rem;
}
.mock-stat-hi { border-color: rgba(124,90,246,0.3); background: rgba(124,90,246,0.07); }
.mock-stat-val {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; color: #f0f0f4;
}
.mock-stat-lbl { font-size: 0.5625rem; color: rgba(240,240,244,0.3); margin-top: 0.15rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mock-chart-row { display: grid; grid-template-columns: 1fr 180px; gap: 0.625rem; }
.mock-chart-main, .mock-chart-side {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.625rem; padding: 0.875rem;
}
.mock-chart-title { font-size: 0.5625rem; color: rgba(240,240,244,0.3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.625rem; }
.mock-bars { display: flex; align-items: flex-end; gap: 5px; height: 72px; }
.mock-bar { flex: 1; background: rgba(124,90,246,0.22); border-radius: 3px 3px 0 0; height: var(--h); }
.mock-bar-hi { background: var(--p); }
.mock-donut { width: 56px; height: 56px; margin: 0 auto 0.5rem; }
.mock-donut svg { width: 100%; height: 100%; }
.mock-legend { display: flex; flex-direction: column; gap: 0.2rem; }
.mock-lg-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.5rem; color: rgba(240,240,244,0.35); }
.mock-lg-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

/* Caption that fades in */
.sdr-caption {
  position: absolute; bottom: 8vh; left: 50%;
  transform: translateX(-50%);
  text-align: center; opacity: 0; pointer-events: none;
  z-index: 3; white-space: nowrap;
  transition: opacity 0.15s linear;
}

/* Light mode overrides */
[data-theme="light"] .device-screen { background: #f0f0f8; }
[data-theme="light"] .mock-stat { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .mock-stat-val { color: #0b0b0e; }
[data-theme="light"] .mock-stat-lbl { color: rgba(11,11,14,0.35); }
[data-theme="light"] .mock-chart-main, [data-theme="light"] .mock-chart-side { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }
[data-theme="light"] .mock-chart-title { color: rgba(11,11,14,0.35); }
[data-theme="light"] .mock-bar { background: rgba(92,62,232,0.2); }
[data-theme="light"] .mock-lg-item { color: rgba(11,11,14,0.4); }
[data-theme="light"] .device-toolbar { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .dev-url { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.07); color: rgba(11,11,14,0.3); }
[data-theme="light"] .device-scaler { box-shadow: 0 24px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.1); }

/* Disable scroll device section on mobile */
@media (max-width: 768px) {
  .scroll-device-section { display: none; }
}

/* === LIGHT MODE ========================================== */
[data-theme="light"] {
  --bg:    #f4f3ef;
  --s1:    rgba(0,0,0,0.03);
  --s2:    rgba(0,0,0,0.06);
  --b1:    rgba(0,0,0,0.09);
  --b2:    rgba(0,0,0,0.16);
  --t1:    #0b0b0e;
  --t2:    rgba(11,11,14,0.54);
  --t3:    rgba(11,11,14,0.32);
  --p:     #5c3ee8;
  --pl:    #4a28d4;
  --c:     #0881a2;
  --cl:    #0e6e88;
  --green: #059669;
}
[data-theme="light"] body { background: var(--bg); color: var(--t1); }
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 60% at var(--gx1) var(--gy1), rgba(92,62,232,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at var(--gx2) var(--gy2), rgba(8,129,162,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at var(--gx3) var(--gy3), rgba(70,40,180,0.04) 0%, transparent 70%);
}
[data-theme="light"] body::after { opacity: 0.018; }
[data-theme="light"] nav {
  background: rgba(244,243,239,0.82);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
[data-theme="light"] .nav-list a:hover { background: rgba(0,0,0,0.06); }
[data-theme="light"] .nav-list a.here  { background: rgba(0,0,0,0.06); }
[data-theme="light"] .nav-cta { background: var(--t1) !important; color: var(--bg) !important; }
[data-theme="light"] .hamburger { background: rgba(0,0,0,0.06); border-color: var(--b1); }
[data-theme="light"] .hamburger span { background: var(--t1); }
[data-theme="light"] .mob-menu { background: rgba(244,243,239,0.97); }
[data-theme="light"] .card { background: rgba(255,255,255,0.7); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
[data-theme="light"] .card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
[data-theme="light"] .card-in { background: rgba(255,255,255,0.5); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9); }
[data-theme="light"] .btn-solid { background: var(--t1); color: var(--bg); }
[data-theme="light"] .btn-solid:hover { background: rgba(11,11,14,0.85); }
[data-theme="light"] .super-title .outline { -webkit-text-stroke: 1.5px rgba(0,0,0,0.12); }
[data-theme="light"] .proj-hero-num { -webkit-text-stroke: 1px rgba(0,0,0,0.06); }
[data-theme="light"] .contact-bg-word { -webkit-text-stroke: 1px rgba(0,0,0,0.04); }
[data-theme="light"] .proj-feat-l { background: rgba(255,255,255,0.5); border-color: var(--b1); }
[data-theme="light"] .proj-feat-r { background: rgba(255,255,255,0.3); }
[data-theme="light"] .form-outer { background: rgba(255,255,255,0.7); }
[data-theme="light"] .form-inner { background: rgba(255,255,255,0.5); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9); }
[data-theme="light"] .field-outer { background: rgba(0,0,0,0.03); border-color: var(--b1); }
[data-theme="light"] input, [data-theme="light"] textarea { color: var(--t1); }
[data-theme="light"] .form-submit { background: var(--t1); color: var(--bg); }
[data-theme="light"] #hero-canvas.ready { opacity: 0.55; }
[data-theme="light"] .tl-item:hover { background: rgba(0,0,0,0.025); }
[data-theme="light"] .contact-item { background: rgba(255,255,255,0.5); }
[data-theme="light"] .contact-item:hover { background: rgba(255,255,255,0.8); }

/* === NAV CONTROLS (theme + lang) ========================= */
.nav-controls {
  display: flex; align-items: center; gap: 0.25rem;
  margin-left: 0.625rem; padding-left: 0.625rem;
  border-left: 1px solid var(--b1);
}
.nav-ctrl-btn {
  height: 2rem; min-width: 2rem; border-radius: 9999px;
  background: transparent; border: none; cursor: pointer;
  color: var(--t3); font-size: 0.6875rem; font-weight: 700;
  padding: 0 0.5rem; letter-spacing: 0.06em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.28s var(--spring);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.nav-ctrl-btn:hover { color: var(--t1); background: rgba(255,255,255,0.08); }
.nav-ctrl-btn.active { color: var(--t1); background: rgba(255,255,255,0.09); }
[data-theme="light"] .nav-ctrl-btn:hover  { background: rgba(0,0,0,0.07); }
[data-theme="light"] .nav-ctrl-btn.active { background: rgba(0,0,0,0.07); }
.nav-ctrl-sep { width: 1px; height: 14px; background: var(--b1); margin: 0 0.125rem; }

/* Theme icon buttons */
.nav-ctrl-icon { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* === RESPONSIVE ========================================== */
@media (max-width: 768px) {
  .nav-list, .nav-logo { display: none; }
  .hamburger { display: flex; }
  nav { padding: 0.375rem; }

  .grid12 { grid-template-columns: 1fr; }
  .g4,.g5,.g6,.g7,.g8,.g12 { grid-column: span 1; }

  section  { padding: 4.5rem 0; }
  .wrap    { padding: 0 1.25rem; }
  .display { letter-spacing: -0.03em; }

  /* Disable 3D tilt on touch */
  .card { transform: none !important; }
}
