:root {
    height: 100%;

    --theme-clr: rgb(216, 0, 255);
    --theme-clr-alt: rgb(102, 0, 142);
    --theme-clr-trans: rgba(225, 0, 255, 0.4);

    scrollbar-gutter: stable;
}

* {
    font-family: sans-serif;
    color-scheme: dark;
}

html:has(div#nav.open) {
    overflow: hidden;
}

@media (pointer: fine) {
    div#pages:hover {
        --spacing: 8px;
        --radius: 2px;
    }

    div.nav-item:hover {
        background: #222a;
    }
}

dynamic-text {
    opacity: 0;
}

dynamic-text.display {
    opacity: 1;
}



nav {
    position: sticky;
    top: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    z-index: 2;
}

div#nav {
    translate: -100% 0;
    transition: translate .5s ease;
    height: 100vh;
    width: min(300px, 100vw);
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0.5rem;
    background: #444a;
    border-radius: 0 2rem 2rem 0;
    overflow: clip;
    backdrop-filter: blur(8px);
    background: #444a;
    border: 1px solid var(--theme-clr-alt);
    z-index: 2;
    pointer-events: all;
}

div#nav-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    align-content: flex-start;
}



div#nav.open {
    position: fixed;
    translate: 0% 0;
    box-shadow: 2px 2px 7px black;
}

div#body-overlay {
    display: none;
    position: fixed;
    height: 100vh;
    width: 100vw;
    background: #0008;
    top: 0;
    z-index: 2;
}

div#body-overlay.active {
    display: block;
}

div#quick-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0px;
    max-width: calc(100vw - 16px);
    height: 2.5rem;
    box-sizing: border-box;
    gap: 0rem;
    padding: 0 0;
    position: relative;
    border-radius: 2rem;
    overflow: clip;
    backdrop-filter: blur(8px);
    background: #444a;
    border: 1px solid var(--theme-clr-alt);
}

h1#title,
h1.title {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

body {
    margin: 0;
}

div#main {
    position: relative;
    width: min(1500px, 100%);
    margin: auto;
    padding-inline: 8px;
    box-sizing: border-box;
}

div.nav-item {
    height: 2.5rem;
    padding: 0 1rem;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-wrap: nowrap;
    border-radius: 1rem;
    -webkit-tap-highlight-color: transparent;
}

div.nav-item.quick-item {
    border-radius: 0;
    flex-grow: 1;
}

div#pages {
    aspect-ratio: 1;
    box-sizing: border-box;
    --spacing: 10px;
    --size: 8px;
    --radius: 3px;
    padding: var(--spacing);
    flex-grow: 0;
    transition: padding .2s, height .2s, border-radius .2s ease;
}

div#pages:active {
    --spacing: 12px;
    --size: 6px;
    --radius: 2px;
}

div#nav-icon {
    position: relative;
    width: 100%;
    height: 100%;
    transition: inherit;
}

div.nav-icon-part {
    position: absolute;
    background: white;
    height: var(--size);
    transition: inherit;
    aspect-ratio: 1;
}

span.nav-text {
    user-select: none;
    -webkit-user-drag: none;
}

div#nav-icon-top-left {
    top: 0;
    left: 0;
    border-radius: var(--radius) 2px 2px 2px;
}

div#nav-icon-top-right {
    top: 0;
    right: 0;
    border-radius: 2px var(--radius) 2px 2px;
}

div#nav-icon-bottom-left {
    bottom: 0;
    left: 0;
    border-radius: 2px 2px 2px var(--radius);
}

div#nav-icon-bottom-right {
    bottom: 0;
    right: 0;
    border-radius: 2px 2px var(--radius) 2px;
}



@media (max-width: 500px) {

    div#nav {
        border: none;
        border-radius: 0;
        box-shadow: none;
        width: 100vw;
    }

    div#nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: space-around;
    }

    div.nav-item.standard-item {
        width: 120px;
        height: 100px;
        background: #0002;
    }

    div.nav-text {
        font-size: 150%;
    }
}


div.nav-item.selected {
    background: var(--theme-clr-trans);
}

div.nav-item.quick-item.selected {
    position: absolute;
    right: 0;
}

div.nav-item:active {
    background: #222a;
    filter: brightness(.8);
}

img {
    max-width: 100%;
}