/* ==========================================================================
   EXCLUSIVE INTERACTIVE VISUAL PORTFOLIO (SELICA MUSIC & PHOTO LIST THEME)
   ========================================================================== */

:root {
    --portfolio-accent: #fee156;
    --portfolio-font-mono: 'Space Mono', 'PP Supply Mono', monospace;
}

.gallery-portfolio-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #040904;
    color: #e5e9e1;
    padding: clamp(100px, 12vh, 130px) 0 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Full-bleed Dynamic Backdrop Image (Reveals on Project Hover) */
.portfolio-backdrop-img {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(1.08);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    filter: brightness(0.4) contrast(1.15) saturate(1.2);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.portfolio-backdrop-img.has-image {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.portfolio-backdrop-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(4, 9, 4, 0.4) 0%, rgba(4, 9, 4, 0.85) 75%, rgba(4, 9, 4, 0.98) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Header Tipografi Hero Section (Identik 1:1 dengan Modul Selica) */
.ag-section-head {
    text-align: center;
    position: relative;
    z-index: 3;
    margin-bottom: clamp(30px, 4vw, 44px);
}

.ag-section-head__row {
    overflow: hidden;
    line-height: 0.92;
}

.ag-head-solid {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3rem, 7.5vw, 6.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ag-section-head__row--outline {
    margin-top: 2px;
}

.ag-head-stroke {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3rem, 7.5vw, 6.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: var(--portfolio-accent, #fee156);
    text-shadow: 0 0 35px rgba(254, 225, 86, 0.4);
}

.ag-head-sub {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(0.85rem, 1.3vw, 1.15rem);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f1f3ed;
    margin-top: 14px;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Wrapper Layout */
.portfolio-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3.5vw, 36px);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Top Bar & Category Filters */
.portfolio-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: clamp(24px, 4vh, 40px);
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portfolio-brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--portfolio-font-mono);
    font-size: clamp(0.78rem, 1.2vw, 0.92rem);
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--portfolio-accent);
}

.brand-num {
    opacity: 0.8;
}

.portfolio-category-filter {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: rgba(12, 28, 12, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.portfolio-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    outline: none;
    padding: 6px 14px;
    border-radius: 999px;
    color: rgba(225, 224, 204, 0.7);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.portfolio-filter-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.portfolio-filter-btn.active {
    background: var(--portfolio-accent);
    color: #040904;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(254, 225, 86, 0.35);
}

/* Portfolio Table Header */
.portfolio-table-header {
    display: grid;
    grid-template-columns: 50px 1.4fr 2.2fr 1.1fr 1.3fr 80px;
    gap: 16px;
    padding: 12px 18px;
    font-family: var(--portfolio-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: rgba(225, 224, 204, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}

/* Rows List */
.portfolio-project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.portfolio-row-item {
    display: grid;
    grid-template-columns: 50px 1.4fr 2.2fr 1.1fr 1.3fr 80px;
    gap: 16px;
    align-items: center;
    padding: clamp(16px, 2.2vh, 22px) 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 1.05rem);
    font-weight: 700;
    color: rgba(240, 236, 228, 0.82);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    position: relative;
}

.portfolio-row-item:hover,
.portfolio-row-item.is-active {
    background: rgba(254, 225, 86, 0.08);
    border-color: rgba(254, 225, 86, 0.35);
    color: #ffffff;
}

.portfolio-row-item .row-num {
    font-family: var(--portfolio-font-mono);
    font-size: 0.78rem;
    color: var(--portfolio-accent);
    opacity: 0.75;
}

.portfolio-row-item:hover .row-num {
    opacity: 1;
}

.portfolio-row-item .row-title {
    color: #ffffff;
    font-weight: 800;
}

.portfolio-row-item:hover .row-title {
    color: var(--portfolio-accent);
}

.portfolio-row-item .row-division,
.portfolio-row-item .row-tag,
.portfolio-row-item .row-loc,
.portfolio-row-item .row-year {
    font-family: var(--portfolio-font-mono);
    font-size: clamp(0.72rem, 1vw, 0.85rem);
    font-weight: 600;
    color: rgba(225, 224, 204, 0.65);
    transition: color 0.2s ease;
}

.portfolio-row-item:hover .row-division,
.portfolio-row-item:hover .row-tag,
.portfolio-row-item:hover .row-loc,
.portfolio-row-item:hover .row-year {
    color: rgba(255, 255, 255, 0.95);
}

/* Row Zoom Button for mobile */
.row-zoom-btn {
    display: none;
    background: rgba(254, 225, 86, 0.15);
    border: 1px solid rgba(254, 225, 86, 0.4);
    color: var(--portfolio-accent);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Category Filter & Pagination Hidden State */
.portfolio-row-item.is-filtered-out,
.portfolio-row-item.is-page-hidden {
    display: none !important;
}

/* Pagination Bar Styling */
.portfolio-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 18px 0;
    margin-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    font-family: var(--portfolio-font-mono);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 28, 12, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f0ece4;
    padding: 7px 18px;
    border-radius: 999px;
    font-family: var(--portfolio-font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--portfolio-accent);
    color: #040904;
    border-color: var(--portfolio-accent);
    box-shadow: 0 4px 15px rgba(254, 225, 86, 0.35);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

.page-number-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(225, 224, 204, 0.8);
    font-family: var(--portfolio-font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.page-number-btn:hover {
    background: rgba(254, 225, 86, 0.2);
    color: #ffffff;
    border-color: rgba(254, 225, 86, 0.4);
}

.page-number-btn.active {
    background: var(--portfolio-accent);
    color: #040904;
    font-weight: 800;
    border-color: var(--portfolio-accent);
    box-shadow: 0 0 12px rgba(254, 225, 86, 0.4);
}

/* Minimalist Corner HUD */
.portfolio-corner-hud {
    margin-top: auto;
    padding-top: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--portfolio-font-mono);
    font-size: 0.72rem;
    color: rgba(225, 224, 204, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-item {
    display: inline-flex;
    align-items: center;
}

#portfolioLiveClock {
    color: var(--portfolio-accent);
    font-weight: 700;
}

.time-zone-tag {
    opacity: 0.7;
    margin-left: 4px;
}

/* Responsive Table */
@media (max-width: 991px) {
    .portfolio-table-header {
        display: none;
    }

    .portfolio-row-item {
        grid-template-columns: 36px 1fr auto;
        gap: 10px;
        padding: 16px 10px;
    }

    .row-division,
    .row-loc,
    .row-year {
        display: none;
    }

    .row-zoom-btn {
        display: inline-flex;
    }
}
    position: relative;
    z-index: 5;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(240, 236, 228, 0.75);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.gallery-filter-btn i {
    font-size: 0.9rem;
    color: var(--idm-secondary-yellow);
    transition: transform 0.3s ease, color 0.3s ease;
}

.gallery-filter-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.gallery-filter-btn:hover i {
    transform: scale(1.15) rotate(5deg);
}

.gallery-filter-btn.active {
    background: linear-gradient(135deg, #FEE156 0%, #EEC30E 100%);
    border-color: rgba(254, 225, 86, 0.6);
    color: #081406 !important;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(254, 225, 86, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.gallery-filter-btn.active i {
    color: #081406 !important;
}

/* Masonry Bento Mosaic Grid (Full Responsive Desktop) */
.gallery-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 4;
}

@media (min-width: 1600px) {
    .gallery-bento-grid {
        max-width: 1380px;
        grid-auto-rows: 270px;
        gap: 28px;
    }
}

/* Bento Card Spans */
.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0d1e0b;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.bento-card--tall {
    grid-row: span 2;
}

.bento-card--wide {
    grid-column: span 2;
}

.bento-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.bento-card:hover .bento-img {
    transform: scale(1.06);
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 18, 7, 0.2) 0%, rgba(8, 18, 7, 0.88) 100%);
    transition: opacity 0.35s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: rgba(254, 225, 86, 0.6);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(254, 225, 86, 0.25);
}

/* Bento Badges */
.bento-badge-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.bento-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--idm-secondary-yellow);
    background: rgba(10, 24, 8, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(254, 225, 86, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
}

.bento-zoom-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 24, 8, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-zoom-icon {
    opacity: 1;
    transform: scale(1);
    background: var(--idm-secondary-yellow);
    color: #0a1408;
    border-color: var(--idm-secondary-yellow);
}

/* Bento Content Bottom */
.bento-content-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    z-index: 2;
    transform: translateY(8px);
    transition: transform 0.35s ease;
}

.bento-card:hover .bento-content-bottom {
    transform: translateY(0);
}

.bento-title {
    font-size: 1.18rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.bento-desc {
    font-size: 0.82rem;
    color: rgba(240, 236, 228, 0.8);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hidden animation for filter */
.bento-card.is-hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

/* ==========================================================================
   LIGHTBOX POPUP MODAL
   ========================================================================== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px;
}

.gallery-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 15, 5, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    background: #0d1e0b;
    border: 1px solid rgba(254, 225, 86, 0.35);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open .lightbox-dialog {
    transform: scale(1) translateY(0);
}

.lightbox-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(10, 24, 8, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lightbox-close-btn:hover {
    background: var(--idm-secondary-yellow);
    color: #0a1408;
    transform: rotate(90deg) scale(1.08);
}

.lightbox-body {
    display: flex;
    flex-direction: column;
}

.lightbox-img-wrap {
    position: relative;
    width: 100%;
    max-height: 60vh;
    background: #050b04;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
}

.lightbox-meta {
    padding: 24px 32px 28px;
    background: #0d1e0b;
}

.lightbox-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--idm-secondary-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.lightbox-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
}

.lightbox-desc {
    font-size: 0.92rem;
    color: rgba(240, 236, 228, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVENESS (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1100px) {
    .gallery-bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-portfolio-hero,
    .gallery-bento-hero {
        padding: 95px 0 80px;
    }

    .ag-head-solid,
    .ag-head-stroke {
        font-size: clamp(2.4rem, 11vw, 4rem);
    }

    .portfolio-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 12px;
    }

    .portfolio-category-filter {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio-category-filter::-webkit-scrollbar {
        display: none;
    }

    .cat-filter-btn {
        flex-shrink: 0;
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    .gallery-bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 18px;
    }

    .bento-card--tall,
    .bento-card--wide {
        grid-row: span 1;
        grid-column: span 1;
    }

    .bento-card-inner {
        height: 260px;
    }

    .bento-title {
        font-size: 1.1rem;
    }

    .lightbox-dialog {
        border-radius: 20px;
        margin: 12px;
    }

    .lightbox-meta {
        padding: 16px 18px 20px;
    }

    .lightbox-title {
        font-size: 1.15rem;
    }

    .lightbox-desc {
        font-size: 0.82rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .ag-head-solid,
    .ag-head-stroke {
        font-size: clamp(2.1rem, 11.5vw, 2.9rem);
    }
}
