:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f2f2f2;
    --gray-200: #dedede;
    --gray-400: #999999;
    --gray-600: #555555;
    --gray-800: #222222;

    --max-width: 1100px;
    --article-width: 760px;

    --sans:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    --mono:
        "SFMono-Regular",
        "Cascadia Code",
        "Roboto Mono",
        Consolas,
        monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--black);

    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
}

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

a {
    color: inherit;
}

.container {
    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin-inline: auto;
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */

.site-header {
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */

.hero {
    padding-top: 110px;
    padding-bottom: 90px;
}

.eyebrow {
    margin-bottom: 18px;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;

    color: var(--gray-600);
}

.hero h1 {
    max-width: 800px;

    margin: 0;

    font-size: clamp(42px, 7vw, 82px);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero-description {
    max-width: 650px;

    margin-top: 32px;

    color: var(--gray-600);

    font-size: 20px;
}

/* ------------------------------------------------------------------
   Posts
------------------------------------------------------------------ */

.post-list {
    border-top: 1px solid var(--black);
}

.post-card {
    padding: 34px 0 38px;

    border-bottom: 1px solid var(--gray-200);
}

.post-card-meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    font-family: var(--mono);
    font-size: 12px;

    color: var(--gray-600);
}

.post-card h2 {
    margin: 9px 0 8px;

    font-size: 29px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.post-card h2 a {
    text-decoration: none;
}

.post-card h2 a:hover {
    text-decoration: underline;
}

.post-card p {
    max-width: 720px;

    margin: 0;

    color: var(--gray-600);
}

/* ------------------------------------------------------------------
   Article
------------------------------------------------------------------ */

.article {
    max-width: var(--article-width);

    padding-top: 80px;
    padding-bottom: 100px;
}

.article-header {
    padding-bottom: 55px;

    border-bottom: 1px solid var(--gray-200);
}

.article-header h1 {
    margin: 0;

    font-size: clamp(42px, 7vw, 68px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.article-description {
    margin: 25px 0;

    color: var(--gray-600);

    font-size: 21px;
    line-height: 1.55;
}

.article-body {
    padding-top: 55px;

    font-size: 18px;
}

.article-body h2 {
    margin-top: 65px;

    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.article-body h3 {
    margin-top: 48px;

    font-size: 25px;
    line-height: 1.3;
}

.article-body p {
    margin: 25px 0;
}

.article-body a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-body img {
    display: block;

    margin: 40px auto;

    border: 1px solid var(--gray-200);
}

.article-body blockquote {
    margin: 35px 0;
    padding: 5px 25px;

    border-left: 3px solid var(--black);

    color: var(--gray-600);
}

.article-body hr {
    margin: 55px 0;

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

/* ------------------------------------------------------------------
   Code
------------------------------------------------------------------ */

.article-body code {
    padding: 2px 5px;

    background: var(--gray-100);

    font-family: var(--mono);
    font-size: .86em;
}

.article-body pre {
    overflow-x: auto;

    margin: 35px 0;
    padding: 22px;

    background: #111;
    color: #eee;

    border-radius: 3px;

    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.65;
}

.article-body pre code {
    padding: 0;

    background: transparent;

    color: inherit;
}

/* ------------------------------------------------------------------
   Tables
------------------------------------------------------------------ */

.article-body table {
    width: 100%;

    margin: 35px 0;

    border-collapse: collapse;

    font-size: 15px;
}

.article-body th,
.article-body td {
    padding: 10px;

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

    text-align: left;
}

.article-body th {
    background: var(--gray-100);
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */

.site-footer {
    border-top: 1px solid var(--gray-200);
}

.footer-inner {
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    color: var(--gray-600);

    font-family: var(--mono);
    font-size: 11px;
}

/* ------------------------------------------------------------------
   Misc
------------------------------------------------------------------ */

.empty {
    padding: 60px 0;

    color: var(--gray-600);
}

.not-found {
    padding-top: 120px;
    padding-bottom: 150px;
}

.not-found h1 {
    font-size: 60px;
    line-height: 1;
}

.button {
    display: inline-block;

    margin-top: 20px;
    padding: 10px 15px;

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

    text-decoration: none;

    font-family: var(--mono);
    font-size: 13px;
}

.button:hover {
    background: var(--black);
    color: var(--white);
}

/* ------------------------------------------------------------------
   Mobile
------------------------------------------------------------------ */

@media (max-width: 700px) {

    .container {
        width: min(
            calc(100% - 28px),
            var(--max-width)
        );
    }

    .hero {
        padding-top: 70px;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .article {
        padding-top: 55px;
    }

    .article-header h1 {
        font-size: 44px;
    }

    .article-body {
        font-size: 17px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}

