/* Technical article pages for portfolio projects: paper structure (abstract,
   numbered sections, captioned figures, stack table, citation block) composed
   in the site's editorial design language. */

.article {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 48px) 96px;
  flex: 1;
}

.article-back {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
}
.article-back:hover { color: var(--accent); }

.article-header { margin: 32px 0 40px; }
.article-tags { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.article-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-title {
  font-size: clamp(32px, 4.5vw, 48px);
  letter-spacing: -0.02em;
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 16px;
  text-wrap: balance;
}
.article-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.article-meta a { color: var(--accent); border-bottom: 0.5px solid rgba(36, 82, 224, 0.3); }
.article-meta a:hover { border-bottom-color: var(--accent); }

/* Abstract box, like a paper's abstract */
.article-abstract {
  background: var(--bg-alt);
  border: 0.5px solid var(--line);
  padding: 24px 28px;
  margin: 0 0 48px;
}
.article-abstract .abstract-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 10px;
}
.article-abstract p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0; text-wrap: pretty; }

/* Numbered sections */
.article-section { margin: 0 0 44px; }
.article-section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.article-section h2 .section-num { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--accent); }
.article-section p { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 14px; text-wrap: pretty; }
.article-section ul { margin: 0 0 14px; padding-left: 22px; }
.article-section li { font-size: 16px; line-height: 1.75; color: var(--muted); margin-bottom: 6px; }
.article-section strong { color: var(--fg); font-weight: 500; }
.article-section a { color: var(--accent); border-bottom: 0.5px solid rgba(36, 82, 224, 0.3); }
.article-section a:hover { border-bottom-color: var(--accent); }
.article-section code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-alt);
  border: 0.5px solid var(--line);
  padding: 1px 6px;
}

/* Captioned figures; the placeholder variant marks images still to provide */
.article-figure { margin: 24px 0 28px; }
.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5px solid var(--line);
  background: #fff;
}
.figure-placeholder {
  border: 1px dashed var(--line-strong);
  background: var(--bg-alt);
  min-height: 240px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  padding: 20px;
  text-align: center;
}
.article-figure video {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5px solid var(--line);
  background: #fff;
}
.article-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 10px;
  line-height: 1.6;
}

/* Stack table */
.stack-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; }
.stack-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  text-align: left;
  padding: 0 16px 10px 0;
  border-bottom: 0.5px solid var(--line-strong);
}
.stack-table td {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  padding: 12px 16px 12px 0;
  border-bottom: 0.5px solid var(--line);
  vertical-align: top;
}
.stack-table td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  white-space: nowrap;
}

/* BibTeX-style citation block, a nod to the paper form */
.article-cite {
  background: var(--bg-alt);
  border: 0.5px solid var(--line);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted-2);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

/* Inline SVG architecture diagrams */
.article-diagram {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 0.5px solid var(--line);
}
.article-diagram .diag-box { fill: var(--bg); stroke: var(--line-strong); }
.article-diagram .diag-box--llm { fill: #fff; stroke: var(--accent); }
.article-diagram .diag-zone { fill: none; stroke: var(--line); stroke-dasharray: 5 4; }
.article-diagram .diag-lbl { font-family: var(--font-mono); font-size: 12px; fill: var(--fg); }
.article-diagram .diag-sub { font-family: var(--font-mono); font-size: 10px; fill: var(--muted-2); }
.article-diagram .diag-tag { font-family: var(--font-mono); font-size: 10px; fill: var(--accent); }
.article-diagram .diag-arrow { stroke: var(--muted-2); stroke-width: 1.2; fill: none; }

/* In-text reference markers and the numbered bibliography */
.ref-mark { font-family: var(--font-mono); font-size: 12px; color: var(--accent); border-bottom: none !important; }
.article-refs { margin: 0; padding-left: 24px; }
.article-refs li { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin-bottom: 10px; }

.article-footer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 0.5px solid var(--line);
  padding-top: 32px;
}
