/* ==========================================================================
   Antigravity Premium Custom Stylesheet
   Theme: Deep Navy / Charcoal (Dark) & Clean Executive Slate / Porcelain (Light)
   ========================================================================== */

/* Custom Variables & Root Settings */
:root {
  --font-sans: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dark Theme Colors (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(59, 130, 246, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;

  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);

  --nav-height: 80px;
}

/* Light Mode Overrides */
body.light-mode {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-color-hover: #93c5fd;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(226, 232, 240, 0.85);
  --glass-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);

  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

body.light-mode::-webkit-scrollbar-track {
  background: #f1f5f9;
}

body.light-mode::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

body.light-mode::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(59, 130, 246, 0.15);
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Accent Gradients & Glows */
.glow-blue {
  box-shadow: 0 0 35px -5px rgba(59, 130, 246, 0.3);
}

.glow-purple {
  box-shadow: 0 0 35px -5px rgba(139, 92, 246, 0.3);
}

/* Background Grids & Orbs */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

body.light-mode .bg-grid-pattern {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.gradient-orb-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
  z-index: 0;
}

.gradient-orb-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  bottom: 10%;
  left: -200px;
  pointer-events: none;
  z-index: 0;
}

body.light-mode .gradient-orb-1 {
  opacity: 0.25;
}

body.light-mode .gradient-orb-2 {
  opacity: 0.2;
}

/* Animated Pulse Badge */
.pulse-dot {
  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 infinite cubic-bezier(0.4, 0, 0.6, 1);
}

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

/* Navbar Scrolled State */
#navbar.scrolled {
  background: rgba(11, 15, 25, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.light-mode #navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
}

/* Modal Overlay Animation */
.modal-overlay {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.modal-content {
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Custom Scroll reveal class */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Active Nav Link Highlight */
.nav-link.active {
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
  margin-top: 4px;
}

body.light-mode .nav-link.active {
  color: #1d4ed8;
}

body.light-mode .nav-link.active::after {
  background: #1d4ed8;
}

/* ============================================================
   LOADING ANIMATION
   ============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(59, 130, 246, 0.15);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loader-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #94a3b8;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   TIMELINE SPINE ANIMATED GRADIENT
   ============================================================ */
.timeline-spine {
  background: linear-gradient(180deg,
      var(--accent-blue) 0%,
      var(--accent-purple) 50%,
      #f43f5e 100%);
}

/* ============================================================
   MOBILE RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 640px) {
  .glass-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* ============================================================
   LIGHT MODE: REFINED VISUAL REDESIGN
   Professional, Elegant, High-Readability Power BI & PMO Palette
   ============================================================ */
body.light-mode {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Section Background Transitions in Light Mode */
body.light-mode section {
  background-color: transparent !important;
}

body.light-mode #home {
  background-color: #f8fafc !important;
}

body.light-mode #identity {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-mode #experience {
  background-color: #f8fafc !important;
}

body.light-mode #expertise {
  background-color: #ffffff !important;
}

body.light-mode #journey {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-mode #blackit {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 50%, #ffffff 100%) !important;
  border-color: #e2e8f0 !important;
}

body.light-mode #projects {
  background-color: #ffffff !important;
}

body.light-mode #skills {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-mode #contact {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light-mode footer {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Cards & Elevated Containers */
body.light-mode .glass-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .glass-card:hover {
  background: #ffffff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(37, 99, 235, 0.04) !important;
}

body.light-mode .glass-panel {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
}

/* Typography Hierarchy in Light Mode */
body.light-mode .text-slate-100 {
  color: #0f172a !important; /* Headings & high contrast */
}

body.light-mode .text-slate-200 {
  color: #1e293b !important; /* Subheadings */
}

body.light-mode .text-slate-300 {
  color: #334155 !important; /* Readable body paragraphs */
}

body.light-mode .text-slate-400 {
  color: #64748b !important; /* Supporting & meta text */
}

body.light-mode .text-slate-500 {
  color: #64748b !important;
}

body.light-mode .text-gradient {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 50%, #0284c7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Inner Card Elements & Nested Containers */
body.light-mode .bg-slate-900,
body.light-mode .bg-slate-900\/80,
body.light-mode .bg-slate-900\/90,
body.light-mode .bg-slate-800,
body.light-mode .bg-slate-800\/80 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .border-slate-800,
body.light-mode .border-slate-800\/60,
body.light-mode .border-slate-800\/80,
body.light-mode .border-slate-700,
body.light-mode .border-slate-700\/80,
body.light-mode .border-white\/10 {
  border-color: #e2e8f0 !important;
}

/* Accents, Badges & Color Tints in Light Mode */
body.light-mode .text-blue-400 {
  color: #1d4ed8 !important;
}

body.light-mode .text-purple-400 {
  color: #6d28d9 !important;
}

body.light-mode .text-emerald-400 {
  color: #047857 !important;
}

body.light-mode .text-amber-400 {
  color: #b45309 !important;
}

body.light-mode .text-rose-400 {
  color: #be123c !important;
}

body.light-mode .bg-blue-500\/10 {
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
}

body.light-mode .bg-purple-500\/10 {
  background-color: #faf5ff !important;
  border-color: #e9d5ff !important;
}

body.light-mode .bg-emerald-500\/10 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

body.light-mode .bg-rose-500\/10 {
  background-color: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

body.light-mode .bg-amber-500\/10 {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
}

body.light-mode .glow-blue {
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.08) !important;
}

body.light-mode .glow-purple {
  box-shadow: 0 8px 24px -4px rgba(109, 40, 217, 0.08) !important;
}

/* Navbar in Light Mode */
body.light-mode #navbar {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
}

body.light-mode .nav-link {
  color: #475569 !important;
}

body.light-mode .nav-link:hover {
  color: #1d4ed8 !important;
}

body.light-mode #theme-toggle-btn,
body.light-mode #mobile-theme-toggle {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

body.light-mode #mobile-menu-btn {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

body.light-mode #mobile-menu {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .mobile-nav-link {
  color: #1e293b !important;
}

body.light-mode .mobile-nav-link:hover {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* Hero Brand Statement Banner in Light Mode */
body.light-mode #home .glass-card.border-blue-500\/30 {
  background: linear-gradient(135deg, #f0f7ff 0%, #f5f3ff 100%) !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.08) !important;
}

body.light-mode #home .glass-card.border-blue-500\/30 .text-blue-300\/90 {
  color: #2563eb !important;
}

/* Career Journey Timeline in Light Mode */
body.light-mode #journey .hidden.sm\:flex.absolute.left-1\/2 {
  background-color: #ffffff !important;
  border-color: #3b82f6 !important;
  color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15) !important;
}

/* Projects Category Chips & Search in Light Mode */
body.light-mode #project-search-input {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode #project-search-input::placeholder {
  color: #94a3b8 !important;
}

body.light-mode .proj-cat-btn:not(.bg-gradient-to-r) {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

body.light-mode .proj-cat-btn:not(.bg-gradient-to-r):hover {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  background-color: #f8fafc !important;
}

/* Contact Inputs in Light Mode */
body.light-mode #contact input,
body.light-mode #contact textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode #contact input::placeholder,
body.light-mode #contact textarea::placeholder {
  color: #94a3b8 !important;
}

body.light-mode #contact input:focus,
body.light-mode #contact textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Skill Level Badges in Light Mode */
body.light-mode .skill-badge-expert {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

body.light-mode .skill-badge-advanced {
  background: #faf5ff !important;
  color: #7c3aed !important;
  border-color: #ddd6fe !important;
}

body.light-mode .skill-badge-proficient {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

/* Focus & Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print Styles */
@media print {
  .glass-panel,
  #navbar {
    display: none;
  }
}