/* The journal: the listing at /blog/ and the article template. Built on the
   tokens and type scale in pages.css. */

.blog { max-width: 1180px; margin: 0 auto; }

/* ------------------------------------------------------------------ cards */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px);
  margin-top: clamp(40px, 5vw, 64px);
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card { display: flex; flex-direction: column; gap: 18px; color: var(--ink); }

.blog-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tile);
}
.blog-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.blog-card:hover .blog-card-media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .blog-card-media img { transition: none; } }

.blog-card-body { display: flex; flex-direction: column; gap: 10px; }

.blog-card-tag {
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 23px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.blog-card p {
  margin: 0;
  font-weight: 300;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-soft);
}

.blog-card-meta { font-weight: 300; font-size: 13px; color: var(--muted); }

/* The newest story runs across the page with its picture beside the words. */
.blog-card--lead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.blog-card--lead .blog-card-media { aspect-ratio: 3 / 2; }
.blog-card--lead h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; }
.blog-card--lead p { font-size: 16px; line-height: 27px; }
@media (max-width: 760px) { .blog-card--lead { grid-template-columns: 1fr; } }

.blog-card.is-loading .blog-card-media { animation: blog-pulse 1.4s ease-in-out infinite; }
@keyframes blog-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .blog-card.is-loading .blog-card-media { animation: none; } }

.blog-empty {
  max-width: 560px;
  margin: clamp(24px, 4vw, 48px) auto 0;
  text-align: center;
}
.blog-empty .pg-note { margin-top: 14px; }

/* --------------------------------------------------------------- article */

.post { max-width: 760px; margin: 0 auto; }

.post-crumbs {
  margin-bottom: 26px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.post-crumbs a:hover { color: var(--ink); }

.post-head .pg-lede { max-width: 58ch; font-size: 18px; line-height: 29px; }

.post-meta {
  margin: 22px 0 0;
  font-weight: 300;
  font-size: 13px;
  color: var(--muted);
}

.post-actions { margin-top: 28px; }

.post-cover { margin: clamp(32px, 4vw, 48px) 0 0; background: var(--tile); }
.post-cover img { width: 100%; height: auto; }

.post-toc {
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 22px 26px;
  border-left: 1px solid var(--ink);
  background: var(--cream);
}
.post-toc-title {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
}
.post-toc ol { margin: 0; padding-left: 18px; font-weight: 300; font-size: 15px; line-height: 28px; }
.post-toc a { border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.post-toc a:hover { border-bottom-color: currentColor; }

.post-body {
  margin-top: clamp(32px, 4vw, 48px);
  font-weight: 300;
  font-size: 17px;
  line-height: 30px;
  color: var(--ink-soft);
}
.post-body > * { margin: 0 0 22px; }
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 44px 0 16px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.post-body h2 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2; }
.post-body h3 { font-size: clamp(20px, 1.7vw, 23px); line-height: 1.3; }
.post-body h4 { font-size: 19px; }
.post-body strong { font-weight: 500; color: var(--ink); }
.post-body a { border-bottom: 1px solid var(--rule); transition: border-color 0.2s ease, color 0.2s ease; }
.post-body a:hover { border-bottom-color: var(--ink); color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  margin: 36px 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.45;
  color: var(--ink);
}
.post-body blockquote p { margin: 0; }
.post-body figure { margin: 36px 0; }
.post-body img { width: 100%; height: auto; }
.post-body figcaption { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--muted); }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }

.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 40px 0 0; padding: 0; list-style: none;
}
.post-tags a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  transition: border-color 0.2s ease;
}
.post-tags a:hover { border-color: var(--ink-soft); }

.post-cta {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(24px, 3vw, 36px);
  background: var(--cream);
  text-align: center;
}
.post-cta .pg-actions { justify-content: center; margin-top: 18px; }

.post-more { max-width: 1180px; margin: clamp(64px, 8vw, 104px) auto 0; }
.post-more .blog-grid { margin-top: 28px; }

.post-loading { display: grid; gap: 16px; }
.post-loading-line { height: 22px; background: var(--tile); animation: blog-pulse 1.4s ease-in-out infinite; }
.post-loading-line.is-short { width: 40%; height: 40px; }
