/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-dark: #0a0a0a;
    --accent-blue: #6A97AC;
    --text-gray: #a0a0a0;
    --border: rgba(255, 255, 255, 0.12);
    --transition-smooth: 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Grid System */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.8;
}

/* ==========================================================================
   2. NAVIGATION
   ========================================================================== */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1250px;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    padding: 15px 30px;
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

#logo-text { font-size: 22px; font-weight: 800; }
#logo-text span { color: var(--accent-blue); }

.menu-capsule {
    background: var(--accent-blue);
    padding: 10px 25px;
    border-radius: 50px;
    display: flex;
    gap: 25px;
}

.menu-capsule a {
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.7;
    transition: 0.3s;
}

.menu-capsule a.active, 
.menu-capsule a:hover { opacity: 1; }

/* ==========================================================================
   3. HEADER & FILTER UI
   ========================================================================== */
.portfolio-container {
    padding-top: 150px; 
    max-width: 1250px;
    margin: 0 auto;
    padding-inline: 5%;
    min-height: 100vh;
}

.portfolio-header { text-align: center; margin-bottom: 60px; }
.portfolio-header h1 { font-size: clamp(30px, 5vw, 55px); font-weight: 800; }
.text-blue { color: var(--accent-blue); }

.filter-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.filter-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #000;
}

/* ==========================================================================
   4. TIMELINE SYSTEM (Garis & Dot)
   ========================================================================== */
.timeline-container {
    max-width: 850px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.timeline-item {
    display: flex;
    gap: 30px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}

.timeline-dot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 20px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background: var(--border);
    border-radius: 50%;
    margin-top: 12px;
    z-index: 2;
    position: relative;
}

/* Pulse Dot Animation for Active Roles */
.timeline-dot.live {
    background: var(--accent-blue) !important;
    box-shadow: 0 0 15px var(--accent-blue);
}

.timeline-dot.live::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Timeline Vertical Line */
.timeline-line {
    width: 2px;
    flex-grow: 1;
    background: linear-gradient(to bottom, var(--border), transparent);
    margin: 5px 0;
}

/* ==========================================================================
   5. CARD CONTENT (Solid Dark Glass Style)
   ========================================================================== */
.timeline-content {
    background: rgba(13, 13, 13, 0.9); /* Solid glass */
    backdrop-filter: blur(40px); /* Deep blur */
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    padding: 35px;
    border-radius: 30px;
    margin-bottom: 40px;
    width: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.timeline-content:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

/* 16:9 Proportional Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 150px));
    gap: 10px;
    margin-top: 15px;
    justify-content: start;
}

.project-gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: 0.3s ease;
}

.project-gallery img:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
}

/* Organization Logo & Info */
.org-group-header { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }

.comp-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #1a1a1a;
    padding: 4px;
}

.org-info h3 { font-size: 19px; font-weight: 800; color: #fff; }

/* Sub-roles Progressions (LinkedIn Style) */
.role-entry {
    position: relative;
    padding-left: 32px;
    margin-bottom: 30px;
}

.role-entry:last-child { margin-bottom: 0; }

.role-connector {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: -30px;
    width: 2px;
    background: var(--border);
}

.role-entry:last-child .role-connector { display: none; }

.role-entry::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 50%;
    z-index: 2;
}

.role-date {
    font-size: 12px;
    color: var(--text-gray);
    display: block;
    margin-bottom: 8px;
}

.timeline-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    padding: 60px 5% 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-gray);
    background-color: var(--bg-dark);
}

.footer-content { max-width: 1250px; margin: 0 auto; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-credit { opacity: 0.6; font-style: italic; }

/* ==========================================================================
   7. ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .timeline-item { gap: 15px; }
    .timeline-content { padding: 25px; }
    .portfolio-container { padding-top: 120px; }
    .project-gallery { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
    .footer-bottom { flex-direction: column; gap: 15px; }

    /* ==========================================================================
    SINKRONISASI NAVIGASI MOBILE (Gunakan ini di Index & Portfolio)
    ========================================================================== */
    nav { 
        width: 90%; 
        padding: 12px 15px; /* Disamakan agar tinggi nav identik */
        flex-direction: column; 
        gap: 10px; 
        border-radius: 20px; 
        top: 10px; /* Jarak dari atas layar disamakan */
    }

    .menu-capsule { 
        width: 100%; 
        justify-content: center; 
        padding: 6px 12px; 
        gap: 12px; 
    }

    .menu-capsule a { 
        font-size: 10px; 
    }
}
