/* 1. PROGRESS BAR */
.progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: transparent; z-index: 2000; }
.progress-bar { height: 100%; background: var(--color-yellow); width: 0%; transition: width 0.1s ease-out; }

/* 2. LAYOUT */
.article-layout { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.article-content { width: 100%; max-width: 100%; }

/* 3. FEATURED IMAGE */
.post-featured-image { margin-bottom: 30px; width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 15px rgba(8, 24, 50, 0.05); }
.post-featured-image img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* 4. UNIFIED TABLE OF CONTENTS (Mobile Accordion First) */
.article-sidebar { margin-bottom: 0; }
.toc-accordion { display: block; background: var(--color-gray); border-radius: 8px; padding: 16px 20px; border: 1px solid rgba(8, 24, 50, 0.05); margin-bottom: 32px; }
.toc-title { font-family: var(--font-main); font-weight: 800; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; cursor: pointer; outline: none; color: var(--color-black); display: block; position: relative; list-style: none; }
.toc-title::-webkit-details-marker { display: none; }
.toc-mobile-hint { text-transform: none; font-weight: 600; opacity: 0.5; margin-left: 6px; font-size: 0.8rem; }

.toc-list { list-style: none; padding: 16px 0 0 0; margin: 16px 0 0 0; border-top: 1px solid rgba(8, 24, 50, 0.08); }
.toc-list li { margin-bottom: 12px; }
.toc-list li:last-child { margin-bottom: 0; }
.toc-list li a { display: block; color: var(--color-black); font-family: var(--font-tagline); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: color 0.2s, border-color 0.2s; border-bottom: 2px solid rgba(253, 211, 44, 0.3); padding-bottom: 4px; }
.toc-list li a:active, .toc-list li a.active { color: var(--color-yellow); border-bottom-color: var(--color-yellow); }

/* 5. AUTHOR FOOTER */
.article-footer { margin-top: 50px; padding-top: 40px; border-top: 1px solid rgba(8, 24, 50, 0.1); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.author-box { display: flex; align-items: center; gap: 16px; }
.author-box img { width: 50px; height: 50px; border-radius: 50%; }
.author-info h4 { font-family: var(--font-main); font-size: 1.05rem; font-weight: 700; color: var(--color-black); margin: 0 0 2px 0; }
.author-info p { font-family: var(--font-tagline); font-size: 0.9rem; margin: 0; color: rgba(8, 24, 50, 0.6); }
.share-links { display: flex; align-items: center; gap: 12px; width: 100%; }
.share-links > span { font-family: var(--font-main); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--color-black); }
.share-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--color-gray); display: flex; align-items: center; justify-content: center; color: var(--color-black); transition: transform 0.2s, background 0.2s; }
.share-btn:hover { background: var(--color-yellow); transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; }

/* --- SCALING UP TO DESKTOP --- */
@media (min-width: 768px) {
    .post-featured-image { margin-bottom: 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(8, 24, 50, 0.08); }
    .article-footer { margin-top: 60px; flex-direction: row; justify-content: space-between; align-items: center; }
    .author-box img { width: 60px; height: 60px; }
    .share-links { width: auto; }
}

@media (min-width: 992px) {
    .article-layout { grid-template-columns: 250px 1fr; gap: 60px; max-width: 1100px; }
    .article-content { max-width: 720px; }
    
    /* Desktop TOC override */
    .article-sidebar { display: block; position: sticky; top: 120px; }
    .toc-accordion { background: transparent; padding: 0; border: none; margin-bottom: 0; }
    .toc-title { cursor: default; pointer-events: none; margin-bottom: 16px; }
    .toc-mobile-hint { display: none; }
    .toc-list { border-top: none; padding-top: 0; margin-top: 0; border-left: 2px solid rgba(8, 24, 50, 0.1); }
    .toc-list li a { padding: 8px 0 8px 16px; color: rgba(8, 24, 50, 0.6); border-bottom: none; border-left: 2px solid transparent; margin-left: -2px; }
    .toc-list li a:hover, .toc-list li a.active { color: var(--color-black); border-left-color: var(--color-yellow); font-weight: 700; }
}