/* ==========================================================================
   1. GOOGLE FONTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   2. CSS VARIABLES (THEME TOKENS)
   ========================================================================== */
:root {
    /* Light Mode Variables (iOS Inspired) */
    --bg-color: #f5f5f7;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --card-bg: rgba(255, 255, 255, 0.7);
    --nav-bg: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.06);
    --accent-color: #0071e3;
    --accent-hover: #0077ED;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
    --selection-bg: rgba(0, 113, 227, 0.2);
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-color: #000000;
    --text-main: #f5f5f7;
    --text-muted: #86868b;
    --card-bg: rgba(28, 28, 30, 0.65);
    --nav-bg: rgba(28, 28, 30, 0.75);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #2997ff;
    --accent-hover: #147ce6;
    --shadow-soft: 0 8px 30px rgba(255, 255, 255, 0.02);
    --shadow-hover: 0 12px 40px rgba(255, 255, 255, 0.05);
    --selection-bg: rgba(41, 151, 255, 0.3);
}

/* ==========================================================================
   3. BASE, RESET & SCROLLBAR
   ========================================================================== */
html, body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Transisi warna tema pada body */
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Selection */
::selection {
    background: var(--selection-bg);
    color: var(--text-main);
}

/* Custom iOS-like Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Global Image Reset */
img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { 
    font-weight: 700; 
    letter-spacing: -0.02em; 
    color: var(--text-main);
}

/* Responsive Headings */
@media (max-width: 768px) {
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

/* ==========================================================================
   5. COMPONENTS (GLASSMORPHISM & CARDS)
   ========================================================================== */
.glass-nav {
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease, 
                background-color 0.4s ease, 
                border-color 0.4s ease;
}

.glass-badge { 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
}

/* Hover effects (Mouse only devices) */
@media (hover: hover) {
    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
    }
}

/* ==========================================================================
   6. LAYOUT: BENTO GRID (MOBILE FIRST)
   ========================================================================== */
.bento-grid {
    display: grid;
    /* Mobile First: 1 Kolom Penuh */
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Layar Tablet ke atas */
@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    .bento-large { 
        grid-column: span 2; 
    }
}

/* ==========================================================================
   7. UTILITIES, HELPERS & ANIMATIONS
   ========================================================================== */
.text-main { color: var(--text-main) !important; }
.text-muted-custom { color: var(--text-muted) !important; }
.text-accent { color: var(--accent-color) !important; }

/* Dynamic Theme Text Transition */
.text-theme {
    color: var(--text-main) !important;
    transition: color 0.4s ease;
}

.bg-accent { 
    background-color: var(--accent-color) !important; 
    color: #ffffff !important; 
    transition: background-color 0.3s ease;
}

.text-truncate-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* Custom Buttons */
.discussion-btn {
    color: var(--text-main) !important;
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Animations & Transitions */
.transition-transform {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.img-hover-zoom { 
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); 
}

.group-hover-translate { transition: transform 0.3s ease; }

@media (hover: hover) {
    .bg-accent:hover { background-color: var(--accent-hover) !important; }
    .hover-accent:hover { color: var(--accent-color) !important; }
    .hover-scale:hover { transform: scale(1.05); }
    .glass-card:hover .img-hover-zoom { transform: scale(1.08); }
    .group:hover .group-hover-translate { transform: translateX(5px); }
    .discussion-btn:hover {
        color: var(--accent-color) !important;
        border-color: var(--accent-color) !important;
        background-color: transparent !important;
    }
}

/* Status Badge */
.available-badge {
    color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 113, 227, 0.2);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

[data-theme="dark"] .available-badge {
    background: rgba(41, 151, 255, 0.12);
    border-color: rgba(41, 151, 255, 0.2);
}

/* ==========================================================================
   8. VECTOR BACKGROUND ANIMATIONS (BLOBS)
   ========================================================================== */
.blob-shape {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    border-radius: 50%;
    animation: float 12s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    top: 0%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: var(--accent-color);
}

.blob-2 {
    top: 20%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: #00d2ff;
    animation-delay: -5s;
}

[data-theme="dark"] .blob-shape { opacity: 0.25; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -60px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.floating-element {
    animation: float-small 4s ease-in-out infinite;
}

@keyframes float-small {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   9. MOBILE BOTTOM NAVIGATION (APP-LIKE)
   ========================================================================== */
@media (max-width: 991px) { 
    body { 
        /* Memberikan ruang agar konten paling bawah tidak tertutup navigasi mobile */
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 15px)); 
    }
    
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        padding-top: 12px;
        /* SafeArea untuk iPhone modern agar tidak nabrak home indicator */
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 15px)); 
        z-index: 1030;
        transition: background-color 0.4s ease, border-color 0.4s ease;
    }
    
    .mobile-nav-item {
        color: var(--text-muted);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: color 0.3s ease, transform 0.2s ease;
    }
    
    .mobile-nav-item:active {
        transform: scale(0.92); /* Efek tombol dipencet di HP */
    }
    
    .mobile-nav-item.active { 
        color: var(--accent-color); 
    }
}
    
    /* ==========================================================================
   10. TAMBAHAN RESPONSIVE IMAGE & NAVIGATION FIXES
   ========================================================================== */

/* Mengatur tinggi container gambar portfolio agar proporsional */
.bento-img-wrap {
    height: 180px; /* Tinggi default mobile */
}

/* Di Mobile, yang "large" tetap pendek agar teks muat tanpa scroll */
.bento-img-wrap.is-large {
    height: 200px; 
}

/* Mulai dari Tablet ke atas, kembalikan ke tinggi aslinya */
@media (min-width: 768px) {
    .bento-img-wrap {
        height: 200px;
    }
    .bento-img-wrap.is-large {
        height: 300px;
    }
}

/* Menguatkan visibilitas Mobile Bottom Navigation agar icon tidak bertumpuk transparan */
@media (max-width: 991px) {
    .mobile-bottom-nav {
        /* Naikkan opasitas background dari 0.75 menjadi 0.90 agar lebih solid */
        background: rgba(255, 255, 255, 0.90);
    }
    [data-theme="dark"] .mobile-bottom-nav {
        background: rgba(28, 28, 30, 0.90);
    }
    .glass-card {
        padding: 1.25rem !important; /* Kurangi padding card di mobile agar konten lega */
    }
}
}