* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: rgb(242, 242, 247);
    color: rgb(57, 57, 57);
    font-family: "Fira Sans";
    display: grid;
    grid-template-columns: 1fr min(100ch, 100%) 1fr;
    line-height: 1.5;
}

header {
    background: white;
    height: 80px;
    display: grid;
    grid-template-columns: 1fr min(100ch, 100%) 1fr;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    grid-column: 1 / 4;
    position: sticky;
    top: 0;
}

header > div {
    grid-column: 2;
    padding: 0 16px;
    display: flex;
    align-items: center;
    font-size: 200%;
    gap: 16px;
}

header > div,
h1 {
    font-family: "Montserrat";
    font-weight: bold;
}

.banner {
    display: grid;
    grid-template-columns: 1fr min(100ch, 100%) 1fr;
    grid-column: 1 / 4;
    background: url(/images/banner.jpg);
    background-size: cover;
    background-position: center;
    margin-bottom: 16px;
}

.banner .title {
    grid-column: 2;
    display: inline-block;
    margin: 32px;
    padding: 0 32px;
    background: rgba(0, 0, 0, 0.6);
}

.banner,
.banner h1,
.banner a {
    color: white;
}

h1,
h1 a {
    color: rgb(183, 26, 85);
}

main {
    padding: 0 16px;
    grid-column: 2;
}

footer {
    grid-column: 2;
    padding: 0 16px;
    font-size: 80%;
}

pre {
    border-radius: 8px;
    padding: 8px;
    border: 2px solid rgba(180, 206, 244, 0.55);
    overflow: auto;
    font-size: 11pt;
}

code {
    font-family: "Fira Code", monospace;
    border: 1px solid rgb(126, 155, 172);
    background: white;
    border-radius: 4px;
    padding: 0 4px;

    /* workaround iOS being wonky */
    text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

pre > code {
    border: unset;
    background: unset;
    border-radius: unset;
    padding: unset;
}

figure {
    text-align: center;
}

figure img {
    max-width: 100%;
    max-height: 500px;
}

figcaption > * {
    margin: 0;
}

a {
    color: rgb(53, 104, 200);
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: none;
}

header a {
    color: rgb(57, 57, 57);
}

.logo {
    border-radius: 100%;
    height: 48px;
}

.spacer {
    flex: 1;
}

.social {
    height: 32px;
    display: block;
}

li:not(:last-child) {
    margin-bottom: 8px;
}

aside {
    background: rgb(255, 210, 200);
    border: 2px solid rgb(244, 179, 164);
    padding: 0 24px;
    border-radius: 16px;
    display: inline-block;
    width: 100%;
}

h1,
h2 {
    scroll-margin-top: 100px;
}

.email i {
    display: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border: 1px solid black;
    padding: 8px 16px;
}

blockquote {
    background: rgba(0, 0, 0, 0.1);
    border-left: 2px solid rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    margin: 0;
}

blockquote > p {
    margin: 0;
}

#comments {
    border: none;
    width: 100%;
    height: 500px;
}

@media screen and (prefers-color-scheme: dark) {
    body {
        background: rgb(23, 23, 28);
        color: rgb(244, 244, 244);
    }

    header {
        background: rgb(50, 50, 57);
    }

    header a {
        color: white;
    }

    .social {
        filter: invert(100%);
    }

    pre {
        border: 2px solid rgba(180, 206, 244, 0.35);
    }

    code {
        background: rgb(15, 15, 15);
        border-color: rgb(121, 121, 121);
    }

    h1,
    h1 a {
        color: rgb(230, 80, 136);
    }

    a {
        color: rgb(130, 190, 242);
    }

    .banner {
        background-color: rgb(160, 160, 160);
        background-blend-mode: multiply;
    }

    aside {
        background: rgb(115, 63, 51);
        border-color: rgb(170, 101, 85);
    }

    img.invertible,
    .invertible img {
        filter: invert(100%) hue-rotate(180deg);
        z-index: -1;
        position: relative;
    }

    th,
    td {
        border-color: white;
    }

    blockquote {
        background: rgba(255, 255, 255, 0.1);
        border-left: 2px solid rgba(255, 255, 255, 0.4);
    }
}
