@layer base {
  html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
  }
}

/* DARK BODY */
html.dark,
html.dark body {
  background: radial-gradient(circle at 50% 0%, #111a2e 0%, #05070b 60%, #030407 100%) !important;
  background-attachment: fixed !important;
}

/* HEADER */
header {
  transition: background 0.3s ease, border-color 0.3s ease;
}
html.dark header {
  background: radial-gradient(circle at 50% 0%, #111a2e 0%, #05070b 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
html:not(.dark) header {
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #f1f5f9 100%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* FOOTER */
footer {
  transition: background 0.3s ease, border-color 0.3s ease;
}
html.dark footer {
  background: radial-gradient(circle at 50% 100%, #111a2e 0%, #030407 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
html:not(.dark) footer {
  background: radial-gradient(circle at 50% 100%, #e2e8f0 0%, #f8fafc 100%) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: #64748b !important;
}

.icon-fill-off {
  font-variation-settings: 'FILL' 0, 'wght' 400;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color, #0b0c20);
}
::-webkit-scrollbar-thumb {
  background: #262a35;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #424754;
}

@keyframes scrollPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.8;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}
.scroll-bounce {
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* TEXT EFFECT */
.decrypt-active {
  text-shadow: 0 0 10px rgba(123, 208, 255, 0.45), 0 0 16px rgba(0, 240, 255, 0.25);
}

.terminal-badge-cursor::after {
  content: '▋';
  display: inline-block;
  margin-left: 2px;
  font-size: 0.8em;
  color: #7bd0ff;
  animation: termBlink 0.75s step-end infinite;
  vertical-align: baseline;
}

html:not(.dark) .terminal-badge-cursor::after {
  color: #2563eb;
}

.terminal-badge-done::after {
  content: none !important;
}

@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Light bulb glow styling */
.lamp-glow-on {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.75)) drop-shadow(0 0 12px rgba(251, 191, 36, 0.45));
}

:root {
  --bg-color: #0b0c20;
}

html:not(.dark), 
  html:not(.dark) body {
    background: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #d5def5 50%, #94a3b8 100%) !important;
    background-attachment: fixed !important;
  }

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* LIGHT MODE */
html:not(.dark) .theme-light-bg {
  background-color: #f8fafc !important;
}

html:not(.dark) .theme-light-header {
  background-color: rgba(213, 222, 245, 0.75) !important;
  background-image: none !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  backdrop-filter: blur(12px) !important;
}

html:not(.dark) .theme-light-footer {
  background-color: transparent !important;
  background-image: none !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  backdrop-filter: blur(12px) !important;
}

html:not(.dark) .theme-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}
html:not(.dark) .theme-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 25px -4px rgba(15, 23, 42, 0.08);
}
html:not(.dark) .theme-sub-badge {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
html:not(.dark) .theme-btn {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
html:not(.dark) .theme-btn:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background-color: #f8fafc !important;
}

@keyframes shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.65)) drop-shadow(0 0 50px rgba(59, 130, 246, 0.2));
  }
}

@keyframes breathe-title-glow {
  0%, 100% {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.15), 0 0 15px rgba(59, 130, 246, 0.12);
  }
  50% {
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.3), 0 0 24px rgba(59, 130, 246, 0.2);
  }
}

@keyframes breathe-title-glow-light {
  0%, 100% {
    text-shadow: 0 0 8px rgba(37, 99, 235, 0.1), 0 0 15px rgba(59, 130, 246, 0.08);
  }
  50% {
    text-shadow: 0 0 14px rgba(37, 99, 235, 0.2), 0 0 24px rgba(96, 165, 250, 0.15);
  }
}

.hero-breathe-title {
  color: #f1f5f9;
  letter-spacing: -0.02em;
  animation: breathe-title-glow 4.5s ease-in-out infinite;
  transition: text-shadow 0.3s ease, filter 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.hero-breathe-title:hover {
  filter: drop-shadow(0 0 20px rgba(173, 198, 255, 0.45));
  transform: scale(1.01);
}

html:not(.dark) .hero-breathe-title {
  color: #0f172a;
  animation: breathe-title-glow-light 4.5s ease-in-out infinite;
}

.hero-subtitle-glow {
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 40%, #38bdf8 70%, #60a5fa 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 8s ease-in-out infinite alternate, pulse-glow 4s ease-in-out infinite;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-subtitle-glow:hover {
  transform: scale(1.015);
  filter: drop-shadow(0 0 35px rgba(56, 189, 248, 0.8)) drop-shadow(0 0 55px rgba(96, 165, 250, 0.4));
}

html:not(.dark) .hero-subtitle-glow {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 40%, #2563eb 70%, #1d4ed8 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* SCROLL */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
}

/* SCROLL BAR */
.custom-scrollbar:hover::-webkit-scrollbar-track {
  background: var(--bg-color, #0b0c20);
}
.custom-scrollbar:hover::-webkit-scrollbar-thumb {
  background: #262a35;
}
.custom-scrollbar:hover::-webkit-scrollbar-thumb:hover {
  background: #424754;
}

