/* Photo button and page menu. Colors follow the album page. */
:root {
  --nav-ink: #1c2a38;
  --nav-glow: #2a5f86;
  --nav-paper: #f4efe6;
  --nav-mute: #5c6b78;
  --nav-line: rgba(42, 95, 134, 0.28);
  --nav-size: 72px;
  --nav-inset: 20px;
}

.nav-toggle {
  position: fixed;
  z-index: 40;
  top: max(var(--nav-inset), env(safe-area-inset-top, 0px));
  right: max(var(--nav-inset), env(safe-area-inset-right, 0px));
  width: var(--nav-size);
  height: var(--nav-size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--nav-ink);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 10px 28px rgba(28, 42, 56, 0.16),
    0 2px 8px rgba(28, 42, 56, 0.08),
    0 0 0 1px rgba(42, 95, 134, 0.45);
}

.nav-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.nav-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.45);
}

.nav-toggle:hover {
  box-shadow:
    0 12px 32px rgba(28, 42, 56, 0.2),
    0 2px 8px rgba(28, 42, 56, 0.1),
    0 0 0 1px rgba(42, 95, 134, 0.72);
}

.nav-toggle[aria-expanded="true"] {
  box-shadow:
    0 10px 28px rgba(28, 42, 56, 0.16),
    0 2px 8px rgba(28, 42, 56, 0.08),
    0 0 0 1px rgba(42, 95, 134, 0.88);
}

.nav-toggle:focus {
  outline: none;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--nav-glow);
  outline-offset: 4px;
}

.site-menu {
  position: fixed;
  z-index: 39;
  top: calc(max(var(--nav-inset), env(safe-area-inset-top, 0px)) + var(--nav-size) + 14px);
  right: max(var(--nav-inset), env(safe-area-inset-right, 0px));
  width: min(17.5rem, calc(100vw - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - var(--nav-size) - var(--nav-inset) - 36px);
  max-height: calc(100dvh - var(--nav-size) - var(--nav-inset) - 36px - env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(244, 239, 230, 0.94);
  border: 1px solid var(--nav-line);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(28, 42, 56, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.site-menu ul {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
}

.site-menu.is-open {
  opacity: 1;
  transform: translateY(0);
}

.site-menu a {
  display: block;
  padding: 0.78rem 1.45rem;
  color: var(--nav-ink);
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-decoration: none;
}

.site-menu a:hover {
  color: var(--nav-glow);
}

.site-menu a:focus {
  outline: none;
}

.site-menu a:focus-visible {
  outline: 2px solid var(--nav-glow);
  outline-offset: -3px;
  color: var(--nav-glow);
}

.menu-albums-label {
  margin: 0.15rem 0 0.2rem;
  padding: 0.85rem 1.45rem 0.35rem;
  border-top: 1px solid var(--nav-line);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nav-mute);
}

.site-menu .menu-albums ul {
  padding: 0.1rem 0 0.55rem;
}

.site-menu .menu-albums a,
.site-menu .menu-albums .is-here {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.38rem 1.45rem;
  color: var(--nav-ink);
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
}

.site-menu .menu-albums img {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(28, 42, 56, 0.12);
}

.album-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-menu .menu-albums a:hover,
.site-menu .menu-albums a:hover .album-title {
  color: var(--nav-glow);
}

.site-menu .menu-albums a:focus-visible {
  outline: 2px solid var(--nav-glow);
  outline-offset: -3px;
  color: var(--nav-glow);
}

.site-menu .menu-albums .is-here {
  color: var(--nav-mute);
  cursor: default;
}

.site-menu .menu-albums .is-here img {
  opacity: 0.72;
}

.here-note {
  margin-top: 0.12rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--nav-mute);
}

@media (max-width: 760px) {
  :root {
    --nav-size: 64px;
    --nav-inset: 14px;
  }

  body > main {
    padding-top: 96px;
  }

  .site-menu .menu-albums ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.7rem;
    row-gap: 0.85rem;
    padding: 0.15rem 1rem 0.95rem;
  }

  .site-menu .menu-albums a,
  .site-menu .menu-albums .is-here {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0;
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu {
    transform: none;
    transition: none;
  }
}

/* Off-screen until focused, then fixed, so it never shifts the cover. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.55rem 0.9rem;
  overflow: visible;
  clip: auto;
  background: var(--nav-glow);
  color: var(--nav-paper, #fff);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 4px;
}
