
.reading-progress-bar {
  position: fixed;
  top: 68px;
  left: 0;
  height: 5px;
  background: var(--primary-color);
  width: 0%; 
  z-index: 9999;
  transition: width 0.1s linear;
  /* box-shadow: 0 2px 10px var(--color-accent-primary); */
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* --- Article Header --- */
.article-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.article-category {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.article-title {
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--color-text-heading);
  margin-bottom: var(--space-lg);
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-body);
}

/* ✨ ENHANCED: Added icon style to meta */
.article-meta .fa-clock {
  margin-right: 4px;
  color: var(--color-accent-primary);
}

.author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}

.author-info {
  text-align: left;
  line-height: 1.4;
}
.author-name {
  display: block;
  font-weight: 700;
  color: var(--color-text-heading);
}

/* --- Feature Image --- */
.article-feature-image {
  margin: 0 0 var(--space-xl) 0;
}
.article-feature-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-sm);
}
.article-feature-image figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-body);
  font-style: italic;
}

/* --- Article Body (The core reading experience) --- */
.article-body {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text-body);
}

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

.article-body h2,
.article-body h3 {
  font-family: var(--font-heading);
  margin: 2em 0 1em 0;
  line-height: 1.3;
  color: var(--color-text-heading);
  scroll-margin-top: 100px; 
}
.article-body h2 {
  font-size: 2rem;
}
.article-body h3 {
  font-size: 1.6rem;
}

.article-body blockquote {
  margin: 2em 0;
  padding-left: 1.5em;
  border-left: 4px solid var(--color-accent-primary);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-text-heading);
}

.article-body ul {
  margin: 2em 0;
  padding-left: 2em;
}
.article-body ul li {
  margin-bottom: 0.8em;
}

.article-body a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}
.article-body a:hover {
  background-color: var(--color-accent-primary);
  color: #000;
  text-decoration: none;
}

.image-inset {
  width: 100%;
  border-radius: var(--border-radius);
  margin: 2em 0;
}

/* ✨ ADDED: Table of Contents Styling */
.table-of-contents {
  background: rgba(30, 30, 30, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.toc-title {
  font-size: 1.4rem !important;
  color: var(--color-text-heading) !important;
  margin-top: 0 !important;
  margin-bottom: var(--space-md) !important;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}
#toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#toc-list li a {
  text-decoration: none;
  color: var(--color-text-body);
  display: block;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
}
#toc-list li a:hover {
  color: var(--color-accent-primary);
  transform: translateX(5px);
  background-color: transparent;
}
#toc-list .toc-h3 {
  padding-left: 1.5rem;
  font-size: 0.9em;
}


/* --- Article Footer (Sharing & Tags) --- */
.article-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.social-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.social-share span {
  font-weight: 700;
  color: var(--color-text-heading);
}
.social-share a {
  font-size: 1.2rem;
  color: var(--color-text-body);
  text-decoration: none;
}
.social-share a:hover {
  color: var(--color-accent-primary);
  transform: scale(1.1);
}

/* --- Post Navigation --- */
.post-navigation {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.post-navigation a {
  font-family: var(--font-body);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  /* ✨ ENHANCED: Better button styling */
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  color: var(--color-text-body);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}
.post-navigation a .fa-solid {
  transition: transform 0.3s ease;
}

.post-navigation a:hover {
  background-color: rgba(0, 153, 204, 0.15);
  border-color: var(--color-accent-primary);
  color: #e0f7ff;
  box-shadow: 0 2px 8px rgba(0, 153, 204, 0.1);
  transform: scale(1.05);
}

.post-navigation a:hover .fa-solid {
  transform: translateX(-4px);
}
.post-navigation .next-post:hover .fa-solid {
  transform: translateX(4px);
}

/* --- Responsive Adjustments for Article Page --- */
@media (max-width: 768px) {
  .article-title {
    font-size: 2.5rem;
  }
  .article-body {
    font-size: 1.1rem;
  }
  .article-container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 2rem;
  }
  .article-footer,
  .post-navigation {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-navigation {
    width: 100%;
  }
  .post-navigation a {
    width: 100%;
    justify-content: center;
  }
  .post-navigation .next-post {
    justify-content: space-between;
    flex-direction: row-reverse;
  }
}

::selection {
  background-color: var(--color-accent-primary);
  color: #000;
}
