/* ============================================
   ARTICLE PAGE — INDIVIDUAL ARTICLE STYLES
   Used by article-*.html pages
   ============================================ */

body { background: var(--cream-50); }

/* Article header — uses .pub-header from publications.css */

/* Back to publications button (top + bottom) */
.back-bar {
  background: var(--cream-50);
  border-bottom: 1px solid var(--ink-10);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(250, 247, 242, 0.92);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-700);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--navy-700);
  color: var(--cream);
}

.back-link svg {
  transition: transform 0.3s var(--ease);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* Bottom back link (more prominent) */
.back-bottom {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--ink-10);
  text-align: center;
}

.back-bottom .back-link {
  padding: 16px 28px;
  background: var(--navy-900);
  color: var(--cream);
  font-size: 13px;
}

.back-bottom .back-link:hover {
  background: var(--navy-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   ARTICLE BODY
   ============================================ */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 0 120px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}

.article-body > p,
.article-body > section > p {
  margin-bottom: 24px;
  color: var(--ink-70);
}

.article-body p strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body p em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
  font-size: 1.05em;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 64px 0 24px;
  line-height: 1.15;
  font-variation-settings: "opsz" 56;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 40px 0 14px;
  line-height: 1.2;
}

.article-body h3 + p { margin-top: 0; }

.article-body ul,
.article-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--ink-70);
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.article-body li strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 7px;
  background: var(--cream-100);
  border-radius: 4px;
  color: var(--navy-700);
  border: 1px solid var(--ink-10);
}

.article-body blockquote {
  margin: 36px 0;
  padding: 20px 28px;
  border-left: 3px solid var(--navy-700);
  background: var(--cream-100);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
}

.article-body blockquote p { margin: 0; color: var(--ink); }

.article-body a {
  color: var(--navy-700);
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s;
}

.article-body a:hover { opacity: 0.7; }

/* ============================================
   ARTICLE TITLE & META in header
   ============================================ */
.article-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  font-variation-settings: "opsz" 86;
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.article-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--blue-300);
  font-weight: 400;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.article-meta .pub-tag {
  background: var(--cream);
  color: var(--navy-900);
}

.article-meta-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-70);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-meta-item::before {
  content: "·";
  margin-right: 16px;
  color: var(--white-30);
}

.article-meta .pub-tag::before { content: ""; margin: 0; }

.article-abstract {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.5;
  color: var(--white-90);
  max-width: 760px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.article-abstract em {
  font-style: normal;
  color: var(--blue-300);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ============================================
   ILLUSTRATIONS — figure container
   ============================================ */
.illustration {
  margin: 48px 0;
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--ink-10);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.illustration-svg {
  width: 100%;
  height: auto;
  display: block;
}

.illustration-caption {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-10);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-50);
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.illustration-caption strong {
  color: var(--navy-700);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .illustration { padding: 24px; margin: 32px 0; }
  .article-body { padding: 60px 0 80px; }
}

/* Dark variant for illustrations on light bg */
.illustration.dark {
  background: var(--navy-950);
  border-color: var(--navy-800);
  color: var(--cream);
}

.illustration.dark .illustration-caption {
  border-top-color: var(--white-10);
  color: var(--white-50);
}

.illustration.dark .illustration-caption strong {
  color: var(--blue-300);
}

/* Comparison-table style illustration */
.illustration-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.illustration-table th {
  text-align: left;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--navy-700);
  border-bottom: 2px solid var(--navy-700);
  background: var(--cream-100);
}

.illustration-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-10);
  color: var(--ink-70);
  vertical-align: top;
  line-height: 1.5;
}

.illustration-table tbody tr:last-child td {
  border-bottom: 0;
}

.illustration-table td strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.illustration-table .check {
  color: var(--accent-green);
  font-weight: 600;
}

.illustration-table .dash {
  color: var(--ink-30);
}

/* "TL;DR" / takeaway box */
.takeaway {
  margin: 40px 0;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(46, 59, 196, 0.06), rgba(46, 59, 196, 0.02));
  border: 1px solid rgba(46, 59, 196, 0.15);
  border-left: 4px solid var(--navy-700);
  border-radius: var(--r);
}

.takeaway-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-700);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  font-weight: 600;
}

.takeaway p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
}

.takeaway p strong {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
}

/* Inline KBD-ish chips for protocol/tech names */
.tech {
  display: inline-block;
  padding: 1px 8px;
  background: var(--cream-100);
  border: 1px solid var(--ink-10);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--navy-700);
  font-weight: 500;
}
