/* Blog: the post list and a post. Loaded after site.css, uses its tokens. */

/* ---------- List ---------- */
.blog-head {
  padding: 72px 0 32px;
}

.blog-head__title {
  margin-bottom: 14px;
  font-size: clamp(40px, 6vw, 64px);
}

.blog-list {
  padding: 24px 0 104px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--line);
}

.post-card__img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--sand);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px 24px;
}

.post-card__tag {
  align-self: flex-start;
  color: var(--clay-ink);
  font: 500 12px var(--mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.post-card__title {
  font-family: var(--serif);
  font-size: 24px;
  text-wrap: balance;
}

.post-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--clay-ink);
}

.post-card__date {
  color: var(--muted);
  font-size: 14px;
}

.post-card__excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.post-card__more {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  font: 500 14px var(--mono);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}

.pagination a:hover {
  border-color: var(--ink);
}

.pagination .is-current {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Post ---------- */
.post {
  padding: 56px 0 104px;
}

.post__back {
  margin-bottom: 28px;
  font-size: 15px;
}

.post__back a {
  color: var(--muted);
  text-decoration: none;
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px dashed var(--clay);
  border-radius: 999px;
  color: var(--clay-ink);
  font: 500 12px var(--mono);
  text-decoration: none;
}

.post__title {
  margin-bottom: 18px;
  font-size: clamp(36px, 5.4vw, 58px);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.post__cover {
  width: min(1040px, 100% - 32px);
  margin: 40px auto 48px;
}

.post__cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post__body {
  font-size: 18px;
  line-height: 1.7;
}

.post__body > * + * {
  margin-top: 1.1em;
}

.post__body p {
  margin-bottom: 0;
}

.post__lede {
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.6;
}

.post__body h2 {
  margin-top: 1.9em;
  font-size: clamp(26px, 3.4vw, 34px);
}

.post__body h3 {
  margin-top: 1.6em;
  font-size: 22px;
  font-weight: 600;
}

.post__body ul,
.post__body ol {
  padding-left: 1.3em;
}

.post__body li + li {
  margin-top: 0.4em;
}

.post__body li::marker {
  color: var(--clay);
}

.post__body blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--clay);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
}

.post__body figure {
  margin-inline: 0;
}

.post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.post__body figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.post__body code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--sand);
  font: 0.88em var(--mono);
}

.post__body pre {
  overflow-x: auto;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font: 14px/1.6 var(--mono);
}

.post__body pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.post__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.post__body th,
.post__body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.post__body hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.post__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .blog-head {
    padding-top: 48px;
  }

  .post {
    padding-top: 36px;
  }

  .post__body {
    font-size: 17px;
  }
}
