/* =============================================
   NAVIGATION
   ============================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg-primary) 84%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { width: 100%; }

/* Theme toggle button */
.theme-toggle {
  width: 34px; height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-card);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 15px; height: 15px;
  fill: var(--text-secondary);
}

.icon-sun, .icon-moon {
  position: absolute;
  transition: all 0.4s var(--ease-out-expo);
}

[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0); }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0); }
