/* =============================================================
   Articles — listing page + article reader
   ============================================================= */

/* ---- LISTING PAGE ---- */
.articles-hero {
  padding-block: clamp(100px,14vw,180px) clamp(60px,8vw,100px);
  position: relative;
  overflow: hidden;
}
.articles-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(100% 80% at 70% 0%, rgba(66,176,213,.08), transparent 60%);
  pointer-events: none;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px,6vw,70px);
}
.filter-chip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--fg-soft);
  background: none;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.filter-chip:hover { border-color: var(--accent); color: var(--fg); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #000; }

/* Featured article card */
.article-featured {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px,5vw,60px);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-1);
  margin-bottom: clamp(40px,5vw,60px);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.article-featured:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.article-featured-body { padding: clamp(28px,4vw,52px); display: flex; flex-direction: column; justify-content: center; }
.article-featured-visual {
  background: linear-gradient(140deg, var(--bg-2), var(--bg));
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.article-featured-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(110% 100% at 50% 0, #000, transparent 85%);
}
.article-featured-visual .big-num {
  position: absolute;
  right: 24px;
  bottom: 12px;
  font-family: var(--display);
  font-size: 120px;
  font-weight: 300;
  line-height: 1;
  color: rgba(66,176,213,.12);
  user-select: none;
}

/* Article list */
.article-list { display: flex; flex-direction: column; }
.article-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 6px;
  border-bottom: 1px solid var(--line);
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: padding .32s var(--ease);
}
.article-row::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .45s var(--ease);
}
.article-row:hover { padding-inline: 20px; }
.article-row:hover::before { width: 100%; }
.article-row:hover .ar-title { color: var(--accent); }
.article-row.hidden { display: none; }

.ar-num { font-family: var(--mono); font-size: 12px; color: var(--fg-faint); }
.ar-title { font-size: clamp(18px,2.2vw,26px); font-weight: 500; transition: color .25s var(--ease); }
.ar-excerpt { color: var(--fg-mute); font-size: 14px; margin-top: 6px; max-width: 66ch; line-height: 1.6; }
.ar-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.ar-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--fg-soft); border: 1px solid var(--line); padding: 4px 10px; border-radius: 2px;
}
.ar-time { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); }
.ar-ext { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); opacity: .7; }

@media (max-width: 720px) {
  .article-featured { grid-template-columns: 1fr; }
  .article-featured-visual { min-height: 180px; }
  .article-row { grid-template-columns: 1fr; gap: 8px; }
  .ar-meta { flex-direction: row; align-items: center; }
}

/* ---- ARTICLE READER ---- */
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding-inline: var(--gut);
}

.article-header {
  padding-top: clamp(100px,14vw,160px);
  padding-bottom: clamp(48px,6vw,80px);
  border-bottom: 1px solid var(--line);
}

.article-body {
  padding-block: clamp(40px,6vw,72px);
  font-size: 17px;
  line-height: 1.78;
  color: var(--fg-soft);
}
.article-body h2 {
  font-family: var(--display);
  font-size: clamp(24px,3vw,34px);
  font-weight: 500;
  color: var(--fg);
  margin-top: 2.4em;
  margin-bottom: .6em;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.article-body h3 {
  font-family: var(--display);
  font-size: clamp(20px,2.2vw,26px);
  font-weight: 500;
  color: var(--fg);
  margin-top: 2em;
  margin-bottom: .5em;
}
.article-body p { margin-bottom: 1.4em; }
.article-body strong { color: var(--fg); font-weight: 600; }
.article-body em { color: var(--accent); font-style: italic; }
.article-body a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
  display: flex;
  flex-direction: column;
  gap: .5em;
}
.article-body li { color: var(--fg-soft); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--bg-1);
  border-radius: 0 3px 3px 0;
  font-style: italic;
  color: var(--fg-soft);
}
.article-body code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--accent-soft);
}
.article-body pre {
  background: #07080a;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow-x: auto;
  margin: 2em 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.article-body pre code {
  background: none;
  border: none;
  padding: 24px;
  font-size: 13.5px;
  line-height: 1.7;
  display: block;
  color: inherit;
}

/* ToC */
.article-toc {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 28px;
  margin-bottom: 2.4em;
}
.article-toc h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 16px;
}
.article-toc ol {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--fg-soft);
  text-decoration: none;
  transition: color .2s;
  border-bottom: 1px solid var(--line);
}
.article-toc a:last-of-type { border-bottom: none; }
.article-toc a::before {
  content: "0" counter(toc);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
}
.article-toc a:hover { color: var(--fg); }

/* Author card */
.article-author {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px 36px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-top: 3em;
}
.article-author img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  flex-shrink: 0;
  border: 2px solid var(--line);
}
.article-author h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.article-author p { font-size: 14px; color: var(--fg-soft); line-height: 1.6; }

@media (max-width: 640px) {
  .article-author { flex-direction: column; align-items: flex-start; }
}
