/* ============================================================
   Additions on top of "Text page template" design
   (articles list + article content styles).
   ============================================================ */

/* article cards on the list page */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid color-mix(in hsl, canvasText, transparent 82%);
}
.article-item:first-child { padding-top: 0; }
.article-item a.article-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.article-item a.article-link h2::before { content: none; }
.article-item a.article-link:hover h2 {
  color: light-dark(#0047ff, #6b9bff);
}
.article-meta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  font-family: ui-monospace, monospace;
  margin-bottom: 0.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.article-excerpt {
  font-weight: 300;
  opacity: 0.8;
  margin-top: 0.75rem;
}
.article-readmore {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: light-dark(#0047ff, #6b9bff);
  font-family: ui-monospace, monospace;
}

/* single article: header meta + back link */
.text-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.text-topbar a {
  color: inherit;
  opacity: 0.6;
  text-decoration: none;
}
.text-topbar a:hover { opacity: 1; color: light-dark(#0047ff, #6b9bff); }

article.text-article header { margin-bottom: 4rem; }
article.text-article header .article-meta { margin-bottom: 1rem; }

/* rendered article body */
.text-article .body {
  font-size: 1.0625rem;
  line-height: 1.85;
}
.text-article .body > *:first-child { margin-top: 0; }
.text-article .body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}
.text-article .body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.text-article .body p { margin: 0 0 1.1em; font-weight: 300; }
.text-article .body ul, .text-article .body ol { margin: 0 0 1.2em 1.3em; }
.text-article .body li { margin-bottom: 0.4em; font-weight: 300; }
.text-article .body blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid light-dark(#0047ff, #6b9bff);
  font-style: italic;
  opacity: 0.85;
}
.text-article .body pre {
  background: light-dark(#17171a, #0d0d0f);
  color: #e8e8ea;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}
.text-article .body :not(pre) > code {
  background: color-mix(in hsl, canvasText, transparent 92%);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.text-article .body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.75rem auto;
  border-radius: 6px;
}
.text-article .body a { color: light-dark(#0047ff, #6b9bff); }
.text-article .body hr {
  border: 0;
  border-top: 1px solid color-mix(in hsl, canvasText, transparent 80%);
  margin: 3rem 0;
}
.text-article .body figure { margin: 1.75rem 0; }
.text-article .body figcaption {
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: center;
  margin-top: 0.5rem;
}

/* articles list page reuses `.heading` numbering from the template */
.list-title { margin-bottom: 3rem; }
