main {
    margin-top: 2rem;
}

.project {
    position: relative;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    /* opacity: 0; */
    transition: opacity 1.5s ease-in-out;
}

@media (orientation: portrait) {
    .project {
        width: 100vw;
        aspect-ratio: 16/9;
    }

    .overlay {
        padding: 2vh;
    }

    .overlay h2 {
        font-size: 1.4em;
        margin-bottom: 1vh;
    }

    .overlay p {
        font-size: 1em;
        margin-bottom: 2vh;
    }
}

@media (orientation: landscape) {
    .project {
        height: 100vh;
    }

    .overlay {
        padding: 80px;
    }

    .overlay h2 {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .overlay p {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
}


.project.active {
    opacity: 1;
}

.project.active .overlay {
    opacity: 1;
}

.overlay {
    position: absolute;
    color: #fff;
    text-align: center;
    /* opacity: 0; */
    transition: opacity 1s ease-in-out;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    max-width: 80%;
}