:root {
  --bg: #faf8f1;
  --text: #1f3a2b;
  --link: #2e9e5b;
  --link-hover: #1f7a43;
  --rule: #d9e3d3;
  --font-body: "Recursive", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Recursive", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 65ch;
}
*, *::before, *::after { box-sizing: border-box; }

@font-face {
  font-family: 'Recursive';
  src: url('./fonts/recursive-variable.woff2') format('woff2');
  font-weight: 300 1000;
  font-style: oblique -15deg 0deg;
  font-display: swap;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
}

/* one centered column */
.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* header + nav */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.site-title,
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: oblique -15deg;
  font-variation-settings: "MONO" 1, "CASL" 1, "CRSV" 1;
}
.site-title {
  font-size: 1.5rem;
  color: var(--link);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--link);
  border-bottom-color: var(--link);
}

/* headings */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}
h1 { font-size: 2rem; margin-top: 2.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

/* main content */
main { padding-block: 0.5rem 3rem; }
p, ul, ol, blockquote, pre, table { margin: 0 0 1.1rem; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--link);
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
img { max-width: 100%; height: auto; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95em; }
pre { overflow-x: auto; padding: 1rem; background: #f0eddf; border-radius: 4px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--rule); }

.site-footer {
  padding-block: 1rem 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.3rem; }
}
