.project {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 20px;
}

.project img {
    width: 100%;
    height: 100%;
    transition: 0.5s ease;
    object-fit: cover;
}

.project .overlay {
    box-sizing: border-box; /* Include padding and borders in the element's total width and height */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: 0.5s ease;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px; /* Add padding back if you want, it won't affect the size */
}

.project:hover .overlay {
    opacity: 1;
}

.project:hover img {
    filter: brightness(50%);
}
