/* ============================================================
   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; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  overflow-x: clip;
  -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;
  /* Home default: purple top-left + emerald bottom-right */
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1),
      rgba(124,90,246,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2),
      rgba(16,185,129,0.17) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at var(--gx3) var(--gy3),
      rgba(90,50,180,0.08) 0%, transparent 70%);
}

/* Projects: teal top-left + amber bottom-right (distinct from home's purple+green) */
body.page-projects::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1),
      rgba(14,165,196,0.24) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2),
      rgba(245,158,11,0.18) 0%, transparent 65%);
}

/* About: teal top-left + amber bottom-right */
body.page-about::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1),
      rgba(14,165,196,0.20) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2),
      rgba(245,158,11,0.15) 0%, transparent 65%);
}

/* Contact: amber top-left + violet bottom-right */
body.page-contact::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1),
      rgba(245,158,11,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2),
      rgba(124,90,246,0.20) 0%, transparent 65%);
}

/* === 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); }

/* Card as link — strip browser underline */
a.card, a.tilt-card { text-decoration: none; color: inherit; }

/* === 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);
  will-change: transform;
}
.card:hover {
  border-color: rgba(124,90,246,0.35);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,90,246,0.12), 0 0 40px rgba(124,90,246,0.06);
}
.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 — animated purple→cyan gradient */
.italic-accent {
  font-style: italic;
  background: linear-gradient(120deg, #a990ff 0%, #5eead4 40%, #b8a4ff 70%, #5eead4 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: grad-shift 6s ease-in-out infinite;
}
@keyframes grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.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: 380vh;
  position: relative; z-index: 1;
}
.scroll-device-sticky {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.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; font-size: clamp(3rem, 6.5vw, 5.5rem); }

.device-scaler {
  width: min(1100px, 94vw);
  transform-origin: center center;
  will-change: transform;
  border-radius: 12px;
  /* overflow:hidden removed — causes GPU compositing glitch on Windows Chromium */
  -webkit-backface-visibility: hidden;
  backface-visibility: 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; min-height: 4px; }
.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 85% 75% at var(--gx1) var(--gy1), rgba(92,62,232,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2), rgba(16,120,80,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at var(--gx3) var(--gy3), rgba(70,40,180,0.05) 0%, transparent 70%);
}
[data-theme="light"] body.page-projects::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1), rgba(92,62,232,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2), rgba(8,129,162,0.08) 0%, transparent 65%);
}
[data-theme="light"] body.page-about::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1), rgba(8,129,162,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2), rgba(160,100,0,0.07) 0%, transparent 65%);
}
[data-theme="light"] body.page-contact::before {
  background:
    radial-gradient(ellipse 85% 75% at var(--gx1) var(--gy1), rgba(160,100,0,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 75% 65% at var(--gx2) var(--gy2), rgba(92,62,232,0.09) 0%, transparent 65%);
}
[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: 1024px) {
  /* Collapse two-column layouts at intermediate viewports to prevent overflow */
  .contact-wrap { grid-template-columns: 1fr !important; gap: 3rem !important; }
  .proj-hero-inner { flex-direction: column !important; align-items: flex-start !important; }
  .proj-hero-inner .body-lg { max-width: 100% !important; }
  .about-hero-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .exp-wrap { grid-template-columns: 1fr !important; }
}

@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; font-size: clamp(2.5rem, 8vw, 3.75rem); }

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

/* === SCROLL PROGRESS BAR ================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--p), var(--c), var(--p));
  background-size: 200% 100%;
  z-index: 9999; pointer-events: none;
  animation: prog-gradient 3s linear infinite;
  transition: width 0.06s linear;
}
@keyframes prog-gradient {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* === CARD ACCENT TOP LINE ================================ */
/* Base ::before for the top-edge glow line */
.card-accent-top::before {
  content: '';
  position: absolute; top: 0; left: 12%; right: 12%;
  height: 1px; border-radius: 9999px;
  opacity: 0;
  transition: opacity 0.55s var(--spring), left 0.55s var(--spring), right 0.55s var(--spring);
  z-index: 3;
}
.card-accent-top:hover::before { opacity: 1; left: 4%; right: 4%; }

/* === PER-PROJECT COLOR IDENTITY ========================== */
/*
  Each project gets a signature accent color applied to:
  border hover, top-edge glow, decorative number, badge tint.
  Recruiters can distinguish projects at a glance without reading.
*/
:root {
  --c1: #7c5af6;   /* Fintu      — violet  */
  --c2: #0ea5c4;   /* Hermes     — teal    */
  --c3: #f59e0b;   /* Analytics  — amber   */
  --c4: #3b82f6;   /* Automation — blue    */
}

/* Per-project: card border + glow on hover */
.proj-c1:hover { border-color: rgba(124,90,246,0.4);  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,90,246,0.14), 0 0 50px rgba(124,90,246,0.08); }
.proj-c2:hover { border-color: rgba(14,165,196,0.4);  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(14,165,196,0.14),  0 0 50px rgba(14,165,196,0.08); }
.proj-c3:hover { border-color: rgba(245,158,11,0.4);  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,158,11,0.14),  0 0 50px rgba(245,158,11,0.08); }
.proj-c4:hover { border-color: rgba(59,130,246,0.4);   box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.14),   0 0 50px rgba(59,130,246,0.08); }

/* Per-project: top edge gradient */
.proj-c1.card-accent-top::before { background: linear-gradient(90deg, transparent, var(--c1), transparent); }
.proj-c2.card-accent-top::before { background: linear-gradient(90deg, transparent, var(--c2), transparent); }
.proj-c3.card-accent-top::before { background: linear-gradient(90deg, transparent, var(--c3), transparent); }
.proj-c4.card-accent-top::before { background: linear-gradient(90deg, transparent, var(--c4), transparent); }

/* Per-project: section background tints */
.proj-c1 { background: rgba(124,90,246,0.025); }
.proj-c2 { background: rgba(14,165,196,0.02);  }
.proj-c3 { background: rgba(245,158,11,0.02);  }
.proj-c4 { background: rgba(59,130,246,0.02);  }

/* Per-project: met-big (metric values) color */
.proj-c1 .met-big { color: var(--pl); }
.proj-c2 .met-big { color: var(--cl); }
.proj-c3 .met-big { color: #fcd34d; }
.proj-c4 .met-big { color: #93c5fd; }

.card { position: relative; }

/* === HERMES GALLERY LIGHTBOX ============================= */
.gallery-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(7,7,10,0.94);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--spring);
}
.gallery-overlay.open { opacity: 1; pointer-events: all; }

.gallery-frame {
  width: min(960px, 92vw);
  position: relative;
}

.gallery-chrome {
  background: #0f0f14;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.06);
}

.gallery-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.gallery-toolbar .dev-dots { display: flex; gap: 5px; }
.gallery-toolbar .dev-dots span { width: 9px; height: 9px; border-radius: 50%; }
.gallery-toolbar .dev-dots span:nth-child(1) { background: rgba(239,68,68,0.55); }
.gallery-toolbar .dev-dots span:nth-child(2) { background: rgba(251,191,36,0.55); }
.gallery-toolbar .dev-dots span:nth-child(3) { background: rgba(52,211,153,0.55); }
.gallery-url {
  flex: 1; font-size: 0.6rem; color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 5px; padding: 0.2rem 0.75rem; text-align: center;
  font-family: 'Plus Jakarta Sans', monospace;
}

.gallery-screen {
  min-height: 420px; max-height: 72vh;
  overflow: hidden; position: relative;
  background: #0b0b10;
}
.gallery-slide {
  position: absolute; inset: 0;
  padding: 1.25rem; overflow-y: auto;
  opacity: 0; transition: opacity 0.3s var(--spring);
  pointer-events: none;
}
.gallery-slide.active { opacity: 1; pointer-events: all; }

/* Close button */
.gallery-close {
  position: absolute; top: -3rem; right: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--t1); font-size: 1.125rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--spring);
}
.gallery-close:hover { background: rgba(255,255,255,0.15); }

/* Nav */
.gallery-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin-top: 1.25rem;
}
.gallery-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--t1); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.28s var(--spring);
}
.gallery-btn:hover { background: rgba(124,90,246,0.2); border-color: rgba(124,90,246,0.4); }
.gallery-dots {
  display: flex; gap: 0.5rem; align-items: center;
}
.gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.15); cursor: pointer;
  transition: all 0.28s var(--spring);
}
.gallery-dot.active { background: var(--pl); transform: scale(1.3); }

/* Gallery slide internals */
.gl-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.gl-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.9375rem; font-weight: 700; color: var(--t1); }
.gl-sub { font-size: 0.5625rem; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.1rem; }
.gl-date { font-size: 0.5625rem; color: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.08); border-radius: 9999px; padding: 0.2rem 0.625rem; }
.gl-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.5rem; margin-bottom: 0.875rem; }
.gl-kpi {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.625rem; padding: 0.75rem;
}
.gl-kpi-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--t1); }
.gl-kpi-lbl { font-size: 0.5rem; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.125rem; }
.gl-kpi-delta { font-size: 0.5625rem; font-weight: 600; margin-top: 0.2rem; }
.gl-kpi-up { color: #34d399; }
.gl-kpi-dn { color: #f87171; }
.gl-kpi-hi { border-color: rgba(124,90,246,0.3); background: rgba(124,90,246,0.06); }
.gl-kpi-hi2 { border-color: rgba(14,165,196,0.3); background: rgba(14,165,196,0.05); }

.gl-row { display: grid; grid-template-columns: 1fr 200px; gap: 0.625rem; margin-bottom: 0.625rem; }
.gl-panel {
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.625rem; padding: 0.875rem;
}
.gl-panel-title { font-size: 0.5625rem; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.625rem; }
.gl-bars { display: flex; align-items: flex-end; gap: 4px; height: 72px; }
.gl-bar { flex: 1; background: rgba(124,90,246,0.2); border-radius: 3px 3px 0 0; }
.gl-bar-hi { background: var(--p); }
.gl-bar-c { background: rgba(14,165,196,0.35); }
.gl-bar-c-hi { background: var(--c); }

.gl-table { width: 100%; border-collapse: collapse; }
.gl-table td, .gl-table th {
  font-size: 0.5625rem; padding: 0.375rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05); text-align: left; color: rgba(255,255,255,0.5);
}
.gl-table th { color: rgba(255,255,255,0.22); text-transform: uppercase; letter-spacing: 0.1em; }
.gl-table td:first-child { color: rgba(255,255,255,0.7); font-weight: 600; }
.gl-platform { display: flex; align-items: center; gap: 0.5rem; }
.gl-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.gl-kpis3 { grid-template-columns: repeat(3,1fr); }
.gl-kpis2 { grid-template-columns: repeat(2,1fr); }
.gl-full { grid-column: 1 / -1; }

/* ═══════════════════════════════════════════════════════════
   v3 ENHANCEMENTS — Aurora background · Numbers strip ·
   3D scroll animations · Hero parallax
═══════════════════════════════════════════════════════════ */

/* Richer home aurora (4 gradient blobs vs 3) */
body.page-home::before {
  background:
    radial-gradient(ellipse 92% 78% at var(--gx1) var(--gy1),
      rgba(124,90,246,0.32) 0%, transparent 58%),
    radial-gradient(ellipse 82% 68% at var(--gx2) var(--gy2),
      rgba(16,185,129,0.22) 0%, transparent 56%),
    radial-gradient(ellipse 58% 48% at var(--gx3) var(--gy3),
      rgba(90,50,180,0.14) 0%, transparent 62%),
    radial-gradient(ellipse 40% 32% at 70% 45%,
      rgba(14,165,196,0.12) 0%, transparent 52%);
}

/* ── Numbers strip ── */
.section-numbers {
  padding: 3.5rem 0;
  border-top: 1px solid var(--b1);
  border-bottom: 1px solid var(--b1);
  position: relative; z-index: 1;
}
.numbers-strip {
  display: flex; align-items: center; justify-content: center;
}
.num-item {
  text-align: center; flex: 1;
  min-width: 110px; padding: 0.5rem 1.5rem;
}
.num-val-wrap {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2.5rem, 4.5vw, 4.25rem);
  font-weight: 800; letter-spacing: -0.045em;
  color: var(--t1); line-height: 1;
  display: flex; align-items: baseline;
  justify-content: center; gap: 0.1rem;
}
.num-unit {
  font-size: 0.44em; font-weight: 300;
  color: var(--pl); font-style: italic; line-height: 1;
}
.num-count { display: inline; }
.num-lbl {
  font-size: 0.625rem; color: var(--t3);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; margin-top: 0.6rem;
}
.num-div {
  width: 1px; height: 3.5rem; background: var(--b1);
  flex-shrink: 0; align-self: center;
}
@media (max-width: 768px) {
  .numbers-strip { flex-wrap: wrap; }
  .num-item { min-width: 50%; padding: 1.25rem 0.75rem; }
  .num-div  { display: none; }
  .section-numbers { padding: 2rem 0; }
}

/* ── Hero canvas — light mode dimming ── */
[data-theme="light"] #hero-canvas.ready { opacity: 0.38; }

/* ═══════════════════════════════════════════════════════════
   n8n-INSPIRED EXTRAS — CURSOR · MARQUEE · HERO GRID · NODES
═══════════════════════════════════════════════════════════ */

/* === INFINITE MARQUEE TICKER ============================= */
.marquee-section {
  position: relative; overflow: hidden;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--b1);
  z-index: 1;
}
.marquee-section::before,
.marquee-section::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 9rem;
  pointer-events: none; z-index: 2;
}
.marquee-section::before {
  left:  0;
  background: linear-gradient(90deg,  var(--bg), transparent);
}
.marquee-section::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.marquee-track {
  display: flex;
  animation: mq-scroll 40s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-set { display: flex; align-items: center; flex-shrink: 0; }
.mq-item {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0 1.625rem;
  font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--t3); white-space: nowrap;
  transition: color 0.3s var(--spring);
}
.mq-item:hover { color: var(--t2); }
.mq-gem {
  width: 3.5px; height: 3.5px; border-radius: 50%;
  flex-shrink: 0; opacity: 0.75;
}
@keyframes mq-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === CUSTOM CURSOR ======================================= */
@media (pointer: fine) {
  * { cursor: none !important; }

  .cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid rgba(124,90,246,0.58);
    pointer-events: none; z-index: 9999;
    will-change: transform;
    transition:
      width  0.38s var(--bounce),
      height 0.38s var(--bounce),
      border-color 0.28s,
      background   0.28s,
      opacity      0.25s;
  }
  .cursor-ring.is-hover {
    width: 50px; height: 50px;
    border-color: rgba(169,144,255,0.82);
    background: rgba(124,90,246,0.07);
  }
  .cursor-ring.is-click {
    width: 20px; height: 20px;
    background: rgba(124,90,246,0.18);
    transition-duration: 0.08s;
  }
  .cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--pl);
    pointer-events: none; z-index: 10000;
    will-change: transform;
    box-shadow: 0 0 8px rgba(169,144,255,0.9);
    transition: opacity 0.25s;
  }
  [data-theme="light"] .cursor-ring {
    border-color: rgba(92,62,232,0.5);
  }
  [data-theme="light"] .cursor-ring.is-hover {
    border-color: rgba(74,40,212,0.72);
    background: rgba(92,62,232,0.06);
  }
}

/* === HERO BACKGROUND GRID ================================ */
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(124,90,246,0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,90,246,0.038) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 42%, black 15%, transparent 72%);
  mask-image:         radial-gradient(ellipse 88% 82% at 50% 42%, black 15%, transparent 72%);
}
[data-theme="light"] .hero-grid-bg {
  background-image:
    linear-gradient(rgba(92,62,232,0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,62,232,0.042) 1px, transparent 1px);
}

/* === CLIP-PATH SCROLL REVEAL ============================= */
.rv-up {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.9s cubic-bezier(0.16,1,0.3,1),
    opacity   0.45s var(--spring);
}
.rv-up.in {
  opacity: 1;
  clip-path: inset(0 0 0% 0);
}
.rv-up.d1 { transition-delay: 0.1s; }
.rv-up.d2 { transition-delay: 0.2s; }
.rv-up.d3 { transition-delay: 0.3s; }

/* === NAV LOGO GLIDE UNDERLINE ============================ */
.nav-logo { position: relative; }
.nav-logo::after {
  content: '';
  position: absolute; left: 0; bottom: -3px;
  height: 1px; width: 0%;
  background: var(--pl);
  transition: width 0.4s var(--spring);
}
.nav-logo:hover::after { width: 100%; }

/* === WORKFLOW NODE SVG ANIMATION ========================= */
.flow-nodes-svg .fnode-active {
  transform-box: fill-box;
  transform-origin: center;
  animation: fnode-pulse 2.4s ease-in-out infinite;
}
.flow-nodes-svg .fnode-active.d1 { animation-delay: 0.8s; }
.flow-nodes-svg .fnode-active.d2 { animation-delay: 1.6s; }
@keyframes fnode-pulse {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.5); }
}

/* === CARD HIGHLIGHT SWEEP (n8n hover effect) ============= */
@keyframes card-sweep {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(250%)  skewX(-15deg); }
}
.card:hover .card-sweep::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.035), transparent);
  animation: card-sweep 0.7s ease forwards;
  pointer-events: none;
}

/* === SECTION ENTRY FADE-UP with extra stagger ============ */
.stagger-item {
  opacity: 0; transform: translateY(1.2rem);
  transition: opacity 0.65s var(--spring), transform 0.65s var(--spring);
}
.stagger-item.in { opacity: 1; transform: translateY(0); }
.stagger-item:nth-child(2) { transition-delay: 0.07s; }
.stagger-item:nth-child(3) { transition-delay: 0.14s; }
.stagger-item:nth-child(4) { transition-delay: 0.21s; }
.stagger-item:nth-child(5) { transition-delay: 0.28s; }
