.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  pointer-events: none; /* re-enabled on children so the stage behind can still be seen/clicked */
}

/* The frosted backing: a white tint plus a blur of whatever's behind, on a
   layer under the links that reaches a little below the bar and is masked
   to fade out top to bottom -- so the blur tapers off smoothly into the
   sharp page below instead of stopping at a hard edge. */
.site-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -2.5rem 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
}

.site-nav > * { pointer-events: auto; }

.site-nav__mark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}
.site-nav__mark span { color: var(--gold); }
.site-nav__mark:hover, .site-nav__mark:focus-visible { color: var(--peacock-bright); }

.site-nav__links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.site-nav__links a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.3em;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible {
  color: var(--text);
}

.site-nav__links a[aria-current="true"] {
  color: var(--gold);
  border-color: var(--gold);
}

.site-nav__toggle {
  display: none;
}

@media (max-width: 640px) {
  .site-nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(78vw, 320px);
    background: var(--bg-soft);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem 2.25rem;
    transform: translateX(100%);
    transition: transform 220ms ease, box-shadow 220ms ease;
  }
  /* shadow only while open: closed, the drawer sits just off-screen and its
     shadow would show down the right edge of the page */
  .site-nav__links[data-open="true"] {
    transform: translateX(0);
    box-shadow: -20px 0 60px rgba(0,0,0,0.4);
  }
  .site-nav__links a { font-size: 1rem; }

  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 4px;
    color: var(--text);
    z-index: 110;
  }
  .site-nav__toggle svg { width: 22px; height: 22px; }
}
