/* Navigation styles */

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(10,10,15,0.95) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* When mobile menu is open, prevent nav bar from blocking menu clicks */
  @media (max-width: 768px) {
    body.nav-open .main-nav {
      pointer-events: none;
    }
    
    body.nav-open .main-nav .logo,
    body.nav-open .main-nav .nav-toggle {
      pointer-events: auto;
    }
  }
  
  .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 4px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1002;
  }
  
  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
  }
  
  .nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
  }
  
  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sky-blue);
    transition: width 0.3s ease;
  }
  
  .nav-links a:hover {
    color: var(--sky-blue);
  }
  
  .nav-links a:hover::after {
    width: 100%;
  }

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */

/* Hamburger button - hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1002;
  position: relative;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

/* Hamburger to X animation */
.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--gold);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--gold);
}

/* Overlay - hidden by default */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

/* Mobile menu styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: block;
    pointer-events: none;
  }

  .nav-overlay.active {
    pointer-events: auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 80vw);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(28, 44, 91, 0.98) 0%, rgba(10, 10, 15, 0.98) 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1001;
    padding: 2rem;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateX(0);
  }

  /* Staggered animation for menu items */
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
  .nav-links.active li:nth-child(7) { transition-delay: 0.4s; }
  .nav-links.active li:nth-child(8) { transition-delay: 0.45s; }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    min-height: 44px; /* Minimum touch target size */
    font-size: 1.1rem;
    letter-spacing: 3px;
    font-family: 'Bebas Neue', sans-serif;
    border-bottom: 1px solid rgba(108, 171, 221, 0.1);
    -webkit-tap-highlight-color: rgba(108, 171, 221, 0.2);
    touch-action: manipulation;
    cursor: pointer;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a:active {
    color: var(--gold);
    background: rgba(108, 171, 221, 0.1);
  }

  /* Prevent body scroll when menu is open */
  body.nav-open {
    overflow: hidden;
  }
  
  .theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
  }
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(108, 171, 221, 0.1);
  border: 1px solid rgba(108, 171, 221, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background: rgba(108, 171, 221, 0.2);
  border-color: var(--city-blue);
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--city-blue);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Sun icon (shown in dark mode) */
.theme-icon.sun {
  display: block;
}

.theme-icon.moon {
  display: none;
}

/* Moon icon (shown in light mode) */
[data-theme="light"] .theme-icon.sun {
  display: none;
}

[data-theme="light"] .theme-icon.moon {
  display: block;
}

[data-theme="light"] .theme-toggle {
  background: rgba(28, 44, 91, 0.1);
  border-color: rgba(28, 44, 91, 0.2);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(28, 44, 91, 0.2);
  border-color: var(--navy);
}

[data-theme="light"] .theme-toggle svg {
  color: var(--navy);
}

/* Mobile: Move to bottom left */
@media (max-width: 768px) {
  .theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 999;
    margin-left: 0;
  }
}

