/* Photo button and page menu. Colors follow the album page. */
:root {
  --nav-ink: #2a2430;
  --nav-glow: #5a4a9a;
  --nav-paper: rgba(255, 252, 248, 0.96);
  --nav-line: rgba(90, 74, 154, 0.22);
  --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: #f4f1ea;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 10px 24px rgba(42, 36, 48, 0.14),
    0 1px 3px rgba(42, 36, 48, 0.06),
    0 0 0 1px rgba(90, 74, 154, 0.32);
}

.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(255, 252, 248, 0.4);
}

.nav-toggle:hover {
  box-shadow:
    0 12px 28px rgba(42, 36, 48, 0.18),
    0 1px 3px rgba(42, 36, 48, 0.08),
    0 0 0 1px rgba(90, 74, 154, 0.55);
}

.nav-toggle[aria-expanded="true"] {
  box-shadow:
    0 10px 24px rgba(42, 36, 48, 0.14),
    0 1px 3px rgba(42, 36, 48, 0.06),
    0 0 0 1px rgba(90, 74, 154, 0.72);
}

.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: var(--nav-paper);
  border: 1px solid var(--nav-line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(42, 36, 48, 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.45rem 0;
}

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

.site-menu a {
  display: block;
  padding: 0.72rem 1.35rem;
  color: var(--nav-ink);
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.45rem;
  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);
}

.albums {
  border-top: 1px solid var(--nav-line);
}

.albums-label {
  margin: 0;
  padding: 0.8rem 1.35rem 0.15rem;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6b6570;
}

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

.site-menu .albums li {
  min-width: 0;
}

.site-menu .albums a,
.site-menu .album-current {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.38rem 1.05rem;
  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.15;
  text-decoration: none;
}

.site-menu .album-current {
  color: #6b6570;
  cursor: default;
}

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

.site-menu .album-title {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
}

.site-menu .album-note {
  display: block;
  margin-top: 0.12rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #6b6570;
}

.site-menu .albums img {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(90, 74, 154, 0.2);
}

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

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

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

  .site-menu .albums a,
  .site-menu .album-current {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: center;
    gap: 0.35rem;
    padding: 0.2rem 0.15rem;
    font-size: 1.02rem;
  }

  .site-menu .albums img {
    align-self: center;
  }

  .albums-label {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .site-menu .album-copy {
    align-items: center;
  }
}

@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;
}
