:root {
    --bg: #f3f3f0;
    --fg: #1b1f22;
    --muted: #5b6268;
    --accent: #3e8e86;
    --border: #d8d9d5;
    --surface: #e4e9e6;
    --dot: #bcc3bf;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family:
        "Miranda Sans",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        "Helvetica Neue",
        sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    position: relative;
}

pre,
code {
    font-family: "Monaspace Neon", monospace;
}

header {
    text-align: center;
    margin-bottom: 1em;
    padding-bottom: 1.5em;
}

.logo {
    display: inline-block;
    background-image: url(./logo.svg);
    background-size: 100%;
    background-repeat: no-repeat;
    width: 160px;
    height: 31px;
}

h1 {
    font-size: 2.75em;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.35em 0 0.25em;
}

h2 {
    font-size: 1.35em;
    margin-top: 0;
}

a {
    color: var(--fg);
    transition: color 0.1s ease;
}

a:hover,
a:focus {
    color: var(--accent);
}

.body-bg {
    background-image: radial-gradient(
        color-mix(in srgb, var(--dot) 60%, transparent) 1px,
        transparent 1px
    );
    background-size: 12px 12px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 256px;
    width: 100%;
    -webkit-mask-image: linear-gradient(to top, transparent 1px, black 100%);
    mask-image: linear-gradient(to top, transparent 1px, black 100%);
}

.body-main {
    margin: 0 auto;
    padding: 2em 1.5em;
    box-sizing: border-box;
    font-size: 1.1em;
    line-height: 1.6;
    width: 100%;
    max-width: 1280px;
    position: relative;
}

main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5em;
    align-items: start;
}

@media screen and (max-width: 768px) {
    .body-main {
        font-size: 1em;
    }

    main {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    h1 {
        font-size: 2.25em;
    }
}

@media screen and (prefers-color-scheme: dark) {
    :root {
        --bg: #14171a;
        --fg: #f3f3f0;
        --muted: #c7cbc7;
        --accent: #46968e;
        --border: #2c3337;
        --surface: #272d30;
        --dot: #2c3337;
    }

    .logo {
        background-image: url(./logodark.svg);
    }
}
