/* ── Reading progress bar (fixed top) ── */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--color-accent);
  z-index: 200;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
}

/* ── Breadcrumb ── */

.breadcrumb {
  padding: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb a {
  color: var(--color-text-subtle);
  transition: color var(--t-fast);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb__sep {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
}

/* ── Article header ── */

.article-header {
  padding: var(--space-8) 0 var(--space-6);
}

.article-header__tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.article-header__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.article-header__description {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.article-header__meta-author {
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

/* ── Article body typography ── */

.article-body {
  padding: var(--space-10) 0;
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text);
}

.article-body p {
  margin-bottom: 1.6em;
}

.article-body h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--color-text);
  margin-top: 2.5em;
  margin-bottom: 0.75em;
}

.article-body h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--color-text);
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.article-body blockquote {
  margin: 2em 0;
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.article-body blockquote p {
  margin-bottom: 0;
}

.article-body code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  padding: 2px 6px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.article-body pre {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin-bottom: 1.6em;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.6em;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  margin-bottom: 0.5em;
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--t-fast);
}

.article-body a:hover {
  color: var(--color-accent-dark);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

.article-body strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

/* ── Share section ── */

.share-section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.share-section__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

/* ── Author card ── */

.author-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}

.author-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-card__avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
}

.author-card__info {
  flex: 1;
  min-width: 0;
}

.author-card__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.author-card__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.author-card__social {
  display: flex;
  gap: var(--space-2);
}

/* ── Related articles ── */

.related-section {
  padding: var(--space-8) 0 var(--space-4);
  border-top: 1px solid var(--color-border);
}

.related-section__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .article-header__title {
    font-size: var(--text-3xl);
  }

  .article-header__description {
    font-size: var(--text-lg);
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}
