:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #eff6ff;

    --accent: #06b6d4;
    --accent-dark: #0891b2;

    --text: #0f172a;
    --text-secondary: #334155;
    --muted: #64748b;

    --bg: #f8faff;
    --card-bg: #ffffff;
    --soft-bg: #f1f5ff;

    --border: rgba(37, 99, 235, 0.09);
    --border-strong: rgba(37, 99, 235, 0.22);

    --shadow-sm:
        0 2px 16px rgba(37, 99, 235, 0.06);

    --shadow-md:
        0 18px 45px rgba(37, 99, 235, 0.13);

    --gradient-hero:
        linear-gradient(
            135deg,
            #eef2ff 0%,
            #e0f2fe 100%
        );

    --gradient-brand:
        linear-gradient(
            135deg,
            #2563eb,
            #06b6d4
        );
}

[data-theme="dark"] {
    --blue: #3b82f6;
    --blue-dark: #60a5fa;
    --blue-light: rgba(59, 130, 246, 0.15);

    --accent: #22d3ee;
    --accent-dark: #22d3ee;

    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --muted: #94a3b8;

    --bg: #020617;
    --card-bg: #0f172a;
    --soft-bg: #111c30;

    --border: rgba(59, 130, 246, 0.16);
    --border-strong: rgba(59, 130, 246, 0.32);

    --shadow-sm:
        0 2px 16px rgba(0, 0, 0, 0.35);

    --shadow-md:
        0 18px 45px rgba(0, 0, 0, 0.48);

    --gradient-hero:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #1e293b 100%
        );

    --gradient-brand:
        linear-gradient(
            135deg,
            #3b82f6,
            #22d3ee
        );
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    background: var(--bg);
    color: var(--text);

    font-family:
        "Plus Jakarta Sans",
        sans-serif;

    line-height: 1.7;

    overflow-x: hidden;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

a {
    color: inherit;
}

:focus-visible {
    outline:
        3px solid
        var(--accent);

    outline-offset: 3px;
}


/* POST HERO */

.post-hero {
    position: relative;

    overflow: hidden;

    padding:
        64px
        20px
        82px;

    border-bottom:
        1px solid
        var(--border);

    background:
        var(--gradient-hero);

    text-align: center;
}

.post-hero-mesh {
    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 20% 25%,
            rgba(37, 99, 235, 0.14),
            transparent 38%
        ),
        radial-gradient(
            circle at 82% 72%,
            rgba(6, 182, 212, 0.14),
            transparent 38%
        );
}

.post-hero-content {
    position: relative;
    z-index: 1;

    max-width: 900px;

    margin: 0 auto;
}

.breadcrumb {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 20px;

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    line-height: 1.6;
}

.breadcrumb a {
    color: var(--blue);

    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.breadcrumb-sep {
    color: var(--muted);
}

.post-category {
    display: inline-flex;

    align-items: center;

    margin-bottom: 16px;

    padding:
        6px
        13px;

    border:
        1px solid
        var(--border-strong);

    border-radius: 999px;

    background:
        var(--card-bg);

    color: var(--blue);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;

    text-transform: uppercase;
}

.post-hero h1 {
    max-width: 860px;

    margin:
        0
        auto
        17px;

    color: var(--text);

    font-size:
        clamp(
            34px,
            5vw,
            52px
        );

    font-weight: 800;

    line-height: 1.12;

    letter-spacing: -1.2px;
}

.post-hero-description {
    max-width: 720px;

    margin:
        0
        auto
        24px;

    color:
        var(--text-secondary);

    font-size: 16px;

    line-height: 1.8;
}

.post-meta {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 9px;
}

.post-meta-item {
    min-height: 38px;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        7px
        11px;

    border:
        1px solid
        var(--border-strong);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.6);

    color:
        var(--text-secondary);

    font-size: 12px;
    font-weight: 700;
}

[data-theme="dark"] .post-meta-item {
    background:
        rgba(15, 23, 42, 0.72);
}

.post-meta-item svg {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: var(--blue);

    stroke-width: 1.9;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ARTICLE */

.post-wrapper {
    max-width: 940px;

    margin:
        0
        auto;

    padding:
        64px
        20px
        78px;
}

.post-card {
    padding:
        42px;

    border:
        1px solid
        var(--border);

    border-radius: 24px;

    background:
        var(--card-bg);

    box-shadow:
        var(--shadow-md);
}

.post-featured-figure {
    margin:
        0
        0
        34px;
}

.post-featured-image {
    width: 100%;
    height: auto;

    max-height: 480px;

    display: block;

    object-fit: cover;

    border:
        1px solid
        var(--border);

    border-radius: 18px;
}


/* CONTENT TYPOGRAPHY */

.post-content {
    color:
        var(--text-secondary);

    font-size: 16px;

    line-height: 1.9;
}

.post-content > :first-child {
    margin-top: 0;
}

.post-content > :last-child {
    margin-bottom: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text);

    line-height: 1.3;

    scroll-margin-top: 100px;
}

.post-content h1 {
    margin:
        38px
        0
        14px;

    font-size: 30px;

    letter-spacing: -0.5px;
}

.post-content h2 {
    margin:
        40px
        0
        13px;

    font-size:
        clamp(
            24px,
            3vw,
            29px
        );

    letter-spacing: -0.45px;
}

.post-content h3 {
    margin:
        29px
        0
        10px;

    font-size: 21px;

    letter-spacing: -0.25px;
}

.post-content h4 {
    margin:
        24px
        0
        9px;

    font-size: 18px;
}

.post-content p {
    margin-bottom: 17px;
}

.post-content strong {
    color: var(--text);
}

.post-content a {
    color: var(--blue);

    font-weight: 650;

    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.post-content a:hover {
    text-decoration-thickness: 2px;
}

.post-content ul,
.post-content ol {
    margin:
        0
        0
        20px
        24px;
}

.post-content li {
    margin-bottom: 8px;

    padding-left: 3px;
}

.post-content li::marker {
    color: var(--blue);

    font-weight: 700;
}

.post-content blockquote {
    margin:
        26px
        0;

    padding:
        18px
        20px;

    border-left:
        4px solid
        var(--blue);

    border-radius:
        0
        12px
        12px
        0;

    background:
        var(--soft-bg);

    color:
        var(--text-secondary);
}

.post-content hr {
    margin:
        36px
        0;

    border: 0;

    border-top:
        1px solid
        var(--border);
}

.post-content img {
    max-width: 100%;
    height: auto;

    border-radius: 14px;
}

.post-content code {
    padding:
        2px
        5px;

    border-radius: 5px;

    background:
        var(--soft-bg);

    color:
        var(--text);

    font-size: 0.9em;
}

.post-content pre {
    max-width: 100%;

    overflow-x: auto;

    margin:
        24px
        0;

    padding: 18px;

    border-radius: 12px;

    background:
        #0f172a;

    color:
        #e2e8f0;
}

.post-content pre code {
    padding: 0;

    background:
        transparent;

    color:
        inherit;
}


/* TABLES */

.post-content table {
    width: 100%;
    max-width: 100%;

    margin:
        26px
        0;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    border:
        1px solid
        var(--border-strong);

    border-radius: 14px;

    background:
        var(--card-bg);

    box-shadow:
        var(--shadow-sm);

    text-align: left;
}

.post-content th {
    padding:
        14px
        16px;

    background:
        var(--gradient-brand);

    color: #ffffff;

    font-size: 13px;
    font-weight: 800;

    line-height: 1.5;

    vertical-align: top;
}

.post-content td {
    padding:
        13px
        16px;

    border-bottom:
        1px solid
        var(--border);

    color:
        var(--text-secondary);

    font-size: 13px;

    line-height: 1.65;

    vertical-align: top;
}

.post-content tr:last-child td {
    border-bottom: 0;
}

.post-content tr:nth-child(even) td {
    background:
        rgba(37, 99, 235, 0.04);
}

[data-theme="dark"]
.post-content tr:nth-child(even) td {
    background:
        rgba(59, 130, 246, 0.08);
}


/* OPTIONAL FRONT-MATTER FAQ */

.post-faq {
    margin-top: 44px;

    padding-top: 32px;

    border-top:
        1px solid
        var(--border);
}

.post-faq > h2 {
    margin-bottom: 20px;

    color: var(--text);

    font-size: 27px;
    font-weight: 800;

    line-height: 1.25;
}

.post-faq-item {
    margin-bottom: 12px;

    padding:
        18px
        20px;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    background:
        var(--soft-bg);
}

.post-faq-item h3 {
    margin-bottom: 7px;

    color: var(--text);

    font-size: 16px;
    font-weight: 800;

    line-height: 1.5;
}

.post-faq-item p {
    color:
        var(--text-secondary);

    font-size: 14px;

    line-height: 1.75;
}


/* CTA */

.post-cta {
    position: relative;

    overflow: hidden;

    padding:
        70px
        20px;

    background:
        var(--gradient-brand);

    color: #ffffff;

    text-align: center;
}

.post-cta-wrap {
    max-width: 680px;

    margin:
        0
        auto;
}

.post-cta h2 {
    margin-bottom: 13px;

    font-size:
        clamp(
            27px,
            4vw,
            38px
        );

    font-weight: 800;

    line-height: 1.2;

    letter-spacing: -0.5px;
}

.post-cta p {
    margin-bottom: 25px;

    font-size: 15px;

    line-height: 1.75;

    opacity: 0.96;
}

.post-cta-actions {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 11px;
}

.post-cta-primary,
.post-cta-secondary {
    min-height: 48px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding:
        12px
        20px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;

    transition:
        transform 0.2s ease;
}

.post-cta-primary {
    border:
        1px solid
        #ffffff;

    background:
        #ffffff;

    color:
        #1d4ed8;
}

.post-cta-secondary {
    border:
        1px solid
        rgba(255, 255, 255, 0.6);

    background:
        rgba(255, 255, 255, 0.1);

    color:
        #ffffff;
}

.post-cta-primary:hover,
.post-cta-secondary:hover {
    transform:
        translateY(-2px);
}


/* TABLET */

@media (max-width: 768px) {

    .post-hero {
        padding:
            52px
            16px
            68px;
    }

    .post-wrapper {
        padding:
            48px
            16px
            62px;
    }

    .post-card {
        padding:
            28px
            24px;
    }

    .post-content table {
        display: block;

        max-width: 100%;

        overflow-x: auto;

        -webkit-overflow-scrolling:
            touch;
    }

    .post-content th,
    .post-content td {
        min-width: 150px;

        padding:
            12px
            13px;
    }
}


/* MOBILE */

@media (max-width: 560px) {

    .post-hero h1 {
        font-size:
            clamp(
                31px,
                9vw,
                40px
            );
    }

    .post-hero-description {
        font-size: 15px;
    }

    .post-meta {
        gap: 7px;
    }

    .post-card {
        padding:
            23px
            19px;

        border-radius: 18px;
    }

    .post-content {
        font-size: 15px;

        line-height: 1.85;
    }

    .post-content h2 {
        font-size: 23px;
    }

    .post-content h3 {
        font-size: 19px;
    }

    .post-cta {
        padding:
            58px
            16px;
    }

    .post-cta-actions {
        display: grid;

        grid-template-columns: 1fr;

        max-width: 340px;

        margin:
            0
            auto;
    }
}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;

        scroll-behavior:
            auto !important;
    }
}
