/* Newsreader (SIL OFL), variable weight + optical size, latin subset, self-hosted */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* Tokens taken from darioamodei.com: ivory/slate swatches, 38.75rem measure, 1.25rem body */
:root {
  --bg: #f0eee6;
  --text: #1f1e1d;
  --muted: #5e5d59;
  --measure: 38.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1e1d;
    --text: #f0eee6;
    --muted: #87867f;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  margin: 15px 0 25px;
  padding: 15px 0 10px;
}

.name {
  margin: 0;
  font-size: 1.44em;
  font-weight: 600;
  line-height: 1;
}
.name a { text-decoration: none; }

main { padding-bottom: 6rem; }

.portrait {
  display: block;
  width: 9rem;
  height: auto;
  margin: 0 0 1.5rem;
  border-radius: 2px;
}

section + section { margin-top: 2.5rem; }

h2 {
  margin: 0 0 0.7em;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.2;
}

p { margin: 0 0 1em; }

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}
li { padding-left: 1em; }

.meta { color: var(--muted); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.1em;
  transition: color 0.2s linear;
}
a:hover { color: var(--muted); }

/* Bio "More" toggle, no JavaScript */
details { margin: 0 0 1em; }
details > summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.1em;
}
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { display: none; }

@media (max-width: 479px) {
  body { font-size: 1.125rem; }
}
