/* ==========================================================================
   article.css — articles list & single article detail
   ========================================================================== */

/* ============== Articles list ============== */
.articles-page-head {
  padding: 9rem 0 4rem;
  border-bottom: 1px solid var(--line);
}
.articles-page-head h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 1rem 0 0;
}
.articles-page-head h1 .serif { color: var(--hot); }
.articles-page-head .lede {
  margin-top: 2rem;
  max-width: 38em;
  font-size: 1.1rem;
  color: var(--ink-2);
  font-weight: 300;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 1.5rem;
}
.filter-bar .filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar .filter-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease;
}
.filter-pill:hover { color: var(--ink); border-color: var(--ink-3); }
.filter-pill.active { background: var(--hot); border-color: var(--hot); color: var(--bg); }
.filter-bar .right {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.filter-bar .right .val { color: var(--hot); }

.articles-list {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 4rem 0 6rem;
  align-items: start;
}
.articles-col { display: flex; flex-direction: column; gap: 1.5rem; }
.articles-side { position: sticky; top: 6rem; }

.side-block {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.side-block h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.side-list a {
  display: block;
  color: var(--ink-2);
  font-size: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
  transition: color 0.3s ease;
}
.side-list a:hover { color: var(--hot); }
.side-list a .n {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  margin-right: 0.5rem;
}

@media (max-width: 1024px) {
  .articles-list { grid-template-columns: 1fr; }
  .articles-side { position: static; }
}

/* ============== Single article ============== */
.article-head {
  padding: 8rem 0 3rem;
  border-bottom: 1px solid var(--line);
}
.article-head .crumb { border-bottom: none; padding: 0 0 1.5rem; }
.article-head h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}
.article-head h1 .serif { color: var(--hot); }
.article-head .lede {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 40em;
  font-weight: 300;
}

.article-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.article-meta .author { color: var(--ink); }
.article-meta .hot { color: var(--hot); }

.article-cover {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.article-cover svg { width: 100%; height: 100%; display: block; }

.article-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  padding: 5rem 0 6rem;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 6rem;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}
.article-toc h5 {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 1rem;
}
.article-toc ol {
  list-style: none;
  padding: 0; margin: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.article-toc li {
  counter-increment: toc;
  font-size: 0.85rem;
  line-height: 1.4;
}
.article-toc a {
  color: var(--ink-2);
  transition: color 0.3s ease;
  display: block;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--line);
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero) ".";
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-right: 0.5rem;
}
.article-toc a:hover { color: var(--hot); }

.prose { max-width: 42em; }
.prose p {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink);
  margin: 0 0 1.5rem;
  font-weight: 300;
}
.prose p strong { color: var(--ink); font-weight: 500; }
.prose p em { color: var(--hot); font-style: italic; }
.prose h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 4rem 0 1.5rem;
  letter-spacing: -0.02em;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.prose h2 .serif { color: var(--hot); }
.prose h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.prose blockquote {
  border-left: 3px solid var(--hot);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
}
.prose blockquote cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.prose ul, .prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5em;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  font-weight: 300;
}
.prose li { margin-bottom: 0.5rem; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--hot);
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}
.prose a { color: var(--hot); border-bottom: 1px solid currentColor; }

@media (max-width: 1024px) {
  .article-body { grid-template-columns: 1fr; gap: 2rem; }
  .article-toc { position: static; border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 2rem; }
}

/* ============== Related ============== */
.related {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
@media (max-width: 1024px) { .related-grid { grid-template-columns: 1fr; } }

/* ============== Article nav (prev/next) ============== */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.article-nav a {
  padding: 3rem 2rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.3s ease;
}
.article-nav a:last-child {
  border-right: none;
  text-align: right;
  align-items: flex-end;
}
.article-nav a:hover { background: var(--bg-2); }
.article-nav .lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.article-nav h5 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.article-nav a:hover h5 { color: var(--hot); }
