/* Binary Link - 2026 Modern Theme & Animations */
:root {
  --bg-deep: #060911;
  --bg-card: rgba(13, 19, 33, 0.7);
  --border-card: rgba(255, 255, 255, 0.08);
  --cyan-glow: #00f2fe;
  --indigo-glow: #4facfe;
  --purple-glow: #7928ca;
  --brand-red: #ff1e27;
  --brand-black: #05070d;
}

body {
  background-color: var(--bg-deep);
  color: #e2e8f0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* Custom Grid Background with soft radial glow */
.cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.radial-glow-cyan {
  background: radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.12) 0%, transparent 60%);
}

.radial-glow-purple {
  background: radial-gradient(circle at 80% 20%, rgba(121, 40, 202, 0.1) 0%, transparent 50%);
}

/* Glassmorphism */
.glass-panel {
  background: rgba(13, 19, 33, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(0, 242, 254, 0.15);
}

/* Glowing borders & neon text */
.text-gradient-cyan {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.brand-logo-badge {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px -2px rgba(255, 30, 39, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px 0px rgba(255, 30, 39, 0.45);
}

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

.text-gradient-silver {
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Code & Monospace accent */
.font-mono-code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #060911;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

/* Pulsing beacon */
@keyframes beaconPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.beacon-pulse {
  animation: beaconPulse 2s infinite ease-in-out;
}

/* Scanline / HUD aesthetic */
.hud-corner {
  position: relative;
}
.hud-corner::before, .hud-corner::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: rgba(0, 242, 254, 0.4);
  pointer-events: none;
}
.hud-corner::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.hud-corner::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

/* ==========================================================================
   Binary Link Dual-Theme System (Dark Cyber & Cleanroom Alpine Light)
   ========================================================================== */

/* Smooth Theme Transitions */
body, .glass-panel, nav, header, section, footer {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Theme Toggle Icons */
.theme-icon-sun {
  display: inline-block;
}
.theme-icon-moon {
  display: none;
}
html.light .theme-icon-sun {
  display: none !important;
}
html.light .theme-icon-moon {
  display: inline-block !important;
}

/* --------------------------------------------------------------------------
   Light Theme: Cleanroom Alpine
   Activated when <html class="light">
   -------------------------------------------------------------------------- */
html.light {
  color-scheme: light;
}

html.light body {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

/* Base Section & Container Backgrounds */
html.light .bg-\[\#060911\],
html.light .bg-\[\#070b14\],
html.light .bg-\[\#050811\],
html.light .bg-\[\#030408\],
html.light .bg-\[\#04060b\],
html.light .bg-slate-950 {
  background-color: #f8fafc !important;
}

html.light .bg-slate-900 {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/50 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

html.light .bg-slate-800 {
  background-color: #f1f5f9 !important;
}

/* Cyber Grid in Light Mode */
html.light .cyber-grid {
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

html.light .radial-glow-cyan {
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 60%);
}

html.light .radial-glow-purple {
  background: radial-gradient(circle at 80% 20%, rgba(121, 40, 202, 0.05) 0%, transparent 50%);
}

/* Glass Panels in Light Mode */
html.light .glass-panel {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02) !important;
}

html.light .glass-panel-hover:hover {
  border-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: 0 16px 36px -8px rgba(2, 132, 199, 0.12) !important;
}

/* Text & Headings in Light Mode */
html.light .text-white {
  color: #0f172a !important;
}

html.light .text-slate-100,
html.light .text-slate-200 {
  color: #1e293b !important;
}

html.light .text-slate-300 {
  color: #334155 !important;
}

html.light .text-slate-400 {
  color: #64748b !important;
}

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

/* Gradients in Light Mode */
html.light .text-gradient-silver {
  background: linear-gradient(180deg, #0f172a 0%, #475569 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.light .text-gradient-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Electric Cobalt High-Contrast Accent for Light Mode */
html.light .text-cyan-400 {
  color: #0284c7 !important;
}

html.light .text-cyan-300 {
  color: #0369a1 !important;
}

/* Borders in Light Mode */
html.light .border-white\/10,
html.light .border-white\/5,
html.light .border-white\/20 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html.light .border-slate-800,
html.light .border-slate-800\/50,
html.light .border-slate-800\/80 {
  border-color: rgba(15, 23, 42, 0.12) !important;
}

/* Fixed Header in Light Mode */
html.light #main-header.bg-\[\#060911\]\/90 {
  background-color: rgba(248, 250, 252, 0.9) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

/* Pill Navigation in Light Mode */
html.light nav.glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06) !important;
}

html.light nav a.text-slate-300 {
  color: #475569 !important;
}

html.light nav a.text-slate-300:hover {
  color: #0284c7 !important;
  background-color: rgba(2, 132, 199, 0.08) !important;
}

/* Dynamic Active Navigation Link Highlights (Shows only for current page/section) */
#desktop-nav a,
#desktop-nav .nav-item,
#mobile-menu a,
#mobile-menu .mobile-nav-item {
  outline: none !important;
  outline-width: 0 !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#desktop-nav a:focus,
#desktop-nav a:focus-visible,
#desktop-nav a:active,
#desktop-nav .nav-item:focus,
#desktop-nav .nav-item:focus-visible,
#desktop-nav .nav-item:active,
#mobile-menu a:focus,
#mobile-menu a:focus-visible,
#mobile-menu a:active,
#mobile-menu .mobile-nav-item:focus,
#mobile-menu .mobile-nav-item:focus-visible,
#mobile-menu .mobile-nav-item:active {
  outline: none !important;
  outline-width: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.nav-item.active-nav,
.mobile-nav-item.active-nav {
  color: #00f2fe !important;
  background-color: rgba(0, 242, 254, 0.14) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

html.light .nav-item.active-nav,
html.light .mobile-nav-item.active-nav {
  color: #0284c7 !important;
  background-color: rgba(2, 132, 199, 0.12) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Badges & Status Pills in Light Mode */
html.light .bg-emerald-950\/40 {
  background-color: rgba(236, 253, 245, 0.95) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #047857 !important;
}

html.light .bg-red-950\/80,
html.light .bg-red-950\/40 {
  background-color: rgba(254, 242, 242, 0.95) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #b91c1c !important;
}

html.light .bg-cyan-950\/80,
html.light .bg-cyan-950\/60,
html.light .bg-cyan-950\/40,
html.light .bg-cyan-950\/30 {
  background-color: rgba(240, 249, 255, 0.95) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  color: #0369a1 !important;
}

/* Interactive Scope Estimator in Light Mode */
html.light #estimator .glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(2, 132, 199, 0.2) !important;
}

html.light #estimator .bg-gradient-to-r {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.08) !important;
}

html.light .est-addon:checked {
  background-color: #0284c7 !important;
}

/* Form Inputs in Light Mode */
html.light input:not(#terminal-input),
html.light textarea,
html.light select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

html.light input:not(#terminal-input):focus,
html.light textarea:focus,
html.light select:focus {
  border-color: #0284c7 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

/* Call to Action Buttons in Light Mode */
html.light a span.bg-\[\#060911\] {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light a:hover span.bg-\[\#060911\] {
  background-color: transparent !important;
  color: #ffffff !important;
}

/* Modal Window in Light Mode */
html.light #project-modal .bg-\[\#090d16\] {
  background-color: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

/* Scrollbars in Light Mode */
html.light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}
html.light ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
}
html.light ::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 132, 199, 0.5);
}

/* ==========================================================================
   DEVELOPER CONVENTION PRESERVATION:
   The Live Cyber Terminal Simulator MUST remain Dark Obsidian (#05070d)
   in both Light and Dark themes (identical to Stripe / Vercel / GitHub conventions).
   ========================================================================== */
html.light .terminal-container {
  background: #05070d !important;
  border-color: rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.35), 0 0 25px -5px rgba(0, 242, 254, 0.15) !important;
}

html.light .terminal-container .bg-slate-900\/90,
html.light .terminal-container .bg-slate-900 {
  background-color: rgba(15, 23, 42, 0.95) !important;
}

html.light .terminal-container .bg-\[\#05070d\]\/95,
html.light .terminal-container .bg-\[\#05070d\] {
  background-color: #05070d !important;
}

html.light .terminal-container .bg-slate-950\/80,
html.light .terminal-container .bg-slate-950 {
  background-color: rgba(2, 6, 23, 0.85) !important;
}

html.light .terminal-container .bg-black\/80 {
  background-color: rgba(0, 0, 0, 0.85) !important;
}

html.light .terminal-container .bg-slate-800 {
  background-color: #1e293b !important;
}

html.light .terminal-container .text-white {
  color: #ffffff !important;
}

html.light .terminal-container .text-slate-200 {
  color: #e2e8f0 !important;
}

html.light .terminal-container .text-slate-300 {
  color: #cbd5e1 !important;
}

html.light .terminal-container .text-slate-400 {
  color: #94a3b8 !important;
}

html.light .terminal-container .text-slate-500 {
  color: #64748b !important;
}

html.light .terminal-container .text-cyan-400 {
  color: #00f2fe !important;
}

html.light .terminal-container .text-cyan-300 {
  color: #67e8f9 !important;
}

html.light .terminal-container .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.light .terminal-container .border-white\/5 {
  border-color: rgba(255, 255, 255, 0.05) !important;
}

html.light .terminal-container input#terminal-input {
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
}


