/* ================= GLOBAL ================= */


:root {
    /* Light Mode - Warna Default */
    --bg-body: #f0faff;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --sky-blue: #87CEEB;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Dark Mode - Warna Otomatis */
[data-theme="dark"] {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --glass: rgba(30, 30, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --white: #1e1e1e; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- FIX DARK MODE AGAR TIDAK NYARU --- */
[data-theme="dark"] body {
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Memaksa judul dan teks di Skill, Project, Contact jadi terang */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] .section-title,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .tab-content,
[data-theme="dark"] .contact-info-item p,
[data-theme="dark"] .contact-info-item h4 {
    color: #f8fafc !important; /* Putih terang */
}

/* Memaksa background box jadi gelap */
[data-theme="dark"] .skill-card, 
[data-theme="dark"] .tab-content, 
[data-theme="dark"] .project-card,
[data-theme="dark"] .contact-container,
[data-theme="dark"] input, 
[data-theme="dark"] textarea {
    background-color: #1e293b !important; /* Biru gelap pekat */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Warna input teks saat diketik */
[data-theme="dark"] input, 
[data-theme="dark"] textarea {
    color: white !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: var(--transition-smooth);
    overflow-x: hidden;
    min-height: 100vh;
}

section {
    scroll-margin-top: 100px;
}


/* ================= NAVIGATION BAR ================= */
header {
    position: fixed;
    top: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

nav {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 35px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    position: relative;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -1px;
    color: var(--text-main);
}

.logo span { color: var(--sky-blue); }

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s ease;
}

nav ul li a:hover { color: var(--sky-blue); }

.contact-btn-nav {
    background: var(--sky-blue);
    color: white !important;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}

/* Control Area (Theme + Hamburger) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle-nav {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none; /* Sembunyi di desktop */
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-main);
}

/* ================= RESPONSIVE (MOBILE) ================= */
@media screen and (max-width: 768px) {
    header { top: 15px; }

    nav {
        width: 90%;
        padding: 10px 20px;
        justify-content: space-between;
        border-radius: 50px;
    }

    .menu-toggle { display: block; }

    nav ul {
        display: none; /* Sembunyi saat awal */
        flex-direction: column;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: var(--glass);
        backdrop-filter: blur(25px);
        padding: 25px;
        border-radius: 25px;
        gap: 20px;
        border: 1px solid var(--border-color);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }

    nav ul.active {
        display: flex;
        animation: slideIn 0.3s ease-out forwards;
    }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= HERO SECTION ================= */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

/* Teks besar "PORTFOLIO" di belakang foto */
.bg-text {
    position: absolute;
    font-size: 16vw;
    font-weight: 900;
    color: var(--bg-card); /* Otomatis ganti warna di dark mode */
    z-index: 1;
    letter-spacing: -8px;
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Container Foto Profil */
.profile-wrapper {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 0 auto;
}

.circle-bg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 85%;
    background: var(--bg-card);
    border-radius: 150px 150px 40px 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.04);
    transition: var(--transition-smooth);
}

.profile-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 150px 150px 40px 40px;
}

.badge {
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: 5px;
    color: var(--sky-blue);
    font-size: 11px;
    text-transform: uppercase;
}

/* ================= ABOUT SECTION ================= */
.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 80px 5%;
}

/* LEFT (Polaroid Style) */
.about-left {
    flex: 1;
    position: relative;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.polaroid-stack {
    position: relative;
    width: 280px;
    height: 350px;
}

.polaroid {
    background: var(--bg-card, #fff);
    padding: 15px 15px 45px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 5px;
    position: absolute;
    width: 260px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--border-color, #eee);
}

.polaroid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.p1 { transform: rotate(-8deg); z-index: 2; }
.p2 {
    transform: rotate(6deg);
    z-index: 1;
    left: 40px;
    top: 30px;
    opacity: 0.6;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
    opacity: 1;
    box-shadow: 0 15px 40px rgba(135, 206, 235, 0.3);
}

/* RIGHT (Text Area) */
.about-right {
    flex: 1.2;
}

.about-name {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--sky-blue);
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
}

/* --- Tombol Buka Modal --- */
.btn-open-cv {
    background: #87CEEB;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.3);
    transition: all 0.3s ease;
}

/* --- Styling Modal CV --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #fff;
    margin: 2vh auto;
    width: 90%;
    max-width: 1000px;
    height: 94vh; /* Modal mengambil 94% tinggi layar */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Header di atas, Body di bawah */
    position: relative;
}

.modal-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #eee;
    flex-shrink: 0; /* Header tidak boleh menyusut */
}

.modal-body {
    flex-grow: 1; /* Body mengambil semua sisa ruang yang ada */
    background: #525659; /* Warna abu-abu khas PDF viewer */
    position: relative;
    overflow: hidden;
}

/* PERBAIKAN: Iframe harus absolut dan mengisi 100% modal-body */
.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Tombol Download & Close */
.btn-download-modal {
    background: #84d7f0;
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 10px;
}

.close-modal {
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.btn-download-modal {
    background: #84d7f0;
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Responsive HP --- */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
    }
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .about-left {
        width: 100%;
        height: 350px;
    }
}

/* ================= RESUME SECTION ================= */
.resume-section {
    background-color: var(--bg-body);
    padding: 100px 5%;
    transition: var(--transition-smooth);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1.5px;
}

.section-title span {
    color: var(--sky-blue);
}

.resume-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: stretch;
}

.resume-column {
    display: flex; 
}

.resume-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.resume-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(135, 206, 235, 0.15);
    border-color: var(--sky-blue);
}

.resume-card h4 {
    color: var(--sky-blue);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.resume-card .date {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 6px 16px;
    background: rgba(135, 206, 235, 0.15);
    border-radius: 50px;
    width: fit-content;
}

.resume-card p {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    text-transform: uppercase;
}

/* --- CONTAINER MODAL --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* --- BOX MODAL (Dibuat Fleksibel) --- */
.modal-content {
    background-color: #fff;
    margin: 2vh auto;
    width: 90%; 
    max-width: 1000px;
    height: 94vh; /* Tinggi hampir full layar */
    border-radius: 20px;
    display: flex;
    flex-direction: column; /* Header di atas, PDF di bawah */
    overflow: hidden; /* Supaya PDF tidak keluar jalur */
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* --- HEADER (Tetap di Atas) --- */
.modal-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #eee;
    flex-shrink: 0; /* Penting: Supaya header gak mengecil */
}

/* --- TOMBOL-TOMBOL --- */
.modal-btns {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-download-modal {
    background: #007bff; /* Warna Biru */
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.close-modal {
    background: #f5f5f5;
    border: none;
    color: #333;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- CONTAINER --- */
#cvModal.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* --- BOX MODAL --- */
#cvModal .modal-content {
    background-color: white;
    margin: 2vh auto;
    width: 90%;
    max-width: 1000px;
    height: 94vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* --- HEADER & TOMBOL SEJAJAR --- */
#cvModal .modal-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

#cvModal .modal-btns {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* TOMBOL DOWNLOAD BIRU */
#cvModal .btn-download-modal {
    background-color: #007bff;
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* TOMBOL X KOTAK ABU (RESET POSISI) */
#cvModal .close-modal {
    position: static; /* Menghapus paksaan position absolute kalau ada */
    background-color: #f5f5f5;
    border: none;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* --- BODY & SCROLL --- */
#cvModal .modal-body {
    flex: 1; /* Biar PDF ambil semua sisa ruang */
    width: 100%;
    background-color: #525659;
    overflow: hidden; /* Scroll dikelola oleh iframe */
}

#cvModal .modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    #cvModal .modal-content {
        width: 95%;
        height: 88vh;
    }
}

/* ================= SKILLS SECTION ================= */

.skills-section {
    padding: 100px 5%;
    text-align: center;
    transition: background-color 0.4s ease;
}

/* Light Mode Background - Mengikuti gaya Resume */
body:not(.dark-theme) .skills-section {
    background-color: #f0f9ff; 
}

/* ================= SKILLS GRID (TOP CARDS) ================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.skill-card {
    background: #ffffff;
    padding: 35px 20px;
    border-radius: 30px; 
    box-shadow: 0 10px 25px rgba(135, 206, 235, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hover & Active State */
.skill-card:hover, .skill-card.active {
    transform: translateY(-10px);
    border-color: var(--sky-blue, #87CEEB);
    box-shadow: 0 15px 35px rgba(135, 206, 235, 0.25);
}

.skill-card h3 {
    font-size: 1.1rem;
    margin: 20px 0 8px;
    color: #333;
    font-weight: 700;
}

.skill-card .percent {
    font-weight: 800;
    color: var(--sky-blue, #87CEEB);
    font-size: 1.4rem;
}

/* ================= PROGRESS CIRCLE ================= */
.progress-circle {
    --w: 110px;
    width: var(--w);
    height: var(--w);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Track warna default (light) */
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef2f5 0);
    transition: 0.4s;
}

.inner-circle {
    width: 84%;
    height: 84%;
    background: #ffffff; 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.4s;
}

/* ================= TABS NAVIGATION ================= */
.skills-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0;
}

.tab-link {
    background: #ffffff; 
    border: 2px solid rgba(135, 206, 235, 0.2);
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    color: #666;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tab-link.active,
.tab-link:hover {
    background: var(--sky-blue, #87CEEB) !important;
    color: white !important;
    border-color: var(--sky-blue, #87CEEB) !important;
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.35);
}

/* ================= SKILLS DETAIL (BOTTOM BOX) ================= */
.skills-detail-container {
    background: rgba(135, 206, 235, 0.08) !important; 
    padding: 50px 30px;
    border-radius: 40px;
    border: 1px solid rgba(135, 206, 235, 0.15);
    max-width: 1100px;
    margin: 20px auto 0;
    backdrop-filter: blur(10px);
}

.software-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.soft-pill {
    background: var(--sky-blue, #87CEEB);
    color: white !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(135, 206, 235, 0.2);
    transition: all 0.3s ease;
}

.soft-pill:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ================= DARK MODE ================= */
body.dark-theme .skills-section { background-color: #0f172a; }

body.dark-theme .skill-card, 
body.dark-theme .tab-link {
    background: #1e293b;
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .skill-card h3 { color: #fff; }

body.dark-theme .skill-card.active {
    border-color: var(--sky-blue, #87CEEB);
    background: #24334d; /* Sedikit lebih terang dari card biasa */
}

body.dark-theme .progress-circle {
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #334155 0);
}

body.dark-theme .inner-circle { background: #1e293b; }

body.dark-theme .skills-detail-container {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05);
}

/* ================= ANIMATION ================= */
.tab-content {
    display: none;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-content.active { display: block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr; /* 2 kolom di HP biar gak kepanjangan */
        gap: 15px;
    }
    .skill-card { padding: 25px 15px; }
    .progress-circle { --w: 90px; }
    .soft-pill { padding: 10px 20px; font-size: 0.8rem; }
}

/* ================= PROJECTS SECTION ================= */

.projects-section {
    padding: 100px 5%;
    text-align: center;
    background-color: #f0f9ff; 
    transition: background-color 0.4s ease;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #1a1a1a; 
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.section-title span {
    color: var(--sky-blue, #87CEEB);
}

/* GRID LAYOUT */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start; 
}

/* PROJECT CARD */
.project-card {
    background: #ffffff;
    border: 1px solid rgba(135, 206, 235, 0.15);
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--sky-blue, #87CEEB);
    box-shadow: 0 20px 40px rgba(135, 206, 235, 0.2);
}

/* IMAGE CONTAINER (Perbaikan Foto Gepeng) */
.project-img {
    position: relative;
    width: 100%;
    height: 220px; /* Tinggi yang ideal untuk tampilan dashboard */
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    /* 'cover' memastikan area terisi penuh tanpa gepeng, 
       'top' memastikan bagian atas dashboard (header app) tetap terlihat */
    object-fit: cover; 
    object-position: top; 
    transition: transform 0.6s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.08);
}

/* OVERLAY ON HOVER */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* BUTTON VIEW */
.view-btn {
    text-decoration: none;
    color: white !important;
    padding: 12px 30px;
    background: var(--sky-blue, #87CEEB);
    border: 2px solid var(--sky-blue, #87CEEB);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-card:hover .view-btn {
    transform: translateY(0);
}

.view-btn:hover {
    background: transparent;
    color: white !important;
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.6);
}

/* PROJECT INFO */
.project-info {
    padding: 30px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 800;
}

.project-info p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================= MODAL PREVIEW (Perbaikan Pop-up) ================= */

.modal-preview {
    display: none; /* Diatur via JS menjadi 'flex' */
    position: fixed; 
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(8px);
    justify-content: center; /* Tengah horizontal */
    align-items: center;     /* Tengah vertikal */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain; /* Gambar utuh di pop-up, tidak terpotong */
    border-radius: 15px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--sky-blue, #87CEEB);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    .project-img {
        height: 200px;
    }
    .section-title {
        font-size: 2.2rem;
    }
}

/* ================= DARK MODE OVERRIDES ================= */

body.dark-theme .projects-section {
    background-color: #0f172a;
}

body.dark-theme .section-title {
    color: #ffffff;
}

body.dark-theme .project-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .project-info h3 {
    color: #f8fafc;
}

body.dark-theme .project-info p {
    color: #94a3b8;
}

/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Satu kolom di HP */
        padding: 0 10px;
    }

    .project-img {
        height: 200px;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

/* ================= CERTIFICATE SECTION ================= */

.certificate-section {
    padding: 100px 0;
    overflow: hidden;
    background-color: #f0f9ff; /* Light Mode */
    transition: background-color 0.4s ease;
}

body.dark-theme .certificate-section {
    background-color: #0f172a; /* Dark Mode */
}

/* Container utama slider */
#certSlider {
    display: flex;
    overflow: hidden; /* Ubah dari auto ke hidden agar user tidak menggeser manual yang merusak looping */
    white-space: nowrap;
    width: 100%;
    padding: 20px 0;
    scroll-behavior: auto !important; 
    cursor: grab;
}

#certSlider:active {
    cursor: grabbing;
}

/* Wrapper untuk menampung dua grup track (Grup 1 & Grup 2) */
.cert-track-wrapper {
    display: flex;
    width: max-content;
}

.cert-track {
    display: flex;
    gap: 25px;
    padding-right: 25px; /* Jarak agar saat looping tidak menempel */
}

/* Certificate Card */
.cert-card-new {
    width: 320px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(135, 206, 235, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s;
}

body.dark-theme .cert-card-new {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cert-card-new:hover {
    transform: translateY(-10px);
    border-color: #87CEEB; /* Menggunakan sky-blue langsung jika variabel belum terdefinisi */
    box-shadow: 0 20px 40px rgba(135, 206, 235, 0.25);
}

.cert-card-new img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    cursor: zoom-in;
    display: block;
    transition: 0.3s;
}

.cert-card-new:hover img {
    filter: brightness(1.1);
}

/* Info Sertifikat */
.cert-info {
    padding: 25px;
    text-align: left;
}

.cert-info h3 {
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-weight: 700;
    white-space: normal; /* Biar teks judul bisa turun ke bawah jika panjang */
}

body.dark-theme .cert-info h3 {
    color: #ffffff;
}

.cert-info p {
    color: #87CEEB;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================= CERTIFICATE MODAL ================= */

.cert-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

#imgFull {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: certZoom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes certZoom {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-modal:hover {
    color: #87CEEB;
    transform: rotate(90deg);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .cert-card-new {
        width: 260px; /* Ukuran sedikit lebih kecil di HP */
    }
    
    .certificate-section {
        padding: 60px 0;
    }
}

/* ================= CONTACT SECTION ================= */

.contact-section {
    padding: 100px 20px;
    /* Menggunakan variabel agar bisa berubah otomatis */
    background-color: var(--bg-section, #e0f2fe); 
    color: var(--text-main, #4a4a4a);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Nama besar */
.contact-name-large {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--sky-blue, #26a3dd);
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 800;
}

.contact-desc {
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 45px;
    font-size: 1.1rem;
    color: var(--text-sub, #666);
}

/* Info list */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-card, #ffffff);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--sky-blue, #8ed1fd);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.info-text .label {
    display: block;
    font-size: 0.7rem;
    color: #aaa;
    font-weight: 700;
    letter-spacing: 1px;
}

.info-text .value {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
}

.info-item-link {
    text-decoration: none;
    color: inherit; /* Mengikuti warna teks asli */
    display: block;
    transition: transform 0.2s ease;
}

.info-item-link:hover {
    transform: translateX(5px); /* Efek geser sedikit saat di-hover */
}

.info-item-link .info-item:hover {
    background: rgba(0, 0, 0, 0.05); /* Memberi sedikit highlight background */
    border-radius: 12px;
}

/* ================= SOCIAL MARQUEE ================= */

.contact-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    margin-bottom: 40px;
    position: relative;
    /* Masking untuk efek fading/menghilang halus di pinggir kiri dan kanan */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.social-pills-marquee {
    display: flex;
    width: max-content; /* Biar memanjang mengikuti isi */
    animation: contactScroll 25s linear infinite; /* 25s agar gerakan lebih elegan, tidak terlalu cepat */
}

/* Container untuk grup tombol (Grup 1 & Grup 2) */
.marquee-content {
    display: flex;
    gap: 15px; /* Jarak antar tombol */
    padding-right: 15px; /* Wajib sama dengan gap agar transisi antar grup mulus */
}

.pill-btn {
    background: var(--sky-blue, #26a3dd);
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(38, 163, 221, 0.2);
    white-space: nowrap; /* Mencegah teks turun ke bawah */
}

.pill-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: #1e87b8; 
    box-shadow: 0 6px 20px rgba(38, 163, 221, 0.4);
}

/* Berhenti saat kursor di atasnya agar user mudah klik link */
.contact-marquee-wrapper:hover .social-pills-marquee {
    animation-play-state: paused;
}

/* Keyframes Seamless: 
   Geser sejauh 50% karena konten kita duplikasi dua kali di HTML 
*/
@keyframes contactScroll {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-50%); 
    }
}

/* Responsive: Sedikit penyesuaian untuk layar kecil */
@media (max-width: 768px) {
    .pill-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }
    .social-pills-marquee {
        animation-duration: 20s; /* Sedikit lebih cepat di HP agar tidak membosankan */
    }
}

/* ================= CONTACT FORM BOX ================= */

.contact-box {
    /* Menggunakan variabel agar background berubah saat dark mode */
    background: var(--bg-card, #ffffff);
    padding: 50px;
    border-radius: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    box-shadow: 0 20px 50px rgba(135, 206, 235, 0.1);
    transition: background 0.4s ease;
}

/* Responsive buat HP */
@media (max-width: 768px) {
    .contact-box {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    .contact-name-large {
        font-size: 2.5rem;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Judul Find Me */
.find-me-title {
    text-align: left;
    color: var(--sky-blue, #26a3dd);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 30px 0 10px 0;
}

/* Ikon Info (Lingkaran) */
.info-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-section, #f0f9ff); /* Warna kontras dengan kartu */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.info-icon i {
    color: var(--sky-blue, #26a3dd) !important; 
    font-size: 20px !important;
}

.info-text .label {
    color: var(--text-sub, #888);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ================= FORM CONTAINER ================= */

.contact-form-container {
    background: var(--bg-card, white);
    padding: 40px;
    border-radius: 30px;
    margin-top: 50px;
    box-shadow: 0 10px 30px rgba(135, 206, 235, 0.2);
    transition: background 0.4s ease;
}

.form-title {
    font-size: 1.8rem;
    color: var(--text-main, #333);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.form-subtitle {
    color: var(--sky-blue, #0095ff);
    font-size: 0.95rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Layout Form */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main, #555);
}

/* Input & Textarea */
.styled-form input,
.styled-form textarea {
    padding: 15px 20px;
    border: 2px solid rgba(135, 206, 235, 0.2);
    border-radius: 15px;
    background: var(--bg-section, #f0f9ff);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.styled-form input:focus,
.styled-form textarea:focus {
    border-color: var(--sky-blue);
    background: var(--bg-card);
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.3);
}

/* Tombol Kirim */
.btn-send {
    background: var(--sky-blue, #0095ff);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-send:hover {
    background: #0077cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 149, 255, 0.3);
}

/* ================= EXTRA & ANIMATION ================= */

.highlight-pink {
    color: var(--sky-blue, #84cdf8);
    font-weight: bold;
}

#contact:target {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% { background-color: rgba(135, 206, 235, 0.4); }
    100% { background-color: transparent; }
}

/* ================= THEME TOGGLE BUTTONS ================= */

/* Tombol Floating di pojok kanan bawah */
.theme-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--sky-blue, #0095ff);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10001; /* Di atas modal */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* Tombol ganti tema di Navbar */
.theme-toggle-nav {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.theme-toggle-nav:hover {
    color: var(--sky-blue);
    transform: scale(1.1);
}

/* ================= CONTACT INFO BUTTONS ================= */

.info-item-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-card, #f8f9fa);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-main, #333);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.info-item-btn:hover {
    transform: translateX(10px);
    background: var(--bg-section);
    border-color: var(--sky-blue);
}

.info-icon-large {
    font-size: 24px;
    margin-right: 15px;
    color: var(--sky-blue);
}

.contact-btn {
    background-color: var(--sky-blue);
    color: white !important;
    padding: 8px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.contact-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.4);
}

/* ================= GLOBAL DARK THEME (SISTEM PUSAT) ================= */

/* Gunakan class 'dark-theme' di tag <body> */
body.dark-theme {
    background-color: #0f172a; /* Biru Gelap Luar Angkasa */
    color: #ffffff;
    
    /* Mengubah Variable Global */
    --bg-section: #0f172a;
    --bg-card: #1e293b;
    --text-main: #ffffff;
    --text-sub: #94a3b8;
}

body.dark-theme header {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

body.dark-theme nav ul li a {
    color: #ffffff;
}

body.dark-theme .info-item-btn,
body.dark-theme .contact-form-container,
body.dark-theme .contact-box {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

body.dark-theme img {
    filter: brightness(0.85) contrast(1.1);
}

/* Responsif Fix */
@media (max-width: 768px) {
    nav ul {
        gap: 15px;
    }
    .theme-toggle {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
}

/* ========== RESPONSIVE=========== */
@media (max-width: 768px) {
    .hero-content { flex-direction: column; }
    .section-container { flex-direction: column; }
    .cert-card { flex: 0 0 260px; }
    header { padding: 1rem; flex-direction: column; gap: 10px; }
    nav a { margin-left: 10px; font-size: 12px; }
}
/* Container Utama */
.cert-wrapper {
    position: relative;
    padding: 0 45px;
    margin-top: 20px;
}

/* Scroll Container */
.cert-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none; /* Firefox */
}

.cert-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ========== 1. RESPONSIVE & GLOBAL =========== */
@media (max-width: 768px) {
    .hero-content, 
    .section-container, 
    header { 
        flex-direction: column; 
    }
    
    .cert-card { 
        flex: 0 0 260px; 
    }
    
    header { 
        padding: 1rem; 
        gap: 10px; 
    }
    
    nav a { 
        margin-left: 10px; 
        font-size: 12px; 
    }
    
    /* Tambahan: Pastikan tombol aksi tidak menutupi konten di layar kecil */
    .top-actions {
        top: 10px;
        right: 10px;
    }
}

/* ========== 2. SERTIFIKAT (CAROUSEL/SCROLL) =========== */
.cert-wrapper {
    position: relative;
    padding: 0 45px;
    margin-top: 20px;
}

.cert-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none; /* Firefox */
}

.cert-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ========== 3. POSISI TOMBOL (TOP ACTIONS) =========== */
/* Menampung Theme Toggle dan tombol navigasi lainnya */
.top-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1001;
}

/* Reset posisi theme-toggle agar mengikuti flexbox dari .top-actions */
.theme-toggle {
    position: static !important;
    margin: 0;
}

/* ========== 4. TOMBOL BACK TO TOP =========== */
.back-to-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;

    .back-to-top-btn {
    /* ... kode Anda yang lain ... */
    z-index: 9999 !important; /* Pastikan selalu di depan */
    pointer-events: auto;    /* Pastikan bisa diklik */
}
    
    /* Flexbox untuk menengahkan ikon/teks */
    display: none; /* Diatur via JavaScript agar muncul saat scroll */
    align-items: center;
    justify-content: center;
    
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease; /* Transisi halus */
}

.back-to-top-btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

