:root {
  --paper: #FAF6EF;
  --ink: #1E1B16;
  --muted: #6B6358;
  --accent: #C97F48;
  --rule: #E8DCCB;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 38rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover, a:focus-visible { color: var(--ink); text-decoration-color: var(--accent); }

main, .site-header nav, .site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Navigation */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover { color: var(--accent); }
.brand { font-weight: 600; letter-spacing: 0.02em; }
.nav-links a { margin-left: 1rem; }
.nav-links a:first-child { margin-left: 0; }

/* Home intro */
.intro { text-align: center; padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.avatar {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
}
.name {
  font-size: clamp(2.6rem, 9vw, 3.8rem);
  font-weight: normal;
  line-height: 1.1;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.tagline { font-style: italic; font-size: 1.25rem; margin: 0 0 1rem; color: var(--accent); }
.disclosure { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin: 0; }

/* Essay list */
.section-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 2.5rem 0 0.5rem;
}
.essay-list { list-style: none; margin: 0; padding: 0; }
.essay-list li { padding: 1.6rem 0; border-bottom: 1px solid var(--rule); }
.essay-list li:last-child { border-bottom: 0; }
.essay-list h2 { font-size: 1.45rem; font-weight: normal; line-height: 1.3; margin: 0 0 0.3rem; }
.essay-list h2 a { color: var(--ink); text-decoration: none; }
.essay-list h2 a:hover { color: var(--accent); }
.excerpt { margin: 0.6rem 0 0; }

/* Meta lines */
.meta { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin: 0; letter-spacing: 0.02em; }
.source { font-style: italic; font-size: 0.95rem; color: var(--muted); margin: 0.2rem 0 0.4rem; line-height: 1.5; }

/* Essay page */
.essay { padding: 3rem 0 1rem; }
.essay header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--accent); }
.essay h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); font-weight: normal; line-height: 1.2; margin: 0 0 0.6rem; }
.essay .source { font-size: 1rem; margin: 0 0 0.6rem; }
.about .avatar { width: 120px; height: 120px; margin: 0 0 1.5rem; }

.prose p { margin: 0 0 1.35em; }
.prose h2, .prose h3, .prose h4 { font-weight: normal; line-height: 1.3; margin: 2em 0 0.6em; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 2px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--accent); width: 4rem; margin: 2.5em auto; }
.prose strong { font-weight: 600; }
.prose .signature { margin-top: 2em; font-style: italic; }

.back { font-family: var(--sans); font-size: 0.85rem; margin: 1rem 0 3rem; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer p { margin: 0 0 0.6rem; }
.social a { margin-right: 0.9rem; display: inline-block; }

@media (max-width: 480px) {
  body { font-size: 1.0625rem; }
  .intro { padding-top: 2.5rem; }
  .avatar { width: 128px; height: 128px; }
}
