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

:root {
  --bg-color: #050507;
  --bg-card: rgba(10, 10, 12, 0.6);
  --bg-card-hover: rgba(16, 16, 20, 0.85);
  --border-color: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.15);
  --accent-primary: #f5f5f7;
  --accent-secondary: #a1a1aa;
  
  --glow-primary: rgba(255, 255, 255, 0.05);
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: #e4e4e7;
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  /* Ambient pure CSS backdrops - no canvas required */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.015), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.015), transparent 40%);
  background-attachment: fixed;
}

/* Futuristic Tech Mesh Pattern */
.tech-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center center;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(circle at 50% 50%, black 50%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 50%, transparent 95%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #1f1f23;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Custom Highlight Selection */
::selection {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Floating Dock Navigation */
.dock-nav {
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease;
}
.dock-nav:hover {
  border-color: var(--border-hover);
}

/* Spotlight Glowing Border Card Effect with 3D Parallax Tilt */
.spotlight-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  overflow: hidden;
  /* 3D tilt configurations */
  transform-style: preserve-3d;
  transition: border-color 0.4s ease, background-color 0.4s ease, transform 0.2s ease-out;
  will-change: transform;
}

/* Radial light glow behind the card content */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(255, 255, 255, 0.08),
    transparent 80%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Precise 1px spotlight edge line halo */
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    180px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(255, 255, 255, 0.38),
    transparent 70%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.spotlight-card:hover::before,
.spotlight-card:hover::after {
  opacity: 1;
}

.spotlight-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background-color: var(--bg-card-hover);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.03);
}

/* Ensure card children stay above the radial glow background */
.spotlight-card-content {
  position: relative;
  z-index: 2;
  transform: translateZ(20px); /* Pushes content forward slightly in 3D space */
}

/* Sweeping Neon Border Beam */
.border-beam-container {
  position: relative;
  overflow: hidden;
}

.border-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: beamSweep 4s linear infinite;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

@keyframes beamSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Floating Vertical HUD Timeline Dots */
.hud-timeline {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 40;
}

.hud-timeline-node {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.hud-timeline-node::after {
  content: attr(data-label);
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent-secondary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hud-timeline-node:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hud-timeline-node.active {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.95), 0 0 5px rgba(255, 255, 255, 0.5);
  transform: scale(1.4);
}

/* System Online Indicator micro-flicker */
@keyframes ledFlicker {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px #10b981); }
  45%, 55% { opacity: 0.75; filter: drop-shadow(0 0 1.5px #10b981); }
  50% { opacity: 0.9; filter: drop-shadow(0 0 5px #10b981); }
}

.led-active {
  animation: ledFlicker 3s ease-in-out infinite;
}

/* Sleek Grayscale Typography Shine */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, #ffffff 10%, var(--accent-secondary) 50%, #4b5563 90%);
  background-size: 200% auto;
  animation: gradientShine 8s linear infinite;
}

@keyframes gradientShine {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* Simplified Static Code Frame Styling */
.code-window {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
}

.code-header {
  background: rgba(15, 15, 18, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.red { background-color: #ef4444; }
.code-dot.yellow { background-color: #f59e0b; }
.code-dot.green { background-color: #10b981; }

/* Custom Code Colors for static preview */
.code-comment { color: #6b7280; font-style: italic; }
.code-keyword { color: #f5f5f7; font-weight: 600; }
.code-string { color: #d4d4d8; }
.code-tag { color: #e4e4e7; }

/* Simple, beautiful full screen loader */
#loader {
  position: fixed;
  inset: 0;
  background-color: #030304;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-spinner {
  width: 45px;
  height: 45px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Glass HUD Button design */
.btn-hud {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 500;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

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

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

.btn-hud:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.12), inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.btn-hud-primary {
  background: #ffffff;
  color: #050507;
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.btn-hud-primary:hover {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.35), inset 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Spotify Equalizer bounce wave */
.spotify-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.spotify-wave-bar {
  width: 2px;
  height: 100%;
  background-color: var(--accent-secondary);
  animation: bounceBar 1.2s ease-in-out infinite alternate;
}
.spotify-wave-bar:nth-child(2) { animation-delay: -0.4s; }
.spotify-wave-bar:nth-child(3) { animation-delay: -0.8s; }
.spotify-wave-bar:nth-child(4) { animation-delay: -0.2s; }

@keyframes bounceBar {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Responsive side dock adjustments */
@media (max-width: 768px) {
  .hud-timeline {
    display: none; /* Hide side dots on mobile to keep space clean */
  }
}
