* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    font-size: 62.5%;
}

body {
    font-size: 1.6rem;
    background: linear-gradient(white, black);
    /* background: linear-gradient( #c7c6c6, rgb(185, 82, 185)); */
    background-attachment: fixed;
    color: black;
    font-family: 'Lato', sans-serif;
}

.app {
    width: 120rem;
    margin: auto;
    font-weight: 300;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 5rem;
    margin-top: 5rem;
}

.container #project {
    width: 35rem;
    height: 24rem;
    position: relative;
}

#project img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    position: absolute;
    object-fit: fill;
}

.image-div {
    display: flex;
    width: 35rem;
    height: 24rem;
    background: #cbc3e3;
    border-radius: 1rem;
    border: 0.2rem white solid;
    position: absolute;
    opacity: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 2.4rem;
    line-height: 3rem;
    transition: all 300ms ease-in-out;
    -webkit-transition: all 300ms ease-in-out;
    -moz-transition: all 300ms ease-in-out;
    -o-transition: all 300ms ease-in-out;
    -ms-transition: all 300ms ease-in-out;
}

#project:hover .image-div {
    opacity: 0.95;
}

footer {
    height: 5rem;
    padding-bottom: 5rem;
}

.link {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    place-content: center;
}

.buttons {
    display: flex;
    justify-content: space-around;
}

.buttons a {
    width: fit-content;
    padding: 1rem 0.5rem;
    font-size: 1.4rem;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0.2rem;
    border-radius: 1rem;
    border: 0.1rem black solid;
    text-decoration: none;
    transition: all 0.3s ease 0s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.div {
    width: 95%;
    height: 95%;
    top: 1rem;
    font-weight: 400;
    letter-spacing: 0.1rem;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.legend {
    display: flex;
    flex-direction: column;
}

.div h1 {
    font-size: 1.8rem;
    text-align: center;
}

.div h2 {
    font-size: 1.4rem;
    text-align: center;
}

.div p {
    font-size: 1.4rem;
    text-align: center;
    overflow: hidden;
    line-height: 2rem;
}

.div p.stack {
    font-size: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 80rem) {
    .app {
        width: 80rem;
    }
}

@media (max-width: 40rem) {
    body {
        background: linear-gradient(farthest-corner at 0px 0px, #c7c6c6, rgb(185, 82, 185));
        background-attachment: fixed;
    }

    .app {
        width: 40rem;
    }

    .container #project {
        width: 35rem;
        height: 30rem;
        position: relative;
    }

    .image-div {
        opacity: 1;
        width: 35rem;
        height: 30rem;
        background-color: transparent;
    }

    .caption {
        position: absolute;
        width: 95%;
        font-weight: 400;
        color: black;
    }

    .caption h1 {
        text-align: left;
    }

    .caption h2 {
        font-weight: 400;
    }

    .div p {
        line-height: 2.5rem;
    }

    .div .legend {
        height: 10rem;
        width: 20rem;
        margin-left: 13rem;
    }

    .legend {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .link a {
        color: #fff;
        font-weight: 400;
        background-color: purple;
        color: #fff;
    }

    #project img {
        width: 12rem;
        height: 10rem;
        border-radius: 1rem;
        position: absolute;
        object-fit: fill;
        margin: 1rem;
    }
}