:root {
  --bg: #fcfcfb;
  --text: #222;
  --muted: #666;
  --line: #ddd8d1;
  --link: #1f1f1f;
  --max: 780px;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.16rem; }
a:hover, a:focus { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid rgba(34, 34, 34, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.7rem 0.9rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4.5rem;
}

header.site-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

nav.primary-nav {
  margin-top: 1.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav.primary-nav a {
  color: var(--muted);
  text-decoration: none;
}

nav.primary-nav a.active,
nav.primary-nav a:hover,
nav.primary-nav a:focus {
  color: var(--text);
  text-decoration: underline;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  letter-spacing: 0.015rem;
}

.page-title {
  margin-bottom: 0.9rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.65rem;
  font-size: 1.03rem;
}

.tagline {
  font-size: 1.18rem;
  max-width: var(--measure);
  margin-top: 1.6rem;
}

main {
  padding-top: 1.75rem;
}

section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-child,
.page-content:last-child {
  border-bottom: none;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.3rem;
}

.lede,
.page-content > p,
.intro,
.tagline {
  max-width: var(--measure);
}

.intro {
  margin: 0 0 2rem;
  color: var(--muted);
}

.work-grid {
  display: grid;
  gap: 1.65rem;
}

.work-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.work-item:last-child { border-bottom: none; padding-bottom: 0; }
.work-item h3 { font-size: 1.14rem; margin-bottom: 0.28rem; }
.work-item p { margin: 0.2rem 0 0; }

.page-content {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--line);
}

.email-link {
  word-break: break-word;
  font-style: normal;
}

footer {
  padding-top: 2.25rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.footer-line {
  margin-top: 0.4rem;
}

@media (max-width: 640px) {
  .wrap {
    padding-top: 1.5rem;
    padding-bottom: 3.5rem;
  }

  header.site-header {
    padding-top: 2.25rem;
    padding-bottom: 2rem;
  }

  nav.primary-nav {
    gap: 0.75rem 1rem;
  }
}
