:root
{
    --dark-color: #151515;
    --dark-color-transparent: #15151500;
    --light-color: #262626;
    --square-size: 50px;
    --squares-per-row: 21;
    --text-starting-column: 5;
    --socials-starting-column: 3;
    --overmij-section-rows: 7;
    --section-rows: 7;
    --project-rows: 8;
    --overmij-grid-columns: 13;
    --square-borderwidth: 10px;
    --rows-between-sections: 3;
    --skills-rows: 1;
    --overmij-maincontent-rows: 3;
    --skills-starting-row: 5;
    --header-padding-divider: 2;
    --carousel-left-offset: -5;
    --carousel-transition: 450ms ease-in-out;
    --carousel-side-width: 2;
}

*
{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    scroll-behavior: smooth;
}

body
{
    height: 100%;
    width: 100%;
    background-color: var(--dark-color);
    color: white;
}

a
{
    color: lightgray;
    cursor: pointer;
    transition: color 0.3s ease;
}

a:hover
{
    color: white;
}

div#container
{
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

canvas#background
{
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

header
{
    position: fixed;
    display: flex;
    grid-template-columns: repeat(var(--squares-per-row), 1fr);
    justify-content: space-between;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--square-size);
    background-color: var(--dark-color);
    color: white;
    z-index: 1000;
    transition: 300ms ease-in-out;
}

header.scrolled
{
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header>.logo
{
    width: calc(var(--square-size));
    height: calc(var(--square-size));
    background-image: url('../images/logo.svg');
    background-repeat: no-repeat;
    background-size: calc(var(--square-size) * 0.75);
    background-position: center;
}

header>nav>ul
{
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding-right: calc(var(--square-size) / var(--header-padding-divider));
    width: 100%;
    gap: calc(var(--square-size) / var(--header-padding-divider));
}

header>nav>ul>li>a
{
    font-size: 1.2em;
    text-decoration: none;
}

main>section
{
    height: calc(var(--square-size) * var(--section-rows));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--dark-color);
    color: white;
}

main>section#hero
{
    height: calc(var(--square-size) * var(--rows-fitting-on-screen));
    background-color: transparent;
    gap: var(--square-borderwidth);
}

main>section#hero>p
{
    font-size: 2.3em;
    font-weight: 300;
}

h1
{
    font-size: 6em;
    font-weight: 700;
}

h2
{
    font-size: 3em;
    font-weight: 600;
}

h3
{
    font-size: 2em;
    font-weight: 500;
}

main>section#project
{
    margin-top: calc(var(--square-size) * 2);
    padding: var(--square-size) calc(var(--square-size) * 2);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: auto;
    align-items: center;
    background-color: var(--dark-color);
    color: white;
}

main>section#project>.main-content
{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--square-size);
    max-height: 75%;

}

main>section#project h2
{
    margin-bottom: 2rem;
}

main>section#project .text
{
    gap: 1rem;
}

main>section#project img
{
    max-height: 100%;
    max-width: 40%;
}

main>section#overmij,
main>section#projecten
{
    margin-bottom: calc(var(--square-size) * var(--rows-between-sections));
}

main>section#overmij
{
    height: calc(var(--square-size) * var(--overmij-section-rows));
    padding: var(--square-size);
    display: grid;
    grid-template-rows: repeat(calc(var(--overmij-section-rows) - 2), 1fr);
}

main>section#overmij>div.main-content
{
    grid-row: 1 / span var(--overmij-maincontent-rows);
    display: grid;
    grid-template-columns: repeat(var(--overmij-grid-columns), var(--square-size));
    grid-template-rows: repeat(3, var(--square-size));
}

main>section#overmij>div.main-content>div.text
{
    grid-row: 1 / span var(--overmij-maincontent-rows);
    grid-column: 1 / span calc(var(--overmij-grid-columns) - 4);
    margin: calc(var(--square-borderwidth) / 2);
}

div.text
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--square-borderwidth);
}

main>section#overmij>div.main-content>img
{
    grid-row: 1 / span 2;
    grid-column: calc(var(--overmij-grid-columns) - 2) / span 2;
    width: calc(var(--square-size) * 2 - 10px);
    margin: calc(var(--square-borderwidth) / 2);
}

main>section#overmij>div#skills
{
    grid-row: var(--skills-starting-row) / span var(--skills-rows);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    height: 100%;
}

main>section#overmij>div#skills>div.skill
{
    width: calc(var(--square-size) - var(--square-borderwidth));
    height: calc(var(--square-size) - var(--square-borderwidth));
    margin: calc(var(--square-borderwidth) / 2);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-color);
}

main>section#overmij>div#skills>div.skill>img
{
    height: calc(var(--square-size) * 0.75);
    width: auto;
}

main>section#projecten
{
    padding: var(--square-size) 0;
    display: grid;
    grid-template-rows: repeat(calc(var(--section-rows) - 2), 1fr);
    grid-template-columns: repeat(var(--squares-per-row), 1fr);
}

main>section#projecten>div.text
{
    grid-column: var(--text-starting-column) / span var(--squares-per-row);
    grid-row: 1 / span 1;
    display: flex;
    flex-direction: column;
    align-items: start;
}

main>section#projecten>div#carousel-wrapper
{
    grid-row: 3 / span 3;
    grid-column: 1 / span var(--squares-per-row);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    width: 100%;
}

main>section#projecten>div#carousel-wrapper>#leftside,
main>section#projecten>div#carousel-wrapper>#rightside
{
    width: calc(var(--square-size) * var(--carousel-side-width));
    height: calc(var(--square-size) * 3);
    background: linear-gradient(to right, var(--dark-color), var(--dark-color-transparent));
    display: flex;
    justify-content: end;
    align-items: center;
    z-index: 5;
}

main>section#projecten>div#carousel-wrapper>#rightside
{
    background: linear-gradient(to left, var(--dark-color), var(--dark-color-transparent));
    justify-content: start;
}

main>section#projecten>div#carousel-wrapper #left-arrow,
main>section#projecten>div#carousel-wrapper #right-arrow
{
    width: var(--square-size);
    height: var(--square-size);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-color);
    cursor: pointer;
    z-index: 10;
    border: calc(var(--square-borderwidth) / 2) solid var(--dark-color);
    user-select: none;
    background-image: url("../images/arrow-left.svg");
    background-repeat: no-repeat;
    background-size: calc(var(--square-size) * 0.5);
    background-position: center;
}

main>section#projecten>div#carousel-wrapper #right-arrow
{
    background-image: url("../images/arrow-right.svg");
}

#carousel
{
    overflow: hidden;
    display: flex;
    height: calc(var(--square-size) * 3);
    justify-content: center;
    align-items: center;
    position: absolute;
    gap: var(--square-size);
    left: calc(var(--square-size) * var(--carousel-left-offset));
    top: 0;
}

#carousel>.carousel-item
{
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    border: var(--dark-color) solid 2px;
    width: calc(var(--square-size) * 3);
    height: calc(var(--square-size) * 3);
    color: white;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    transition: 0.3s ease;
}

/* main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item:hover
{
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    overflow: unset;
} */

main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item.comingsoon
{
    cursor: grabbing;
}

main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item>img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    z-index: 1;
}

main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item>h3,
main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item>p
{
    z-index: 2;
    text-align: center;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.3);
    width: 100%;
    padding: 0.5rem;
}

main>section#projecten>div#carousel-wrapper>div#carousel>.carousel-item>h3
{
    font-size: 1.5em;
    font-weight: 600;
}

main>section#contact
{
    padding: var(--square-size);
    display: grid;
    grid-template-columns: repeat(calc(var(--squares-per-row) - 2), 1fr);
    grid-template-rows: repeat(calc(var(--section-rows) - 2), 1fr);
}

main>section#contact>div.text
{
    grid-column: calc(var(--text-starting-column) - 1) / span 6;
    grid-row: 1 / span 2;
}

main>section#contact>div#socials
{
    grid-column: var(--socials-starting-column) / span 6;
    grid-row: 3 / span 3;
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    height: 100%;
}

main>section#contact>div#socials>a
{
    display: grid;
    grid-template-columns: var(--square-size) 1fr;
    height: var(--square-size);
    align-items: center;
    text-decoration: none;
}

main>section#contact>div#socials>a>p
{
    margin-left: calc(var(--square-size) / 2);
    font-size: 1.2em;
    font-weight: 500;
    color: lightgrey;
    transition: color 0.3s ease;
    cursor: pointer;
}

main>section#contact>div#socials>a:hover>p
{
    color: white;
}

main>section#contact>div#socials>a>div.image-wrapper
{
    width: calc(var(--square-size) - var(--square-borderwidth));
    height: calc(var(--square-size) - var(--square-borderwidth));
    margin: calc(var(--square-borderwidth) / 2);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-color);
}

main>section#contact>div#socials>a>div.image-wrapper>img
{
    width: calc(var(--square-size) * 0.5);
    height: calc(var(--square-size) * 0.5);
    border: calc(var(--square-borderwidth) / 2) solid var(--dark-color);
}

main>section#contact>img
{
    grid-column: calc(var(--squares-per-row) - 2 - 6) / span 6;
    grid-row: 2 / span 4;
    width: 100%;
    height: 100%;
}

footer
{
    display: grid;
    grid-template-columns: repeat(var(--squares-per-row), 1fr);
    justify-content: start;
    align-items: center;
    background-color: transparent;
    height: var(--square-size);
    width: 100%;
    color: white;
}

footer>p
{
    grid-column: 2 / span calc(var(--squares-per-row) - 2);
    margin-left: calc(var(--square-size) / 2);
    font-size: 1.2em;
    font-weight: 500;
}

@media screen and (max-width: 1540px)
{
    :root
    {
        --squares-per-row: 17;
        --text-starting-column: 3;
        --socials-starting-column: 1;
        --project-rows: 10;
    }

    main>section#project>.main-content
    {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    main>section#project img
    {
        max-width: 100%;
        max-height: 50%;
    }

}

@media screen and (max-width: 1400px)
{
    :root
    {
        --squares-per-row: 13;
        --overmij-grid-columns: 11;
        --overmij-section-rows: 9;
        --text-starting-column: 2;
        --socials-starting-column: 0;
        --overmij-maincontent-rows: 4;
        --skills-starting-row: 6;
        --skills-rows: 2;
        --project-rows: 11;
    }

    *
    {
        font-size: 14px;
    }

    main>section#overmij>div.main-content>img
    {
        margin-right: var(--square-size);
    }

    main>section#contact>img
    {
        grid-column: calc(var(--squares-per-row) - 6) / span 6;
    }

    main>section#project>div.main-content
    {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    main>section#project img
    {
        max-width: 100%;
        max-height: 50%;
    }
}

@media screen and (max-width: 1100px)
{
    :root
    {
        --squares-per-row: 9;
        --project-rows: 9;
    }

    main>section#project
    {
        padding: var(--square-size);
    }

    main>section#project>div.main-content
    {
        margin-top: 2em;
    }

    main>section#project>div.main-content,
    main>section#overmij>div.main-content
    {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    main>section#project img,
    main>section#project iframe
    {
        max-width: 100%;
        max-height: 50%;
    }
}

@media screen and (max-width: 1000px)
{
    :root
    {
        --squares-per-row: 7;
        --text-starting-column: 2;
        --carousel-side-width: 1;
        --header-padding-divider: 4;
        --socials-starting-column: 1;
        --carousel-left-offset: -6;
        --project-rows: 10;
    }
}

@media screen and (max-width: 800px)
{
    :root
    {
        --squares-per-row: 7;
        --overmij-grid-columns: 5;
        --overmij-section-rows: 14;
        --overmij-maincontent-rows: 8;
        --skills-starting-row: 10;
        --skills-rows: 3;
        --project-rows: 12;
    }

    *
    {
        font-size: 12px;
    }

    main>section#overmij>div.main-content
    {
        justify-content: end;
        height: 100%;
    }

    main>section#contact
    {
        display: flex;
        flex-direction: column;
        align-items: start;
        justify-content: center;
        gap: var(--square-size);
    }

    main>section#contact>img
    {
        display: none;
    }

    main>section#hero>p
    {
        font-size: 1.5em;
        font-weight: 300;
    }

    h1
    {
        font-size: 5em;
    }

    h2
    {
        font-size: 2.5em;
    }

}

@media screen and (max-width: 500px)
{
    :root
    {
        --project-rows: 15;
    }
}

@media screen and (max-width: 400px)
{
    :root
    {
        --project-rows: 18;
    }

    footer
    {
        font-size: 0.8em;
    }
}

@media screen and (max-width: 200px)
{
    :root
    {
        --project-rows: 21;
    }

    footer
    {
        font-size: 0.5em;
    }
}