/* ===== Custom Premium Theme Variables (CSS variables) ===== */
:root {
  --background: 210 40% 98%;
  --foreground: 224 71.4% 4.1%;
  --card: 0 0% 100%;
  --card-foreground: 224 71.4% 4.1%;
  --primary: 250 85% 60%;
  --primary-foreground: 210 40% 98%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;
  --accent: 262 83.3% 57.8%;
  --accent-foreground: 210 40% 98%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 250 85% 60%;
  --radius: 1rem;
  
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

.dark {
  --background: 222 47% 4%;
  --foreground: 210 40% 98%;
  --card: 222 47% 7%;
  --card-foreground: 210 40% 98%;
  --primary: 250 90% 70%;
  --primary-foreground: 222 47% 4%;
  --secondary: 217.2 32.6% 12%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 12%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 263.4 70% 50.4%;
  --accent-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 250 90% 70%;
}

/* ===== Global Reset & Defaults ===== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* ===== Premium Utilities & Design System Classes ===== */

/* High-fidelity glassmorphism */
.glassmorphism {
  background: rgba(var(--bg-glass, 255, 255, 255), 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--border-glass, 220, 220, 220), 0.35);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
}

.dark .glassmorphism {
  --bg-glass: 15, 23, 42;
  --border-glass: 255, 255, 255;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Cursor Glow container for dynamic interactive cards */
.glow-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.1);
  border-color: hsl(var(--primary) / 0.4);
}

.dark .glow-card:hover {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(139, 92, 246, 0.12),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.glow-card:hover::before {
  opacity: 1;
}

/* Premium Buttons */
.cosmic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / 0.8));
  color: #fff !important;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px -3px hsl(var(--primary) / 0.3);
  position: relative;
  overflow: hidden;
}

.cosmic-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.cosmic-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px -3px hsl(var(--primary) / 0.5);
}

.cosmic-button:hover::after {
  transform: translateX(100%);
}

.cosmic-button:active {
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  font-weight: 600;
  font-family: var(--font-heading);
  background: transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: hsl(var(--primary) / 0.08);
  border-color: hsl(var(--primary) / 0.6);
  transform: translateY(-2px);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue-rotate-anim 10s infinite linear;
}

.dark .text-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes hue-rotate-anim {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Star Background */
.star {
  position: absolute;
  border-radius: 9999px;
  background-color: #fff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.dark .star {
  background-color: #fff;
}

.meteor {
  position: absolute;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.4), transparent);
  border-radius: 9999px;
  pointer-events: none;
}

/* Timeline style */
.timeline-line {
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, hsl(var(--primary) / 0.3) 15%, hsl(var(--primary) / 0.3) 85%, transparent);
}

@media (min-width: 768px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-node {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: hsl(var(--background));
  border: 3px solid hsl(var(--primary));
  box-shadow: 0 0 10px hsl(var(--primary));
  z-index: 10;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .timeline-node {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes meteor {
  0% { transform: rotate(215deg) translateX(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: rotate(215deg) translateX(-600px); opacity: 0; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-subtle {
  animation: pulse-subtle 4s ease-in-out infinite;
}

.animate-fade-in {
  animation: fade-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scrollbar customize */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* Form floating label logic */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: hsl(var(--card) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  color: hsl(var(--foreground));
  outline: none;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.form-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
  background: hsl(var(--card));
}
