/* ======================== */
/* QUANTUM BENTO GRID       */
/* ======================== */

.search-filter-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
}

.filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
}

@media (max-width: 576px) {
    .search-filter-container {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}

.bento-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Desktop: 3 Columns for Bento Asymmetry */
@media (min-width: 1024px) {
    .bento-grid-container {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 350px;
        /* Increased height to prevent overlap */
    }

    /* Asymmetric Spans */
    .bento-card.featured {
        grid-column: span 2;
        grid-row: span 2;
    }

    .bento-card.wide {
        grid-column: span 2;
    }

    .bento-card.tall {
        grid-row: span 2;
    }
}

/* Card Styling - Glass & Tech */
.bento-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover Effect: Glow Reveal */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(0, 240, 255, 0.06),
            transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bento-card:hover::before,
.bento-card:active::before {
    opacity: 1;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Image Container */
.bento-img-container {
    height: 60%;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.bento-card.featured .bento-img-container {
    height: 65%;
    /* More image for featured */
}

.bento-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bento-card:hover .bento-img-container img {
    transform: scale(1.05);
}

/* Content */
.bento-content {
    position: relative;
    z-index: 2;
}

.bento-tag {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.bento-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.bento-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Action Button */
.bento-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s;
}

.bento-btn:hover {
    gap: 1rem;
    color: var(--neon-cyan);
}

/* Projects Mobile Optimization */
@media (max-width: 768px) {
    .bento-grid-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 1rem !important;
    }

    .bento-card {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: auto !important;
        min-height: 400px !important;
    }

    .bento-title {
        font-size: 1.2rem !important;
    }

    .page-title {
        font-size: 2rem !important;
        word-wrap: break-word !important;
    }
}