.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 3rem;
  font: 500 12px/1.5 system-ui, sans-serif;
}

.site-nav button {
  position: relative;
  display: inline-grid;
  justify-items: center;
  flex-shrink: 0;
  align-items: center;
  min-height: 44px;
  color: inherit;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}

/* Reserve the selected label's width so font-weight changes never move the nav. */
.home-nav button > span {
  grid-area: 1 / 1;
}

.home-nav .nav-size {
  visibility: hidden;
  font-weight: 600;
}

.site-nav button[aria-pressed="true"] {
  font-weight: 600;
}

a:focus-visible,
.site-nav button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
  border-radius: 2px;
}

.home-nav {
  position: fixed;
  z-index: 1;
  top: max(1.5rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.5rem 1.5rem;
  border-radius: 1rem;
  background: transparent;
  color: #faf8f3;
  text-shadow: 0 1px 3px rgb(0 0 0 / 65%), 0 0 12px rgb(0 0 0 / 25%);
}

@media (max-width: 600px) {
  .home-nav {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    gap: 0;
    padding-inline: 0;
  }
}

.section-blurb {
  position: fixed;
  z-index: 2;
  left: 50%;
  top: var(--blurb-position, 45%);
  transform: translate(-50%, -50%);
  width: var(--blurb-width, 32rem);
  max-width: calc(100vw - 3rem);
  text-align: center;
  color: #faf8f3;
  font: 300 12px/1.4 system-ui, sans-serif;
}

.section-blurb[hidden] { display: none; }

.photo-caption {
  top: auto;
  left: 67%;
  bottom: max(7%, env(safe-area-inset-bottom));
  max-width: calc(66vw - 3rem);
  transform: translateX(-50%);
  line-height: 1.8;
}

.photo-caption:not([data-section-content="home"]) {
  left: auto;
  right: max(1.5rem, 8vw);
  max-width: calc(100vw - max(1.5rem, 8vw) - 1.5rem);
  transform: none;
  text-align: right;
}

.section-blurb p,
.favorites-list li > span {
  display: inline;
  margin: 0;
  padding: 0.16em 0.35em;
  background: rgb(24 34 45 / 65%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.photo-caption p {
  color: #111;
  background: #faf8f3;
  font-weight: 400;
  padding: 0.25em 0.5em;
}

@media (max-width: 600px) {
  .photo-caption {
    text-wrap: balance;
  }
}

.section-blurb a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.08em;
  transition: color 150ms ease;
}

.section-blurb a:hover {
  color: #ffd7e6;
}

.favorites-list {
  columns: 3;
  column-gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.favorites-list li {
  break-inside: avoid;
  margin: 0;
}
/* Keep longer blurbs below navigation and reachable on small screens. */
.section-blurb--favorites {
  max-height: calc(100svh - 17rem);
  overflow-y: auto;
  padding: 0.35rem;
  scrollbar-width: thin;
}
@media (max-width: 600px) {
  .favorites-list { columns: 2; }
}

.blurb-paragraph + .blurb-paragraph { margin-top: 1rem; }

.favorites-list a { text-decoration: none; }
