:root {
  --blog-accent: #0ab692;
  --blog-muted: rgba(0, 0, 0, 0.65);
  --blog-rule: rgba(0, 0, 0, 0.12);
}

.blog-shell,
.article-shell {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.blog-article-page {
  max-width: 100%;
  overflow-x: clip;
}

.blog-hero {
  /* min-height: 27.5rem; */
  padding: 10.75rem 1.5rem 4rem;
  text-align: center;
}

.blog-kicker {
  font-family: "Havelock Titling", sans-serif;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-hero-title {
  max-width: 36rem;
  margin: 1.9rem auto 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 2.25vw, 2.5rem);
  font-weight: 400;
  line-height: 1.24;
}

.blog-hero-note,
.article-date {
  color: var(--blog-accent);
  font-size: 1.25rem;
  line-height: 1.4;
}

/* Prevent iOS Safari data detectors from turning dates into blue links */
.article-date a[x-apple-data-detectors],
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
}

.blog-hero-note {
  margin-top: 2rem;
}

.blog-latest {
  padding: 2rem 0 5rem;
}

.blog-section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
}

.latest-article-card {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(17rem, 0.78fr);
  gap: 1.6rem;
  align-items: start;
  margin-top: 3.5rem;
  color: #000;
}

.latest-article-image {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  display: block;
}

.latest-article-copy {
  padding-top: 0.15rem;
}

.latest-article-copy h3 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 2.25vw, 2.35rem);
  font-weight: 400;
  line-height: 1.22;
}

.latest-article-copy p {
  margin-top: 1.5rem;
  color: rgba(0, 0, 0, 0.82);
  font-size: 1.2rem;
  line-height: 1.4;
}

.blog-archive {
  padding: 0 0 12rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 4.3rem;
  row-gap: 4.1rem;
  margin-top: 1.8rem;
}

.archive-card {
  color: #000;
}

.archive-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f6f6f6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.archive-card h3 {
  margin-top: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.32;
}

.archive-card:hover img {
  opacity: 0.9;
  transform: translateY(-2px);
}

.article-shell {
  padding: 6.8rem 0 7.4rem;
}

.article-header {
  padding-top: 2.7rem;
}

.article-header .blog-kicker {
  text-align: center;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 5rem;
}

.author-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 9.25rem;
  min-height: 2.2rem;
  padding: 0.15rem 0.3rem 0.15rem 1.55rem;
  border: 1px solid #000;
  border-radius: 999px;
  color: rgba(0, 0, 0, 0.7);
  font-size: 1.05rem;
  line-height: 1;
}

.author-avatar {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  border-radius: 50%;
  background: #0ab692;
  color: #111;
  font-family: "Havelock Titling", sans-serif;
  font-size: 0.85rem;
}

.article-header h1 {
  max-width: 45rem;
  margin-top: 1.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1.22;
}

.article-subtitle {
  margin-top: 1.25rem;
  color: var(--blog-muted);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.4;
}

.article-hero-figure,
.article-inline-figure {
  margin: 3.2rem 0 0;
}

.article-hero-figure img,
.article-inline-figure img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.article-hero-figure img {
  aspect-ratio: 1.35;
}

.article-inline-figure img {
  aspect-ratio: 2.05;
}

.article-hero-figure figcaption,
.article-inline-figure figcaption {
  position: relative;
  margin-top: 0.85rem;
  padding-left: 2.2rem;
  text-align: right;
  color: var(--blog-accent);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.3;
}

.article-hero-figure figcaption::before,
.article-inline-figure figcaption::before {
  content: "";
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.65rem;
  border-bottom: 1px solid var(--blog-accent);
  border-left: 1px solid var(--blog-accent);
  border-radius: 0 0 0 1.25rem;
  transform: translateY(-0.25rem);
}

.article-body {
  margin-top: 3.35rem;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: 1.25rem;
  line-height: 1.52;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin-top: 1.5rem;
}

.article-body h2 {
  margin-top: 3.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 2.8vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
}

.article-body h3 {
  margin-top: 2.55rem;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
}

.article-body h4 {
  margin-top: 2.55rem;
  font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.25;
}

.article-body ul,
.article-body ol {
  padding-left: 1.8rem;
}

.article-body li + li {
  margin-top: 0.25rem;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}

.article-body thead,
.article-body tbody,
.article-body tr {
  display: table;
  width: 100%;
}

.article-body th,
.article-body td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--blog-rule);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  font-weight: 600;
}

.article-body td code {
  word-break: break-word;
}

.article-body hr {
  height: 1px;
  margin: 3rem 0;
  border: 0;
  background: var(--blog-rule);
}

.article-body blockquote {
  margin: 1.5rem 0 0;
  padding: 0.25rem 0 0.25rem 1.35rem;
  border-left: 3px solid var(--blog-accent);
  color: var(--blog-muted);
  font-style: italic;
}

.article-body blockquote p {
  margin-top: 0;
}

.article-body blockquote p + p {
  margin-top: 1rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 0.4rem;
}

.article-body pre {
  margin-top: 1.5rem;
  padding: 1.1rem 1.35rem;
  border-radius: 0.6rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 1rem;
  line-height: 1.5;
}

.article-body pre code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: none;
  padding: 0;
}

.article-body :not(pre) > code {
  padding: 0.15em 0.4em;
  border-radius: 0.35rem;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.06);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-callout {
  padding: 0 1.35rem;
  font-style: italic;
}

.article-weekly {
  margin-top: 0.5rem;
}

.article-weekly h2 {
  margin-top: 0;
  font-size: clamp(2.25rem, 3.4vw, 3.35rem);
  font-weight: 400;
}

.article-weekly p {
  max-width: 53rem;
  margin-top: 6.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

@media screen and (max-width: 1100px) {
  .nav-links {
    gap: 1.8rem;
  }

  .blog-shell,
  .article-shell {
    max-width: 820px;
  }

  .archive-grid {
    column-gap: 2.5rem;
  }
}

@media screen and (max-width: 900px) {
  .latest-article-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .latest-article-copy {
    padding-top: 0;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-meta-row {
    margin-top: 3.5rem;
  }
}

@media screen and (max-width: 768px) {
  .blog-hero {
    /* min-height: 21rem; */
    padding-top: 7.75rem;
  }

  .blog-shell,
  .article-shell {
    max-width: 680px;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .blog-latest {
    padding-top: 0;
  }

  .article-shell {
    padding-top: 5.5rem;
  }

  .article-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .author-pill {
    align-self: flex-start;
  }

  .article-body {
    font-size: 1.08rem;
  }
}

@media screen and (max-width: 560px) {
  .blog-archive {
    padding-bottom: 7rem;
  }

  .archive-grid {
    grid-template-columns: 1fr;
    row-gap: 2.4rem;
  }

  .latest-article-copy h3 {
    font-size: 1.65rem;
  }

  .latest-article-copy p,
  .blog-hero-note,
  .article-date {
    font-size: 1rem;
  }

  .article-hero-figure figcaption,
  .article-inline-figure figcaption {
    text-align: left;
  }

  .article-weekly p {
    margin-top: 3rem;
  }
}
