/* Top navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition-base);
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
}
.nav-logo-prefix {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--text-3);
  margin-right: 5px;
  font-style: italic;
}
.nav-logo-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
}

.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition-base);
}
.nav-link:hover { color: var(--text); }

/* Theme toggle button */
.theme-toggle {
  background: var(--bg-2);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: color var(--transition-base);
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 14px; height: 14px; }

/* Hide moon in light mode, sun in dark mode */
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Mobile menu */
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text); }

@media (max-width: 768px) {
  .nav { padding: 16px 22px; }
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-2);
    padding: 22px;
    border-bottom: 1px solid var(--border);
    gap: 18px;
    align-items: flex-start;
  }
  .nav-mobile-toggle { display: block; cursor: pointer; }
}
