/* ==========================================================================
   Bhoumic Garg • Founder & Startup Growth Operator (MG Technologies Ecosystem)
   Premium Modern Design System — Dark-First, Glassmorphism, Scroll Animations
   Supported: Dark Theme (Default) & Light Theme
   ========================================================================== */

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

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-main);
  --font-mono: 'JetBrains Mono', monospace;

  /* Primary & Accent Palette */
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  --color-primary-light: #34d399;
  --color-accent-cyan: #06b6d4;
  --color-accent-indigo: #6366f1;
  --color-accent-purple: #a855f7;
  --color-accent-amber: #f59e0b;

  /* Animation Timings */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 180ms;
  --transition-base: 280ms;
  --transition-slow: 450ms;
}

/* Base resets & typography */
html {
  font-family: var(--font-main);
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

html.dark ::-webkit-scrollbar-track {
  background: #080c14;
}

html.dark ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981, #0284c7);
  border-radius: 3px;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #34d399, #06b6d4);
}

html:not(.dark) ::-webkit-scrollbar-track {
  background: #f8fafc;
}

html:not(.dark) ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

html:not(.dark) ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   SCROLL PROGRESS BAR
   ========================================================================== */

#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #06b6d4, #6366f1);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  pointer-events: none;
}

/* ==========================================================================
   AMBIENT BACKGROUND GLOWS
   ========================================================================== */

.ambient-glow-emerald {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.13) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
  filter: blur(50px);
  z-index: 0;
}

.ambient-glow-cyan {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.11) 0%, rgba(6, 182, 212, 0) 70%);
  pointer-events: none;
  filter: blur(55px);
  z-index: 0;
}

.ambient-glow-indigo {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
  filter: blur(55px);
  z-index: 0;
}

/* ==========================================================================
   HERO GRID OVERLAY
   ========================================================================== */

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   GRADIENT TEXT
   ========================================================================== */

.text-gradient-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #67e8f9 0%, #06b6d4 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-brand {
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-multi {
  background: linear-gradient(135deg, #34d399, #06b6d4, #a855f7, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200%;
  animation: gradient-shift 4s linear infinite;
}

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

/* ==========================================================================
   GLASSMORPHISM CARDS
   ========================================================================== */

.glass-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform var(--transition-base) var(--ease-spring),
    border-color var(--transition-base) ease,
    box-shadow var(--transition-base) ease,
    background var(--transition-base) ease;
  will-change: transform;
}

html.dark .glass-card {
  background: rgba(16, 23, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html.dark .glass-card:hover {
  background: rgba(20, 30, 50, 0.90);
  border-color: rgba(16, 185, 129, 0.32);
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px -15px rgba(16, 185, 129, 0.15),
    0 0 0 1px rgba(16, 185, 129, 0.08) inset;
}

html:not(.dark) .glass-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

html:not(.dark) .glass-card:hover {
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.10);
}

/* ==========================================================================
   CARD INTERACTIVE
   ========================================================================== */

.card-interactive {
  transition:
    transform var(--transition-base) var(--ease-spring),
    border-color var(--transition-base) ease,
    box-shadow var(--transition-base) ease;
}

.card-interactive:hover {
  transform: translateY(-4px);
}

/* ==========================================================================
   LIVE PULSE
   ========================================================================== */

.live-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   TERMINAL CARD
   ========================================================================== */

.terminal-card {
  background: #090e17;
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 1rem;
  box-shadow:
    0 25px 50px -15px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(16, 185, 129, 0.05) inset;
  position: relative;
  overflow: hidden;
}

.terminal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), rgba(6, 182, 212, 0.3), transparent);
}

.terminal-header {
  background: #0f1726;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 0.375rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav-link-active {
  color: #10b981 !important;
  font-weight: 700;
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 2px;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.70s var(--ease-out), transform 0.70s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.70s var(--ease-out), transform 0.70s var(--ease-out);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.70s var(--ease-out), transform 0.70s var(--ease-out);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.70s var(--ease-out), transform 0.70s var(--ease-out);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.19s; }
.stagger-4 { transition-delay: 0.26s; }
.stagger-5 { transition-delay: 0.33s; }
.stagger-6 { transition-delay: 0.40s; }

/* ==========================================================================
   FLOATING ACTION BUTTON
   ========================================================================== */

#floating-cta {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 99px;
  background: linear-gradient(135deg, #059669, #0891b2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-main);
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 25px -5px rgba(16, 185, 129, 0.55),
    0 0 0 1px rgba(16, 185, 129, 0.2) inset;
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
  opacity: 0;
  transform: translateY(80px) scale(0.9);
  pointer-events: none;
  transition:
    transform var(--transition-base) var(--ease-spring),
    box-shadow var(--transition-base) ease,
    opacity var(--transition-slow) ease;
}

#floating-cta.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#floating-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 12px 35px -5px rgba(16, 185, 129, 0.65),
    0 0 0 1px rgba(16, 185, 129, 0.3) inset;
}

#floating-cta:active {
  transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   PILLAR CARD ACCENT SIDE-LINES
   ========================================================================== */

.pillar-card {
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0%;
  border-radius: 0 0 3px 3px;
  transition: height 0.45s var(--ease-out);
}

.pillar-card:hover::before {
  height: 100%;
}

.pillar-cyan::before   { background: linear-gradient(180deg, #06b6d4, transparent); }
.pillar-green::before  { background: linear-gradient(180deg, #10b981, transparent); }
.pillar-purple::before { background: linear-gradient(180deg, #a855f7, transparent); }
.pillar-amber::before  { background: linear-gradient(180deg, #f59e0b, transparent); }

/* ==========================================================================
   MODAL BACKDROP
   ========================================================================== */

.modal-backdrop {
  background-color: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  header, footer, #themeToggle, #themeToggleMobile, .no-print,
  button:not(.print-allow), #scroll-progress-bar, #floating-cta {
    display: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #0f172a !important;
  }

  .dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
  }

  .resume-card {
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .text-gradient-multi {
    animation: none;
  }

  .live-pulse {
    animation: none;
  }
}
