/* Main Styles */

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* Selection Styling */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-primary);
}

::-moz-selection {
  background-color: var(--color-accent-light);
  color: var(--color-primary);
}

/* Hero Section Animations */
@media (prefers-reduced-motion: no-preference) {
  .hero__title {
    animation: fadeInUp 0.8s var(--transition-timing) 0.2s both;
  }

  .hero__bio {
    animation: fadeInUp 0.8s var(--transition-timing) 0.4s both;
  }

  .music-platforms {
    animation: fadeInUp 0.8s var(--transition-timing) 0.6s both;
  }

  .about-section {
    animation: fadeInUp 0.8s var(--transition-timing) 0.75s both;
  }

  .links-section {
    animation: fadeInUp 0.8s var(--transition-timing) 0.9s both;
  }

  .platform-list li {
    animation: fadeInScale 0.5s var(--transition-timing) both;
  }

  .platform-list li:nth-child(1) {
    animation-delay: 0.7s;
  }

  .platform-list li:nth-child(2) {
    animation-delay: 0.8s;
  }

  .platform-list li:nth-child(3) {
    animation-delay: 0.9s;
  }

  .platform-list li:nth-child(4) {
    animation-delay: 1s;
  }

  .platform-list li:nth-child(5) {
    animation-delay: 1.1s;
  }
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Interactive States */
.platform-link {
  position: relative;
}

.platform-link::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--border-radius) + 4px);
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-timing);
  pointer-events: none;
}

.platform-link:hover::after {
  opacity: 0.1;
  background: var(--color-link-accent);
}

.platform-link:active::after {
  opacity: 0.14;
  background: var(--color-link-accent);
}

/* Smooth scrolling with fallback */
@supports not (scroll-behavior: smooth) {
  html {
    scroll-behavior: auto;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-accent-mid: #0000FF;
    --focus-outline-width: 4px;
  }

  .hero__background {
    opacity: 0.3;
  }

  .text-link {
    text-decoration-thickness: 3px;
  }
}

/* Dark Mode Support (for future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Currently using light theme only per design */
  /* Can be enhanced later if needed */
}

/* Loading State */
.hero__background {
  background-color: #d4f1f4;
  transition: opacity 0.5s var(--transition-timing);
  background-image: url('../images/background-waves-desaturated.png');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__background.loaded {
  opacity: 1;
}

/* Accessibility: Ensure sufficient touch target size on mobile */
@media (hover: none) and (pointer: coarse) {
  .platform-link {
    min-width: 44px;
    min-height: 44px;
  }

  .text-link {
    padding: var(--space-xs) 0;
    display: inline-block;
  }
}

/* Error Handling for Background Image */
.hero__background {
  background-color: #d4f1f4;
}

.hero__background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.08) 52%,
    rgba(255, 255, 255, 0.12) 100%
  );
  opacity: 1;
}

/* Ensure proper stacking context */
.hero > *:not(.hero__background) {
  position: relative;
  z-index: 1;
}

.hero__background,
.hero__background::before {
  z-index: 0;
}

/* Responsive Images */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero__background {
    background-image: url('../images/background-waves-desaturated.png');
  }
}

/* Focus-within for better keyboard navigation feedback */
.music-platforms:focus-within .section-heading,
.about-section:focus-within .section-heading,
.links-section:focus-within .link-text {
  color: var(--color-accent-mid);
  transition: color var(--transition-speed) var(--transition-timing);
}

/* Utility: Prevent text selection on decorative elements */
.platform-icon {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Ensure links are always accessible */
a {
  position: relative;
  z-index: 10;
}

