@import url(https://static.caesi.dev/css/general.css);
@font-face {
    font-family: OpenSans;
    src: url(https://static.caesi.dev/fonts/OpenSans-Regular.ttf)
}

:root {
    font-size: 1.1em;
    font-size: minmax(1em, 4vw);
}

* {
    margin: 0px;
    box-sizing: border-box;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

html,
body {
    background-color: var(--background-color);
    height: 100%;
    width: 100%;
}

body {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: auto;
    color: var(--text-color);
    font-family: OpenSans;
}

main,
aside,
nav {
    grid-column: auto;
}

nav {
    transition: transform 0.1s linear;
    transform: translateX(-100%);
    display: block;
    position: fixed;
    height: 100%;
    padding: 1%;
    margin: minmax(0px, 20px);
    order: 1;
    top: 0px;
    bottom: 0px;
    left: 0px;
    flex-flow: column;
    overflow-y: scroll;
}

nav a {
    cursor: pointer;
}

main {
    background-color: var(--background-color);
    order: 3;
}

aside {
    transition: transform 0.1s linear;
    transform: translateX(100%);
    display: block;
    position: fixed;
    height: 100%;
    order: 2;
    top: 0px;
    bottom: 0px;
    right: 0px;
}

#explorer>a {
    display: flex;
    flex-flow: column;
    padding: 3px 20px;
    color: var(--text-color);
    white-space: nowrap;
}

aside,
nav {
    background-color: var(--foreground-color);
}

article {
    overflow: auto;
    margin: 0 auto;
    padding: 5%;
    background-color: var(--article-background-color);
}

aside p,
nav p {
    text-align: center;
    padding: 10px;
}

article {
    width: clamp(10ch, 100%, 75ch);
}

article img.status {
    width: 50%;
}

article p.status {
    font-size: 1.2em;
    place-self: center;
    text-align: center;
    padding: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 20px 0px;
}

pre {
    border: solid 1px var(--code-border-color);
    border-radius: 5px;
    margin: 15px 0px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    overflow-y: scroll;
    padding: 5px;
}

code {
    border: solid 1px var(--code-border-color);
    border-radius: 5px;
    margin: 5px;
    padding: 2px;
}

pre code {
    border: none;
    margin: 0px;
    padding: 0px;
}

table {
    line-break: anywhere;
    width: 100%;
    border: solid 1px var(--code-border-color);
    border-radius: 10px;
    margin: 10px 0px;
    border-spacing: 0;
}


/*rounded borders*/

table>thead>tr>th:nth-child(1) {
    border-top-left-radius: 10px;
}

table>thead>tr>th:nth-last-child(1) {
    border-top-right-radius: 10px;
}

table>tbody>tr:nth-last-child(1)>td:nth-child(1) {
    border-bottom-left-radius: 10px;
}

table>tbody>tr:nth-last-child(1)>td:nth-last-child(1) {
    border-bottom-right-radius: 10px;
}

th,
td {
    border: solid 1px var(--code-border-color);
    padding: 5px;
}

#tableofcontents,
.subsections {
    display: flex;
    flex-flow: column;
    border: solid var(--seperator-color);
    border-width: 0px 0px 1px 0px;
}

.subsections>a,
aside>a {
    padding: 5px 20px;
    color: var(--text-color);
}

.subsections a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.subsections a:nth-child(1),
aside>a {
    font-weight: bold;
}

.subsections>a:nth-child(1n+2),
.subsections>.subsections:nth-child(1n+2) {
    height: 0px;
    visibility: hidden;
}

.subsections:hover>a:nth-child(1n+2),
.subsections:hover>.subsections:nth-child(1n+2),
.subsections:focus-within a:nth-child(1n+2),
.subsections:focus-within .subsections:nth-child(1n+2) {
    height: auto;
    visibility: visible;
}

.subsections a:focus {
    text-decoration: underline;
}

@media only screen and (min-width: 100ch) {
    body {
        display: grid;
        grid-template-rows: 1fr;
        grid-template-columns: auto 1fr auto;
    }
    nav {
        transform: translateX(0%) !important;
        transform: translateX(0px);
        display: flex;
        position: unset;
        height: unset;
        width: unset;
        order: unset;
        grid-column: 1/2;
    }
    main {
        overflow-y: scroll;
        order: unset;
        grid-column: 2/3;
    }
    aside {
        transform: translateX(0%) !important;
        transform: translateX(0px);
        display: block;
        overflow-y: scroll;
        order: unset;
        grid-column: 3/4;
        height: 100vh;
        position: sticky;
        top: 0;
    }
    article {
        margin-top: 3%;
    }
}

@media only screen and (min-width: 2000px) {
     :root {
        font-size: 2em;
    }
}

@media (prefers-color-scheme: light) {
    .logo {
        filter: invert(0.7);
    }
}