/* ===================================================
   Navbar + Mobile Menu
   =================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo img {
  height: 32px;
  width: auto;
}

.dark .navbar-logo img {
  filter: brightness(0) invert(1) opacity(0.85);
}

.navbar-links {
  display: none;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-fg));
  transition: color 0.2s;
}

.navbar-links a:hover,
.navbar-links a[aria-current="page"] {
  color: hsl(var(--primary));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  transition: background 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.08);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  color: hsl(var(--muted-fg));
}

.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* Mobile menu */
.mobile-menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
  color: hsl(var(--fg));
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: hsl(var(--bg));
  z-index: 99;
  padding: 1.5rem;
}

.mobile-nav.open {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: fadeIn 0.2s ease;
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--fg));
  border-radius: var(--radius);
  transition: background 0.2s;
}

.mobile-nav a:hover {
  background: hsl(var(--muted));
}

.mobile-nav .mobile-cta {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .navbar-links { display: flex; }
  .mobile-menu-btn { display: none; }
}

/* RTL */
html[dir="rtl"] .mobile-nav a { text-align: right; }
