/* =========================================================================
   Blog additions — article prose and pagination.

   The original static site had no article detail page, so these are the only
   genuinely new styles. They reuse the existing design tokens throughout.
   ========================================================================= */

/* ---------- Article prose ---------- */
.rich-text {
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink-70);
}
.rich-text > * + * { margin-top: 1.35em; }

.rich-text h2,
.rich-text h3,
.rich-text h4 {
  font-family: var(--display);
  color: var(--navy);
  font-weight: 500;
  line-height: 1.25;
  margin-top: 2.4em;
}
.rich-text h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.rich-text h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.rich-text h4 { font-size: 1.15rem; }

.rich-text a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hairline);
  transition: color .3s var(--ease), text-decoration-color .3s var(--ease);
}
.rich-text a:hover { color: var(--orange); text-decoration-color: var(--orange); }

.rich-text strong { color: var(--charcoal); font-weight: 600; }

.rich-text ul,
.rich-text ol { padding-left: 1.4em; }
.rich-text li + li { margin-top: .5em; }
.rich-text ul li::marker { color: var(--orange); }

.rich-text blockquote {
  border-left: 2px solid var(--orange);
  padding: .3em 0 .3em 1.4em;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--navy);
}

.rich-text img,
.rich-text figure img { width: 100%; height: auto; border-radius: 4px; }
.rich-text figcaption {
  font-size: .84rem;
  color: var(--ink-50);
  margin-top: .7em;
  text-align: center;
}

.rich-text hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin-block: 3em;
}

.rich-text code {
  font-size: .9em;
  background: var(--warmgrey);
  padding: .15em .45em;
  border-radius: 3px;
}
.rich-text pre {
  background: var(--warmgrey);
  padding: 1.2rem 1.4rem;
  border-radius: 6px;
  overflow-x: auto;
}
.rich-text pre code { background: none; padding: 0; }

.rich-text table { width: 100%; border-collapse: collapse; }
.rich-text th,
.rich-text td {
  border-bottom: 1px solid var(--hairline);
  padding: .8em 1em;
  text-align: left;
}
.rich-text th { font-family: var(--sans); font-weight: 600; color: var(--navy); }

/* ---------- Article meta line under the title ---------- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  font-family: var(--sans);
  font-size: .86rem;
  letter-spacing: .04em;
  color: var(--ink-50);
  margin-top: 1.2rem;
}
.article-meta .tag { position: static; }

.article-hero__media {
  margin-top: 2.5rem;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.article-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}
.pagination .nav-links {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--ink-70);
  min-width: 42px;
  height: 42px;
  padding: 0 .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  transition: all .3s var(--ease);
}
.pagination .page-numbers:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.pagination .page-numbers.current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.pagination .page-numbers.dots {
  border-color: transparent;
  min-width: auto;
  padding: 0 .3rem;
}

/* ---------- Prev / next article ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 620px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav__item { display: flex; flex-direction: column; gap: .5rem; }
.post-nav__item--next { text-align: right; }
.post-nav__label {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.post-nav__title {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--navy);
  transition: color .3s var(--ease);
}
.post-nav a:hover .post-nav__title { color: var(--orange); }

/* ---------- Search results summary ---------- */
.results-count {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--ink-50);
  margin-bottom: 2rem;
}
