:root {
    --color1: #8C55BF;
    --color2: #222222;
    --color3: #ebebeb;
    --color4: #D5AC4E
    /*
    --color2: #1D1A31;
    --color3: #dcced1;
    --color4: #6F606D
    */
}

.josefin-sans {
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

html {
    font-size: 10px;
    font-family: "Josefin Sans", sans-serif;
    background-color: var(--color2);
    color: var(--color3);
}

#navbar {
    background-color: var(--color1);
    color: var(--color2);
    position: fixed;
    width: 100%;
    height: 7rem;
    font-size: 3rem;
    z-index: 999;

    ul {
        width: 25%;
        height: inherit;
        position: absolute;
        right: 5%;
        display: flex;
        flex-direction: row;
        align-items: center;
        list-style: none;

        li {
            height: 100%;
            padding: 0 3rem;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: color 0.2s ease-out, background-color 0.2s ease-out;
        }
    }
    li:hover {
        background-color: var(--color2);
        color: var(--color1);
    }
}

@media (max-width: 1600px) {
    #navbar ul {
        width: 35%;
        right: 0;
    }
}

@media (max-width: 1400px) {
    #navbar ul {
        width: 50%;
        right: 0;
    }
}

@media (max-width: 1000px) {
    #navbar ul {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 500px) {
    #navbar {
        font-size: 2rem;
    }
}

#about {
    margin: 0;
    padding: 4rem 0 0 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color2);

    h1 {
        font-size: 10rem;
        padding: 2rem 2rem 0 2rem;
    }

    .push-up {
        position: relative;
        top: -0.8rem;
    }

    h3 {
        padding: 0;
        font-size: 3rem;
        color: var(--color1);
    }

    #arrow {
        font-size: 10rem;
        position: relative;
        top: 15rem;
    }
}

@media (max-width: 1000px) {
    #about h1 {
        font-size: 6rem;
        padding: 0 1rem;
    }
    #about h3 {
        padding: 0 1rem;
    }
}

#projects {
    background-color: var(--color3);
    color: var(--color2);
    margin: 0;
    padding: 10rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    h2 {
        font-size: 7.5rem;
    }

    #projects-grid {
        width: 100%;
        margin: 2rem auto;
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
        justify-content: center;

        .projects-tile {
            margin: 2rem;
            background-color: var(--color4);
            color: var(--color2);
            transition: background-color 0.2s ease-out, color 0.2s ease-out;
            width: 45rem;
            height: 31rem;
            border: 0.5rem solid var(--color1);

            .project-preview {
                background-color: var(--color2);
                color: var(--color3);
                width: 100%;
                height: 80%;
                display: flex;
                object-fit: fill;
                justify-content: center;
                align-items: center;
                font-size: 3rem;
            }
            p {
                height: 20%;
                font-size: 3rem;
                display: flex;
                justify-content: center;
                align-items: center;

                .code {
                    color: var(--color4);
                    font-weight: bold;
                    transition: color 0.2s ease-out;
                }
            }
        }
        .projects-tile:hover {
            background-color: var(--color2);
            color: var(--color3);
            .code {
                color: var(--color1);
            }
        }
    }

    button {
        background-color: var(--color4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: inherit;
        width: 20rem;
        height: 6rem;
        padding: 1rem 1rem 0.5rem 1rem;
        font-size: 3rem;
        border: 0.5rem solid var(--color1);
        transition: color 0.2s ease-out, background-color 0.2s ease-out;

        a {
            position: relative;
            left: 2rem;
            color: var(--color2);
            transition: left 0.2s ease-out;
        }

        .code {
            width: 2rem;
            color: var(--color4);
        }
    }
    button:hover {
        background-color: var(--color2);
        a {
            color: var(--color3);
            left: 0.5rem;
        }
        .code {
            color: var(--color1);
        }
    }
}

@media (max-width: 1000px) {
    #projects h2 {
        font-size: 5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 500px) {
    #projects #projects-grid .projects-tile p {
        font-size: 2rem;
    }
}

#contact {
    margin: 0;
    padding: 4rem 0 0;
    width: 100%;
    height: calc(100vh - 7rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color2);

    h1 {
        font-size: 8rem;
    }

    h2 {
        font-size: 6rem;
    }

    div {
        width: 50%;
        font-size: 5rem;
        display: flex;
        justify-content: space-evenly;
        align-items: baseline;
        padding: 1rem 0 4rem;
        gap: 3rem;

        a {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 1rem;
        }

        a:hover {
            p {
                text-decoration: underline;
            }
        }
        img {
            width: 5rem;
            height: 5rem;
            margin: 0;
            padding: 0;
            border-radius: 50%;
            position: relative;
            top: 0.5rem;
            object-fit: cover;
            background-color: white;
        }
    }

    div:last-of-type {
        justify-content: center;
    }
}

@media (max-width: 1000px) {
    #contact div {
        padding: 1rem;
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }
    #contact h1 {
        font-size: 6rem;
        padding: 0 1rem;
        text-align: center;
    }
    #contact h2 {
        padding: 0 1rem;
    }
}

@media (max-width: 500px) {
    #contact div {
        font-size: 3.5rem;
    }
}

footer {
    width: 100%;
    color: var(--color2);
    background-color: var(--color1);
    font-size: 3rem;
    padding: 2rem 5%;
    text-align: right;
}

@media (max-width: 500px) {
    footer {
        font-size: 2rem;
    }
}