/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Navbar scroll state */
nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-blur-lg;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2dd4bf;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu animations */
#mobileMenu.open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.mobile-link:hover {
  border-bottom-color: #2dd4bf;
}

/* Reveal animations - progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero text animation - only below the fold content */
@media (prefers-reduced-motion: no-preference) {
  #hero .reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s ease forwards;
  }

  #hero .reveal:nth-child(2) {
    animation-delay: 0.2s;
  }

  #hero .reveal:nth-child(3) {
    animation-delay: 0.4s;
  }

  #hero .reveal:nth-child(4) {
    animation-delay: 0.6s;
  }

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background: #99f6e4;
  color: #134e4a;
}
