:root {
    color-scheme: light dark;
    --paper: #faf9f6;
    --ink: #292b2a;
    --muted: #616660;
    --link: #22634f;
    --rule: #d9ddd5;
    --code: #eeeee8;
    font-family: system-ui, sans-serif;
    line-height: 1.7;
    background: var(--paper);
    color: var(--ink);
}

* {
    box-sizing: border-box;
}

body {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
    font-size: 1.0625rem;
    overflow-wrap: anywhere;
}

a {
    color: var(--link);
    text-underline-offset: .2em;
}

a:hover {
    text-decoration-thickness: .15em;
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 4px;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

h1 {
    font-size: 2rem;
    letter-spacing: -.025em;
    margin: 0 0 1rem;
}

h2 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
}

p,
ul,
ol {
    margin-block: 1rem;
}

.site-header {
    margin-bottom: 3.5rem;
}

.site-name {
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin-top: .5rem;
}

nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
}

.site-footer {
    text-align: center;
    border-top: 1px solid var(--rule);
    margin-top: 4rem;
    padding-top: 1rem;
    color: var(--muted);
}

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

.post-list li {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: .5rem 1.5rem;
    margin-block: 1rem;
}

time {
    color: var(--muted);
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    margin-bottom: .5rem;
}

blockquote {
    margin: 1.5rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}

code {
    font-size: .9em;
    background: var(--code);
    padding: .1em .3em;
    border-radius: .2rem;
}

.prose pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: var(--code);
    border-radius: .3rem;
    font-size: .9em;
    line-height: 1.5;
}

.prose pre code {
    font-size: inherit;
    padding: 0;
    background: transparent;
}

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

.prose img {
    display: block;
    margin-block: 1.5rem;
    border-radius: .3rem;
}

table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

th,
td {
    padding: .5rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--rule);
}

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin-block: 2rem;
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: 1rem;
    padding: .25rem .5rem;
    background: var(--paper);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

@media (max-width: 30rem) {
    body {
        padding: 2rem 1.25rem 1.25rem;
    }

    .site-header {
        margin-bottom: 2.5rem;
    }

    .post-list li {
        grid-template-columns: 1fr;
        gap: 0;
        margin-block: 1.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #1b211f;
        --ink: #e1e6e0;
        --muted: #a8b4aa;
        --link: #94d5b5;
        --rule: #3b4941;
        --code: #28332d;
    }
}
