:root {
  --bg: #fcfcfa;
  --text: #1c1e1d;
  --muted: #5f6663;
  --rule: #e3e5e1;
  --accent: #1f6f4a;
  --tint: #eef3ef;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --text: #e6e8e6;
    --muted: #9aa19d;
    --rule: #2a2e2c;
    --accent: #7fd1a4;
    --tint: #1a211d;
  }
}

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

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

body {
  margin: 0;
  padding: 2rem 1.5rem 3rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Email: a button that looks and behaves like the other links */
.email {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.email:hover { text-decoration-thickness: 2px; }
.email:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--bg); }

h1, h2, h3, p, ul { margin: 0; }

/* Site nav */
.nav {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
  padding: 0 0 0.9rem;
  border-bottom: 1px solid var(--rule);
  list-style: none;
  font-size: 0.9375rem;
}
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--accent);
}

/* Intro */
.intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.photo {
  flex: none;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rule);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--rule);
}

h1 {
  font-family: var(--serif);
  font-size: 2.375rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.lede {
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0.6rem;
  padding: 0;
  list-style: none;
}

section {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
h2::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 1px;
  background: var(--accent);
}

article { margin-top: 2.5rem; }
h3 { scroll-margin-top: 1.5rem; }
article + article {
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
h3:target { color: var(--accent); }

/* Stack chips */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0;
  list-style: none;
}
.stack li {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--tint);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* External links get an arrow */
.more a::after { content: " \2192"; }

h3 {
  font-family: var(--serif);
  font-size: 1.4375rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.meta {
  margin-top: 0.2rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

article p.body {
  margin-top: 0.9rem;
  text-wrap: pretty;
}

.more {
  margin-top: 0.8rem;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.more.none { color: var(--muted); }

/* Compact lists: work index on the homepage, Earlier on the work page */
.list {
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}
.list li + li { margin-top: 0.6rem; }
.list .years {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.work-index { margin-top: 0.75rem; }
.work-index li + li { margin-top: 0; border-top: 1px solid var(--rule); }
.work-index a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 1rem;
  align-items: baseline;
  padding: 0.85rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.work-index a:hover { background: var(--tint); }
.work-index .title {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}
.work-index a:hover .title { color: var(--accent); }
.work-index .years { font-size: 0.9375rem; }
.work-index .meta { grid-column: 1 / -1; margin-top: 0; }
.all-work { margin-top: 1rem; font-size: 0.9375rem; }
.all-work a::after { content: " \2192"; }

.prose {
  margin-top: 1.25rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  text-wrap: pretty;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}
footer .links { margin-top: 0; }

@media (max-width: 30rem) {
  body { padding: 1.5rem 1.25rem 2rem; }
  .nav { margin-bottom: 2.25rem; }
  .intro { gap: 1.1rem; }
  .photo { width: 5.5rem; height: 5.5rem; }
  h1 { font-size: 2rem; }
  h3 { font-size: 1.3125rem; }
  .lede { font-size: 1.125rem; }
  section, footer { margin-top: 2.75rem; }
}

@media print {
  body { padding: 0; font-size: 11pt; }
  a { color: inherit; }
  .nav { display: none; }
}
