:root {
  --bg: #ffffff;
  --ink: #121212;
  --muted: #666666;
  --line: #e5e5e5;
  --max-width: 39rem;
  --font-serif: "Newsreader", "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.15em;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0 0.8rem;
}

.brand,
.site-nav,
.post-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
}

.brand {
  color: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

main.shell {
  flex: 1 0 auto;
  padding: 2rem 0;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  padding: 0.9rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.6rem;
  align-items: start;
}

.footer-meta {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

h1 {
  font-size: clamp(1.55rem, 3vw, 1.8rem);
}

h2 {
  font-size: clamp(1.12rem, 2.2vw, 1.22rem);
}

h3 {
  font-size: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.post-meta,
.lede {
  color: var(--muted);
}

.lede {
  max-width: 34rem;
  font-size: 0.98rem;
}

.archive-heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

.post-list li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.post-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.post-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

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

.entry-title {
  margin-bottom: 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.entry-title a {
  text-decoration: none;
}

.entry-title a:hover,
.entry-title a:focus {
  text-decoration: underline;
}

.post-meta {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.newsletter {
  padding-top: 0.2rem;
}

.newsletter-heading,
.newsletter-form {
  font-family: var(--font-sans);
}

.newsletter-heading {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.newsletter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.05rem;
  font-size: 0.74rem;
}

.newsletter-input,
.newsletter-button {
  font: inherit;
  line-height: 1.4;
  border: 1px solid #ececec;
  background: #ffffff;
  color: #666666;
}

.newsletter-input {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.28rem 0.42rem;
}

.newsletter-input::placeholder {
  color: #9a9a9a;
  opacity: 1;
}

.newsletter-button {
  flex: 0 0 auto;
  padding: 0.28rem 0.46rem;
  color: #7a7a7a;
}

.newsletter-form--inactive .newsletter-input,
.newsletter-form--inactive .newsletter-button,
.newsletter-input:disabled,
.newsletter-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.footer-contact {
  padding-top: 0.2rem;
}

.contact-row {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-icon {
  flex: 0 0 auto;
}

.contact-email {
  white-space: normal;
}

.footer-site {
  padding-top: 0.2rem;
}

.site-link-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--muted);
}

.site-link-icon {
  flex: 0 0 auto;
}

.site-link {
  color: inherit;
  text-decoration: none;
}

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

.prose > * + * {
  margin-top: 1.15rem;
}

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

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.prose pre {
  margin: 1rem 0;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-x: auto;
}

.prose pre code {
  font-size: inherit;
}

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

  .masthead {
    align-items: flex-start;
  }

  .post-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.1rem;
  }

  .newsletter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .newsletter-button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .contact-email {
    white-space: normal;
  }

  main.shell {
    padding-top: 2rem;
  }
}
