/**
 * Selected Work Section - Bento Grid Layout
 * 
 * @package Asivo
 * @version 1.0.0
 */

/* ================================
   Selected Work Section
   ================================ */

.selected-work {
    padding: 120px 0;
    background: linear-gradient(180deg, #0a0e15 0%, #0d1014 100%);
    position: relative;
    overflow: hidden;
}

.selected-work-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* Header */
.selected-work-header {
    max-width: 1000px;
    margin-bottom: 80px;
}

.selected-work-title {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.1;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.title-icon {
    display: inline-block;
    font-size: 0.8em;
    color: #4F46E5;
    transform: rotate(0deg);
}

.title-highlight {
    background: linear-gradient(135deg, #4F46E5 0%, #00D1FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.selected-work-intro {
    font-size: 18px;
    line-height: 1.7;
    color: #9CA3AF;
    max-width: 800px;
}

/* Background Text */
.portfolio-background-text {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    font-size: clamp(120px, 20vw, 300px);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(79, 70, 229, 0.08);
    z-index: 1;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

/* Bento Grid */
.portfolio-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 180px);
    gap: 20px;
    position: relative;
}

/* Bento Items - Layout Pattern */
.bento-item--1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.bento-item--2 {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
}

.bento-item--3 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.bento-item--4 {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
}

/* Bento Item Styling */
.bento-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #111826;
    border: 1px solid #24324A;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: #4F46E5;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(79, 70, 229, 0.3),
        0 0 40px rgba(79, 70, 229, 0.2);
}

.bento-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover .bento-image {
    transform: scale(1.05);
}

.bento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 14, 20, 0.3) 0%,
        rgba(10, 14, 20, 0.7) 60%,
        rgba(10, 14, 20, 0.95) 100%
    );
    z-index: 1;
    transition: opacity 0.4s;
}

.bento-item:hover .bento-overlay {
    background: linear-gradient(
        180deg,
        rgba(79, 70, 229, 0.2) 0%,
        rgba(10, 14, 20, 0.8) 60%,
        rgba(10, 14, 20, 0.98) 100%
    );
}

/* Content */
.bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bento-number {
    font-size: 24px;
    font-weight: 700;
    color: #00D1FF;
    line-height: 1;
    opacity: 0.3;
    font-family: var(--font-ui);
}

.bento-item--1 .bento-number {
    font-size: 32px;
}

.bento-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

.bento-item--1 .bento-title {
    font-size: 18px;
}

.bento-subtitle {
    font-size: 12px;
    line-height: 1.4;
    color: #9CA3AF;
    margin: 0;
}

.bento-meta {
    font-size: 11px;
    line-height: 1.3;
    color: #6B7280;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #b3b8c4;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover .bento-excerpt {
    opacity: 1;
    transform: translateY(0);
}

.bento-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #00D1FF;
    text-decoration: none;
    margin-top: 2px;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(10px);
}

.bento-item:hover .bento-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.bento-cta:hover {
    gap: 12px;
    color: #ffffff;
}

.bento-cta .arrow {
    transition: transform 0.3s;
}

.bento-cta:hover .arrow {
    transform: translateX(4px);
}

/* No Projects Message */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    color: #9CA3AF;
    font-size: 18px;
    padding: 60px 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .portfolio-bento {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 200px);
    }

    .bento-item--1 {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }

    .bento-item--2 {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .bento-item--3 {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .bento-item--4 {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }
}

@media (max-width: 768px) {
    .selected-work {
        padding: 80px 0;
    }

    .selected-work-container {
        padding: 0 24px;
    }

    .selected-work-header {
        margin-bottom: 48px;
    }

    .selected-work-title {
        font-size: 36px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .selected-work-intro {
        font-size: 16px;
    }

    .portfolio-bento {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 250px);
        gap: 16px;
    }

    .bento-item--1,
    .bento-item--2,
    .bento-item--3,
    .bento-item--4 {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .bento-content {
        padding: 24px;
    }

    .bento-number {
        font-size: 40px;
    }

    .bento-item--1 .bento-number {
        font-size: 48px;
    }

    .bento-title {
        font-size: 20px;
    }

    .bento-item--1 .bento-title {
        font-size: 24px;
    }

    .portfolio-background-text {
        font-size: 80px;
        top: 30%;
    }

    /* Show excerpt and CTA on mobile */
    .bento-excerpt,
    .bento-cta {
        opacity: 1;
        transform: translateY(0);
    }
}
