/* Fixed nav sits above the hero */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: var(--nav-height);
  z-index: 10;
  padding: calc(1.3rem + env(safe-area-inset-top, 0px))
    var(--projects-right-edge) 1.2rem 1.15rem;
  background-color: var(--nav-bg);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  pointer-events: none;
  transition:
    background-color 220ms ease,
    -webkit-backdrop-filter 220ms ease,
    backdrop-filter 220ms ease;
}

.site-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(181, 116, 255, 0.58);
  box-shadow: 0 0 10px rgba(181, 116, 255, 0.22);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    box-shadow 220ms ease;
}

.site-nav.is-scrolled {
  background-color: rgba(var(--nav-bg-rgb), 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-nav.is-scrolled::after {
  opacity: 0.34;
  box-shadow: 0 0 8px rgba(181, 116, 255, 0.12);
}

/* Only the button group is interactive so the rest of the overlay stays transparent */
.site-nav__group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  pointer-events: auto;
}

/* Nav items are presented as plain text links */
.site-nav__link {
  color: rgba(246, 247, 255, 0.94);
  text-decoration: none;
  display: inline-flex;
  font-size: 0.9rem;
  line-height: 1;
  --link-underline-offset: -0.38rem;
  transition: color 180ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: #fff;
}
