/* =============================================
   ARTICLE LAYOUT
   ============================================= */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
    padding: clamp(2rem, 4vw, 3.5rem) 0;
}

/* =============================================
   ARTICLE HEADER
   ============================================= */
.article-header {
    max-width: var(--article-max);
    margin-bottom: 2.5rem;
}

.article-header__cat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    background: var(--red-light);
    padding: 0.3rem 0.7rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.article-header__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.article-header__excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    max-width: 600px;
}

.article-header__meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.article-header__author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.article-header__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.article-header__author-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--navy);
}

.article-header__author-role {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.article-header__meta-sep {
    width: 1px;
    height: 28px;
    background: var(--border-light);
}

.article-header__date,
.article-header__read-time,
.article-header__updated {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.article-header__date svg,
.article-header__read-time svg,
.article-header__updated svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =============================================
   HERO IMAGE
   ============================================= */
.article-hero-img {
    max-width: var(--article-max);
    margin-bottom: 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.article-hero-img img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.article-hero-img__caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    padding: 0.65rem 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
}
/* =============================================
   ARTICLE BODY
   ============================================= */
.article-body {
    max-width: var(--article-max);
}

.article-body h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.55rem;
    color: var(--navy);
    line-height: 1.2;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    scroll-margin-top: 88px;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navy);
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 88px;
}

.article-body p {
    font-size: 1.02rem;
    color: var(--gray-600);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1.5rem 1.25rem;
    color: var(--gray-600);
    line-height: 1.85;
}

.article-body li {
    margin-bottom: 0.5rem;
    font-size: 1.02rem;
}

.article-body ul { list-style: none; margin-left: 0; }

.article-body ul li {
    padding-left: 1.25rem;
    position: relative;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
}

.article-body ol li::marker {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--red);
}

.article-body a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-color: rgba(200,54,45,0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-body a:hover { text-decoration-color: var(--red); }

.article-body strong {
    color: var(--gray-800);
    font-weight: 600;
}

.article-body blockquote {
    border-left: 3px solid var(--red);
    background: var(--off-white);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body blockquote p {
    font-size: 1rem;
    color: var(--gray-700);
    font-style: italic;
    margin-bottom: 0;
    line-height: 1.7;
}

.article-body blockquote cite {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 0.65rem;
    letter-spacing: 0.03em;
}

.article-body__img {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.article-body__img img { width: 100%; display: block; }

.article-body__img-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    padding: 0.6rem 0.85rem;
    background: var(--off-white);
    border-top: 1px solid var(--border-light);
}

.article-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--off-white);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    color: var(--gray-700);
}

/* =============================================
   CALLOUT BOXES
   ============================================= */
.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.75rem 0;
    border: 1px solid;
}

.callout--info {
    background: rgba(26,39,68,0.04);
    border-color: rgba(26,39,68,0.12);
}

.callout--warning {
    background: var(--amber-light);
    border-color: rgba(212,148,10,0.2);
}

.callout--success {
    background: var(--green-light);
    border-color: rgba(42,125,79,0.2);
}

.callout__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.callout--info .callout__icon { color: var(--navy); }
.callout--warning .callout__icon { color: var(--amber); }
.callout--success .callout__icon { color: var(--green); }

.callout__content { flex: 1; }

.callout__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.callout__text { font-size: 0.9rem; color: var(--gray-600); line-height: 1.65; }
.callout__text p { margin-bottom: 0.5rem; font-size: 0.9rem; }
.callout__text p:last-child { margin-bottom: 0; }

/* =============================================
   TABLES
   ============================================= */
.article-body__table-wrap {
    margin: 1.75rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.article-body thead { background: var(--navy); }

.article-body th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream);
    padding: 0.85rem 1rem;
    text-align: left;
}

.article-body td {
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--border-light);
    line-height: 1.5;
}

.article-body tbody tr:last-child td { border-bottom: none; }
.article-body tbody tr:nth-child(even) { background: var(--off-white); }

.article-body td strong {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
}
/* =============================================
   SHARE BAR
   ============================================= */
.share-bar {
    max-width: var(--article-max);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.share-bar__label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: var(--gray-600);
}

.share-bar__buttons { display: flex; gap: 0.4rem; }

.share-bar__btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    background: transparent;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.share-bar__btn:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--off-white);
}

.share-bar__btn svg { width: 16px; height: 16px; }

/* =============================================
   AUTHOR CARD
   ============================================= */
.author-card {
    max-width: var(--article-max);
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2.5rem;
    display: flex;
    gap: 1.5rem;
    border: 1px solid var(--border-light);
}

.author-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.author-card__content { flex: 1; }

.author-card__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.author-card__name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0.15rem;
}

.author-card__role {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

.author-card__bio {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

.author-card__links { display: flex; gap: 0.5rem; }

.author-card__link {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    transition: all 0.2s;
}

.author-card__link:hover { border-color: var(--red); color: var(--red); }

/* =============================================
   ARTICLE NAV
   ============================================= */
.article-nav {
    max-width: var(--article-max);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.article-nav__link {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.article-nav__link:hover {
    border-color: var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.article-nav__link--next { text-align: right; }

.article-nav__label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-nav__link--next .article-nav__label { justify-content: flex-end; }
.article-nav__label svg { width: 12px; height: 12px; }

.article-nav__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--navy);
    line-height: 1.35;
    transition: color 0.2s;
}

.article-nav__link:hover .article-nav__title { color: var(--red); }

/* =============================================
   RELATED ARTICLES
   ============================================= */
.related {
    padding: var(--section-pad) 0;
    background: var(--off-white);
    border-top: 1px solid var(--border-light);
}

.related__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.related__title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--navy);
}

.related__link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease;
}

.related__link:hover { gap: 0.7rem; }
.related__link svg { width: 16px; height: 16px; }

.related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

.related-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    border-color: var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.related-card__img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--cream);
}

.related-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-card__img img { transform: scale(1.05); }

.related-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card__cat {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.related-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
    line-height: 1.35;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
    flex: 1;
}

.related-card:hover .related-card__title { color: var(--red); }

.related-card__date {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner { padding: var(--section-pad) 0; }

.cta-banner__inner {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner__inner::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(200,54,45,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner__inner::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212,148,10,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner__title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 0.65rem;
    position: relative;
    z-index: 1;
}

.cta-banner__title em { font-style: normal; color: var(--amber); }

.cta-banner__desc {
    font-size: 1rem;
    color: var(--text-on-dark-muted);
    max-width: 520px;
    margin: 0 auto 1.75rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cta-banner__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn--primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn--primary:hover {
    background: var(--red-hover);
    border-color: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,54,45,0.25);
}

.btn--outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

.btn--outline-white:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.08);
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.sidebar__section {
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.sidebar__heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-light);
}

.toc {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toc__item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--gray-600);
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.toc__item a:hover {
    background: var(--white);
    color: var(--navy);
    border-left-color: var(--gray-300);
}

.toc__item a.active {
    background: var(--red-light);
    color: var(--red);
    font-weight: 600;
    border-left-color: var(--red);
}

.toc__item--sub a {
    padding-left: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.toc__item--sub a:hover { color: var(--navy); }
.toc__item--sub a.active { color: var(--red); }

.sidebar__post {
    display: flex;
    gap: 0.85rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: opacity 0.2s;
}

.sidebar__post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar__post:first-child { padding-top: 0; }
.sidebar__post:hover { opacity: 0.8; }

.sidebar__post-rank {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--gray-200);
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
}

.sidebar__post-content { flex: 1; min-width: 0; }

.sidebar__post-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy);
    line-height: 1.35;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar__post:hover .sidebar__post-title { color: var(--red); }

.sidebar__post-date {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.sidebar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sidebar__tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    color: var(--gray-600);
    background: var(--white);
    padding: 0.3rem 0.65rem;
    border-radius: 2px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.sidebar__tag:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-light);
}

.sidebar__cta {
    background: var(--navy);
    border-color: var(--navy);
    text-align: center;
}

.sidebar__cta .sidebar__heading {
    color: var(--cream);
    border-bottom-color: rgba(255,255,255,0.08);
}

.sidebar__cta-desc {
    font-size: 0.85rem;
    color: var(--text-on-dark-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sidebar__cta-btn {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    padding: 0.7rem 1.25rem;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}

.sidebar__cta-btn:hover { background: var(--red-hover); }

/* =============================================
   ANIMATIONS
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

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

@media (max-width: 768px) {
    .article-layout { grid-template-columns: 1fr; }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .sidebar__cta { grid-column: 1 / -1; }

    .related__grid { grid-template-columns: repeat(2, 1fr); }

    .author-card { flex-direction: column; align-items: center; text-align: center; }
    .author-card__links { justify-content: center; }

    .article-nav { grid-template-columns: 1fr; }
    .article-nav__link--next { text-align: left; }
    .article-nav__link--next .article-nav__label { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .sidebar { grid-template-columns: 1fr; }
    .related__grid { grid-template-columns: 1fr; }
    .share-bar { flex-direction: column; gap: 0.75rem; }
    .article-header__meta { flex-direction: column; align-items: flex-start; }
    .article-header__meta-sep { display: none; }
}
