/*
 * base.css — structural rules shared by every theme.
 *
 * Themes layer on typography, color, and spacing. Anything that should be
 * consistent across every theme (box model, image fluidity, semantic
 * structure, accessibility resets) belongs here. Themes must not need to
 * re-state these rules.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

/* Structural page layout */

.site-header {
  flex: 0 0 auto;
}

.site-main {
  flex: 1 0 auto;
}

.site-header nav {
  display: flex;
}

.nav-toggle {
  display: none;
}

.nav-toggle__line {
  display: block;
  width: 1.35rem;
  height: 1px;
  background: currentColor;
}

.nav-toggle__line + .nav-toggle__line {
  margin-top: 0.38rem;
}

@media (max-width: 720px) {
  .site-header {
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: auto;
  }

  .site-header .site-nav {
    display: none !important;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 1rem;
  }

  .site-header[data-nav-open="true"] .site-nav {
    display: flex !important;
  }
}

/* Works page structure.
 *
 * Only structural spacing here — the theme files own the actual visual
 * hierarchy (heading sizes, rules, alignment, indentation). The numbers
 * below are intentionally generous so themes can rely on the gaps being
 * present even when they don't restate them. */

.works-page .category {
  margin-bottom: 3rem;
}

.works-page .category:last-child {
  margin-bottom: 0;
}

.works-page .status + .status {
  margin-top: 3.5rem;
}

.works-page .work + .work {
  margin-top: 2rem;
}

/* Visually-hidden helper for accessibility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
