/* ============================================================
   THE LITARN — Article Page Styles
   article.css: progress bar, header, body, pull quotes, sidebar
   ============================================================ */

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  height: 1px;
  background: var(--rose);
  width: 0%;
  z-index: 300;
  transition: width 0.08s linear;
}

/* ===== NAV ARTICLE ADDITIONS ===== */
.nav__article-extras {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.font-btn {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gray);
  transition: color var(--transition);
  padding: 0.2rem 0.25rem;
  line-height: 1;
}

.font-btn:hover {
  color: var(--ink);
}

.font-sep {
  color: var(--taupe);
  font-size: 10px;
}

.bookmark-btn {
  background: none;
  border: none;
  color: var(--gray);
  display: flex;
  align-items: center;
  transition: color var(--transition);
  padding: 0.25rem;
}

.bookmark-btn:hover,
.bookmark-btn.bookmarked {
  color: var(--ink);
}

.bookmark-btn svg {
  width: 16px;
  height: 16px;
}

.bookmark-icon-fill {
  display: none;
}

.bookmark-btn.bookmarked .bookmark-icon-outline {
  display: none;
}

.bookmark-btn.bookmarked .bookmark-icon-fill {
  display: block;
}

/* ===== ARTICLE HEADER ===== */
.article-header {
  max-width: 680px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  text-align: center;
}

.article-header__meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 1.5rem;
}

.article-header__title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.article-header__deck {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.article-header__byline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--taupe);
  display: block;
  margin-bottom: 1.75rem;
}

.article-header__rule {
  border: none;
  border-top: 0.5px solid rgba(18, 18, 18, 0.15);
}

/* ===== ARTICLE HERO IMAGE ===== */
.article-hero-image {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.article-hero-image__inner {
  aspect-ratio: 16 / 7;
  background: var(--beige);
  position: relative;
  overflow: hidden;
}

.article-hero-image__caption {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-style: italic;
  color: var(--taupe);
  text-align: right;
  padding: 0.6rem 0 0;
}

/* ===== ARTICLE LAYOUT ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 5rem;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  padding: 4rem 0 3rem;
  min-width: 0;
}

.article-body p {
  font-family: 'Inter', sans-serif;
  font-size: var(--article-size, clamp(15px, 1.6vw, 17px));
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink);
  letter-spacing: 0.012em;
  margin-bottom: 1.75rem;
}

/* Drop cap */
.article-body > p:first-of-type::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4.2em;
  float: left;
  line-height: 0.82;
  color: var(--ink);
  margin-right: 0.07em;
  margin-top: 0.1em;
  margin-bottom: -0.05em;
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--ink);
  margin: 3.5rem 0 1.5rem;
  line-height: 1.2;
}

/* ===== PULL QUOTE ===== */
.pull-quote {
  width: calc(100% + 4rem);
  margin-left: -2rem;
  background: var(--beige);
  padding: 3.5rem 3rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pull-quote__brush {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
}

.pull-quote__text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: var(--ink);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ===== CALLOUT BOX ===== */
.callout-box {
  border-left: 1px solid var(--rose);
  background: rgba(220, 199, 199, 0.12);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
}

.callout-box__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 0.6rem;
}

.callout-box__text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.75;
  margin: 0;
}

/* ===== KEY CONCEPTS TABLE ===== */
.concepts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
}

.concepts-table tr {
  border-bottom: 0.5px solid var(--taupe);
}

.concepts-table tr:first-child {
  border-top: 0.5px solid var(--taupe);
}

.concepts-table td {
  padding: 0.9rem 0;
  vertical-align: top;
}

.concepts-table td:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  width: 38%;
  padding-right: 1.25rem;
}

.concepts-table td:last-child {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.7;
}

/* ===== INLINE FIGURE ===== */
.article-figure {
  margin: 2.5rem 0;
}

.article-figure__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--beige);
  position: relative;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.article-figure__caption {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-style: italic;
  color: var(--taupe);
}

/* ===== FOOTNOTE ===== */
.article-footnote {
  border-top: 0.5px solid rgba(18, 18, 18, 0.15);
  padding-top: 1.75rem;
  margin-top: 3.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--taupe);
  line-height: 1.75;
}

/* ===== ARTICLE SIDEBAR ===== */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  padding: 4rem 0 2rem;
  min-width: 0;
}

.sidebar__progress {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid rgba(18, 18, 18, 0.10);
}

.sidebar__progress-track {
  width: 100%;
  height: 1px;
  background: var(--beige);
  margin-bottom: 0.6rem;
  position: relative;
}

.sidebar__progress-fill {
  height: 100%;
  background: var(--rose);
  width: 0%;
  transition: width 0.1s linear;
  position: absolute;
  top: 0;
  left: 0;
}

.sidebar__progress-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--taupe);
}

.sidebar__toc-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 1rem;
}

.sidebar__toc {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.toc-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--taupe);
  padding: 0.4rem 0.75rem;
  border-left: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  display: block;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--ink);
}

.toc-link.active {
  color: var(--ink);
  border-left-color: var(--rose);
}

.sidebar__tags {
  padding-top: 1.5rem;
  border-top: 0.5px solid rgba(18, 18, 18, 0.10);
  margin-bottom: 1.5rem;
}

.sidebar__tags-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 0.8rem;
}

.tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray);
  border-bottom: 0.5px solid rgba(110, 106, 102, 0.4);
  padding-bottom: 1px;
  display: inline-block;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
  transition: color var(--transition), border-color var(--transition);
}

.tag:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.sidebar__share {
  padding-top: 1.5rem;
  border-top: 0.5px solid rgba(18, 18, 18, 0.10);
}

.share-btn {
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--taupe);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  padding-bottom: 1px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.share-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ===== ARTICLE FOOTER ===== */
.article-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.article-footer__tags {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid rgba(18, 18, 18, 0.10);
}

/* Author Bio */
.author-bio {
  background: var(--beige);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.author-bio__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-bio__info {
  flex: 1;
}

.author-bio__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.author-bio__role {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 0.75rem;
}

.author-bio__text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.75;
}

/* Related articles */
.related-section {
  border-top: 0.5px solid rgba(18, 18, 18, 0.10);
  padding-top: 2.5rem;
}

.related-section__title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  display: block;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* ===== MOBILE BOTTOM BAR ===== */
.mobile-reading-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  padding: 0.875rem 1.5rem;
  z-index: 150;
  align-items: center;
  justify-content: space-between;
}

.mobile-reading-bar__progress {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(244, 241, 236, 0.65);
}

.mobile-reading-bar__bookmark {
  background: none;
  border: none;
  color: rgba(244, 241, 236, 0.65);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.mobile-reading-bar__bookmark:hover {
  color: var(--cream);
}

.mobile-reading-bar__bookmark svg {
  width: 18px;
  height: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .article-sidebar {
    display: none;
  }

  .mobile-reading-bar {
    display: flex;
  }

  .article-body {
    padding-bottom: 5rem;
  }

  .pull-quote {
    width: 100%;
    margin-left: 0;
  }

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

  .nav__article-extras {
    gap: 0.6rem;
  }
}

@media (max-width: 600px) {
  .article-header {
    padding: 4rem 1.5rem 2.5rem;
  }

  .article-hero-image {
    padding: 0 1.5rem;
  }

  .article-layout {
    padding: 0 1.5rem;
  }

  .author-bio {
    flex-direction: column;
  }
}
