@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-latin-italic.woff2") format("woff2");
}

:root {
  --ink: #1d1d1b;
  --muted: #6b6a66;
  --rule: #e4e2dc;
  --bg: #fdfcfa;
  --measure: 40rem;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;          /* 19px */
  line-height: 1.65;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 0.5rem; z-index: 10; background: var(--bg); padding: 0.5rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.bar {
  max-width: calc(var(--measure) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
}
.name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  font-size: 1.125rem;
  text-decoration: none;
  white-space: nowrap;
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}
.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--muted);
}
.menu a:hover { color: var(--ink); }
.menu a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

/* Phone: name on its own row, menu on a full-width row below */
@media (max-width: 40rem) {
  .bar { padding: 0 1.25rem; }
  .site-header .bar { padding-top: 0.25rem; }
  .site-header nav, .site-footer nav { flex-basis: 100%; }
  .menu { justify-content: space-between; column-gap: 1rem; }
  .menu a { min-height: 44px; padding: 0 0.125rem; }
}
@media (max-width: 40rem) { .site-footer .menu { justify-content: space-between; } }

/* Small phones (320px class): tighten so four items still fit on one line */
@media (max-width: 22.5rem) {
  .bar { padding: 0 1rem; }
  .menu { column-gap: 0.75rem; }
  .menu a { font-size: 1rem; padding: 0; }
}
/* Very narrow: allow two lines, never hide */
@media (max-width: 18.5rem) {
  .menu, .site-footer .menu { justify-content: flex-start; column-gap: 1.25rem; }
}

/* ---------- main ---------- */
.container {
  max-width: calc(var(--measure) + 3rem);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
@media (max-width: 40rem) { .container { padding: 2.25rem 1.25rem 3rem; } }

.title {
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
@media (max-width: 40rem) { .title { font-size: 1.875rem; } }

.bio { margin: 0 0 3rem; color: var(--ink); }
.empty { color: var(--muted); }

.list h2 {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.list h2 a { text-decoration: none; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.entries li:last-child { border-bottom: 1px solid var(--rule); }
.entries a { text-decoration: none; }
.entries a:hover { text-decoration: underline; }
.entries time { display: block; color: var(--muted); font-size: 0.95rem; }

.essay .date { color: var(--muted); margin: 0 0 2.5rem; }
.prose p { margin: 0 0 1.25em; }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.prose li { margin: 0.3em 0; padding-left: 0.2em; }
.prose ol li::marker { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 0.5rem 0 1.5rem; }
