:root {
  --bg: #fbfaf7;
  --text: #111111;
  --muted: #6f6b66;
  --rule: #1c1c1c;
  --link: #7d9db8;
  --link-hover: #4f789a;
  --max: 1180px;
  --measure: 760px;
  --centered-measure: min(760px, 80vw);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

a:hover {
  color: var(--link-hover);
}

.site-header,
.compact-header,
main,
.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  padding: 32px 0 0;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  line-height: 1.2;
}

.top-nav a {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.top-nav a[aria-current="page"] {
  color: var(--muted);
}

.masthead {
  max-width: var(--measure);
  margin-top: 70px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.35);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.masthead h1 {
  max-width: var(--measure);
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.tagline {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.45;
}

.featured {
  width: var(--centered-measure);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 76px 0 14px;
  text-align: left;
}

.featured-post {
  max-width: var(--measure);
}

.featured-post h2,
.post-list h2,
.compact-header h1,
.article-header h1 {
  line-height: 1.08;
  letter-spacing: 0;
}

.featured-post h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
}

.featured-post h2 a,
.post-row h3 a {
  color: var(--text);
  text-decoration: none;
}

.featured-post p:not(.post-meta),
.post-row p:not(.post-meta),
.article p,
.article li {
  font-size: 1.05rem;
}

.post-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
}

.post-list {
  width: var(--centered-measure);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 76px 0 72px;
  text-align: left;
}

.post-list > h2 {
  margin: 0 0 14px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
}

.post-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
}

.post-row h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.post-row p {
  max-width: 720px;
  margin: 0;
}

.read-link {
  justify-self: start;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.compact-header {
  padding: 32px 0 76px;
}

.compact-header h1 {
  max-width: var(--measure);
  margin: 76px 0 26px;
  text-align: left;
  font-size: 2.1rem;
}

.article {
  width: var(--centered-measure);
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.narrow {
  width: var(--centered-measure);
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.article {
  padding-bottom: 72px;
}

.article > * {
  max-width: var(--measure);
}

.article-header {
  margin: 28px 0 28px;
}

.article-header h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.lede {
  color: var(--muted);
  font-size: 1.18rem !important;
  line-height: 1.45;
}

.article h2 {
  margin: 42px 0 8px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.article hr {
  width: 100%;
  margin: 54px 0 34px;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.22);
}

.article p,
.article li {
  margin-top: 0;
}

.article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.article figure {
  position: relative;
  width: min(100%, 620px);
  margin: 36px auto;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

video {
  display: block;
  width: 100%;
  height: auto;
  background: #111111;
}

.article figure img {
  cursor: zoom-in;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.media-gallery img {
  height: 100%;
  object-fit: cover;
}

.media-gallery + figcaption {
  margin-top: 12px;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.expand-media-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #ffffff;
  cursor: pointer;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 10, 0.86);
}

.media-lightbox.is-open {
  display: flex;
}

.media-lightbox img,
.media-lightbox video {
  max-width: min(1120px, 94vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  background: #111111;
}

.media-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.78);
  color: #ffffff;
  cursor: pointer;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
}

blockquote {
  margin: 34px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--rule);
  font-style: italic;
}

.archive-list {
  max-width: var(--centered-measure);
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.22);
  font-size: 1.05rem;
}

.archive-list time,
.archive-list span {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
}

.site-footer {
  width: var(--centered-measure);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(17, 17, 17, 0.2);
  color: var(--muted);
  font-size: 0.9rem;
}

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

  .site-header,
  .compact-header,
  main,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .featured,
  .post-list,
  .article,
  .narrow {
    width: 100%;
  }

  .site-header,
  .compact-header {
    padding-top: 28px;
  }

  .top-nav {
    justify-content: center;
    gap: 14px 22px;
  }

  .masthead {
    margin-top: 52px;
    padding-bottom: 24px;
  }

  .masthead h1 {
    font-size: 2.35rem;
  }

  .featured {
    padding-top: 48px;
  }

  .post-row,
  .archive-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .media-gallery {
    grid-template-columns: 1fr;
  }

  .compact-header h1 {
    margin-top: 48px;
    font-size: 1.8rem;
  }

  .article-header {
    margin-top: 34px;
  }
}
