.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: all .3s ease;
  background: transparent;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(10, 14, 20, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

[data-theme="light"] .navbar.scrolled { background: rgba(255,255,255,.8); }

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand .brand-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--gradient);
  color: #061019;
  font-size: .85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 999px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: all .2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  background: var(--surface-2);
  color: var(--accent);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

#themeToggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}
#themeToggle:hover { border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  align-items: center; justify-content: center;
  cursor: pointer;
}

@media (max-width: 991px) {
  .nav-links {
    position: fixed;
    top: 72px; left: 20px; right: 20px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 10px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all .25s ease;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { padding: 12px 16px; border-radius: 8px; }
  .nav-toggle { display: flex; }
}
