/* Article Page — Medium/Substack-inspired reading experience */
/* Nuclear reset: override ALL global styles that leak into article pages */

body.article-body section {
  display: block;
  margin: 0;
  padding: 0;
  height: auto;
  min-height: auto;
  padding-bottom: 0;
  box-sizing: border-box;
  background: none;
}

body.article-body .section-container {
  display: block;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #1a1a1a;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Layout — single column, everything stacks */
/* Override the global `article { display: flex; width: 10rem }` from style.css */
article.article-page {
  display: block;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  justify-content: initial;
  gap: initial;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}

.article-back:hover {
  color: #1a1a1a;
  text-decoration: none;
}

/* Article Header */
.article-header {
  display: block;
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #eee;
}

.article-category {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: #e8d5ff;
  color: #4a1d8e;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.article-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-align: left;
}

.article-subtitle {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  text-align: left;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #888;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Article Content — single column reading */
.article-content {
  display: block;
  width: 100%;
}

.article-content section {
  display: block;
  margin-bottom: 2.5rem;
}

.article-content p {
  font-size: 1.12rem;
  line-height: 1.78;
  color: #1a1a1a;
  margin-bottom: 1.4rem;
}

.article-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

/* Blockquotes (filmmaker quotes) */
.article-content blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid #1a1a1a;
  background: #fafafa;
  border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 0;
  font-style: italic;
}

.article-content blockquote cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #888;
  font-style: normal;
}

/* Callout boxes (key insights) */
.callout {
  margin: 2rem 0;
  padding: 1.5rem 1.8rem;
  background: #f3edff;
  border-radius: 10px;
  border: 1px solid #e0d4f5;
}

.callout p {
  font-size: 1.02rem;
  color: #3d1d72;
  margin-bottom: 0;
  font-weight: 500;
}

/* Full-bleed figures (architecture diagram) */
figure {
  display: block;
  margin: 2.5rem 0;
}

figure.full-bleed {
  width: calc(100% + 4rem);
  margin-left: -2rem;
  margin-right: -2rem;
}

figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

figure figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: #888;
  margin-top: 1rem;
  font-style: italic;
}

/* Tables (rubric) */
.rubric-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rubric-table thead {
  background: #1a1a1a;
  color: white;
}

.rubric-table th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rubric-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.rubric-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.rubric-table tbody tr:last-child td {
  border-bottom: none;
}

/* Decision Ladder */
.decision-ladder {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 2rem 0;
}

.ladder-band {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  gap: 0.5rem;
}

.ladder-band .ladder-score {
  font-weight: 700;
  min-width: 60px;
}

.ladder-band .ladder-action {
  font-weight: 600;
  min-width: 90px;
}

.ladder-band .ladder-desc {
  color: #555;
  font-size: 0.9rem;
}

.ladder-band.keep {
  background: #e6f9e6;
  border: 1px solid #b8e6b8;
}

.ladder-band.refine {
  background: #fff8e6;
  border: 1px solid #f0dfa0;
}

.ladder-band.regen {
  background: #fff0e6;
  border: 1px solid #f0c8a0;
}

.ladder-band.escalate {
  background: #ffe6e6;
  border: 1px solid #f0a8a8;
}

/* Lists */
.article-content ul, .article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

/* Inline code */
.article-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  background: #f4f4f4;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #e83e8c;
}

/* Tech stack grid */
.tech-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.4rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.tech-grid dt {
  font-weight: 600;
  color: #1a1a1a;
}

.tech-grid dd {
  color: #555;
  margin: 0;
}

/* Share strip */
.article-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  text-align: center;
}

.article-share p {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.article-share-buttons {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.article-share-buttons .share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  background: white;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.article-share-buttons .share-btn:hover {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
  text-decoration: none;
}

/* Footer contact */
.article-footer-contact {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid #eee;
  max-width: 680px;
  margin: 0 auto;
}

.article-footer-contact > p {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .article-page {
    padding: 1.2rem 1.2rem 2.5rem;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-subtitle {
    font-size: 1.05rem;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .article-content p {
    font-size: 1.02rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  figure.full-bleed {
    width: calc(100% + 2.4rem);
    margin-left: -1.2rem;
    margin-right: -1.2rem;
  }

  figure img {
    border-radius: 0;
  }

  .rubric-table {
    font-size: 0.85rem;
  }

  .rubric-table th, .rubric-table td {
    padding: 0.6rem 0.7rem;
  }

  .ladder-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 0.2rem 0;
  }

  .tech-grid dt {
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .article-header h1 {
    font-size: 1.55rem;
  }

  .article-subtitle {
    font-size: 0.95rem;
  }

  .article-content p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .article-content h2 {
    font-size: 1.3rem;
  }

  .callout {
    padding: 1rem;
  }
}
