/* Site frame: page width, header, nav, footer */

.site {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Theme toggle bar, above the page column: right on wide screens, centred on phones */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem 0;
}

.masthead {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: var(--border-frame);
}
.masthead__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--font-header);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.1;
}
.masthead__name {
  text-align: center;
  text-wrap: balance;
}
.masthead__title .glyph {
  font-size: 1.3em;
  color: var(--color-neon);
  text-shadow: var(--glow-neon);
}

/* Nav: glyph and label in a row, items separated by a small dot.
   Two centred rows of three; three rows of two on phones. */
.nav__list {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 0.75rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__list li {
  display: flex;
  align-items: center;
}
.nav__list li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-inline: 1rem;
  border-radius: 50%;
  background: var(--color-border);
}
/* No dot at the start of a row */
.nav__list li:nth-child(3n + 1)::before {
  display: none;
}
.nav__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text);
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav__glyph {
  font-size: 1.6rem;
  color: var(--color-accent-secondary);
  transition: color 0.2s;
}
.nav__item:hover,
.nav__item:hover .nav__glyph,
.nav__item[aria-current="page"],
.nav__item[aria-current="page"] .nav__glyph {
  color: var(--color-accent);
  text-shadow: var(--glow-accent);
}

@media (max-width: 40rem) {
  .topbar {
    justify-content: center;
  }
}

@media (max-width: 34rem) {
  .nav__list {
    grid-template-columns: repeat(2, auto);
  }
  .nav__list li:nth-child(3n + 1)::before {
    display: block;
  }
  .nav__list li:nth-child(odd)::before {
    display: none;
  }
}

.footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: var(--border-frame);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.footer__fine {
  margin: 0;
}

