/* =========================================
   VARIABEL WARNA & FONT
   ========================================= */
:root {
    --bg-paper: #f9f9f9;         /* Putih kertas */
    --text-dark: #1a1a1a;        /* Teks gelap */
    --text-light: #cccccc;       /* Teks redup */
    --accent-blue: #8cbce3;      /* Biru soft untuk hover blok */
    --accent-grey: #e8e8e8;      /* Abu-abu folder/kertas */
    --border-color: #d4d4d4;     /* Garis batas */
    
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'Space Mono', monospace;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background-color: var(--bg-paper);
    color: var(--text-dark);
    font-family: var(--font-serif);
    line-height: 1.5;
}

/* =========================================
   TIPOGRAFI & GARIS EDITORIAL
   ========================================= */
.mono-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
}

.dotted-divider {
    width: 100%;
    border-top: 1px dotted var(--text-dark);
    margin: 30px 0;
}

/* =========================================
   HEADER
   ========================================= */
.header {
    padding: 60px 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -2px;
}

.archive-text {
    color: var(--text-light);
}

.hero-desc {
    max-width: 700px;
    color: var(--text-dark);
    line-height: 1.8;
}

/* =========================================
   NAVIGASI TAB FOLDER (Dengan Hover Biru)
   ========================================= */
.category-nav {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 30px;
}

.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.folder-tab {
    background-color: var(--accent-grey);
    border: none;
    padding: 15px 30px 15px 15px;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    /* Bentuk potongan folder */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 200px;
    position: relative;
    overflow: hidden; /* Kunci blok warna agar tidak keluar bentuk tab */
    z-index: 1;
}

.tab-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-bottom: 10px;
}

/* Blok warna biru yang tersembunyi di bawah */
.folder-tab::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--accent-blue);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

/* Efek slide saat di-hover atau aktif */
.folder-tab:hover::before, 
.folder-tab.active::before {
    transform: translateY(0);
}

/* =========================================
   GALLERY MASONRY & KARTU KARYA
   ========================================= */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.gallery-grid {
    column-count: 3; /* Layout masonry rapat */
    column-gap: 40px;
}

.card {
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    break-inside: avoid; /* Mencegah kartu terpotong antar kolom */
    margin-bottom: 40px; /* Jarak vertikal */
}

.card-img-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: var(--accent-grey);
    margin-bottom: 15px;
}

/* Ukuran Rasio Dinamis */
.ratio-landscape { aspect-ratio: 16 / 9; }
.ratio-portrait  { aspect-ratio: 1 / 1.414; }
.ratio-social    { aspect-ratio: 9 / 16; }
.ratio-square    { aspect-ratio: 1 / 1; }

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1); /* Tampilan awal normal (full gambar) */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05); /* Gambar membesar (zoom-in) saat di-hover */
}

.card-info {
    border-top: 1px dotted var(--border-color);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 400;
    max-width: 70%;
}

.card-category {
    text-align: right;
}

/* =========================================
   MODAL & SLIDER DETAIL KARYA
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--bg-paper);
    z-index: 999;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px dotted var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-paper);
    z-index: 10;
}

/* Tombol Back to Archive (Dengan Hover Biru) */
.close-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-dark);
    position: relative;
    padding: 5px 15px;
    overflow: hidden;
    z-index: 1;
}

.close-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--accent-blue);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.close-btn:hover::before {
    transform: translateY(0);
}

.modal-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 15px;
    scrollbar-width: thin;
}

.slider-container::-webkit-scrollbar {
    height: 6px;
}
.slider-container::-webkit-scrollbar-track {
    background: var(--accent-grey);
}
.slider-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

.slide-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background-color: var(--accent-grey);
}

.slide-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 75vh;
}

.scroll-hint {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 10px;
    text-align: right;
    display: none;
}

.modal-title {
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 15px;
}

.modal-meta {
    margin-bottom: 30px;
    color: #666;
}

.modal-desc {
    font-size: 1rem;
    line-height: 1.8;
}

/* =========================================
   FOOTER & RESPONSIVE
   ========================================= */
.footer {
    max-width: 1400px;
    margin: 60px auto 30px;
    padding: 0 30px;
    text-align: center;
}

@media (max-width: 1024px) { 
    .gallery-grid { column-count: 2; } 
}

@media (max-width: 900px) {
    .modal-content { grid-template-columns: 1fr; }
    .modal-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .top-bar { flex-direction: column; gap: 10px; text-align: center; }
    .folder-tab { flex: 1 1 100%; min-width: 100%; }
    .header-content { flex-direction: column; align-items: flex-start; }
    .gallery-grid { column-count: 1; }
}