/* ================================
   ARTICLE DETAIL PAGE
   ================================ */

/* Article Hero */
.article-hero {
  position: relative;
  min-height: clamp(360px, 45vh, 480px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(13, 13, 15, 0.3) 0%,
      rgba(13, 13, 15, 0.5) 40%,
      rgba(13, 13, 15, 0.92) 80%,
      var(--ink) 100%);
}

/* Clean hero variant — no background image/gradient */
.article-hero-clean {
  min-height: auto;
  align-items: flex-start;
  border-bottom: 1px solid var(--ink-mid);
}

.article-hero-clean .article-hero-inner {
  padding: calc(var(--nav-height) + 34px) 0 30px;
}

.article-hero-clean .article-hero-content {
  max-width: 900px;
}

/* Featured Image (between hero and content) */
.article-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.article-featured-img {
  padding: 0;
}

.article-featured-img img {
  width: 100%;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: calc(var(--nav-height) + 22px) 0 30px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
}

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

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.article-hero-content {
  max-width: 860px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.article-meta-top .blog-category {
  position: static;
}

.article-meta-top time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.article-read-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 900;
  line-height: 1.18;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.article-excerpt {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 0;
}

.article-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-author strong {
  display: block;
  font-size: 15px;
  color: var(--white);
}

.article-author span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-label {
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.share-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  color: var(--silver);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.share-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(212, 160, 74, 0.08);
  transform: translateY(-2px);
}

/* Article Grid Layout */
.article-layout {
  padding: 64px 0 80px;
}

.article-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

/* Sidebar / Table of Contents */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.toc-card {
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  border-radius: 16px;
  padding: 24px;
}

.toc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-mid);
}

.toc-nav {
  display: flex;
  flex-direction: column;
}

.toc-link {
  display: block;
  font-size: 13px;
  color: var(--silver);
  padding: 8px 0 8px 16px;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--white);
  border-left-color: var(--ink-mid);
}

.toc-link.active {
  color: var(--amber);
  border-left-color: var(--amber);
  font-weight: 500;
}

/* Article Prose Typography */
.prose {
  max-width: 860px;
}

/* Keep imported article HTML visible even if source content contains reveal classes. */
.content-no-reveal .reveal,
.content-no-reveal .reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 56px 0 20px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-mid);
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin: 36px 0 14px;
}

.prose p {
  font-size: 16.5px;
  color: var(--mist);
  line-height: 1.85;
  margin-bottom: 20px;
}

.prose p a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212, 160, 74, 0.3);
  transition: text-decoration-color 0.3s ease;
}

.prose p a:hover {
  text-decoration-color: var(--amber);
}

.prose strong {
  color: var(--white);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 20px 0 28px;
  padding-left: 0;
  list-style: none;
}

.prose li {
  position: relative;
  font-size: 16px;
  color: var(--mist);
  line-height: 1.8;
  padding: 6px 0 6px 28px;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.6;
}

.prose ol {
  counter-reset: article-counter;
}

.prose ol li {
  counter-increment: article-counter;
}

.prose ol li::before {
  content: counter(article-counter);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(212, 160, 74, 0.12);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blockquote */
.prose blockquote {
  margin: 36px 0;
  padding: 28px 32px;
  border-left: 3px solid var(--amber);
  background: rgba(212, 160, 74, 0.04);
  border-radius: 0 16px 16px 0;
}

.prose blockquote p {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  color: var(--cloud);
  line-height: 1.7;
  margin-bottom: 12px;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose blockquote cite {
  display: block;
  font-size: 13px;
  color: var(--slate);
  font-style: normal;
  margin-top: 8px;
}

/* Tip Box */
.article-tip {
  display: flex;
  gap: 16px;
  padding: 24px;
  margin: 28px 0;
  background: rgba(212, 160, 74, 0.06);
  border: 1px solid rgba(212, 160, 74, 0.15);
  border-radius: 16px;
}

.tip-icon {
  flex-shrink: 0;
  color: var(--amber);
  margin-top: 2px;
}

.article-tip strong {
  display: block;
  font-size: 14px;
  color: var(--amber);
  margin-bottom: 6px;
}

.article-tip p {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.6;
  margin: 0;
}

/* Stats Row */
.article-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 36px 0;
}

.article-stat {
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.article-stat:hover {
  border-color: rgba(212, 160, 74, 0.3);
}

.article-stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 8px;
}

.article-stat-label {
  font-size: 13px;
  color: var(--silver);
}

/* In-article CTA */
.article-cta-card {
  margin: 48px 0 0;
  padding: 40px;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.08), rgba(212, 160, 74, 0.02));
  border: 1px solid rgba(212, 160, 74, 0.2);
  border-radius: 20px;
  text-align: center;
}

.article-cta-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.article-cta-card p {
  font-size: 15px;
  color: var(--silver);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Tags & Share Bottom Bar */
.article-bottom-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 56px 0 8px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-mid);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tags-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 4px;
}

.tag {
  font-size: 13px;
  color: var(--silver);
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  padding: 6px 16px;
  border-radius: 100px;
  transition: all 0.3s ease;
}

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

/* Author Card */
.author-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  border-radius: 20px;
  margin-bottom: 48px;
}

.author-avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
  flex-shrink: 0;
}

.author-card-info strong {
  display: block;
  font-size: 17px;
  color: var(--white);
  margin-bottom: 8px;
}

.author-card-info p {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.7;
  margin-bottom: 12px;
}

.author-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
}

.author-link:hover {
  color: var(--amber-light);
}

/* Prev/Next Navigation */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.article-nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--ink-light);
  border: 1px solid var(--ink-mid);
  border-radius: 16px;
  transition: all 0.3s var(--ease-out-expo);
}

.article-nav-item:hover {
  border-color: rgba(212, 160, 74, 0.2);
  transform: translateY(-2px);
}

.article-nav-item.next {
  text-align: right;
}

.nav-direction {
  font-size: 12px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

/* Sidebar Ad Banner */
.sidebar-ad {
  margin-top: 24px;
  text-align: center;
}

.sidebar-ad img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Related Posts */
.related-posts {
  padding: 100px 0;
  background: var(--ink-light);
}

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

  .article-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-sidebar {
    position: static;
    order: -1;
    margin-bottom: 48px;
  }

  .toc-card {
    max-width: 100%;
  }

  .toc-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .toc-link {
    border-left: none;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--ink);
    border: 1px solid var(--ink-mid);
    font-size: 12px;
  }

  .toc-link.active {
    background: rgba(212, 160, 74, 0.1);
    border-color: rgba(212, 160, 74, 0.3);
  }

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

@media (max-width: 768px) {
  .article-hero {
    min-height: 280px;
  }

  .article-hero-inner {
    padding-bottom: 20px;
  }

  .article-author-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .article-stats-row {
    grid-template-columns: 1fr;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

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

  .prose blockquote {
    padding: 20px 24px;
    margin: 28px 0;
  }

  .article-cta-card {
    padding: 28px 24px;
  }

  .article-bottom-bar {
    margin: 44px 0 4px;
    padding-top: 24px;
    align-items: flex-start;
    gap: 14px;
  }

  .article-tags {
    width: 100%;
  }

  .article-share {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .share-links {
    justify-content: flex-start;
  }
}
