:root {
    --twenty-px: 20px /*min(1.25vw, 2.25vh)*/;
    --ten-px: 10px /*min(0.625vw, 1.125vh)*/;

    --bright-col:rgb(151, 220, 77);
    --dark-col:rgb(128, 198, 81);
    --highlight-col:#9dff00;
    --highlight-trans: #9dff0080;
    --highlight-col-2:rgb(255, 0, 0);
    --lightbg-col:rgb(236, 248, 201);
    --sidebar-col:rgb(199, 234, 134);
    --section-col:rgb(255, 209, 209);
    --shadow-col:rgb(19, 70, 3);
    --shadow-col-2:rgb(70, 3, 3);
    --text-col:rgb(15, 53, 1);
    --anchor-col:rgb(254, 82, 82);
    --button-col-2:rgb(72, 118, 12);
    --svg-col:rgb(244, 95, 95);

    --navbar-height: 9vh;
    --footer-height: var(--navbar-height) + 20px;
    --main-height: calc(100vh - var(--navbar-height));
    
    --fs-xl: max(5vw, 6vh);
    --fs-l: max(4vw, 5vh);
    
    --fs-m: max(1.33vw, 2.75vh);
    --fs-s: max(1.13vw, 2.5vh);
    --fs-xs: max(0.9vw, 2.25vh);
    --fs-footer: max(0.75vw, 2vh);

    --fs-nav1: 1.33vw;
    --fs-nav2: 0.9vw;

    --border-params: white solid min(0.3vw, 0.5vh)
} 

@media (max-width:1800px) {
    :root {
        --fs-xl: min(5vw, 6vh);
        --fs-l: min(4vw, 5vh);
        
        --fs-m: min(1.33vw, 2.75vh);
        --fs-s: min(1.13vw, 2.5vh);
        --fs-xs: min(0.9vw, 2.25vh);
        --fs-footer: min(0.75vw, 2vh);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: Poppins, sans-serif /* todo: new font at some point!!! */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--navbar-height) + var(--twenty-px)); 
}

body {
    background-color: var(--lightbg-col);
    display: grid;
    grid-template-columns: calc(25vw - var(--ten-px) * 2.5) calc(75vw - var(--ten-px) * 2.5);
    grid-template-rows: var(--navbar-height) 1fr calc(var(--navbar-height)*0.6);
    grid-template-areas: 
    "navbar navbar"
    "sidebar main"
    "footer footer";
    min-height: calc(100vh - var(--twenty-px));
    margin: 0px var(--twenty-px) var(--ten-px) var(--ten-px);
    gap: var(--ten-px);
    transition: grid-template-columns 0.3s ease;
}

nav {
    grid-area: navbar;
    position: sticky;
    top: var(--ten-px);
}
aside {
    grid-area: sidebar;
}
main {
    grid-area: main;
}
footer {
    grid-area: footer;
}

p {
    max-width: fit-content;
    /* transition: transform 0.3s ease, scale 0.3s ease; */
    color: var(--text-col);
}


nav {
    margin-top: var(--ten-px);
    text-align: center;
    background-color: var(--bright-col);
    height: var(--navbar-height);
    align-items: center;
    justify-content: center;
    display: flex;
    z-index: 3;
    border-radius: calc(var(--navbar-height)/2);
    overflow: hidden;
}

svg {
    fill: var(--svg-col)
}

.navbar-content {
    height: var(--navbar-height);
    display: flex;
    flex-grow: 1;
    flex-shrink: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ten-px) calc(var(--ten-px) * 5);
}

.navbar-content h1 {
    flex-grow: 2;
    text-align: center;
    justify-content: center;
    align-items: center;
    color: var(--anchor-col);
    margin: 0;
    padding: 0;
    font-size: var(--fs-nav1);
    transition: transform 0.3s ease, scale 0.3s ease;
    line-height: 1em;
}

.navbar-content h2 {
    flex-grow: 1;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--fs-nav2);
    font-weight: normal;
    transition: transform 0.3s ease, scale 0.3s ease; 
    margin: 0;
    padding: 0;
}

.navbar-content h1:hover, .navbar-content h2:hover {
    transform: scale(1.03); 
}

/* .logo {
    width: calc(var(--navbar-height)*1.2);
    aspect-ratio: 1;
    position: fixed; 
    z-index: 2; 
    right: 10px;
    transform: translateY(-50%);  
    transition: transform 0.3s ease, scale 0.3s ease;
} */

/* .logo::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    border-radius: calc(var(--navbar-height)/2);
    box-shadow: white 110% 110%;
    opacity: 0.7; 
    transition: scale 0.3s ease;
    z-index: -1
}

.logo:hover {
    transform: translateY(-50%) scale(1.05); 
    ::before {
        transform: scale(1.05); 
    }
} */

.profile {
    align-items: center;
    display: flex;
    flex-grow: 0;
    flex-direction: column;
    justify-content: center;
    padding: 0px min(1vw, 2vh);
    max-width: 40%;
}

.profile-img {
    max-height: 70%;
    aspect-ratio: 1;
    border-radius: 50%;  
    position: relative;
    object-fit: cover;  
    border-radius: 50%; 
    border: var(--border-params);
    transition: transform 0.3s ease, rotate 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05) rotate(1deg); 
}

/* .img-sub {
    display: flex;
    height: 10%;
    align-items: center;
    color: white;
    font-size: var(--fs-xs);
    text-align: center;
    padding-top: 5px;
    font-style: italic;
    opacity: 0.5;
    text-wrap: nowrap;
} */

.container {
    margin-top: var(--ten-px);
    display: flex;
    flex-direction: column; 
    gap: var(--ten-px);
    align-items: center;
    justify-content: center;
}

.content {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    height: calc(var(--main-height) - var(--ten-px) * 3);
    max-width: 100%
}

.section {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-s);
    border-radius: 8vh;
    background-color: var(--section-col);
}

.sidebar { 
    position: sticky;
    align-self: start;
    top: calc(var(--navbar-height) + var(--twenty-px));
    border-radius: 8vh;
    display: flex;
    min-width: 22.5vw;
    max-width: 25vw;
    flex-shrink: 0;
    flex-grow: 0;
    flex-direction: column; /* vertically */
    height: calc(var(--main-height) - var(--footer-height) - var(--ten-px) * 5);
    background-color: var(--sidebar-col);
    padding: var(--twenty-px) var(--ten-px);
}

.info {
    max-height: 50%;
    flex-grow: 1; 
    display: flex;
    align-items: stretch; 
    max-width: 100%;
}

.current {
    max-width: 100%;
    max-height: 50%;
    flex-grow: 1;
    display: flex; 
    justify-content: center;
    align-items: center; 
    padding: 0 5vh;
    flex-direction: column;
    gap: 20px;
}

p { 
    text-align: center;
    font-size: var(--fs-s);
}

.bio {
    text-align: center;
    max-width: fit-content;
    padding: 0 min(4vh, 2vw) 0 0;
    height: 100%;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    display: flex;
    gap: 2vh;
    font-size: var(--fs-s);
}


.text {
    word-wrap: break-word;
    color: white;
}

.snake {
    display: flex; /* horizontal */
    align-items: center;
    justify-content: stretch;
    gap: 2vh;
    padding: 0 20px;
    max-height: 50%
}

.snake-text {
    flex-grow: 1;
    font-size: var(--fs-s);
    padding-right: var(--twenty-px)
}

.snake a {
    height: fit-content;
    min-width: 15%;
    align-items: center;
    justify-content: center;
}

.github-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(var(--fs-s), 3vh, var(--fs-m));
    line-height: var(--twenty-px);
    border: var(--border-params);
    border-radius: 8vh; 
    transition: transform 0.3s ease-in-out, rotate 0.3s ease; 
    text-wrap: wrap;
    line-height: 1em;
    padding: 0.5em 0.7em;
    background-color: var(--bright-col);
    p {
        color: white
    }
}

.github-button svg {
    height: 9vh;
    aspect-ratio: 1;
}

.github-button:hover {
    transform: scale(1.03) rotate(1.5deg);
}

.sidebar ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    height: 100%;
    width: 100%;
    gap: 5vh;
    justify-content: space-between;
}

.sidebar li {
    width: 100%;
    position: relative;
    text-align: center;
    flex-grow: 1;
}

.sidebar li::before {
    content: "";
    background-color: var(--bright-col);
    border: var(--border-params);
    z-index: 1;
    position: absolute;
    border-radius: 50%; 
    height: 120%;
    aspect-ratio: 1;
    top: 50%;
    left: 0;
    transform: translateY(-50%);  
    transition: transform 0.3s ease, scale 0.3s ease; 
    pointer-events: none;
}

.sidebar li a svg {
    position: absolute;
    height: 120%;
    aspect-ratio: 1;
    top: 50%;
    left: min(0.3vw, 0.5vh);
    transform: translateY(-50%);  
    transition: transform 0.3s ease, scale 0.3s ease, rotate 1s ease; 
    z-index: 2;
}

.sidebar li a svg .about-icon {
    width: 13.2vh
}

.sidebar a {
    display: block;
    text-decoration: none;
    height: 100%;
}

.expand-button {
    display: block;
    width: 0; 
    padding: 0 1em 0 var(--twenty-px);
    height: fit-content;
    font-size: var(--fs-m);
    color: white;
    border: var(--border-params);
    border-radius: calc(var(--twenty-px) * 5);
    cursor: pointer;
    outline: none;
    transition: width 0.3s ease, opacity 0.3s ease;  
    opacity: 0;  
    text-align: right;
    overflow: hidden;
    white-space: nowrap;
    height: 100%;
    background-color: var(--button-col-2);
}

.sidebar li:hover::before {
    transform: translateY(-50%) scale(1.05); 
    background-color: var(--dark-col);
}

.sidebar li svg:hover {
    transform: translateY(-50%) scale(1.05) rotate(360deg); 
}

.expand-button:hover {
    text-decoration: none;
}

.sidebar li:hover .expand-button {
    opacity: 1;
    width: 100%;
    transform-origin: left;
    text-decoration: none;
}

.box {
    box-shadow: 0 0 0.5em white;
}

footer {  
    display: flex;
    flex-direction: column;
    height: calc(var(--footer-height) - var(--twenty-px));
    font-size: var(--fs-xs);
    background-color: var(--bright-col);
    text-align: center;
    padding: 0.5vh calc(var(--ten-px) * 5);
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--footer-height)/2);
    margin-bottom: var(--ten-px)
}


.navbar a, .footer a {
    text-decoration: none; 
    font-weight: bold;
    color: var(--anchor-col);
    /*text-shadow: 0 0 0.1em var(--shadow-col);*/
}


.navbar a:hover, .footer a:hover {
    text-decoration: none; 
    text-shadow: 0 0 0.1em var(--highlight-col);
}

p a {
    font-weight: 600;
    color: var(--text-col);
}

p a:hover:not(.vanilla) {
    text-decoration: underline; 
    color: var(--button-col-2)
}

a {
    text-decoration: none; 
}

/* @media (max-width: 1520px) {
    .expand-button {
        display: none;
    }
    .sidebar li {
        width: fit-content;
        ::before {
            left: 50%
        }
    }
    body {
        grid-template-columns: 1fr 6fr; 
    }
    .sidebar {
        max-width: none;
        min-width: 0;
        width: fit-content;
        ul {
            width: fit-content;
            justify-content: center;
            align-items: center;
        }
    }
} */

/*@media (max-width:1800px) {
    :root {
        --fs-xl: min(5vw, 6vh);
        --fs-l: min(4vw, 5vh);
        --fs-m: min(2vw, 2.5vh);
        --fs-s: min(1.75vw, 2vh);
        --fs-xs: min(1.25vw, 1.5vh);
        --fs-footer: min(1vw, 1.25vh);
    }
}*/

@media (max-width:900px) {
    nav h2 {
        display: none;
        position: relative
    }
}

@media (max-width:1024px) { /*ipad width*/
    :root { /* make mobile font sizes biggerrr */
        --navbar-height: 5vh;
        --footer-height: --navbar-height + 20px;
        --fs-xl: 6vh;
        --fs-l: 5vh;
        --fs-footer: clamp(0.5vw, 1vh, 1.5vh)
    }

    .sidebar {
        display: none;
        left: -300px
    }
    body {
        grid-template-areas: 
        "navbar"
        "main"
        "footer";
        grid-template-columns: 96vw;
        grid-template-rows: var(--navbar-height) 1fr var(--footer-height);
        justify-content: center;
    }
    
    .section, .content {
        flex-direction: column;
        justify-content: center;
        padding: 2vh;
        align-items: center; 
        justify-content: flex-start;
        height: auto;
    }
    .profile-img {
        width: 48vw;
        height: 48vw;
        max-height: 0;
        aspect-ratio: 1;
    }
    .bio {
        padding: 0 3vh 0 0
    }
    .profile {
        justify-content: center;
        align-items: center;
        max-height: 100%;
        padding: 2vh 0;
        width: 48vw
    }
    .current, .bio {
        justify-content: center;
        align-items: center;
        width: 100%;
        flex-grow: 1;
        gap: 5vh;
    }
    .profile {
        justify-content: center;
        align-items: center;
        flex-grow: 0;
        width: 48vw;
        height: 48vw;
    }
    .snake, .info {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        a {
            width: 90%;
            .github-button {
                width: 100%
            }
        }
    }

    .empty {
        height: 280vh
    }

    footer {
        border-radius: calc(var(--footer-height)/2);
    }
}