/* Blog post layout, matching index-v2.html */
:root {
    --navy: #0f1b2d;
    --teal: #2bb3a3;
    --teal-dark: #1d8a7d;
    --amber: #f2a33a;
    --ink: #1c2533;
    --muted: #5b6676;
    --line: #e3e8ef;
    --bg-soft: #f5f7fa;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 27, 45, 0.96);
    backdrop-filter: blur(6px);
}

.nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav ul a {
    color: #c9d3e0;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav ul a:hover {
    color: #fff;
}

.nav .cta-sm {
    background: var(--teal);
    color: var(--navy);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.nav .cta-sm:hover {
    color: var(--navy);
    background: #46c9b9;
}

/* post header */
.post-hero {
    background: radial-gradient(900px 400px at 85% -20%, rgba(43, 179, 163, 0.22), transparent 60%), var(--navy);
    color: #fff;
    padding: 64px 0 56px;
}

.post-hero .inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.back {
    display: inline-block;
    color: #8fa0b5;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 26px;
}

.back:hover {
    color: #fff;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal);
    margin: 0 0 14px;
}

.post-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 24px;
}

.author {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c9d3e0;
    font-size: 0.92rem;
}

.author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author strong {
    color: #fff;
    font-weight: 600;
}

/* article body */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 24px;
    font-size: 1.06rem;
}

.article h2 {
    font-size: 1.6rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 48px 0 14px;
    color: var(--ink);
}

.article h3 {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 32px 0 10px;
    color: var(--ink);
}

.article p {
    margin: 0 0 18px;
}

.article ul,
.article ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.article li {
    margin-bottom: 8px;
}

.article a {
    color: var(--teal-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article strong {
    color: #0b1422;
}

.article img,
.article-img,
.img-fluid {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    margin: 8px 0 28px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 6px;
}

pre {
    background: var(--navy);
    color: #e6edf5;
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 22px;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* callouts */
.highlight-box,
.warning-box {
    border-radius: 10px;
    padding: 18px 22px;
    margin: 26px 0;
}

.highlight-box {
    background: rgba(43, 179, 163, 0.09);
    border-left: 4px solid var(--teal);
}

.warning-box {
    background: rgba(242, 163, 58, 0.12);
    border-left: 4px solid var(--amber);
}

.highlight-box > :last-child,
.warning-box > :last-child,
.xyz-card > :last-child {
    margin-bottom: 0;
}

.xyz-card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 26px 0;
}

.xyz-card .label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal-dark);
    margin-bottom: 8px;
}

.xyz-tag {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.xyz-tag.y {
    background: var(--teal-dark);
}

.xyz-tag.z {
    background: var(--amber);
    color: var(--navy);
}

.tech-tag {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    margin: 0 6px 8px 0;
    font-size: 0.86rem;
}

.toc {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0 0 32px;
}

.toc h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.toc ol {
    margin: 0;
}

.toc a {
    text-decoration: none;
}

/* tables */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
    display: block;
    overflow-x: auto;
}

.article th,
.article td {
    border-bottom: 1px solid var(--line);
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
}

.article th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
}

.article tr:nth-child(even) td {
    background: var(--bg-soft);
}

/* end of post */
.author-card {
    max-width: 760px;
    margin: 32px auto 0;
    padding: 0 24px;
}

.author-card .box {
    display: flex;
    gap: 22px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}

.author-card img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-card h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.author-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    margin: 0 8px 6px 0;
}

.btn-primary {
    background: var(--teal);
    color: var(--navy);
}

.btn-primary:hover {
    background: #46c9b9;
}

.btn-outline {
    border: 1.5px solid var(--line);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--teal);
}

.more-posts {
    max-width: 760px;
    margin: 28px auto 72px;
    padding: 0 24px;
    font-weight: 600;
}

.more-posts a {
    color: var(--teal-dark);
    text-decoration: none;
}

footer.site {
    background: #0a1320;
    color: #8fa0b5;
    font-size: 0.88rem;
    padding: 24px 0;
}

footer.site .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

footer.site a {
    color: #c9d3e0;
    text-decoration: none;
    margin-left: 18px;
}

footer.site a:first-child {
    margin-left: 0;
}

@media (max-width: 640px) {
    .wrap {
        padding: 0 16px;
    }

    .post-hero {
        padding: 40px 0 40px;
    }

    .post-hero .inner,
    .article,
    .author-card,
    .more-posts {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article {
        font-size: 1rem;
    }

    .nav ul li.hide-sm {
        display: none;
    }

    .author-card .box {
        flex-direction: column;
        align-items: flex-start;
    }
}
