/* Header styles scoped to .site-header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(180deg, rgba(18,18,26,0.95) 0%, rgba(10,10,15,0.9) 100%);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-neutral-700);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

/* Brand */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-xl);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px var(--color-primary-glow);
}

.brand-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Navigation */
.primary-nav {
  display: block; /* Progressive enhancement: visible when JS disabled */
}

.menu-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.menu-item a {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base) var(--ease-out);
}

.menu-item a:hover {
  color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-neutral-700), inset 0 0 24px var(--color-primary-glow);
}

.menu-item a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Toggle button */
.menu-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  transition: all var(--transition-base) var(--ease-out);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.menu-toggle:hover {
  color: var(--color-primary);
}

.menu-toggle .menu-toggle-inner {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle .bar {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.menu-label {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Responsive behavior */
@media (max-width: 1023.98px) {
  .menu-toggle { display: inline-flex; }
  .menu-list { flex-direction: column; align-items: flex-start; gap: var(--space-3); }

  /* Hide the menu on small screens only when JS is enabled */
  html.js-enabled .primary-nav { display: none; }
  html.js-enabled .primary-nav.is-open { display: block; }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: linear-gradient(180deg, var(--color-background-alt) 0%, var(--color-background) 100%);
    border-bottom: 1px solid var(--color-neutral-700);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    animation: slideDown var(--transition-slower) var(--ease-out);
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Prevent body scroll when nav is open on mobile */
body.nav-open { overflow: hidden; }
