/* =========================================
   1. CSS VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Light Mode (Default) */
    --bg-body: #e9ecef;
    --bg-paper: #ffffff;
    --bg-nav: #ffffff;
    --text-primary: #000000;
    --text-secondary: #333333;
    --line-color: #000000;
    --thin-line: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --nav-border: #e0e0e0;
    --btn-hover: #f0f0f0;
}

body.dark-mode {
    /* Dark Mode Overrides */
    --bg-body: #121212;
    --bg-paper: #1e1e1e;
    --bg-nav: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #bbbbbb;
    --line-color: #555555;
    --thin-line: #333333;
    --shadow: 0 4px 15px rgba(0,0,0,0.5);
    --nav-border: #333333;
    --btn-hover: #2d2d2d;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 70px; /* Space for Fixed Navbar */
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

strong {
    font-weight: 700;
    color: var(--text-primary);
}

/* =========================================
   3. NAVBAR (TOP HEADER)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--nav-border);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    height: 36px;
}

.nav-btn:hover {
    background-color: var(--btn-hover);
}

.nav-btn.btn-primary {
    background-color: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

.nav-btn.btn-primary:hover {
    background-color: #5b4cc4;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background-color: var(--nav-border);
    margin: 0 2px;
}

/* =========================================
   4. LANGUAGE LOGIC (HIDE/SHOW)
   ========================================= */
body.lang-id-active .lang-en { display: none !important; }
body.lang-en-active .lang-id { display: none !important; }

/* =========================================
   5. CV CONTAINER (PAPER STYLE)
   ========================================= */
.cv-wrapper {
    padding-bottom: 50px;
}

.cv-container {
    background-color: var(--bg-paper);
    max-width: 210mm;
    margin: 0 auto;
    padding: 40px 50px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

/* =========================================
   6. CV HEADER SECTION
   ========================================= */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.main-role {
    font-size: 1.25rem;
    font-weight: 400;
    text-align: right;
    max-width: 300px;
    line-height: 1.3;
    color: var(--text-primary);
}

.thick-line {
    border: none;
    height: 3px;
    background-color: var(--line-color);
    margin-bottom: 35px;
    display: block;
    width: 100%;
    opacity: 1;
}

/* =========================================
   7. MAIN LAYOUT GRID (SECTIONS)
   ========================================= */
.cv-section {
    display: grid;
    grid-template-columns: 140px 1fr; /* Fixed Left Column */
    gap: 30px;
    border-bottom: 1px solid var(--thin-line);
    padding-bottom: 35px;
    margin-bottom: 35px;
}

.cv-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-label {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 3px;
    color: var(--text-primary);
}

.section-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* =========================================
   8. CONTENT STYLING
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr; 
    gap: 5px 0px;
}

.contact-item {
    margin-bottom: 5px;
    word-break: break-word;
}

.contact-item .label {
    font-weight: 700;
    margin-right: 5px;
    color: var(--text-primary);
}

.bullet-list {
    list-style-type: disc;
    padding-left: 18px;
    margin: 0;
}

.bullet-list li {
    margin-bottom: 6px;
}

.bullet-list.no-bullet-space li {
    margin-bottom: 4px;
}

.job-item {
    margin-bottom: 20px;
}

.job-item:last-child {
    margin-bottom: 0;
}

.job-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.job-company {
    font-style: italic;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* =========================================
   9. FOOTER
   ========================================= */
.site-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--nav-border);
    margin-top: auto;
}

/* =========================================
   10. MEDIA QUERIES: MOBILE
   ========================================= */
@media (max-width: 768px) {
    /* Navbar Adjustment */
    .nav-container {
        padding: 0 15px;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .nav-brand {
        font-size: 1.3rem;
    }
    
    .nav-actions {
        width: auto;
        gap: 5px;
    }

    .nav-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    /* Logic: Hide Text but Keep Flag Icon */
    .nav-btn .lang-text { display: none; } /* Hide 'EN/ID' Text */
    #pdf-btn span { display: none; } /* Hide 'PDF' Text */
    
    /* Hide Divider & Print Button */
    .nav-divider, 
    #print-btn {
        display: none !important;
    }

    /* CV Container */
    .cv-container {
        padding: 30px 20px;
        width: 100%;
        box-shadow: none;
    }
    
    /* Header Stack & Font Resizing */
    .cv-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .name {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .main-role {
        text-align: left;
        max-width: 100%;
        font-size: 1.3rem;
    }
    
    .thick-line {
        margin-bottom: 40px;
    }

    /* Sections Stack */
    .cv-section {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    .section-label {
        margin-bottom: 12px;
        padding-bottom: 0;
        border-bottom: none; 
        font-size: 1.1rem;
    }
    
    /* Contact Stack */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* =========================================
   11. MEDIA QUERIES: PRINT
   ========================================= */
@media print {
    .no-print { display: none !important; }

    body {
        padding: 0 !important;
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .cv-wrapper { padding: 0; }
    
    .cv-container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 40px 50px !important;
        box-shadow: none;
        background: white !important;
    }

    .name, .main-role, .section-label, strong, .contact-item .label, .job-title {
        color: black !important;
    }
    
    .section-content, .job-company, .contact-item {
        color: #333 !important;
    }

    .thick-line {
        background-color: black !important;
        height: 3px !important;
    }
    
    .cv-section {
        border-bottom: 1px solid #ccc !important;
    }
    
    .cv-section:last-child {
        border-bottom: none !important;
    }
    
    .cv-section { grid-template-columns: 140px 1fr !important; }
    .contact-grid { grid-template-columns: 1.8fr 1fr !important; }
    
    a { text-decoration: none; color: black !important; }
}