/* CONTAINER */
.grid-wrapper {
    display: flex;
    flex-direction: column;
    width: 92%; 
    max-width: 1600px;
    margin: 0 auto;
    gap: 8px;
    height: 100vh; 
    padding-top: 0; 
    padding-bottom: 14px;
    box-sizing: border-box;
}

.grid-row {
    display: flex;
    width: 100%;
    flex: 1;
    gap: 8px;
    border: none;
    overflow: hidden; 
}

.project-item {
    position: relative;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    border: none;
    filter: none;
    transform: translateZ(0);
    will-change: flex;
    padding: 0;
    box-sizing: border-box;
    transition: flex 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-item:hover {
    z-index: 2;
}

/* Flex Distribution */
.row-1 .project-item:nth-child(1) { flex: 1; }
.row-1 .project-item:nth-child(2) { flex: 1.2; }
.row-1 .project-item:nth-child(3) { flex: 1; }
.row-1 .project-item:hover { flex: 1.8 !important; }

.row-2 .project-item:nth-child(1) { flex: 1.3; }
.row-2 .project-item:nth-child(2) { flex: 1; }
.row-2 .project-item:hover { flex: 2.0 !important; }

.row-3 .project-item:nth-child(1) { flex: 1; }
.row-3 .project-item:nth-child(2) { flex: 1; }
.row-3 .project-item:nth-child(3) { flex: 1.3; }
.row-3 .project-item:hover { flex: 1.8 !important; }

.row-4 .project-item:nth-child(1) { flex: 1; }
.row-4 .project-item:nth-child(2) { flex: 1.3; }
.row-4 .project-item:hover { flex: 2.0 !important; }

/* MEDIA */
.project-media {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    filter: blur(3px);
    transform: scale(1.06);
    transition: filter 0.6s ease, transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

.project-item:hover .project-media video {
    filter: blur(0);
    transform: scale(1.08);
    opacity: 1;
}

.project-item:not(:hover) .project-media video {
    filter: blur(3px);
    transform: scale(1.06);
}

/* TEXT */
.project-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    z-index: 10;
    width: 80%;
    pointer-events: none;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

.project-item:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.project-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .grid-wrapper {
        display: block;
        height: auto;
        padding-top: 80px;
        width: 100%;
    }
    
    .grid-row {
        flex-direction: column;
        height: auto;
        gap: 8px;
    }
    
    .project-item {
        width: 100%;
        height: 40vh;
        margin-bottom: 12px;
    }
}
