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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  width: 0%;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  transition: width 0.1s ease-out;
}

html {
  scroll-behavior: smooth;
}

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-brand: 'Orbitron', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Refined Color Palette */
  --bg-dark: #05010d;
  --bg-accent: #0a0118;
  --primary: #00e5ff;
  --secondary: #ff007f;
  --text-main: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  /* Focus styles */
  --focus-ring: 0 0 0 2px var(--bg-dark), 0 0 0 4px var(--primary);

  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */

  /* Touch & Interaction */
  --touch-min: 44px;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  /* Animation Timing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-fast: 150ms;
  --transition-base: 300ms;
  --transition-slow: 500ms;

  /* Safe Areas for notched devices */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

/* Global focus styles for accessibility */
*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

#app {
  min-height: 100vh;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Page Transitions & Reveals */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

.stagger-5 {
  animation-delay: 0.5s;
}

/* Holographic Sheen Utility */
.holographic {
  position: relative;
  overflow: hidden;
}

.holographic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      transparent 20%,
      rgba(0, 229, 255, 0.1) 40%,
      rgba(255, 0, 127, 0.1) 50%,
      rgba(0, 229, 255, 0.1) 60%,
      transparent 80%);
  background-size: 200% 200%;
  background-position: var(--mouse-px, 50%) var(--mouse-py, 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.holographic:hover::after {
  opacity: 1;
}

/* Digital Glitch Component */
@keyframes glitch {
  0% {
    transform: translate(0);
    text-shadow: none;
  }

  20% {
    transform: translate(-2px, 2px);
    text-shadow: 2px 0 var(--primary), -2px 0 var(--secondary);
  }

  40% {
    transform: translate(-2px, -2px);
    text-shadow: -2px 0 var(--primary), 2px 0 var(--secondary);
  }

  60% {
    transform: translate(2px, 2px);
    text-shadow: 2px 0 var(--primary), -2px 0 var(--secondary);
  }

  80% {
    transform: translate(2px, -2px);
    text-shadow: -2px 0 var(--primary), 2px 0 var(--secondary);
  }

  100% {
    transform: translate(0);
    text-shadow: none;
  }
}

.glitch-on-hover:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}
/* Accessibility - Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--bg-dark);
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 0;
}
