/* ============================================
   VARIABLES — Design tokens + Dark/Light mode
   ============================================ */

/* ---- DARK MODE (default) ---- */
:root {
  --bg:        #07070f;
  --bg-2:      #0d0d1a;
  --bg-3:      #111120;
  --surface:   rgba(255,255,255,0.035);
  --surface-h: rgba(255,255,255,0.065);

  --blue:        #00c8f0;
  --violet:      #9d4edd;
  --blue-dim:    rgba(0,200,240,0.07);
  --violet-dim:  rgba(157,78,221,0.09);

  --grad:      linear-gradient(135deg, #00c8f0 0%, #9d4edd 100%);
  --grad-text: linear-gradient(135deg, #00c8f0, #9d4edd);

  --border:      rgba(255,255,255,0.07);
  --border-blue: rgba(0,200,240,0.28);

  --text:       #dde4f0;
  --text-muted: #8896aa;
  --text-dim:   #505c70;

  --card-bg:   rgba(255,255,255,0.03);
  --card-bg-h: rgba(0,200,240,0.04);

  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-pill: 999px;

  --shadow-card: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0,200,240,0.10);

  --nav-h:     68px;
  --section-y: 108px;

  --ease: cubic-bezier(0.4,0,0.2,1);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --t: 0.28s var(--ease);
}

/* ---- LIGHT MODE overrides ---- */
:root.light-mode {
  --bg:        #f0f2f8;
  --bg-2:      #e8eaf2;
  --bg-3:      #dde0ee;
  --surface:   rgba(0,0,0,0.04);
  --surface-h: rgba(0,0,0,0.07);

  --border:      rgba(0,0,0,0.09);
  --border-blue: rgba(0,150,200,0.3);

  --text:       #0e1120;
  --text-muted: #4a5568;
  --text-dim:   #8896aa;

  --card-bg:   rgba(255,255,255,0.7);
  --card-bg-h: rgba(0,180,220,0.06);

  --shadow-card: 0 4px 24px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 32px rgba(0,180,220,0.12);

  --blue:   #0099c0;
  --violet: #7c35c0;

  --blue-dim:   rgba(0,153,192,0.09);
  --violet-dim: rgba(124,53,192,0.09);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

h1,h2,h3,h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue), var(--violet)); border-radius: 2px; }
::selection { background: rgba(0,200,240,0.18); color: var(--blue); }

/* ---- Utilities ---- */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 5px 13px;
  border-radius: var(--r-pill);
  background: var(--blue-dim);
  border: 1px solid rgba(0,200,240,0.18);
  margin-bottom: 18px;
}

.section-label::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* 3D tilt */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Particle canvas */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  transition: opacity 0.4s;
}

:root.light-mode #particle-canvas { opacity: 0.12; }
