.mobile-nav-toggle {
  display: none;
}

.site-header > nav a {
  position: relative;
}

.site-header > nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  opacity: 0;
  transform: scaleX(.35);
  background: currentColor;
  transition: opacity 180ms ease, transform 220ms ease;
}

.site-header > nav a:hover::after,
.site-header > nav a:focus-visible::after,
.site-header > nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.mobile-nav-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #0f3234;
  color: #f5f6f2;
}

.mobile-nav-dialog::backdrop {
  background: rgb(4 20 21 / .42);
  backdrop-filter: blur(4px);
}

.mobile-nav-dialog[open] {
  animation: nav-dialog-in 280ms cubic-bezier(.2, .82, .24, 1) both;
}

.mobile-nav-shell {
  display: grid;
  min-height: 100%;
  padding: calc(20px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 88% 8%, rgb(255 255 255 / .08), transparent 28%),
    #0f3234;
}

.mobile-nav-top,
.mobile-nav-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-brand {
  font-size: 18px;
  font-weight: 650;
  line-height: .82;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.mobile-nav-brand span {
  display: block;
}

.mobile-nav-close,
.mobile-nav-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  background: transparent;
}

.mobile-nav-close {
  display: grid;
  width: 44px;
  padding: 0;
  place-items: center;
}

.mobile-nav-close svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.mobile-nav-dialog nav {
  display: flex;
  padding-block: clamp(42px, 10vh, 92px);
  justify-content: center;
  flex-direction: column;
}

.mobile-nav-dialog nav a {
  display: flex;
  min-height: 58px;
  padding: 6px 0;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgb(245 246 242 / .18);
  font-family: var(--display, "Oranienbaum", serif);
  font-size: clamp(38px, 12vw, 64px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.035em;
}

.mobile-nav-dialog nav a::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0;
  background: currentColor;
}

.mobile-nav-dialog nav a[aria-current="page"]::after {
  opacity: 1;
}

.mobile-nav-dialog nav a:not([aria-current="page"]) {
  color: rgb(245 246 242 / .68);
}

.mobile-nav-meta {
  gap: 16px;
  color: rgb(245 246 242 / .66);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mobile-nav-meta a {
  color: #f5f6f2;
}

body.mobile-nav-is-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header > nav,
  .site-header > .header-cta {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    min-width: 78px;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    justify-self: end;
    gap: 10px;
    font: inherit;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .mobile-nav-toggle i {
    position: relative;
    display: block;
    width: 13px;
    height: 1px;
    background: currentColor;
  }

  .mobile-nav-toggle i::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 0;
    width: 9px;
    height: 1px;
    background: currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-dialog[open] {
    animation: none;
  }
}

@keyframes nav-dialog-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
