/* =========================================================
   GLOBAL.CSS - PONDASI & KOMPONEN UTAMA
   1. Base & Variables
   2. Navbar
   3. UI Components
   4. Table / Info List
========================================================= */

/* =========================================================
   1. BASE & VARIABLES
========================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #5c7cfa;
    --color-secondary: #3fb2ff;
    --color-whatsapp: #25D366;
    --color-text: #333;
    --color-black: #000;
    --color-white: #fff;
    
    --facebook-color: #1877f2;
    --linkedin-color: #0a66c2;
    --github-color: #24292e;
    --gitlab-color: #fc6d26;
    
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.12);
    
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 60px;
    --radius-image: 80px;
    
    --transition-fast: 0.3s ease;
    --transition-normal: 0.35s ease;
    --transition-slow: 0.5s ease;
    
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-white);
    padding: 20px 10%;
    color: var(--color-text);
}

/* =========================================================
   2. NAVBAR
========================================================= */
nav {
    position: fixed; /* Membuatnya menempel di layar */
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%; /* Menyamakan dengan padding body */
    background-color: rgba(255, 255, 255, 0.95); /* Sedikit transparan */
    backdrop-filter: blur(5px); /* Efek blur ala Apple/Glassmorphism */
    z-index: 1000;
    transition: transform 0.4s ease-in-out; /* Animasi mulus saat menghilang/muncul */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Bayangan sangat halus di bawah navbar */
}

/* Class ini akan dipicu oleh JavaScript */
.nav-hidden {
    transform: translateY(-100%); /* Menggeser navbar ke atas hingga hilang */
}

nav ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    list-style: none;
    /* margin-bottom: 50px; <-- HAPUS baris ini jika masih ada */
}

nav ul li {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
}

nav ul li.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

/* PENTING: Tambahkan padding-top di body agar Hero Section tidak tertutup navbar yang melayang */
body {
    padding-top: 90px; 
}

/* =========================================================
   2. NAVBAR
========================================================= */
/* ... (Kode nav dan nav ul untuk desktop biarkan sama seperti sebelumnya) ... */

/* --- HAMBURGER ICON --- */
.hamburger {
    display: none; /* Sembunyikan di tampilan Desktop */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001; /* Pastikan tombol selalu berada di lapisan paling atas */
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--color-black);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* --- RESPONSIVE NAVBAR & SIDEBAR (Mobile) --- */
@media screen and (max-width: 768px) {
    nav {
        display: flex;
        justify-content: flex-end; /* Memastikan hamburger di posisi kanan */
    }

    .hamburger {
        display: flex; /* Munculkan hamburger di HP */
    }

    /* Ubah ul menjadi sidebar yang tersembunyi di kanan */
    nav ul {
        position: fixed;
        top: 0;
        right: -100%; /* Posisikan di luar layar sebelah kanan */
        width: 250px;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease-in-out; /* Animasi meluncur */
    }

    /* Class ini akan dipicu JS untuk menggeser menu ke dalam layar */
    nav ul.active {
        right: 0; 
    }

    /* --- ANIMASI HAMBURGER JADI TANDA SILANG (X) --- */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0; /* Garis tengah menghilang */
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* =========================================================
   3. UI COMPONENTS
========================================================= */
.typing-container {
    font-size: 35px;
    font-weight: bold;
}

.profession {
    font-size: 60px;
}

/* --- BUTTONS --- */
.hero-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    min-width: 140px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    transition: var(--transition-fast);
}

.btn:hover {
    transform: translateY(-3px);
}

.download-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.contact-btn {
    background-color: var(--color-whatsapp);
    color: var(--color-white);
}

/* --- SOCIAL ICONS --- */
.social-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    background-color: var(--color-white);
    color: var(--color-text);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
}

.social-icons a:hover {
    transform: translateY(-6px) scale(1.08);
    color: var(--color-white);
}

.social-icons .facebook:hover { background-color: var(--facebook-color); }
.social-icons .linkedin:hover { background-color: var(--linkedin-color); }
.social-icons .github:hover { background-color: var(--github-color); }
.social-icons .gitlab:hover { background-color: var(--gitlab-color); }
.social-icons .instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* --- WHATSAPP POPUP --- */
.wa-popup {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

.wa-box {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
}

.wa-box input, .wa-box textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
}

.wa-box textarea {
    resize: none;
    height: 120px;
}

.wa-buttons {
    display: flex;
    gap: 10px;
}

.wa-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--color-whatsapp);
    color: var(--color-white);
    cursor: pointer;
}

/* --- COMPONENT RESPONSIVE (Mobile) --- */
@media screen and (max-width: 768px) {
    .typing-container {
        order: 3;
        width: 100%;
        margin-top: -10px;
        margin-bottom: 20px;
    }
    .profession {
        font-size: 29px;
    }
    .hero-buttons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }
    .btn {
        height: 49px;
        padding: 12px;
        font-size: 15px;
    }
    .social-icons {
        justify-content: center;
        gap: 14px;
    }
    .social-icons a {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* =========================================================
   4. TABLE / INFO LIST (Komponen Reusable)
========================================================= */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-title {
    font-weight: bold;
    width: 40%; 
    color: var(--color-primary);
}

.info-value {
    width: 60%; 
    color: var(--color-text);
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    .info-title, .info-value {
        width: 100%;
    }
}

/* --- TIMELINE MODAL POPUP --- */
.timeline-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Sembunyikan di awal */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.timeline-modal-box {
    background-color: var(--color-white);
    max-width: 600px;
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    text-align: center;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-modal-btn:hover { color: var(--color-black); }

#modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

#modal-year {
    color: var(--color-primary);
    font-size: 16px;
    margin-bottom: 10px;
}

#modal-title {
    color: var(--color-black);
    margin-bottom: 15px;
}

#modal-desc {
    color: var(--color-text);
    line-height: 1.6;
    text-align: justify;
}