.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-m);
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-content {
  flex: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface-page);
  border-bottom: 3px solid var(--color-accent);
}
.site-header__inner {
  height: var(--header-height-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}
.site-branding a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-2);
  color: var(--text-body);
  text-decoration: none;
}

.nav-primary ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
}
.nav-primary a {
  color: var(--text-body);
  text-decoration: none;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  position: relative;
}
.nav-primary a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.3em;
  height: 2px;
  background: var(--color-accent);
  transition: right var(--duration-fast) var(--ease-standard);
}
.nav-primary a:hover::after,
.nav-primary a:focus-visible::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2xs);
}

@media (max-width: 46rem) {
  .nav-toggle { display: block; }
  .nav-primary {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--surface-page);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-m);
    display: none;
  }
  .nav-primary.is-open { display: block; }
  .nav-primary ul { flex-direction: column; gap: var(--space-s); }
}

/* Footer — one compact row, not padded out with extra content. */
.site-footer {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  margin-top: var(--space-l);
  padding-block: var(--space-s);
}
.site-footer a { color: var(--text-inverse); }
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-m);
  font-size: var(--step--1);
}
.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 600;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-m);
}
.footer-nav a,
.site-footer__email {
  text-decoration: none;
  opacity: 0.85;
}
.footer-nav a:hover,
.site-footer__email:hover {
  opacity: 1;
  text-decoration: underline;
}
.site-footer__copyright {
  margin-left: auto;
  opacity: 0.7;
}

/* Generic section rhythm */
.section {
  padding-block: var(--space-2xl);
}
.section--alt {
  background: var(--surface-alt);
}
.section__header {
  max-width: 40rem;
  margin-bottom: var(--space-l);
}

/* Matches .entry-content's own width/centering exactly, so a page's
   title and the prose beneath it read as one aligned column instead of
   a full-width heading sitting above a narrower, separately-centered
   block of text. */
.entry-header {
  max-width: var(--prose-max);
  margin-inline: auto;
  margin-bottom: var(--space-m);
}
