:root {
    font-size: 20px;

    /* Colors */
    --c1: #ff8340;
    --c2: #ff7755;
    --c3: #ffb26a;
    --c4: #ffdd7f;
    --c5: #d2ff7f;
    --c6: #b0f6ff;
    --c7: #ffa8b4;

    --bg1: #1e1916;
    --bg2: #261f1a;
    --bg3: #423129;

    --text: #e8ccb6;

    --red: #ff757f;
    --yellow: #fad779;
    --green: #9ece6a;
    --blue: #7dcfdc;
    --purple: #d7b9ff;
    --white: #ffffff;

    /* Responsive font sizes using clamp(min, viewport, max) */
    --title: clamp(1.5em, 5vw, 2em);
    --h1: clamp(1.25em, 4vw, 1.75em);
    --h2: clamp(1.1em, 3vw, 1.5em);
    --h3: clamp(1em, 2.5vw, 1.25em);
    --p: clamp(0.9em, 2vw, 1em);
}

/* Reusable Classes */
.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Global */
* {
    box-sizing: border-box;
}

body {
    display: flex;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg2);
    color: var(--text);
    font-size: var(--p);
    font-family: 'Times New Roman', Times, serif;
    flex-direction: row;
    /* default desktop layout */
}

/* Headings */
h1 {
    font-size: var(--h1);
    color: var(--c2);
    margin: 0.67em 0 0.3em 0;
}

h2 {
    font-size: var(--h2);
    color: var(--c3);
    margin: 0.3em 0;
}

h3 {
    font-size: var(--h3);
    color: var(--c4);
    margin: 0.3em 0;
}

h4 {
    font-size: var(--h3);
    color: var(--c5);
    margin: 0.3em 0;
}

h5 {
    font-size: var(--h3);
    color: var(--c6);
    margin: 0.3em 0;
}

p {
    margin-top: 0;
    text-align: justify;
}

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

p>a {
    color: var(--c7);
}

a:hover {
    scale: 0.90;
    filter: brightness(150%) saturate(150%);
}

img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

hr {
    margin: 1em 0;
    border: 2px solid var(--bg2);
}

b {
    color: var(--c5);
}

/* Layout containers */
#header {
    display: flex;
    flex-direction: column;
    background-color: var(--bg1);
    color: var(--text);
    width: 18em;
    max-width: 25%;
    min-width: 150px;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

#body {
    flex: 1;
    max-height: 100vh;
    margin-left: 5em;
    margin-right: 2em;
    padding: 2em 2em 2em 2em;
    padding-top: 0;
    background-color: var(--bg3);
    overflow-y: auto;
}

/* Header internal */
#header-text {
    margin-top: 0.5em;
    font-size: var(--title);
}

#header-logo {
    display: flex;
    font-size: var(--title);
    height: 3em;
    justify-content: center;
    align-items: center;
}

#header-logo>img {
    height: 75%;
    aspect-ratio: 1/1;
}

#header-navigation {
    display: flex;
    flex-direction: column;
    font-size: var(--h2);
}

.navigation-option {
    width: 90%;
    line-height: 2em;
    margin-top: 0.5em;
    background-color: var(--bg3);
    border-radius: 10em;
}

#showcase {
    display: flex;
    width: 16em;
    height: 13em;
    justify-content: center;
    align-items: center;
    margin: auto;
}

#showcase>img {
    height: 80%;
    flex-shrink: 0;
}

/* Flex items */
.flex-item {
    display: flex;
    flex-direction: column;
    width: 12em;
    max-height: 10em;
    margin-bottom: 1em;
}

.alternate-item {
    width: 11em;
}

.flex-item>div {
    font-size: var(--h3);
    color: var(--c4);
    text-align: center;
}

.flex-item>img {
    max-height: 8.75em;
    flex-shrink: 0;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 1em;
}

::-webkit-scrollbar-track {
    background-color: var(--bg1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--c1);
    border-radius: 10px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {

    /* Stack layout */
    body {
        flex-direction: column;
    }

    #header {
        position: sticky;
        overflow: unset;
        width: 100%;
        max-width: none;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    #header-top {
        height: 75%;
        gap: 0.5em;
    }

    #showcase {
        width: auto;
        height: auto;
    }

    #showcase>img {
        height: calc(3em * 4 / 3);
        flex-shrink: 0;
    }

    #header-navigation {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        font-size: 0.8em;
    }

    .navigation-option {
        width: auto;
        line-height: 2em;
        padding: 0.5em;
        margin-bottom: 1em;
        background-color: var(--bg3);
        border-radius: 1em;
    }

    .flex-item {
        width: 50%;
    }

    /* Body fills remaining space */
    #body {
        margin: 0;
        margin-top: 0.5em;
        max-height: none;
        padding: 1em;
        overflow: visible;
    }
}