.portfolio {
    padding: 20px 0 60px;
    background: #0b0c0e;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.portfolio-card {
    min-width: 0;
}

.portfolio-preview {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 0;
    overflow: hidden;
    border: 1px solid #ff980040;
    border-radius: 14px;
    background: #161616;
    cursor: pointer;
    transition: border-color .3s, box-shadow .3s;
}

.portfolio-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.portfolio-preview:hover {
    border-color: #ff9800;
    box-shadow: 0 0 25px #ff880035;
}

.portfolio-preview:hover img {
    transform: scale(1.06);
}

.play-icon {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #ffffff80;
    border-radius: 50%;
    background: #0009;
    color: #fff;
    font-size: 17px;
    backdrop-filter: blur(6px);
}

.portfolio-preview:hover .play-icon {
    background: #ff9800;
    color: #111;
}

.portfolio-card h3 {
    margin: 12px 0 5px;
    font-size: 18px;
}

.portfolio-card p {
    margin: 0;
    color: #aaa;
    font-size: 13px;
    line-height: 1.5;
}

#video-modal {
    width: min(800px, 94vw);
    max-height: 95dvh;
    padding: 14px;
    background: #101114;
    color: white;
    border: 1px solid #ff980066;
    border-radius: 16px;
    box-shadow: 0 0 50px #ff880025;
}

#video-modal::backdrop {
    background: #000d;
    backdrop-filter: blur(8px);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
}

#video-close {
    color: white;
    background: transparent;
    border: 0;
    font-size: 32px;
    cursor: pointer;
}

#portfolio-player {
    display: block;
    width: 100%;
    max-height: 76dvh;
    background: #000;
    border-radius: 8px;
}

@media (max-width: 1000px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        gap: 12px;
    }

    .portfolio-card h3 {
        font-size: 14px;
    }

    .portfolio-card p {
        font-size: 11px;
    }
}
