/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --bg-primary: #07090e;
  --bg-surface: rgba(18, 22, 34, 0.65);
  --bg-surface-hover: rgba(28, 34, 52, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;

  --gradient-title: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #38bdf8 100%);
  --gradient-btn: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
                 0 0 0 1px var(--border-subtle),
                 inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-btn: 0 10px 25px -5px rgba(99, 102, 241, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 1.5rem;
  line-height: 1.6;
}

/* Subtle background grid pattern */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Ambient Glow Orbs
   ========================================================================== */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
  animation: floatOrb 16s ease-in-out infinite alternate;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(99, 102, 241, 0.1) 70%, transparent 100%);
  top: -10%;
  left: 10%;
  animation-duration: 18s;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.08) 70%, transparent 100%);
  bottom: -15%;
  right: 10%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.glow-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
  top: 40%;
  right: 25%;
  animation-duration: 14s;
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.08);
  }
  100% {
    transform: translate(-30px, 40px) scale(0.95);
  }
}

/* ==========================================================================
   Layout & Main Card
   ========================================================================== */
.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.hero-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 3rem 2.5rem;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s ease, 
              box-shadow 0.4s ease;
}

.hero-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 30px -5px rgba(99, 102, 241, 0.2),
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
}

/* Mouse dynamic spotlight light */
.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(139, 92, 246, 0.12),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

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

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ==========================================================================
   Status Badge
   ========================================================================== */
.badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  align-self: flex-start;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseIndicator 2s infinite ease-in-out;
}

@keyframes pulseIndicator {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

.badge-text {
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-pill {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   Headings & Typography
   ========================================================================== */
.header-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.welcome-label {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
}

.main-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.gradient-text {
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  background-size: 200% 200%;
  animation: shimmerGradient 8s ease infinite;
}

@keyframes shimmerGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.description em {
  color: #e2e8f0;
  font-style: normal;
  font-weight: 500;
}

/* ==========================================================================
   Tech Stack Tags
   ========================================================================== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: all 0.25s ease;
  user-select: none;
}

.tech-tag:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
}

.tag-icon {
  font-size: 0.95rem;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Glow burst animation trigger */
.sparkle-burst {
  animation: glowPulse 1.2s ease-in-out;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6);
  }
  50% {
    box-shadow: 0 0 45px 15px rgba(139, 92, 246, 0.4),
                0 0 70px 25px rgba(56, 189, 248, 0.3);
  }
  100% {
    box-shadow: var(--shadow-card);
  }
}

/* ==========================================================================
   Card Footer & Stats
   ========================================================================== */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-subtle);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  visibility: hidden;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
  color: #f1f5f9;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 100;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--accent-emerald);
  color: #064e3b;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  .hero-card {
    padding: 2rem 1.5rem;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .stat-divider {
    display: none;
  }

  .actions-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
