:root {
    --bg: #f3f5f3;
    --text: #1d211d;
    --muted: #636964;
    --accent: #0d7729;
}

html {
    height: 100%;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Source Code Pro", monospace;
    display: flex;
    flex-direction: row;
    max-width: 900px;
    margin-inline: auto;
    padding: 24px;
    padding-top: 0;
    gap: 24px;
}

aside {
    position: sticky;
    top: 24px;
    margin-top: 100px;
    align-self: flex-start;
}

main {
    margin: 0 auto;
    flex: 1;
    display: grid;
    place-items: center;
}

nav {
    display: flex;
    flex-direction: column;
}

section {
    width: 100%;
}

@media (max-width: 800px) {
    body {
        flex-direction: column;
        gap: 0;
        height: 100%;
        padding: 0;
    }
    aside {
        top: 0;
        width: 100%;
        margin: 0;
        padding: 12px;
        box-sizing: border-box;
        background-color: var(--bg);
        border-bottom: 1px solid var(--muted);
    }
    nav {
        display: inline;
    }
    nav > a {
        display: inline-block;
    }
    main {
        overflow-y: scroll;
        scroll-behavior: smooth;
        padding: 24px;
        padding-top: 0;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--accent);
    margin: 6px 0;
}

h1 {
    text-align: center;
}

small {
    color: var(--muted);
}

a {
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
    line-height: 1.5;
    padding: 0 5px;
    color: var(--accent);
    background: linear-gradient(var(--accent), var(--accent)) border-box
        no-repeat left bottom / 0 100%;
    transition:
        background-size 0.2s ease,
        color 0.2s ease;
    text-align: center;
}
a:hover {
    background-size: 100% 100%;
    color: var(--bg);
}

nav > a {
    font-style: italic;
}
