.site-header {
  display: flex;
  justify-content: center;
  padding: 28px 40px 0;
}

.navbar {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(10, 9, 7, 0.6);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 60px -30px rgba(0, 0, 0, 0.85);
  view-transition-name: site-navbar;
}

/* A soft light that tracks the cursor inside the pill, set via
   --spot-x/--spot-y from navbar.js. Only visible on hover, so it never
   competes with the active-tab glow when the pointer is elsewhere. */
.navbar__spotlight {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    220px circle at var(--spot-x, 50%) var(--spot-y, 0%),
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
  transition: opacity 0.4s ease;
}

.navbar:hover .navbar__spotlight {
  opacity: 1;
}

.brand {
  display: flex;
  align-items: center;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill);
}

.brand:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.brand__logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  /* The mark's native tone is the same warm cream used everywhere else
     as the accent — no badge needed, it just glows against the dark. */
  filter: drop-shadow(0 0 10px rgba(253, 233, 204, 0.3));
  transition: transform 0.4s var(--ease-spring), filter 0.3s ease;
}

.brand:hover .brand__logo {
  transform: scale(1.1) rotate(-8deg);
  filter: drop-shadow(0 0 16px rgba(253, 233, 204, 0.5));
}

.nav-items {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: color 0.25s ease, transform 0.35s var(--ease-spring);
}

.nav-item i {
  font-size: 14px;
  color: inherit;
  transition: transform 0.3s var(--ease-spring), filter 0.25s ease;
}

.nav-item:hover {
  color: var(--color-text);
  transform: translateY(-1px);
}

.nav-item:hover i {
  transform: scale(1.12);
}

.nav-item:active {
  transform: translateY(0) scale(0.98);
}

.nav-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-item.active {
  color: var(--color-accent);
}

.nav-item.active i {
  filter: drop-shadow(0 0 6px rgba(253, 233, 204, 0.55));
}

/* The active tab's glow lives on its own pseudo-element, separate from
   the icon/label, so a page navigation only has to animate a plain glow
   between tabs instead of morphing text into text. */
.nav-item.active::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(253, 233, 204, 0.22), rgba(253, 233, 204, 0.07) 70%, transparent 100%);
  box-shadow: 0 0 24px rgba(253, 233, 204, 0.25);
  view-transition-name: active-nav-pill;
}

::view-transition-group(active-nav-pill) {
  animation-duration: 0.32s;
  animation-timing-function: var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-item i,
  .brand__logo,
  .navbar__spotlight {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 24px 20px 0;
  }

  .nav-item {
    padding: 10px 12px;
    font-size: 14px;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  .nav-item__label {
    display: none;
  }

  .nav-item {
    padding: 12px;
  }

  .nav-item i {
    font-size: 16px;
  }
}
