@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Ubuntu.woff2");
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Ubuntu', sans-serif;
    line-height: 2.2rem;
}

h1,
h2,
h3,
h4,
.card-title {
    font-family: sans-serif;
    word-wrap: break-word;
    font-weight: bold;
}

h1,
h2 {
    line-height: 3rem;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

a,
a:visited {
    color: #5f0000;
    text-decoration: underline;
}

:focus {
    outline: 0.5rem solid blue;
}

.skip-link {
    position: absolute;
    left: -999px;
    width: 1px;
    height: 1px;
    top: auto;
}

.skip-link:focus {
    background-color: white;
    color: black;
    display: inline;
    height: auto;
    width: auto;
    position: absolute;
    margin: auto;
    top: 0;
    left: 0;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: 100vh;
    grid-template-areas: "left-nav right-content";
}

.left-nav {
    grid-area: left-nav;
    background-color: #5f0000;
    color: #fff;
    padding-top: 4rem;
    max-height: 100%;
    overflow: hidden;
}

.left-nav img {
    width: 12rem;
    height: 12rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.left-nav .menu-bar h1 {
    font-size: 2rem;
    margin: 2rem;
    text-align: center;
}

.left-nav nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.left-nav nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    margin: 1rem;
}

.left-nav nav a[aria-current="page"] {
    color: #aaa;
}

.left-nav nav a:hover {
    color: #aaa;
}

.menu-bar a svg {
    fill: #fff;
    width: 4rem;
    height: 4rem;
    margin: 1rem;
    position: absolute;
    right: 2rem;
    top: 1.5rem;
}

.menu-bar a svg:hover,
.menu-bar a[aria-expanded="true"] svg {
    fill: #aaa;
}

.menu-bar a:focus svg {
    outline: 0.5rem solid blue;
}

.menu-bar a {
    display: none;
}

.menu-bar a #menu-graphic-close {
    display: none;
}

.social-media {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem;
    bottom: 0;
}

.social-media a svg {
    width: 3rem;
    height: 3rem;
    margin: 0.5rem;
    fill: white;
}

.social-media a:hover svg {
    fill: #aaa;
}

.right-content {
    grid-area: right-content;
    display: grid;
    padding: 3rem;
    font-size: 1.1rem;
    overflow-y: auto;
    word-wrap: break-word;
}

main h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.more-buttons {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.more-buttons a {
    display: inline-flex;
    background-color: #5f0000;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
    text-align: center;
}

.more-buttons a:hover {
    background-color: #240000;
}

.showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    grid-gap: 1rem;
    margin-bottom: 2rem;

    /* center the items */
    justify-items: center;
}

.card {
    background-color: #fff;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 0.5rem #aaa;
}

.card-title,
.card-body {
    padding: 1rem;
}

.card-title {
    text-align: center;
}

.card-title svg {
    width: 4rem;
    height: 4rem;
    fill: #5f0000;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.post-meta {
    color: #222;
    font-size: 1rem;
}

.post-heading {
    text-decoration: none;
}

code {
    font-family: monospace;
    display: block;
    font-size: 1rem;
    white-space: pre;
    background-color: #efefef;
    padding: 0.2rem;
    margin: 1.5rem 0;
    border-radius: 0.2rem;
    box-shadow: inset 0 0 0.2rem #aaa;
    overflow-x: auto;
    max-width: 100%;
}

@media only screen and (max-width: 1000px) {
    .grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas: "left-nav" "right-content";
    }

    .left-nav {
        padding: 1rem;
    }

    .left-nav img,
    .left-nav .menu-expand {
        display: none;
    }

    h1 {
        font-size: 0.8rem;
    }

    .right-content {
        display: inline;
        padding: 1rem;
        font-size: 1.2rem;
    }

    .menu-bar a {
        display: inline;
    }

    .left-nav .menu-bar h1 {
        text-align: left;
    }

    .subtitle {
        display: none;
    }
}

@media only screen and (max-height: 800px) {
    .left-nav {
        font-size: 1rem;
        overflow-y: auto;
    }

    .left-nav img {
        width: 8rem;
        height: 8rem;
    }
}

@media (prefers-color-scheme: dark) {
    :focus,
    .menu-bar a:focus svg {
        outline: 0.5rem solid yellow;
    }

    a,
    a:visited {
        color: #ccc;
        text-decoration: underline;
    }

    body,
    .right-content {
        background-color: #0b0b0b;
        color: #eee;
    }

    .more-buttons a {
        color: #eee;
    }

    .card {
        background-color: #0b0b0b;
        box-shadow: 0 0 0.5rem #3d3d3d;
    }

    .card-title svg {
        fill: #eee;
    }

    .post-meta {
        color: #ccc;
    }

    code {
        background-color: #222;
        box-shadow: inset 0 0 0.2rem 3d3d3d;
    }
}

@media (prefers-contrast: more) {
    .left-nav {
        background-color: #000;
        color: #fff;
    }

    .left-nav nav a[aria-current="page"],
    .left-nav nav a:hover {
        color: #fff;
        text-decoration: underline;
    }


    /* dark mode support too */
    @media (prefers-color-scheme: dark) {
        .left-nav {
            border: #fff 0.5rem solid;
        }

        body,
        .right-content,
        .post-meta {
            background-color: #000;
            color: #fff;
        }
    }
}