@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --glass-bg: rgba(8, 14, 30, 0.6);
  --glass-border: rgba(255, 255, 255, 0.07);
  --blur: blur(22px);
  --indigo: #6366f1;
  --purple: #a855f7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: #030712;
  color: #f1f5f9;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none; /* hide default cursor — custom one is in JS */
}

/* ─── CUSTOM CURSOR ─── */
#cursor {
  position: fixed;
  width: 12px; height: 12px;
  background: #818cf8;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease, background 0.2s;
  box-shadow: 0 0 14px 4px rgba(99,102,241,0.55);
  mix-blend-mode: screen;
}
#cursor-glow {
  position: fixed;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99998;
  transition: transform 0.18s ease, width 0.3s, height 0.3s, border-color 0.3s;
  background: rgba(99,102,241,0.04);
}
body.cursor-grow #cursor { transform: translate(-50%, -50%) scale(2.5); background: #c084fc; }
body.cursor-grow #cursor-glow { width: 80px; height: 80px; border-color: rgba(168,85,247,0.45); }

/* ─── SCROLL PROGRESS BAR ─── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  z-index: 9999;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(99,102,241,0.9);
}

/* ─── PARTICLE CANVAS ─── */
#particle-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.55;
}

/* ─── GRID BG ─── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}

/* ─── BLOBS ─── */
.blob {
  position: fixed; border-radius: 50%;
  filter: blur(130px); pointer-events: none; z-index: 0;
  will-change: transform;
}
.blob-1 {
  top: -10%; left: -6%;
  width: 65vw; height: 65vw; max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 65%);
  animation: blobFloat1 18s ease-in-out infinite alternate;
}
.blob-2 {
  bottom: 5%; right: -7%;
  width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, rgba(168,85,247,0.22) 0%, transparent 65%);
  animation: blobFloat2 22s ease-in-out infinite alternate;
}
.blob-3 {
  top: 45%; left: 38%;
  width: 45vw; height: 45vw; max-width: 550px; max-height: 550px;
  background: radial-gradient(circle, rgba(59,130,246,0.09) 0%, transparent 65%);
  animation: blobFloat3 25s ease-in-out infinite alternate;
}
@keyframes blobFloat1 {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate(4%, 6%) scale(1.08) rotate(3deg); }
  100% { transform: translate(-2%, 3%) scale(0.94) rotate(-2deg); }
}
@keyframes blobFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-5%, -4%) scale(1.1); }
  100% { transform: translate(3%, 2%) scale(0.96); }
}
@keyframes blobFloat3 {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(3%, -5%); }
  100% { transform: translate(-4%, 4%); }
}

/* ─── GLASS ─── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  position: relative;
}
/* Shimmer sweep on glass cards */
.glass::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.045) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: -100% 0;
  transition: background-position 0.7s ease;
  pointer-events: none;
}
.glass:hover::after { background-position: 200% 0; }

.glass-nav {
  background: rgba(3,7,18,0.85);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(255,255,255,0.055);
}
.glass-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.glass-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}

/* ─── BUTTONS ─── */
.primary-btn {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  box-shadow: 0 4px 24px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: none; position: relative; overflow: hidden;
}
.primary-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.primary-btn:hover::before { opacity: 1; }
.primary-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 42px rgba(99,102,241,0.65), inset 0 1px 0 rgba(255,255,255,0.18);
}
.primary-btn:active { transform: translateY(0) scale(0.98); }

/* Ripple effect spawned by JS */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleAnim 0.55s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

.outline-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.11);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.outline-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.35);
}

/* ─── TEXT GRADIENTS ─── */
.text-gradient-primary {
  background: linear-gradient(130deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-warm {
  background: linear-gradient(130deg, #fb923c 0%, #ec4899 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
/* Animated shifting gradient for hero name */
.text-gradient-hero {
  background: linear-gradient(130deg, #818cf8, #c084fc, #ec4899, #818cf8);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradientShift 5s linear infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.mono { font-family: 'JetBrains Mono', monospace; }
.code-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 5px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.28);
  color: #a5b4fc; display: inline-block;
}
.section-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

/* ─── TICKER ─── */
.ticker-wrap { overflow: hidden; background: rgba(255,255,255,0.015); border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 13px 0; }
.ticker-content { display: flex; gap: 2.5rem; width: max-content; animation: marquee 35s linear infinite; }
.ticker-item { display: flex; align-items: center; gap: 0.45rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(148,163,184,0.6); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── TYPEWRITER ─── */
.typewriter-cursor::after {
  content: '|'; color: #818cf8;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ─── FLOAT ANIMATION (code card) ─── */
@keyframes floatY {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-10px) rotate(0.5deg); }
  66%       { transform: translateY(-6px) rotate(-0.5deg); }
}
.float-anim { animation: floatY 5s ease-in-out infinite; }

/* ─── GLOW PULSE (KLYRA card) ─── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168,85,247,0.1), 0 0 0 rgba(168,85,247,0); }
  50%       { box-shadow: 0 0 50px rgba(168,85,247,0.35), 0 0 100px rgba(99,102,241,0.12); }
}
.klyra-card { animation: glowPulse 4s ease-in-out infinite; }

/* ─── SPINNING BORDER (LIVE badge) ─── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinning-border { position: relative; z-index: 0; }
.spinning-border::before {
  content: '';
  position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #6366f1);
  animation: spin 3s linear infinite; opacity: 0.7;
}
.spinning-border::after {
  content: '';
  position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(8,14,30,0.92);
}

/* ─── ACTIVE NAV ─── */
nav a.nav-active { color: white; }
nav a.nav-active::after {
  content: ''; display: block; width: 100%; height: 2px; margin-top: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
}

/* ─── SCROLL REVEAL ANIMATIONS ─── */
.animate-on-scroll {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.animate-fade-left {
  opacity: 0; transform: translateX(-36px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.animate-fade-right {
  opacity: 0; transform: translateX(36px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.animate-scale-in {
  opacity: 0; transform: scale(0.88);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.animate-fade-in {
  animation: fadeInUp 0.95s cubic-bezier(0.16,1,0.3,1) forwards;
  opacity: 0;
}
.animate-revealed {
  opacity: 1 !important;
  transform: translate(0,0) scale(1) !important;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.delay-100 { animation-delay: 100ms; transition-delay: 100ms; }
.delay-200 { animation-delay: 200ms; transition-delay: 200ms; }
.delay-300 { animation-delay: 300ms; transition-delay: 300ms; }
.delay-400 { animation-delay: 400ms; transition-delay: 400ms; }
.delay-500 { animation-delay: 500ms; transition-delay: 500ms; }

.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 80ms; }
.stagger-3 { transition-delay: 160ms; }
.stagger-4 { transition-delay: 240ms; }

/* ─── PROJECT CARD HOVER ─── */
.project-card {
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), border-color 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ─── SECTION NUMBER COUNTER OVERLAY ─── */
.section-number {
  position: absolute; right: 2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 9rem; font-weight: 900;
  color: rgba(255,255,255,0.018);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
}

/* ─── SKILL PROGRESS BARS ─── */
.skill-bar-track {
  height: 3px; background: rgba(255,255,255,0.06); border-radius: 9999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%; border-radius: 9999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  width: 0%; transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}

/* ─── TAG HOVER SHIFT ─── */
.tag-chip {
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.tag-chip:hover {
  transform: translateY(-2px);
  background: rgba(99,102,241,0.18) !important;
  border-color: rgba(99,102,241,0.45) !important;
}

/* ─── HERO GRADIENT BG SWEEP ─── */
@keyframes bgSweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-bg {
  background: linear-gradient(135deg, #030712 0%, #0a0d1f 40%, #030712 100%);
  background-size: 200% 200%;
  animation: bgSweep 12s ease infinite;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.45); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.75); }

/* ─── SELECTION ─── */
::selection { background: rgba(99,102,241,0.35); }

/* ─── ANIMATED HERO ORBS ─── */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.hero-orb.o1 {
  width: 300px; height: 300px;
  background: rgba(99, 102, 241, 0.15); /* indigo */
  top: 10%; right: 10%;
  animation-delay: 0s;
}
.hero-orb.o2 {
  width: 400px; height: 400px;
  background: rgba(168, 85, 247, 0.15); /* purple */
  bottom: 0%; left: 5%;
  animation-delay: -4s;
}
.hero-orb.o3 {
  width: 250px; height: 250px;
  background: rgba(236, 72, 153, 0.1); /* pink */
  top: 40%; left: 40%;
  animation-delay: -8s;
}
@keyframes floatOrb {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -50px) scale(1.1); }
  100% { transform: translate(-40px, 30px) scale(0.9); }
}

/* ─── SPARKLE TWINKLE EFFECTS (decorative section stars) ─── */
.sparkle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: white;
  pointer-events: none;
  animation: sparklePop 2s ease-in-out infinite;
}
@keyframes sparklePop {
  0%, 100% { opacity: 0; transform: scale(0); }
  50%       { opacity: 0.9; transform: scale(1); }
}

/* ─── NEON GLOW TEXT PULSE ─── */
@keyframes neonPulse {
  0%, 100% { text-shadow: 0 0 8px rgba(99,102,241,0.4), 0 0 20px rgba(168,85,247,0.2); }
  50%       { text-shadow: 0 0 16px rgba(99,102,241,0.8), 0 0 40px rgba(168,85,247,0.4), 0 0 80px rgba(236,72,153,0.15); }
}
.neon-glow { animation: neonPulse 3s ease-in-out infinite; }

/* ─── WOBBLE ON HOVER (tags / badges) ─── */
@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-3deg); }
  40%       { transform: rotate(3deg); }
  60%       { transform: rotate(-2deg); }
  80%       { transform: rotate(2deg); }
}
.glass-btn:hover, .code-badge:hover { animation: wobble 0.5s ease; }

/* ─── HEARTBEAT (LIVE badges) ─── */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.18); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.12); }
  70%       { transform: scale(1); }
}
.animate-ping { animation: heartbeat 1.8s ease-in-out infinite; }

/* ─── GRADIENT BORDER ANIMATION for section headings ─── */
.section-heading-underline {
  display: inline-block;
  position: relative;
}
.section-heading-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.animate-revealed .section-heading-underline::after { width: 100%; }

/* ─── WIGGLE EFFECT (stat numbers) ─── */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-6deg); }
  75%       { transform: rotate(6deg); }
}
.counter:hover { display: inline-block; animation: wiggle 0.4s ease; }

