/* Blog shell — same 400px column as the landing page hero, same 400x300 media footprint */

.blog-page {
  background-color: var(--page-background);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.blog-logo {
  position: absolute;
  top: 115px;
  left: 140px;
  font-family: var(--font-medium);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.48px;
  color: var(--base-slate);
  text-decoration: none;
}

.blog-logo__serif {
  font-family: var(--font-canon);
  font-weight: 400;
}

.blog-main {
  width: min(100%, 400px);
  margin-left: 400px;
  padding: 200px 0 150px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.blog-main > * {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

.blog-back,
.blog-link {
  font-family: var(--font-medium);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.32px;
  color: var(--base-slate);
  text-decoration: none;
  width: max-content;
}

.blog-back:hover,
.blog-link:hover,
.blog-nav a:hover,
.blog-list__item:hover .blog-list__title {
  color: var(--base-black);
  text-decoration: underline;
}

.blog-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-meta {
  font-family: var(--font-regular);
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.32px;
  color: var(--base-slate);
  margin: 0;
}

.blog-title {
  font-family: var(--font-canon);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.64px;
  color: var(--base-slate);
  margin: 0;
}

.blog-page--index .blog-title {
  font-size: 48px;
  letter-spacing: -0.96px;
}

.blog-lede {
  font-family: var(--font-regular);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.32px;
  color: var(--base-black);
  margin: 0;
}

/* Media: 400x300, the landing hero footprint */
.blog-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-figure__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--base-cream, #f2f2ea);
}

.blog-figure__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-figure figcaption {
  font-family: var(--font-regular);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.26px;
  color: var(--text-color-subtle);
}

.blog-figure figcaption a {
  color: inherit;
}

/* Article body */
.blog-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-body > * {
  margin: 0;
}

.blog-body p,
.blog-body li {
  font-family: var(--font-regular);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.32px;
  color: var(--base-black);
}

.blog-body a {
  color: var(--base-slate);
}

.blog-body h2 {
  position: relative;
  font-family: var(--font-canon);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.48px;
  color: var(--base-slate);
  margin-top: 30px;
}

.blog-body h2:first-child {
  margin-top: 0;
}

/* Section numbers hang in the gutter, like the 0001 number on the landing page */
.blog-body h2[data-n]::before {
  content: attr(data-n);
  position: absolute;
  top: 3px;
  right: calc(100% + 10px);
  font-family: var(--font-medium);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.32px;
  color: var(--base-slate);
  font-variant-numeric: tabular-nums;
}

.blog-body ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-body .blog-figure {
  margin: 10px 0;
}

.blog-body blockquote {
  padding-left: 16px;
  border-left: 1.5px solid var(--base-slate);
  font-style: italic;
}

.blog-body em {
  font-style: italic;
}

.blog-body strong {
  font-family: var(--font-medium);
  font-weight: 500;
}

/* Three key elements: a small definition table */
.blog-terms {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 16px;
}

.blog-terms dt {
  font-family: var(--font-medium);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.32px;
  line-height: 1.5;
  color: var(--base-slate);
}

.blog-terms dd {
  margin: 0;
  font-family: var(--font-regular);
  font-size: 16px;
  letter-spacing: -0.32px;
  line-height: 1.5;
  color: var(--base-black);
}

/* Post footer */
.blog-credits {
  font-family: var(--font-regular);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.26px;
  color: var(--text-color-subtle);
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--base-slate);
}

.blog-credits a {
  color: inherit;
}

.blog-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--base-slate);
}

.blog-nav a {
  font-family: var(--font-medium);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.32px;
  color: var(--base-slate);
  text-decoration: none;
}

/* Index list */
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.blog-list__item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.blog-list__title {
  font-family: var(--font-canon);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.64px;
  color: var(--base-slate);
  margin: 0;
}

.blog-list__summary {
  font-family: var(--font-regular);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.32px;
  color: var(--base-black);
  margin: 0;
}

/* Mobile — DS one --sf scaling, media goes full-bleed like the landing hero */
@media (max-width: 768px) {
  .blog-logo {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    padding: calc(20px * var(--sf));
    font-size: calc(20px * var(--sf));
  }

  .blog-main {
    width: 100%;
    margin-left: 0;
    padding: calc(20px * var(--sf));
    padding-top: calc(30px * var(--sf));
    gap: calc(24px * var(--sf));
    box-sizing: border-box;
  }

  .blog-main > * {
    max-width: 100%;
  }

  .blog-title {
    font-size: calc(24px * var(--sf));
    letter-spacing: calc(-0.48px * var(--sf));
  }

  .blog-page--index .blog-title {
    font-size: calc(32px * var(--sf));
    letter-spacing: calc(-0.64px * var(--sf));
  }

  .blog-meta,
  .blog-lede,
  .blog-body p,
  .blog-body li,
  .blog-terms dt,
  .blog-terms dd,
  .blog-list__summary,
  .blog-back,
  .blog-link,
  .blog-nav a {
    font-size: calc(14px * var(--sf));
    letter-spacing: calc(-0.28px * var(--sf));
  }

  .blog-body h2 {
    font-size: calc(20px * var(--sf));
    letter-spacing: calc(-0.4px * var(--sf));
    padding-left: calc(30px * var(--sf));
  }

  .blog-body h2[data-n]::before {
    right: auto;
    left: 0;
    top: 2px;
    font-size: calc(13px * var(--sf));
  }

  .blog-list__title {
    font-size: calc(24px * var(--sf));
    letter-spacing: calc(-0.48px * var(--sf));
  }

  .blog-figure__media {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .blog-figure figcaption,
  .blog-credits {
    font-size: calc(12px * var(--sf));
  }
}
