:root {
  --black: #0a0a0a;
  --white: #fdfdfb;
  --muted: #6b6b66;
  --hairline: #e7e5dd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Iowan Old Style', 'Charter', 'Palatino Linotype', 'Palatino', 'Georgia', serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--black); color: var(--white); }

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ---------- nav ---------- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--black);
  margin-bottom: 4rem;
}

.site-nav .brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--black);
}

.site-nav nav {
  display: flex;
  gap: 1.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  letter-spacing: .02em;
}

.site-nav nav a {
  color: var(--black);
  text-decoration: none;
  padding: .1rem .35rem;
  margin: 0 -.35rem;
  transition: background .12s ease, color .12s ease;
}

.site-nav nav a:hover {
  background: var(--black);
  color: var(--white);
}

/* ---------- hero ---------- */
.hero {
  margin-bottom: 5rem;
}

.hero h1 {
  font-size: clamp(3.5rem, 11vw, 6.5rem);
  line-height: .92;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero .lede {
  font-size: 1.2rem;
  max-width: 38ch;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.hero .contact {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px;
  color: var(--muted);
}

.hero a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}

.hero a:hover {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
}

/* ---------- section title ---------- */
.section-title {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 500;
  margin: 0 0 1.25rem;
  color: var(--black);
}

/* ---------- page title (writing, about) ---------- */
.page-title {
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 2.75rem;
}

.page-lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 3rem;
  line-height: 1.5;
}

/* ---------- post list ---------- */
.post-list { list-style: none; }

.post-list li + li { border-top: 1px solid var(--hairline); }

.post-list a {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 1rem .5rem;
  margin: 0 -.5rem;
  color: var(--black);
  text-decoration: none;
  align-items: baseline;
  transition: background .15s ease, color .15s ease;
}

.post-list a:hover {
  background: var(--black);
  color: var(--white);
}

.post-list a:hover time { color: var(--white); opacity: .6; }

.post-list time {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--muted);
}

.post-list .title {
  font-size: 1.15rem;
  line-height: 1.3;
}

/* ---------- article ---------- */
article.post header {
  margin-bottom: 2.5rem;
}

article.post h1 {
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: .75rem;
}

article.post header time {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
}

article.post h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 .75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

article.post h3 {
  font-size: 1.15rem;
  margin: 2rem 0 .5rem;
  font-weight: 600;
}

article.post p,
article.post ul,
article.post ol {
  margin-bottom: 1.25rem;
}

article.post ul,
article.post ol {
  padding-left: 1.25rem;
}

article.post li + li { margin-top: .25rem; }

article.post blockquote {
  border-left: 2px solid var(--black);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: #2a2a28;
}

article.post a,
.prose a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}

article.post a:hover,
.prose a:hover {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
}

article.post code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .9em;
  background: #f1efe9;
  padding: .1em .35em;
  border-radius: 2px;
}

article.post pre {
  background: var(--black);
  color: var(--white);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 13.5px;
  line-height: 1.55;
}

article.post pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

article.post hr {
  border: none;
  border-top: 1px solid var(--black);
  margin: 2.5rem auto;
  width: 4rem;
}

article.post img {
  max-width: 100%;
  display: block;
  margin: 1.75rem 0;
  border: 1px solid var(--black);
}

/* generic prose container (about page, etc) */
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.25rem; }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--black);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.site-foot .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-foot .disclaimer {
  margin-top: .75rem;
  font-size: 12px;
  color: var(--muted);
  opacity: .8;
}

.site-foot a {
  color: var(--black);
  text-decoration: none;
  padding: .1rem .35rem;
  margin: 0 -.35rem;
}

.site-foot a:hover {
  background: var(--black);
  color: var(--white);
}

/* ---------- responsive ---------- */
@media (max-width: 540px) {
  body { font-size: 17px; }
  .wrap { padding: 2rem 1.25rem 3.5rem; }
  .site-nav { margin-bottom: 3rem; }
  .hero { margin-bottom: 3.5rem; }
  .post-list a {
    grid-template-columns: 78px 1fr;
    gap: 1rem;
    padding: .9rem .5rem;
  }
  .post-list .title { font-size: 1.05rem; }
}
