/* ============================================
   Navigation: Fixed top bar + theme toggle
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: var(--nav-height);
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-card-border);
  transition: var(--transition-theme);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-accent);
  text-decoration: none;
}

.theme-toggle {
  margin-left: auto;
  background: none;
  border: 2px solid var(--color-card-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

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

.theme-toggle__icon::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-text);
  transition: background 0.3s ease, clip-path 0.4s ease;
}

/* Sun icon (dark mode active — clicking switches to light) */
[data-theme="dark"] .theme-toggle__icon::before {
  clip-path: circle(50% at 50% 50%);
}

/* Moon icon (light mode active — clicking switches to dark) */
[data-theme="light"] .theme-toggle__icon::before {
  clip-path: polygon(
    40% 0%, 55% 18%, 70% 5%,
    65% 25%, 100% 30%, 70% 45%,
    85% 70%, 55% 55%, 50% 85%,
    35% 60%, 10% 75%, 30% 45%,
    0% 30%, 35% 25%
  );
}
