/* =========================================================
   ARTICLE READER STYLES
   ========================================================= */

/* ---------- Reading progress ---------- */
.reading-progress {
  position: sticky;
  top: 0;
  z-index: 101;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.reader__header {
  max-width: 760px;
  padding-top: clamp(2rem, 5vw, 3rem);
}

.reader__breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.reader__breadcrumb a:hover {
  color: var(--navy);
}

.reader__header h1 {
  font-size: var(--step-3);
}

.reader__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-bottom: 1rem;
}

.reader__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.not-found {
  max-width: 640px;
}

/* ---------- Cover image ---------- */
.reader__cover {
  max-width: 900px;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.reader__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

/* ---------- Body grid (share rail + content) ---------- */
.reader__body-grid {
  display: grid;
  grid-template-columns: 64px minmax(0, 700px);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.reader__share {
  position: sticky;
  top: 5rem;
  height: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.reader__share-label {
  font-size: 0.7rem;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.share-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.share-btn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.share-btn--copy.is-copied {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.reader__content {
  font-size: var(--step-0);
  color: var(--text);
}

.reader__content p {
  max-width: 68ch;
  margin-bottom: 1.4rem;
}

.reader__lede {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  color: var(--navy);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .reader__body-grid {
    grid-template-columns: 1fr;
  }

  .reader__share {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
  }

  .reader__share-label {
    margin: 0 0.4rem 0 0;
  }
}

/* ---------- Download link (article_file) ---------- */
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--navy);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: -1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.download-link:hover {
  border-color: var(--navy);
}

/* ---------- Author bio ---------- */
.author-bio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: center;
  max-width: 760px;
  margin-top: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  padding: 1.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.author-bio__portrait {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-bio__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-bio__body h3 {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}

.author-bio__body p {
  font-size: var(--step--1);
  color: var(--text);
  margin-bottom: 0.6rem;
}

@media (max-width: 560px) {
  .author-bio {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-bio__portrait {
    margin-inline: auto;
  }
}