/* ---------------------- Custom font declarations --------------------------- */

@font-face {
    font-family: "Jost";
    src: url("/assets/fonts/Jost/Jost-VariableFont_wght.ttf");
}

@font-face {
    font-family: "TikTok Sans";
    src: url("/assets/fonts/TikTok_Sans/TikTokSans-VariableFont_opsz,slnt,wdth,wght.ttf");
}

/* <------------------------------------------------> */


/* <-------- Global variables and colors -----------> */


:root {
    --margins: clamp(1rem, 5vw, 5rem);
}

:root.theme-dark {
    /* Base backgrounds */
    --color-background: #131313;
    --color-on-background: #f1f1f1;

    /* Surfaces & containers */
    --color-surface: #2b2b2b;
    --color-on-surface: #f1f1f1;
    --color-surface-container: #213031;
    --color-on-surface-container: #f1f1f1;

    /* Accents */
    --color-primary: #0ad89a;
    --color-on-primary: #131313;
    --color-primary-container: #0abd87;
    --color-on-primary-container: #131313;
    --color-secondary: #4695f0;
    --color-on-secondary: #f1f1f1;

    /* Text variations */
    --color-text-muted: #c4c4c4;
    /* for borders, dividers, etc. */
    --color-outline: #49635e;

    /* Callouts */
    --color-callout-note-bg: #002e31;
    --color-callout-note-title: #00cf8a;
    --color-callout-note-content: #c1d2da;
    --color-callout-note-border: #058666;

    /* Icons */
    --icon-invert: none;
    --icon-invert-onbackground: invert();
}

:root.theme-light {
    /* Base backgrounds */
    --color-background: #cccccc;
    --color-on-background: #0f0f0f;

    /* Surfaces & containers */
    --color-surface: #c0c0e7;
    --color-on-surface: #1a1a1a;
    --color-surface-container: #cacaca;
    --color-on-surface-container: #202020;

    /* Accents */
    --color-primary: #0c00ad;
    --color-on-primary: #DCDCDC;
    --color-primary-container: #080080;
    --color-on-primary-container: #DCDCDC;
    --color-secondary: #1418f0;
    --color-on-secondary: #f1f1f1;

    /* Text variations */
    --color-text-muted: #272727;
    /* for borders, dividers, etc. */
    --color-outline: #49635e;

    /* Callouts */
    --color-callout-note-bg: #bcbdf3;
    --color-callout-note-title: #0019a7;
    --color-callout-note-content: #1a1a1a;
    --color-callout-note-border: #0b2bdf;

    /* Icons */
    --icon-invert: invert();
    --icon-invert-onbackground: none;
}

:root.theme-abyss {
    /* Base backgrounds */
    --color-background: #0a0a24;
    --color-on-background: #c0c0c0;

    /* Surfaces & containers */
    --color-surface: #151b3d;
    --color-on-surface: #c0c0c0;
    --color-surface-container: #151b3d;
    --color-on-surface-container: #c0c0c0;

    /* Accents */
    --color-primary: #45acab;
    --color-on-primary: #141414;
    --color-primary-container: #3b8898;
    --color-on-primary-container: #141414;
    --color-secondary: #3b8898;
    --color-on-secondary: #141414;

    /* Text variations */
    --color-text-muted: #b3b3b3;
    /* for borders, dividers, etc. */
    --color-outline: #284a6f;

    /* Callouts */
    --color-callout-note-bg: #021549;
    --color-callout-note-title: #00c3e6;
    --color-callout-note-content: #c1d2da;
    --color-callout-note-border: #054886;

    /* Icons */
    --icon-invert: none;
    --icon-invert-onbackground: invert();
}

:root.theme-purple {
    /* Base backgrounds */
    --color-background: #c5c5c5;
    --color-on-background: #121617;

    /* Surfaces & containers */
    --color-surface: #86A3A4;
    --color-on-surface: #121617;
    --color-surface-container: #b3c1c2;
    --color-on-surface-container: #121617;

    /* Accents */
    --color-primary: #7400b8;
    --color-on-primary: #cccccc;
    --color-primary-container: #5e098f;
    --color-on-primary-container: #cccccc;
    --color-secondary: #000bac;
    --color-on-secondary: #c5c5c5;

    /* Text variations */
    --color-text-muted: #222222;
    /* for borders, dividers, etc. */
    --color-outline: #284a6f;

    /* Callouts */
    --color-callout-note-bg: #bcb5fc;
    --color-callout-note-title: #050092;
    --color-callout-note-content: #000000;
    --color-callout-note-border: #7300ff;

    /* Icons */
    --icon-invert: invert();
    --icon-invert-onbackground: none;
}

/* <------------------------------------------------> */


/* <---------------------- General --------------------------> */


* {
    box-sizing: border-box;
    font-family: "TikTok Sans";
    transition: background-color .2s ease, color .2s ease;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    width: 100%;
}


/* <------------------------------------------------> */


/* <----------------------- Header -------------------------> */


header {
    z-index: 999;
    position: sticky;
    top: 0;
}

.nav-horizontal {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding-left: var(--margins);
    padding-right: var(--margins);
    padding-top: 1rem;
    padding-bottom: .5rem;
    background-color: var(--color-background);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-horizontal a {
    text-decoration: none;
    color: var(--color-on-background);
}

#logo-container svg {
    fill: var(--color-primary);
    width: 32px;
    height: auto;
    margin-right: .2rem;
}

#logo-container {
    margin-right: auto;
    display: flex;
    align-items: center;
    font-family: "TikTok Sans";
    color: var(--color-on-background);
    font-size: 1.1rem;
}

#logo-container mark {
    background-color: transparent;
    color: var(--color-primary);
}

.nav-links.wide {
    display: flex;
    align-items: center;
    justify-content: right;
    margin-left: auto;
    width: 50%;
}

.nav-links.wide>a:not(:last-of-type) {
    margin-right: 2rem;
}

.nav-links.sidebar {
    display: flex;
    flex-direction: column;
    align-items: start;
    margin-top: 2rem;
    margin-left: 2rem;
    font-size: 1.5rem;
}

.nav-links.sidebar>a {
    color: var(--color-on-background);
    text-decoration: none;
}

.nav-links.sidebar>a:not(:last-of-type) {
    margin-bottom: .5rem;
}

.pref-btn-container {
    display: flex;
    flex-direction: column;
    width: fit-content;
    position: fixed;
    right: var(--margins);
    bottom: 1rem;
    background-color: var(--color-surface);
    border-radius: 30px;
    padding: .4rem;
}

.pref-btn {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: .5rem;
    /* position: fixed; */
    background-color: var(--color-primary-container);
    cursor: pointer;
}

.pref-btn:first-of-type {
    margin-bottom: 2rem;
}

.pref-btn img {
    width: 28px;
    filter: var(--icon-invert);
}

.list-options {
    list-style-type: none;
    margin: 0;
    width: fit-content;
    max-height: 10rem;
    overflow-y: scroll;
    scrollbar-width: none;
    height: fit-content;
    background-color: var(--color-surface);
    padding: 0;
    border-radius: 10px;
    position: fixed;
    right: clamp(5rem, 20vw, 10rem);
    bottom: 1rem;
    transform: translateY(300px);
    opacity: 0;
    transition: transform .5s ease, opacity .3s ease;
}

.list-options button {
    text-align: left;
    font-size: 1rem;
    background-color: transparent;
    color: var(--color-on-surface);
    border: none;
    width: 100%;
    padding: .5rem 2rem .5rem 1rem;
}

.list-options li:not(:last-of-type) button {
    border-bottom: 1px solid var(--color-outline);
}

.opened {
    transform: translateY(0);
    opacity: 100;
}

h1,
h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'TikTok Sans';
}

p {
    color: var(--color-on-background);
}

.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    padding: .4rem;
    border: none;
    background-color: var(--color-primary);
}

.sidebar-btn img {
    width: 20px;
    filter: var(--icon-invert);
    cursor: pointer;
}

.nav-sidebar {
    width: 100%;
    position: fixed;
    z-index: 1000;
    padding: 1rem;
    top: 0;
    transform: translateX(100vw);
    height: 100vh;
    background-color: var(--color-surface);
    opacity: 0;
    transition: transform .3s ease, opacity .2s ease;
}

.nav-sidebar.opened {
    transform: translateX(0);
    opacity: 1;
}

/* <------------------------------------------------> */


/* <-------------------- Elements ----------------------------> */


.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    word-wrap: break-word;
    align-self: center;
    padding-left: clamp(1rem, 8vw, 10rem);
    padding-right: clamp(1rem, 8vw, 10rem);
    margin-bottom: 10rem;

}

.footnote {
    margin-left: 0;
    font-style: italic;
    color: var(--color-text-muted);
}

.icon {
    filter: var(--icon-invert-onbackground);
}

.p-link {
    color: var(--color-secondary);
    text-decoration: none;
    transition-property: opacity;
    transition-duration: .1s;
    transition-timing-function: cubic-bezier(1, .4, .5, .8);
}

.p-link:hover {
    opacity: 80%;
}

.p-link:active {
    opacity: 60%
}

.p-link img {
    vertical-align: middle;
    width: 20px;
}

.no-bp {
    font-size: 1.1rem;
    margin-left: 1rem;
    line-height: 2rem;
    list-style-type: none;
    color: var(--color-on-background);
}

.custom-list {
    font-size: 1.1rem;
    line-height: 2rem;
    color: var(--color-on-background);
}

footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    height: 12rem;
}

.p-footer {
    font-size: 1rem;
}

.p-footer a {
    color: unset;
}

.p-footer:not(:last-of-type) {
    margin-right: 1rem;
}

.custom-button{
    border: none;
    font-size: 1.2rem;
    padding: .4rem .8rem .4rem .8rem;
    width: 10rem;
    border-radius: 2px;
    position: relative;
    align-self: flex-end;
    margin-top: 1rem;

    transition-property: filter;
    transition-duration: .1s;
    transition-timing-function: ease-out;
    color: var(--color-on-primary);
    background-color: var(--color-primary);
}

.custom-button:hover{
    filter: brightness(80%);
}

.custom-button:active{
    filter: brightness(60%);
}

call-out {
    display: grid;
    width: fit-content;
    grid-template:
        ". . . ." .8rem
        ". a b ." 2.5rem
        ". c c ." max-content
        ". . . ." 2rem / 1rem 20px minmax(10rem, 30rem) 1rem;
    border-radius: 10px;
}

.callout-icon {
    width: 20px;
    filter: var(--icon-invert-onbackground);
    grid-area: a;
}

.callout-title {
    font-weight: 500;
    grid-area: b;
    text-overflow: ellipsis;
    overflow: hidden;
    text-wrap: nowrap;
    width: inherit;
    margin: 0;
    padding: 0;
    margin-left: 1rem;
}

.callout-content {
    margin: 0;
    font-size: .95rem;
    grid-area: c;
    text-wrap: wrap;
    width: inherit;
}

call-out.note{
    background-color: var(--color-callout-note-bg);
    border: 1px solid var(--color-callout-note-border);
}

call-out.note .callout-title {
    color: var(--color-callout-note-title);
}

call-out.note .callout-content {
    color: var(--color-callout-note-content);
}

call-out.note .callout-content a {
    color: var(--color-callout-note-title);
}

/* <---------------------------------------------------------> */


/* <------------------ "Under Construction" --------------> */


.under-construction-txt {
    text-align: center;
}

.h-under-construction {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.p-under-construction {
    font-size: 1.2rem;
    margin-top: 3rem;
}

#under-construction-img {
    width: 300px;
    opacity: 30%;

}

#under-construction-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8rem;
}


/* <------------------------------------------------> */


/* <-------------------- Media ----------------------------> */


@media (width <=600px) {
    .nav-links.wide {
        display: none;
    }
}

@media (width > 600px) {
    #open-sidebar {
        display: none;
    }

    .nav-sidebar {
        display: none;
    }
}

@media screen and (width <=500px) {
    .h-under-construction {
        font-size: 1.3rem;
    }

    .p-under-construction {
        font-size: .75rem;
    }

    #under-construction-img {
        width: 200px;
    }

}

@media screen and (width <=480px) {
    footer {
        display: grid;
        columns: 2;
        align-items: unset;
        justify-content: unset;
        padding-bottom: 1rem;
        margin-bottom: 10rem;
    }

    .p-footer:first-of-type {
        grid-column-start: 1;
        grid-column-end: 1;
        margin: 0;
        margin-left: 1rem;
    }

    .p-footer:not(:first-of-type) {
        height: fit-content;
        text-align: right;
        grid-column-start: 2;
        margin: 0;
        margin-right: 2rem;
    }

}

/* <------------------------------------------------> */

@media print {
    @page {
        margin: 0;
        margin-left: 10px;
        margin-right: 10px;
    }

    body {
        background-color: white;
        margin: 0;
        padding: 0;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    header {
        display: none;
    }

    footer {
        display: none;
    }
}