:root {
  --bg: #fbfbf8;
  --text: #171717;
  --muted: #66604f;
  --rule: #ddd7c8;
  --link: #153e75;
  --link-hover: #0d2c52;
  --callout-bg: #f4efe2;
  --callout-accent: #8a6a1e;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.6;
}

.page-shell {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.content {
  max-width: 52rem;
  margin: 0 auto;
}

.site-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem 2rem;
  align-items: flex-start;
  justify-content: space-between;
}

.header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-tagline {
  margin: 0.4rem 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.site-nav a,
a {
  color: var(--link);
  text-decoration: none;
}

.site-nav a:hover,
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.content h1,
.content h2,
.content h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.content h1 {
  margin: 0 0 1.2rem;
  font-size: 1.9rem;
}

.content h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.content p,
.content li {
  max-width: 100%;
}

.content ul {
  padding-left: 1.1rem;
}

.content li + li {
  margin-top: 0.3rem;
}

.content figure {
  display: table;
  max-width: 100%;
  margin: 1.5rem auto;
}

.content figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

.content figcaption {
  display: table-caption;
  caption-side: bottom;
  padding-top: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lede {
  font-size: 1.1rem;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-deck {
  max-width: 36rem;
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-toc {
  max-width: 40rem;
  margin: 0 0 2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.02);
}

.post-toc-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.post-toc-list,
.post-toc-sublist {
  margin: 0;
  padding-left: 1.1rem;
}

.post-toc-sublist {
  margin-top: 0.35rem;
}

.toc-item {
  margin: 0;
}

.toc-item + .toc-item {
  margin-top: 0.35rem;
}

.toc-level-2 {
  font-size: 0.96rem;
}

.toc-level-3 {
  font-size: 0.93rem;
}

.post h1[id],
.post h2[id],
.post h3[id] {
  scroll-margin-top: 1rem;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin: 0 0 1.2rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--rule);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-link {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
}

.post-list-meta {
  margin: 0.2rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.placeholder-block {
  margin: 1.5rem 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.02);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(138, 106, 30, 0.28);
  border-left: 4px solid var(--callout-accent);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--callout-bg), rgba(244, 239, 226, 0.72));
}

.callout p {
  margin: 0;
}

.inline-linklist {
  margin: 1rem 0 1.5rem;
}

.about-headshot {
  float: right;
  width: 132px;
  margin: 0.2rem 0 1rem 1.25rem;
  border-radius: 2px;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .page-shell {
    padding-top: 1.5rem;
  }

  .site-header-inner {
    display: block;
  }

  .site-nav {
    margin-top: 1rem;
  }

  .about-headshot {
    float: none;
    display: block;
    margin: 0 0 1rem;
  }
}
