/* /css/navbar.css
 *
 * Header and primary navigation.
 * Fixed top navbar with responsive menu.
 * Used across all pages for site navigation.
 */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);

  display: flex;
  align-items: center;

  z-index: 999;
  transition: background-color 0.2s ease, border-color 0.2s ease, backdrop-filter 0.2s ease;
}

/* Scrolled state (toggled by main.js) */
header.scrolled {
  background: rgba(19, 20, 22, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;

  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-bright);
}

.brand svg {
  flex: 0 0 auto;
}

.brand-logo {
  width: 40px;
  height: 40px;

  border-radius: 8px;
}

@media (max-width: 860px) {
  .brand-logo {
    width: 34px;
    height: 34px;
  }
}


.brand span {
  font-size: 1.5rem;
}

/* Nav */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;

  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;

  padding: 0.4rem 0.6rem;
  border-radius: 10px;

  color: var(--text-main);
  font-weight: 600;
  font-size: var(--text-sm);

  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-menu a:hover {
  background: rgba(185, 208, 220, 0.06);
  color: var(--text-bright);
}

.nav-menu a[aria-current="page"] {
  color: var(--text-bright);
  background: rgba(185, 208, 220, 0.08);
  border: 1px solid rgba(185, 208, 220, 0.12);
}

.nav-menu a[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;

  align-items: center;
  justify-content: center;

  border-radius: 12px;
  border: 1px solid rgba(185, 208, 220, 0.12);
  background: rgba(185, 208, 220, 0.06);

  color: var(--text-bright);

  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav-toggle:hover {
  background: rgba(185, 208, 220, 0.1);
  border-color: rgba(185, 208, 220, 0.18);
  transform: translateY(-1px);
}

.nav-toggle:active {
  transform: translateY(0);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Mobile menu */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    right: 1.25rem;
    top: var(--header-height);

    display: none;
    flex-direction: column;
    align-items: stretch;

    width: min(320px, calc(100vw - 2.5rem));
    padding: 0.75rem;

    background: rgba(19, 20, 22, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
  }

  .nav-actions {
    position: relative;
  }
}
