/*

Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/

*/

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

#root, #__next {
    isolation: isolate;
}

/*

Progressive font-size

*/

@media (min-width: 576px) {
    html {
        font-size: 106.25%;
    }
}
@media (min-width: 768px) {
    html {
        font-size: 112.5%;
    }
}
@media (min-width: 1024px) {
    html {
        font-size: 118.75%;
    }
}
@media (min-width: 1280px) {
    html {
        font-size: 125%;
    }
}
@media (min-width: 1536px) {
    html {
        font-size: 131.25%;
    }
}

/*

Project design

*/

::selection {
    background-color: #1f6feb;
    color: #fff;
}

html, body {
    height: 100%;
}

body {
    font-family: system-ui, sans-serif;
    background-color: #0d1117;
    color: #f0f6fc;
}

a {
    color: #4493f8;
}

/*

Main layout

*/

main {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    min-height: 100%;
    gap: 1rem;
    padding: 1rem;
}

/* 

Treeview

*/

main aside {
    top: 0;
    padding-right: 1rem;
    border-right: .0625rem solid rgba(61, 68, 77, 0.702);
    overflow: auto;
}

/* Reset */
details summary::-webkit-details-marker { display: none; }
details summary::marker { display: none; }
details summary::-moz-list-bullet { list-style-type: none; }

details > summary {
    cursor: pointer;
    display: inline-block;
    user-select: none;
    text-decoration: underline;
}

details > summary > span {
    display: none;
}

details[open] > summary > span {
    display: inline-block;
}

details > section {
    padding-left: .75rem;
}

details[open] > section {
    border-left: .0625rem solid rgba(61, 68, 77, 0.702);
    border-left: .0625rem solid rgb(247, 129, 102);
}

/* 

Markdown article

*/

article .anchor > a {
    color: #656c76;
    text-decoration: none;
    margin-left: .25em;
    opacity: 0;
}

article .anchor:hover > a {
    opacity: unset;
}
