:root {
    /* Color Palette - Premium Dark Theme */
    --bg-color: #0b0d12;      /* Latar belakang utama (Sangat gelap) */
    --card-bg: #161a23;       /* Background untuk tombol/modal */
    --text-color: #e2e8f0;    /* Teks putih/abu terang */
    --text-muted: #94a3b8;    /* Teks redup */
    --primary-color: #3b82f6; /* Aksen Lingkaran Biru (WTFun Projects) */
    --accent-color: #ef4444;  /* Aksen Lingkaran Merah (Tentang Saya) */
    
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ================= HEADER ================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 80%;
    margin: 0 auto;
}

/* Lingkaran Biru Concept */
.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 22px; /* Space for the circle */
}
.logo h1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); /* Subtle glow */
}

/* Lingkaran Merah Concept */
.nav-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-btn::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ================= CATEGORIES ================= */
.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 5%;
    margin-bottom: 2rem;
}

.cat-btn {
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.cat-btn:hover {
    color: var(--text-color);
    background: rgba(255,255,255,0.05);
}

.cat-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
    font-weight: 600;
}

/* ================= GALLERY CONTROLS ================= */
.gallery-controls {
    display: flex;
    justify-content: flex-end;
    padding: 0 5%;
    max-width: 80%;
    margin: 0 auto 1.5rem auto;
}

.sort-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sort-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ================= GALLERY (MASONRY) ================= */
.gallery {
    display: flex;
    gap: 1.5rem;
    padding: 0 5%;
    max-width: 80%;
    margin: 0 auto 4rem auto;
    align-items: flex-start;
}

.gallery-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-item {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--card-bg); /* Placeholder background during load */
    transform: translateZ(0); /* Hardware acceleration */
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ================= LIGHTBOX MODAL ================= */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 5, 8, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 95vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
    margin-top: 1.5rem;
    text-align: center;
}

.lightbox-caption h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.gdrive-btn {
    display: inline-flex;
    align-items: center;
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    padding: 0.7rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}
.gdrive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}
.close-lightbox:hover { color: white; }

/* ================= ABOUT MODAL ================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    display: flex; justify-content: center; align-items: center;
    z-index: 999;
    opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal.active { opacity: 1; pointer-events: all; }

.modal-content {
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.about-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.about-header h2 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 20px;
}
.about-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--accent-color); /* Red accent for About */
    border-radius: 50%;
}

.about-body p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.about-body strong {
    color: var(--text-color);
}

.close-modal {
    position: absolute; top: 15px; right: 20px;
    font-size: 2rem; cursor: pointer; color: var(--text-muted);
    line-height: 1;
}
.close-modal:hover { color: white; }

@media (max-width: 768px) {
  header { flex-direction: column; gap: 1rem; max-width: 100%; padding: 1.5rem 1rem; }
  .categories, .gallery-controls { max-width: 100%; padding: 1rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 1rem; }
}
