/* ==========================================================================
   Secure Affair — Article page
   ========================================================================== */

.reading-progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 200; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

.article-header { padding: 32px 0 30px; }
.article-header .breadcrumb { margin-bottom: 26px; }
.article-header__title { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; margin: 14px 0 18px; }
.article-header__dek { font-size: 21px; line-height: 1.5; color: var(--text-2); }

.byline {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    margin-top: 28px; padding-block: 18px; border-block: 1px solid var(--line);
}
.byline__author { display: flex; align-items: center; gap: 14px; }
.byline__author span { display: grid; line-height: 1.35; }
.byline__author strong { font-family: var(--font-head); font-size: 16px; }
.byline__author small { color: var(--muted); font-size: 13px; }
.byline__author:hover strong { color: var(--secondary); }
.byline__dates { display: flex; gap: 26px; margin: 0; }
.byline__dates div { display: grid; }
.byline__dates dt { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-head); }
.byline__dates dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }

.article-figure { margin: 0 auto 44px; }
.article-figure img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

.article-layout { display: grid; grid-template-columns: 56px minmax(0, 1fr) 320px; gap: 44px; align-items: start; padding-bottom: 64px; }
.article-main { max-width: 720px; }

/* Share */
.article-share { position: sticky; top: calc(var(--header-h) + 64px); }
.share-list { display: grid; gap: 10px; }
.share-list a, .share-list button {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
    transition: background .2s, color .2s, border-color .2s;
}
.share-list a:hover, .share-list button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.share-list button.is-copied { background: var(--success); border-color: var(--success); color: #fff; }
.article-share--inline { display: none; position: static; margin-top: 32px; }
.article-share--inline p { font-family: var(--font-head); font-weight: 800; margin-bottom: 12px; }
.article-share--inline .share-list { display: flex; flex-wrap: wrap; }

/* Table of contents */
.toc { margin-bottom: 36px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.toc__toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 18px 22px; border: 0; background: none; font-family: var(--font-head); font-weight: 800; font-size: 16px;
}
.toc__toggle span i { color: var(--accent); margin-right: 8px; }
.toc__toggle > i { transition: transform .2s; }
.toc.is-collapsed .toc__toggle > i { transform: rotate(-90deg); }
.toc.is-collapsed .toc__list { display: none; }
.toc__list { counter-reset: toc; padding: 0 22px 18px; display: grid; gap: 4px; }
.toc__list li { counter-increment: toc; }
.toc__list a { display: flex; gap: 12px; padding: 6px 0; color: var(--text-2); font-weight: 500; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); color: var(--muted); font-family: var(--font-head); font-weight: 800; font-size: 13px; padding-top: 2px; }
.toc__list a:hover, .toc__list a.is-active { color: var(--cat); }

/* Body */
.prose h2 { scroll-margin-top: calc(var(--header-h) + 64px); }
.prose > p:first-of-type::first-letter {
    float: left; font-family: var(--font-head); font-size: 4.2em; line-height: .85; font-weight: 800;
    margin: .08em .12em 0 0; color: var(--accent);
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }

/* Author box */
.author-box {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 26px;
    margin-top: 44px; padding: 30px 30px 26px;
    border-radius: var(--radius-lg); border: 1px solid var(--line);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(245, 158, 11, .08) 0%, transparent 45%),
        var(--surface);
    box-shadow: var(--shadow);
}
.author-box::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 55%, var(--accent) 100%);
}

.author-box__media {
    flex: none; display: block; width: 96px; height: 96px; border-radius: 50%;
    padding: 3px; background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 8px 20px -8px rgba(23, 37, 84, .45);
    transition: transform .25s var(--ease);
}
.author-box__media:hover { transform: scale(1.04); }
.author-box__avatar {
    display: block; width: 100%; height: 100%; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--surface); background: var(--line);
}

.author-box__body { flex: 1; min-width: 0; }
.author-box__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.author-box__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); font-family: var(--font-head);
}
.author-box__eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.author-box__name { font-size: 24px; line-height: 1.2; margin: 6px 0 0; letter-spacing: -.01em; }
.author-box__name a { color: var(--text); transition: color .2s; }
.author-box__name a:hover { color: var(--accent); }

.author-box__social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.author-box__social a {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--bg); color: var(--primary); font-size: 14px;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.author-box__social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }

.author-box__meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.author-box__meta li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 999px;
    background: var(--bg); border: 1px solid var(--line);
    font-size: 13px; font-weight: 600; color: var(--primary);
}
.author-box__meta i { font-size: 12px; color: var(--accent); }

.author-box__bio { color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 14px 0 0; }

.author-box__foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.author-box__cta {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--primary);
}
.author-box__cta i {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 12px;
    transition: background .2s, color .2s, transform .2s;
}
.author-box__cta:hover i { background: var(--accent); color: var(--primary); transform: translateX(4px); }

.page-article .sidebar { top: calc(var(--header-h) + 64px); }
.article-figure figcaption a { text-decoration: underline; text-underline-offset: 2px; }
