:root {
  --paper: #faf8f5;
  --ink: #292524;
  --muted: #6b6259;
  --line: #ddd6cd;
  --accent: #8f3e1b;
  --content-width: 44rem;
}

* { box-sizing: border-box; }

html { color: var(--ink); background: var(--paper); }

body {
  max-width: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: .4rem .65rem;
  color: var(--paper);
  background: var(--ink);
  z-index: 1;
}

.site-header, .site-footer, main {
  width: min(calc(100% - 2.5rem), var(--content-width));
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--line); }

.site-header__inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title { color: var(--ink); font-weight: 700; text-decoration: none; }

nav { display: flex; gap: 1rem; font-size: .92rem; }
nav a { color: var(--ink); }

.page-heading h1, .article h1, .section-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.writing { padding: 3.25rem 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 0 0 .7rem; font-size: clamp(2rem, 5vw, 3rem); }
.section-heading a { font-size: .92rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.2rem 0 1.45rem; border-bottom: 1px solid var(--line); }
.post-list__date, .article-date { margin: 0 0 .25rem; color: var(--muted); font-size: .86rem; }
.post-list h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; line-height: 1.25; }
.post-list h2 a { color: var(--ink); }
.post-list p:not(.post-list__date) { margin: .32rem 0 0; color: var(--muted); font-size: .96rem; }

.page-heading { padding: 3.25rem 0 1.75rem; }
.page-heading h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.page-heading > p { color: var(--muted); }
.not-found { min-height: 50vh; }

.article { padding: 3.75rem 0 4rem; }
.article-header { margin-bottom: 2.5rem; }
.article h1 { font-size: clamp(2.35rem, 6vw, 4.2rem); }
.article-description { max-width: 38rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.12rem; }

.prose { font-family: Georgia, "Times New Roman", serif; font-size: 1.14rem; }
.prose > * { max-width: 100%; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.35rem; }
.prose h2, .prose h3 { margin: 2.6rem 0 1rem; line-height: 1.2; font-weight: 600; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.25rem; }
.prose blockquote { margin-inline: 0; padding-left: 1.15rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose img { display: block; width: 100%; height: auto; margin: 1.8rem 0; border: 1px solid var(--line); }
.prose pre { overflow-x: auto; padding: 1rem; background: #f0ece6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84em; }
.prose :not(pre) > code { padding: .1em .25em; background: #f0ece6; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .94rem; }
.prose th, .prose td { padding: .55rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.syndication { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.site-footer__links { display: flex; gap: 1rem; }

@media (max-width: 38rem) {
  body { font-size: 16px; }
  .site-header, .site-footer, main { width: min(calc(100% - 2rem), var(--content-width)); }
  .site-header__inner { min-height: 4rem; }
  nav { gap: .75rem; }
  .article { padding-top: 2.75rem; }
  .site-footer { display: block; }
  .site-footer__links { margin-top: .4rem; }
}
