html { scroll-behavior: smooth; }

/* ── CSS Variables: Light mode defaults ─────────────────────── */
:root {
  --bg:          #f5f3ff;
  --bg-2:        #ede9fe;
  --surface:     #ffffff;
  --surface-2:   #f0ebff;
  --border:      rgba(102,20,184,0.14);
  --border-soft: rgba(102,20,184,0.08);
  --text:        #0f0a1e;
  --text-2:      #3d3660;
  --text-muted:  #7c6fa0;
  --nav-bg:      rgba(245,243,255,0.88);
  --nav-border:  rgba(102,20,184,0.1);
  --scrollbar-track: #ede9fe;
  --divider: linear-gradient(90deg, transparent, rgba(102,20,184,0.3), transparent);
  --glow: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(102,20,184,0.15) 0%, transparent 70%);
  --stat-gradient: linear-gradient(135deg, #3b0764 0%, #7c3aed 100%);
  --heading-gradient: linear-gradient(135deg, #1e0533 0%, #7c3aed 50%, #6614b8 100%);
  --subtle-gradient: linear-gradient(135deg, #2d1b69 0%, #7c3aed 100%);
}

/* ── CSS Variables: Dark mode overrides ─────────────────────── */
html.dark {
  --bg:          #080808;
  --bg-2:        #0f0f0f;
  --surface:     #111111;
  --surface-2:   #181818;
  --border:      rgba(255,255,255,0.07);
  --border-soft: rgba(255,255,255,0.04);
  --text:        #e4e4e4;
  --text-2:      #a1a1aa;
  --text-muted:  #52525b;
  --nav-bg:      rgba(8,8,8,0.80);
  --nav-border:  rgba(255,255,255,0.05);
  --scrollbar-track: #080808;
  --divider: linear-gradient(90deg, transparent, rgba(102,20,184,0.4), transparent);
  --glow: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(102,20,184,0.25) 0%, transparent 70%);
  --stat-gradient: linear-gradient(135deg, #ffffff 0%, #c084fc 100%);
  --heading-gradient: linear-gradient(135deg, #ffffff 0%, #a855f7 50%, #6614b8 100%);
  --subtle-gradient: linear-gradient(135deg, #e4e4e4 0%, #c084fc 100%);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* Purple glow */
.glow-purple {
  background: var(--glow);
  pointer-events: none;
}

/* Nav */
.nav-glass {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* Nav text */
.nav-link { color: var(--text-muted); transition: color 0.2s; }
html.dark .nav-link { color: var(--text); }
.nav-link:hover { color: var(--text); }

/* Brand name in nav */
.nav-brand { color: var(--text); }

/* Gradient headings */
.text-gradient {
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-subtle {
  background: var(--subtle-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Body text helpers */
.text-body   { color: var(--text); }
.text-body-2 { color: var(--text-2); }
.text-muted  { color: var(--text-muted); }

/* Section headings (white in dark, near-black in light) */
.section-heading { color: var(--text); }

/* Service cards */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.service-card:hover {
  background: var(--surface-2);
  border-color: rgba(102,20,184,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(102,20,184,0.1);
}

/* Reel cards */
.reel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.35s ease;
}
.reel-card:hover {
  border-color: rgba(102,20,184,0.5);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(102,20,184,0.18);
}
.reel-card-thumb {
  position: relative;
  aspect-ratio: 9/16;
  background-color: var(--surface-2);
  overflow: hidden;
}
.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.22) 100%);
  z-index: 1;
  transition: background 0.3s ease;
}
.reel-card:hover .reel-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(102,20,184,0.18) 60%, rgba(0,0,0,0.28) 100%);
}
.reel-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(102,20,184,0.07) 50%, transparent 70%);
  z-index: 0;
}
.reel-play-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}
.reel-card:hover .reel-play-circle {
  background: rgba(102,20,184,0.75);
  border-color: rgba(139,61,224,0.85);
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 24px rgba(102,20,184,0.5);
}
.reel-card-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border-soft);
}
.reel-card-body p { color: var(--text); }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6614b8, #8b3de0);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7a1fd6, #9d50f0);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102,20,184,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: rgba(102,20,184,0.5);
  background: var(--surface-2);
  color: var(--text);
}

/* Stats */
.stat-num {
  background: var(--stat-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { color: var(--text-muted); }

/* Divider */
.divider {
  height: 1px;
  background: var(--divider);
}

/* Tag pills */
.tag {
  background: rgba(102,20,184,0.12);
  border: 1px solid rgba(102,20,184,0.3);
  color: #7c3aed;
}
html.dark .tag { color: #c084fc; }

/* Skill pills */
.skill-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  display: inline-block;
  transition: all 0.2s;
}
.skill-pill:hover {
  background: rgba(102,20,184,0.12);
  border-color: rgba(102,20,184,0.4);
  color: #7c3aed;
}
html.dark .skill-pill:hover { color: #c084fc; }

/* Form inputs */
.form-input {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  outline: none;
  border-color: rgba(102,20,184,0.55);
  background: var(--surface-2);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: #6614b8; border-radius: 2px; }

/* Mobile nav */
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }

/* Mode toggle button */
.mode-toggle {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.mode-toggle:hover {
  border-color: rgba(102,20,184,0.4);
  background: var(--surface-2);
  color: #7c3aed;
}
html.dark .mode-toggle { color: var(--text); }
html.dark .mode-toggle:hover { color: #c084fc; }

/* Resume section */
.resume-timeline-item {
  position: relative;
  padding-left: 1.75rem;
}
.resume-timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6614b8;
  border: 2px solid rgba(102,20,184,0.4);
  box-shadow: 0 0 8px rgba(102,20,184,0.5);
}
.resume-timeline-item::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 20px;
  width: 1px;
  bottom: -12px;
  background: linear-gradient(to bottom, rgba(102,20,184,0.3), transparent);
}
.resume-timeline-item:last-child::after { display: none; }

/* Logo: show correct version per mode */
.logo-dark-only { display: block; }
html:not(.dark) .logo-dark-only { display: none; }
.logo-light-only { display: none; }
html:not(.dark) .logo-light-only { display: block; }
