@import url("https://fonts.googleapis.com/css?family=Gabarito:wght=400,800&display=swap;");
@import url("https://fonts.googleapis.com/css?family=Material+Icons");

* {
    margin: 0;
}

:root {
    --bg: #362455;
    --panel: oklch(from var(--bg) calc(l - 0.05) c h);
    --panel-dark: oklch(from var(--bg) calc(l - 0.1) c h);
    --border: oklch(from var(--bg) calc(l + 0.2) c h);
    --accent: oklch(from var(--bg) calc(l + 0.6) c calc(h * 2.5 - 50));
    --scr-acc: oklch(from var(--bg) calc(l + 0.2) c calc(h * 2.2));
    --accent-light: oklch(from var(--bg) calc(l + 1) c calc(h * 2.5 - 25));
    --accent-dark: oklch(from var(--bg) calc(l + 0.5) c calc(h * 2.5 - 40));
    --selection: #4a3a66a9;
    --text: oklch(from var(--bg) calc(l + 0.6) c h);
    --heading: white;
    --muted: oklch(from var(--bg) calc(l + 0.4) c h);
    --mdark: oklch(from var(--bg) calc(l + 0.2) c h);

    /* fonts */
    --main: "Gabarito";
}

html {
    scrollbar-color: var(--scr-acc) var(--panel);
}
body {
    background: var(--bg);
    padding-top: 55px;
}


/* Navbar container */
ul.navbar {
    position: fixed;
    display: flex;
    align-items: center;
    z-index: 1000;
    list-style: none;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0 20px;
    background-color: var(--panel);
    width: 100%;
    box-sizing: border-box;
    line-height: normal;
    font-family: var(--main);
    border-bottom: var(--border) 1px solid;
}

/* Title + icon */
ul.navbar li.uri {
    display: flex;
    align-items: center;
    color: white;
    line-height: normal;
}

/* Text next to icon spacing */
ul.navbar li.uri b {
    margin-left: var(--icon-text-gap); /* precise control */
}

/* Push links to the right */
ul.navbar li.uri + li {
    margin-left: auto; /* first link after the title goes to the right */
    line-height: normal;
}

/* Links styling */
ul.navbar li a {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    line-height: normal;
    transition: background-color 0.3s ease;
    border-radius: 6px;
}

/* Text links hover (excluding icons) */
ul.navbar li a.link:hover {
    background-color: var(--panel-dark);
}

/* Icon sizing */
.site-icon {
    height: 28px;
    width: auto;
    display: inline-block;
    padding: 0;
    transform: translateY(0.15em);
}


#banner {
    height: calc(280px + 3vw);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: var(--border) 1px solid;
    font-family: var(--main);
    .titlerow {
        opacity: unset;
        display: flex;
        gap: 8px;
        color: var(--heading);
        img {
            width: 60px;
        }
    }
    ::selection {
        color: currentColor;
        background: var(--selection);
    }
}

#bgb {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/img/bgscr.png");
    background-size: 100px;
    opacity: 0.05;
    z-index: -1;
    filter: blur(2px);
    animation: gradualmove 90s linear infinite;
}

@keyframes gradualmove {
    from {
        background-position: 0% 0%;
    } to {
        background-position: 100% 100%;
    }
}


.sect {
    background-color: var(--bg);
    border-bottom: var(--border) 1px solid;
    padding: 40px;
    font-family: var(--main);
    scroll-margin-top: 40px;

    h1:not(.tbox) {
        color: var(--heading);
        margin-left: 30%;
        text-decoration: underline;
        text-decoration-color: var(--accent);
        text-decoration-thickness: 8px;
        text-underline-offset: 8px;
        margin-bottom: 16px;
    }

    h2:not(.tbox) {
        color: var(--heading);
        margin: 0.6em 28% 0.1em 28%;
    }

    h3 {
        color: var(--heading);
        margin-left: 24%;
        margin-bottom: 10px;
    }

    c {
        color: var(--accent-dark);
        background: var(--selection);
        padding: 0 2px;
        border: var(--mdark) 1px solid;
        box-shadow: 0 1.5px var(--panel-dark);
        font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
        border-radius: 4px;
        white-space: nowrap;
    }

    k {
        color: var(--heading);
        background: var(--selection);
        padding: 0 2px;
        border: var(--mdark) 1px solid;
        box-shadow: 0 1.5px var(--panel-dark);
        border-radius: 4px;
    }

    a {
        color: var(--accent-dark);
    }

    ul {
        color: var(--text);
        margin-left: 25%;
    }

    ul li {
        max-width: 500px;
    }

    ul li::marker {
        color: var(--text);
    }

    /* DETAILS & SUMMARY */
    details {
        width: 500px;
        margin-left: 25%;
        background: var(--panel);
        padding: 35px;
        border-radius: 8px;
    }
    details pre[class*="language-"] {
        margin-left: 0;
        width: calc(100% - 35px);
    }
    /* Only toolbars inside details get the default */
    details div.code-toolbar > .toolbar {
        right: 0.8em !important;
    }
    details.dark {
        background: var(--panel-dark);
    }

    summary {
        list-style: none;
        cursor: pointer;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: space-between;
        font-size: 1.5em;
        font-weight: bold;
        padding-bottom: 8px;
        border-bottom: var(--border) 2px solid;
    }

    summary::-webkit-details-marker {
        display: none;
    }

    summary::after {
        content: 'expand_more';
        font-family: 'Material Icons';
        font-weight: normal;
        font-style: normal;
        display: inline-block;
        margin-left: auto;
    }

    details[open] summary::after {
        transform: rotate(180deg);
    }

    ::selection {
        color: currentColor;
        background: var(--selection);
    }

    table {
        display: block;
        width: min(600px, 100%);
        margin-left: 25%;
        margin-right: auto;
        box-sizing: border-box;
        margin-top: 20px;
        margin-bottom: 20px;
        border-collapse: separate;
        border-spacing: 0;
        td {
            color: var(--text);
            border-bottom: var(--border) 1px solid;
            padding: 20px;
            border-left: 1px solid var(--border);
        }
        th {
            color: var(--heading);
            padding: 20px;
            border-bottom: var(--border) 1px solid;
            border-top: var(--border) 1px solid;
            border-left: 1px solid var(--border);
        }
        td.r, th.r {
            border-right: var(--border) 1px solid;
        }
        td.bl {
            border-bottom-left-radius: 8px;
        }
        th.r.t {
            border-top-right-radius: 8px;
        }
        th.tl {
            border-top-left-radius: 8px;
        }
        td.b.r {
            border-bottom-right-radius: 8px;
        }
    }

    .mdiv {
        background: var(--border);
        width: 525px;
        margin-left: 26.5%;
        height: 2px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    .ddiv {
        background: repeating-linear-gradient(
            90deg,
            var(--border),
            var(--border) 3px,
            transparent 3px,
            transparent 10px
        );
        width: 525px;
        margin-left: 26.5%;
        height: 2px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    img.inline {
        width: 100%;
        max-width: 600px;
        margin-left: 25%;
        border: var(--border) 1px solid;
        margin-top: 12px;
        margin-bottom: 12px;
        border-radius: 0.8em;
    }
}
/* psect — independent of psect2 */
p.psect {
    display: block;
    width: min(600px, 100%);
    margin-left: 25%;
    margin-right: auto;
    box-sizing: border-box;
    color: var(--text);
}
/* psect2 — independent of psect */
p.psect2 {
    display: block;
    max-width: 600px;
    color: var(--text);
    margin-left: 0;
    margin-right: auto;
}

.tbox {
    background: var(--panel);
    border: var(--border) 1px solid;
    padding: 12px;
    display: flex;
    max-width: 400px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    .tcol {
        display: flex;
        flex-direction: column;
        margin: 18px 0;
        border-left: 1px solid var(--border);
        padding-left: 18px;
    }
    h2 {
        color: var(--heading);
        text-decoration: none;
    }
    p {
        color: var(--text);
        text-decoration: none;
    }
    img {
        width: 90px;
    }
    button {
        width: 200px;
        border: none;
        border-bottom: var(--accent-light) 2px solid;
        padding: 10px 16px;
        background: var(--accent);
        border-radius: 0.8em;
        font-family: var(--main);
        cursor: pointer;
        transition: all 0.2s;
    }
    button:hover {
        transform: translateY(-5px);
        box-shadow: var(--accent-dark) 0 4px;
    }
}

.tbox:hover {
    transform: scale(1.025);
    filter: brightness(1.05);
    box-shadow: black 2px 2px 4px;
}

.sect.tut #tboxs .tbox:hover {
    transform: scale(1.025);
    filter: brightness(1.05);
    box-shadow: none;
}

#tboxs {
    margin: 40px;
    background: var(--panel-dark);
    padding: 40px;
    border-radius: 16px;
    border-bottom: var(--border) 1px solid;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 64vw;
    justify-self: center;
    a {
        text-decoration: none;
    }
}

.sect.tut #tboxs {
    background-color: transparent;
    border: none;
    padding: 0;
}

.trow {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    a {
        text-decoration: none;
    }
    button {
        width: 200px;
        border: none;
        border-bottom: var(--accent-light) 2px solid;
        padding: 10px 16px;
        background: var(--accent);
        border-radius: 0.8em;
        font-family: var(--main);
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        gap: 12px;
        justify-content: center;
        img {
            height: 1.5em;
            transform: translateY(-0.2em);
            filter: brightness(0.1);
        }
    }
    button:hover {
        transform: translateY(-5px);
        box-shadow: var(--accent-dark) 0 4px;
    }
}

.trow.long {
    button {
        width: auto;
    }
}
#cRow {
    display: flex;
}

#content {
    width: calc(100% - 230px);
    position: absolute;
    right: 0;
}

#explorer {
    background: var(--panel);
    padding: 40px;
    font-family: var(--main);
    width: 200px;
    position: fixed;
    z-index: 5;
    border-right: var(--border) 1px solid;
    h2 {
        color: var(--heading);
        border-bottom: var(--border) 1px solid;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    ul {
        list-style-type: none;
        padding: 0;
        overflow: auto;
        height: 70vh;
    }
    ul li {
        margin: 0;
        color: var(--text);
        padding: 10px 16px;
        border-radius: 6px;
        transition: all 0.2s;
    }
    ul li:hover {
        background: var(--panel-dark);
        cursor: pointer;
    }
}

@font-face {
    font-family: Seti;
    src: url("/fonts/seti.woff2");
}

.seti {
    font-size: 24px;
    font-family: "Seti";
}

/* 404 */
#box404 {
    font-family: var(--main);
    width: 400px;
    padding: 40px;
    border: var(--border) 1px solid;
    border-radius: 8px;
    background: var(--panel);
    h1 {
        color: var(--heading);
    }
    p {
        color: var(--text);
    }
    a {
        color: var(--accent-dark);
    }
    h6 {
        color: var(--accent-dark);
    }
    ::selection {
        color: currentColor;
        background: var(--selection);
    }
}
.b404 {
    text-decoration: none;
}

#b4 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80vh;
}

.trow button::selection {
    color: currentColor;
    background-color: currentColor;
}