#portfolio {
    display: grid;
    width: 100%;
    height: 100%;
    position: relative;
    backdrop-filter: grayscale(1) brightness(.5);
}

#portfolio h2 {
    margin-top: 1rem;
    margin-left: 3rem;
    color: #eee;
    border-bottom: 2px solid var(--primary-color);
    width: 40%;
    height: fit-content;
    position: relative;
}

#portfolio .underline {
    width: 70px;
    height: 6px;
    background: var(--accent-color);
    position: absolute;
    top: 50px;
    z-index: 2;
}

article {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 100px auto;
    perspective: 1000px;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    scale: .6;
}

.items {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center;
    transform: rotateY(calc(var(--position) * (360/var(--quantity)) * 1deg)) translateZ(210px);
    transition: transform 0.5s;
}

.items video {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    transition: .5s;
}

.items video:hover {
    scale: 1.15;
}

.items h3 {
    text-align: center;
    margin-top: 10px;
}

.controls {
    position: absolute;
    left: 50%;
    bottom: 24%;
    translate: -50% -50%;
    display: flex;
    justify-content: center;
}

.controls button {
    background-color: var(--accent-color);
    color: #eee;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    box-shadow: var(--box-shadow);
}

.controls button:first-child {
    background: var(--disable);
    color: #222831;
}

.controls button:hover {
    background-color: var(--hover-color);
}

.controls button:first-child:hover {
    color: #eee;
}

.portfolioDesc {
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: center;
    color: #eee;
    position: absolute;
    left: 50%;
    bottom: -32%;
    translate: -50% -50%;
    font-weight: 500;
    border-radius: 1rem;
}

@media screen and (min-width: 700px) {
    .slider {
        scale: .8;
    }
}
@media screen and (min-width: 920px) {
    .slider {
        scale: 1;
    }
    #portfolio h2 {
        margin-left: 4rem;
    }
}