/* =========================================================
   NAVIGATION
   ========================================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

html.light nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Logo */
nav .logo {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: var(--font-heading);
  color: var(--purple-primary);
  text-decoration: none;
}

nav .logo:hover {
  text-decoration: none;
  color: var(--purple-soft);
}

/* Nav Links */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: rgba(191, 0, 255, 0.1);
  color: var(--purple-primary);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--purple-primary);
  background: rgba(191, 0, 255, 0.1);
}

.nav-links a i {
  font-size: 1.1rem;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Theme toggle button */
.theme-toggle {
  margin-left: 0.5rem;
  background: transparent;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--purple-primary);
  background: rgba(191, 0, 255, 0.1);
}

html.light .theme-toggle {
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--text-light);
}

/* =========================================================
   RESPONSIVE NAV
   ========================================================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    order: 3;
  }

  .theme-toggle {
    order: 2;
    margin-left: auto;
    margin-right: 0.5rem;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  html.light .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }

  nav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
  }

  /* Hamburger animation */
  nav.open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  nav.open .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }

  nav.open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #000;
  color: var(--text-muted);
  font-size: 0.9rem;
}

html.light footer {
  background: #f0f0f0;
}

footer p {
  margin: 0;
}
