/* ==============================================================================
   CYBER-DARK DESIGN SYSTEM & GLASSMORPHISM STYLES
   Developed with UI/UX Pro Max standards for high-performance developer portfolios
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-dark: #050B14;
  --bg-card: rgba(11, 22, 40, 0.75);
  --border-cyan: rgba(0, 229, 255, 0.18);
  --border-cyan-hover: rgba(0, 229, 255, 0.45);
  --glow-cyan: rgba(0, 229, 255, 0.25);
  --accent-cyan: #00E5FF;
  --accent-emerald: #10B981;
  --accent-blue: #2979FF;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(41, 121, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.04) 0%, transparent 45%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
}

code, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050B14;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
  border: 1px solid rgba(0, 229, 255, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #00E5FF;
}

/* Glass Panels & Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-cyan);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-cyan-hover);
  box-shadow: 0 10px 30px -10px var(--glow-cyan);
}

/* Subtle Interactive Card Hover */
.interactive-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.interactive-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-cyan-hover);
  box-shadow: 0 12px 35px -8px rgba(0, 229, 255, 0.22);
}

/* Glowing Neon Elements */
.glow-text-cyan {
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
}

.glow-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.glow-btn:hover::before {
  left: 100%;
}

/* Live Pulse Indicator */
@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-status {
  animation: pulse-ring 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Toast Notification */
#toast {
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Modal Window Animation */
#project-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#project-modal.active {
  opacity: 1;
  pointer-events: auto;
}

#project-modal .modal-content {
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#project-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Command Palette Overlay */
#command-palette {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#command-palette.active {
  opacity: 1;
  pointer-events: auto;
}

/* Typewriter Cursor */
.typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  color: #00E5FF;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Grid Background Lines Overlay */
.cyber-grid-bg {
  background-size: 40px 40px;
  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);
}

/* Accessibility: Focus Indicators */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* Accessibility: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
