:root {
    --blue: #1779b8;
    --orange: #f7911f;
    --blue-dark: #0f5a8a;
    --blue-light: #e8f4fc;
    --orange-light: #fff3e5;
    --text-dark: #111827;
    --text-mid: #374151;
    --text-light: #6b7280;
    --white: #ffffff;
    --off-white: #f9fafb;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(23, 121, 184, 0.12);
    --shadow-lg: 0 16px 48px rgba(23, 121, 184, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ── READING PROGRESS BAR ── */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--orange));
    transition: width 0.1s linear;
}

/* ── POST HERO ── */
.post-hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 65%, #2196c9 100%);
    padding: 64px 5% 72px;
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 90% 50%, rgba(247, 145, 31, 0.15) 0%, transparent 60%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 40px);
}

.post-hero-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-decoration: none;
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(247, 145, 31, 0.2);
    border: 1px solid rgba(247, 145, 31, 0.4);
    color: #ffc07a;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.post-category::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}

.post-hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(32px, 5.5vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1px;
    color: var(--white);
    margin-bottom: 20px;
}

.post-hero h1 em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--orange);
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.post-author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #c96e0a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.author-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.author-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.post-meta-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
}

.post-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-meta-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.post-meta-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.hero-bottom-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--orange) 0px, var(--orange) 60px, var(--blue-dark) 60px, var(--blue-dark) 80px);
}

/* ── PAGE LAYOUT ── */
.page-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 5% 100px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    align-items: start;
}

/* ── ARTICLE BODY ── */
.article-body {
    min-width: 0;
}

/* Cover image placeholder */
.cover-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
    position: relative;
    background: linear-gradient(135deg, #cde8f5, #a0cde8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: var(--shadow-lg);
}

.cover-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    padding: 20px 24px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* Prose styles */
.prose {
    line-height: 1.85;
    color: var(--text-mid);
}

.prose p {
    font-size: 16px;
    margin-bottom: 1.6rem;
    line-height: 1.85;
}

.prose h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--blue-light);
    position: relative;
}

.prose h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--orange);
}

.prose h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 0.75rem;
}

.prose ul,
.prose ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.6rem;
}

.prose li {
    font-size: 16px;
    margin-bottom: 0.6rem;
    line-height: 1.75;
    color: var(--text-mid) !important;
}

.prose ul li::marker {
    color: var(--orange) !important;
}

.prose ol li::marker {
    color: var(--blue) !important;
    font-weight: 700 !important;
}

/* Callout / highlight box */
.callout {
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 2rem 0;
}

.callout.orange {
    background: var(--orange-light);
    border-color: var(--orange);
}

.callout-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 6px;
}

.callout.orange .callout-label {
    color: var(--orange);
}

.callout p {
    font-size: 14px !important;
    margin-bottom: 0 !important;
    color: var(--text-dark) !important;
}

/* Stat callout */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-sm);
}

.stat-cell {
    background: var(--white);
    padding: 24px 20px;
    text-align: center;
}

.stat-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    color: var(--blue);
    margin-bottom: 6px;
}

.stat-number.orange {
    color: var(--orange);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Step list */
.steps {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
}

.step {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--off-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color .2s, box-shadow .2s;
}

.step:hover {
    border-color: rgba(23, 121, 184, 0.25);
    box-shadow: var(--shadow-sm);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue), #2196c9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.step-content h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 12px !important;
    color: var(--text-light) !important;
    margin-bottom: 0 !important;
    line-height: 1.6 !important;
}

/* Comparison table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}

.compare-table thead tr {
    background: var(--blue-dark);
    color: white;
}

.compare-table th {
    padding: 14px 18px;
    text-align: left;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.compare-table th:first-child {
    width: 40%;
}

.compare-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:nth-child(even) td {
    background: var(--off-white);
}

.compare-table .yes {
    color: #15803d;
    font-weight: 600;
}

.compare-table .no {
    color: #dc2626;
    font-weight: 600;
}

.compare-table .highlight td {
    background: var(--blue-light) !important;
}

/* Tags row */
.tags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.tag {
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--off-white);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-mid);
}

/* Share row */
.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: var(--off-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 48px;
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    margin-right: 4px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    transition: all .2s;
    border: 1px solid var(--border);
    color: var(--text-mid);
    background: var(--white);
}

.share-btn:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* Author card */
.author-card {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.author-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border: 30px solid rgba(247, 145, 31, 0.12);
    border-radius: 50%;
}

.author-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--orange), #c96e0a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    font-family: 'Barlow Condensed', sans-serif;
}

.author-card-info {
    position: relative;
    z-index: 1;
}

.author-card-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.author-card-role {
    font-size: 12px;
    color: var(--orange);
    font-weight: 600;
    margin-bottom: 10px;
}

.author-card-bio {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Related posts */
.related-section h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-section h2::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.related-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    text-decoration: none;
    display: block;
    transition: all .2s;
}

.related-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.related-cat {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.related-cat.blue {
    color: var(--blue);
}

.related-cat.orange {
    color: var(--orange);
}

.related-cat.dark {
    color: var(--blue-dark);
}

.related-card h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 8px;
    transition: color .2s;
}

.related-card:hover h4 {
    color: var(--blue);
}

.related-card span {
    font-size: 14px;
    color: var(--text-light);
}

/* ── SIDEBAR ── */
.sidebar {
    position: sticky;
    top: 88px;
}

/* TOC */
.toc {
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.toc-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--orange);
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 2px;
}

.toc-list a {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-mid);
    text-decoration: none;
    transition: all .2s;
    line-height: 1.4;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    background: var(--blue-light);
    color: var(--blue);
    border-color: var(--blue);
}

.toc-list a.active {
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 600;
    border-color: var(--blue);
}

/* CTA box */
.sidebar-cta {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.sidebar-cta::before {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border: 20px solid rgba(247, 145, 31, 0.15);
    border-radius: 50%;
}

.sidebar-cta h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.sidebar-cta p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.sidebar-cta a {
    display: block;
    text-align: center;
    background: var(--orange);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
    position: relative;
    z-index: 1;
}

.sidebar-cta a:hover {
    background: #e07d0f;
}

/* Quick facts */
.quick-facts {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.quick-facts-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-facts-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--blue);
    border-radius: 2px;
}

.fact-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.fact-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fact-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.fact-text h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.fact-text p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar {
        position: static;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .stat-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .post-hero h1 {
        font-size: 2rem;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim {
    animation: fadeUp 0.5s ease both;
}

.anim-1 {
    animation-delay: 0.1s;
}

.anim-2 {
    animation-delay: 0.2s;
}

.anim-3 {
    animation-delay: 0.3s;
}