*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0c;
    --bg-elev: #111114;
    --bg-elev-2: #16161b;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #e9e9ef;
    --text-dim: #a3a3ad;
    --text-mute: #6b6b75;
    --accent: #3fc3ad;
    --accent-2: #f48565;
    --accent-warm: #f3cf7a;
    --radius: 8px;
    --maxw: 1120px;
    --measure: 740px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    min-height: 100vh;
    overflow-x: clip;
    background:
        linear-gradient(180deg, rgba(63, 195, 173, 0.06), transparent 280px),
        linear-gradient(160deg, var(--bg) 0%, #101014 55%, var(--bg) 100%);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.2px);
    background-size: 30px 30px;
    mask-image: linear-gradient(#000 0%, transparent 78%);
    -webkit-mask-image: linear-gradient(#000 0%, transparent 78%);
    pointer-events: none;
}

::selection {
    background: rgba(63, 195, 173, 0.30);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

p,
h1,
h2,
h3 {
    overflow-wrap: break-word;
}

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-200%);
    transition: transform .2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.wrap {
    width: min(100% - 48px, var(--maxw));
    margin: 0 auto;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
}

.brand-prompt {
    color: var(--accent);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.nav-cta {
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 13.5px;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.nav-link {
    padding: 8px 12px;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}

.nav-cta {
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
}

.nav-cta:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.07);
}

.blog-hero {
    padding: 76px 0 34px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.kicker::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--accent);
}

.blog-hero h1,
.article-title {
    max-width: 16ch;
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: 0;
    font-weight: 700;
    text-wrap: balance;
}

.blog-hero p,
.article-dek {
    max-width: 720px;
    margin: 0;
    color: var(--text-dim);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.55;
}

.post-list {
    display: grid;
    gap: 18px;
    padding: 34px 0 88px;
}

.post-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
    padding: 28px;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.post-card:hover,
.post-card:focus-within {
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.post-card h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    letter-spacing: 0;
}

.post-card p {
    max-width: 760px;
    margin: 0;
    color: var(--text-dim);
    font-size: 16.5px;
}

.post-card a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-card-title {
    position: relative;
}

.post-card-title a:hover {
    color: #fff;
}

.post-meta,
.article-meta,
.article-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.post-card .post-meta {
    white-space: nowrap;
    padding-top: 8px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) minmax(240px, 300px);
    gap: 72px;
    align-items: start;
    padding: 70px 0 92px;
}

.article-header {
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.article-title {
    max-width: 13ch;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 28px;
}

.article-body {
    padding-top: 28px;
}

.article-body h2 {
    margin: 56px 0 16px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: 0;
}

.article-body p {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.72;
}

.article-body p + p {
    margin-top: 4px;
}

.article-body a {
    color: #d6fff5;
    border-bottom: 1px solid rgba(63, 195, 173, 0.45);
}

.article-body a:hover {
    color: #fff;
    border-bottom-color: var(--accent);
}

.article-side {
    position: sticky;
    top: 92px;
    border-left: 1px solid var(--line);
    padding-left: 26px;
}

.article-label {
    margin: 0 0 14px;
    color: var(--accent);
}

.article-index {
    display: grid;
    gap: 2px;
}

.article-index a {
    display: block;
    border-top: 1px solid var(--line);
    padding: 14px 0;
    color: var(--text-dim);
}

.article-index a:hover,
.article-index a[aria-current="page"] {
    color: var(--text);
}

.article-index strong {
    display: block;
    color: inherit;
    font-size: 15px;
    line-height: 1.35;
}

.article-index span {
    display: block;
    margin-top: 4px;
    color: var(--text-mute);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 54px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.article-nav a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-dim);
}

.article-nav a:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.article-nav span {
    display: block;
    margin-bottom: 5px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.article-nav strong {
    display: block;
    line-height: 1.35;
}

footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
    color: var(--text-mute);
    font-size: 13px;
}

.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px 28px;
}

.foot a {
    color: var(--text-dim);
}

.foot a:hover {
    color: var(--text);
}

@media (max-width: 860px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 46px;
        padding-top: 54px;
    }

    .article-side {
        position: static;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 28px 0 0;
    }
}

@media (max-width: 700px) {
    .wrap {
        width: min(100% - 32px, var(--maxw));
    }

    .nav-inner {
        min-height: 58px;
    }

    .nav-links .nav-link {
        display: none;
    }

    .brand {
        font-size: 13px;
    }

    .blog-hero {
        padding: 52px 0 22px;
    }

    .blog-hero h1,
    .article-title {
        font-size: 42px;
        line-height: 1.02;
    }

    .post-card {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .post-card .post-meta {
        white-space: normal;
        padding-top: 0;
    }

    .article-body p {
        font-size: 17px;
        line-height: 1.68;
    }

    .article-nav {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}