/* Post detail page. Loaded only by posts/show (pushed via @push('head')). */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #2dd4bf);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
}

/* --- Outline (table of contents) ------------------------------------- */
.post-outline {
    margin: 0 0 32px;
    padding: 20px 24px;
    background: var(--bg-alt, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 8px);
}

.post-outline-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    margin: 0 0 12px;
}

.post-outline ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-outline li { margin: 0; }

.post-outline a {
    display: block;
    padding: 6px 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text, #1c1917);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.post-outline a:hover,
.post-outline a:focus-visible {
    background: var(--primary-light, #ccfbf1);
    color: var(--primary, #0d9488);
}

.post-outline .outline-h3 { padding-left: 26px; font-size: 0.85rem; }

.post-outline a.is-active {
    border-left-color: var(--primary, #0d9488);
    background: var(--primary-light, #ccfbf1);
    color: var(--primary, #0d9488);
    font-weight: 600;
}

/* Sticky site header must not cover a heading we just jumped to. */
.article-body h2,
.article-body h3 {
    scroll-margin-top: calc(var(--header-height, 64px) + 16px);
}

.article-body h2:first-child,
.article-body h3:first-child { margin-top: 0; }

/* --- Share row -------------------------------------------------------- */
.post-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-share-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    margin-right: 2px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, filter 0.15s;
}

.share-btn:hover,
.share-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
    color: #fff;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.copy { background: #475569; }

/* --- Category / tag groups ------------------------------------------- */
.post-taxonomy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
}

.post-taxonomy-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.post-taxonomy-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    min-width: 72px;
}

.post-taxonomy-row .tag {
    font-size: 0.82rem;
    padding: 5px 12px;
}

/* --- Author block ----------------------------------------------------- */
.author-card .author-facts {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

.author-facts .dot { opacity: 0.4; }

@media (max-width: 640px) {
    .post-outline { padding: 16px 18px; }
    .post-share .share-btn span { display: none; }
    .post-taxonomy-label { min-width: 100%; }
}
