@charset "UTF-8"

* {box-sizing:border-box}
[disabled] { pointer-events:none; opacity:0.3; }
div {position:relative}
img {width:auto; height:auto}
:root {
    color-scheme: light dark;
    --col-text: light-dark(#000, #ccc);
    --col-bg: light-dark(#fff, #222);

    --col-hero-bg: light-dark(#729fcf, #204a87);
    --siz-hero-text: 20pt;
 
    --col-footer-bg: light-dark(#2e3436, #888a85);
    --col-footer-text: light-dark(#eeeeec, #eeeeec);
    --siz-footer-text: 10pt;

    --col-article: light-dark(#fafafa, #272727);
    --siz-article-h1: 18pt;
    --siz-article-h2: 16pt;
    --siz-article-h3: 15pt;
    --siz-article-h4: 14pt;
}
html {
    height: 100%;
}
html, body {
    border: 0 none;
    margin: 0;
    padding: 0;
    background-color: var(--col-bg);
    font-family: sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--col-text);
    min-height: 100%;
}
header {
    display: flex;
    flex-direction: row;
    align-self: flex-start;
    height: 10rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--col-hero-bg);

    h1 {
        font-size: var(--siz-hero-text);
        padding: 0 0 0 1em;
    }

    img {
        height: 80%;
        padding: 0 1em 0 0;
        max-width: 50%;
    }

    a,
    a:active,
    a:visited,
    a:hover {
        text-decoration: none;
        color: inherit;
    }
    a:hover {
        text-decoration: underline;
    }
}
main {
    flex-grow: 1;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    align-self: flex-start;
    width: 100%;

    div {
        width: min(60rem, 70vw);
        padding: 1rem;
    }
    nav.toc {
        padding: 1rem 0;
        summary::marker,
        summary::-webkit-details-marker {
            display: none;
            content: "";
        }
        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        a.h2 {
            font-weight: bold;
        }
    }
    nav.site {
        padding: 1rem;
        width: max(10vw, 10rem);
        summary::marker,
        summary::-webkit-details-marker {
            display: none;
            content: "";
        }
        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        li, summary {
            padding: 0.5rem 1rem;
        }
        summary {
            display: none;
        }
    }

    article {
        header {
            background: none;
            padding: 0;
            height: auto;

            time {
                padding-right: 1rem;
            }
        }
        h1, h2, h3, h4 {
            margin: 0;
            padding: 0.5rem 0 0.2rem 0;
        }
        h1 {
            padding: 1rem 0 0.5rem 0;
            font-size: var(--siz-article-h1);
        }
        h2 {
            font-size: var(--siz-article-h2);
        }
        h3 {
            font-size: var(--siz-article-h3);
        }
        h4 {
            font-size: var(--siz-article-h4);
        }
        nav.toc {
            details {
                background-color: var(--col-article);
                padding: 0.5rem;
                position: relative;
                width: fit-content;
                summary {
                    cursor: pointer;
                    position: relative;
                    width: fit-content;
                    font-weight: bold;
                    padding: 0.1rem 1rem 0.5rem 0.1rem;
                }
                ul {
                    padding-left: 0.5rem;
                    li a {
                        padding: 0.25rem 0 0.15rem 1rem;
                    }
                    li a.h2 {
                        padding-left: 0.5rem;
                    }
                }
            }
        }
    }
    article.card {
        background-color: var(--col-article);
        margin: 2rem 0;
        padding: 0 1rem 2rem 1rem;
    }
}

footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-self: flex-end;
    background-color: var(--col-footer-bg);
    color: var(--col-footer-text);
    width: 100%;
    padding: 5pt 0;

    a,
    a:visited,
    a:active {
        color: var(--col-footer-text);
        text-decoration: none;
    }
}

@media screen and (max-width: 610px) {
    main {
        flex-direction: column;
        nav.site {
            max-width: 80vw;
            ul {
                display: flex;
                flex-direction: row;
            }
        }
        div {
            width: 100%;
            padding: 0;

            article:first-child {
                margin-top: 0;
            }
            article {
                padding: 0 0.5rem;
            }
        }
    }
}

