/* === VARIABEL WARNA (TEMA ELEGANT NAVY BLUE BLEND) === */
:root {
    --bg-main: #f4f7f9; 
    --bg-card: #ffffff; 
    --primary: #1e40af; 
    --primary-dark: #1e3a8a; 
    --primary-light: #dbeafe; 
    --text-dark: #0f172a; 
    --text-muted: #475569; 
    --shadow-soft: 0 10px 40px -10px rgba(30, 64, 175, 0.15); 
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === CUSTOM SCROLLBAR (Desktop) === */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Poppins', sans-serif; text-decoration: none; list-style: none; scroll-behavior: smooth;
}

body { background-color: var(--bg-main); color: var(--text-dark); line-height: 1.7; overflow-x: hidden; }

/* === HEADER & NAVIGASI === */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 1.5rem 8%;
    display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: var(--transition);
}
header.scrolled {
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 1rem 8%;
}

.logo { display: none; font-size: 1.5rem; font-weight: 700; color: var(--text-dark); }
.logo span { color: var(--primary); }
.desktop-spacer { flex: 1; display: block; }

.navbar { display: flex; gap: 2rem; }
.navbar a {
    color: var(--text-muted); font-weight: 500; font-size: 0.95rem; position: relative; transition: var(--transition);
}
.navbar a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: var(--transition);
}
.navbar a:hover, .navbar a.active { color: var(--primary); }
.navbar a:hover::after, .navbar a.active::after { width: 100%; }
.menu-icon { font-size: 2rem; color: var(--text-dark); display: none; cursor: pointer; }

/* --- KONTAINER UMUM --- */
.container { width: 90%; max-width: 1100px; margin: 0 auto; }
section { padding: 8rem 8% 4rem; min-height: 100vh; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 700; margin-bottom: 3rem; color: var(--text-dark);}
.section-title span { color: var(--primary); }

/* === TOMBOL === */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
    padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 8px 20px rgba(30, 64, 175, 0.25); border: none; }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 12px 25px rgba(30, 64, 175, 0.35); color: #fff;}
.btn-secondary { background-color: transparent; color: var(--primary); border: 2px solid var(--primary-light); }
.btn-secondary:hover { background-color: var(--primary-light); border-color: var(--primary); transform: translateY(-3px); color: var(--primary-dark); }

/* === HERO SECTION DENGAN EFEK ANIMASI NAVY BLEND === */
.hero { 
    position: relative; 
    display: flex; align-items: center; justify-content: space-between; gap: 4rem; 
    overflow: hidden; 
}
.hero-content { flex: 1; position: relative; z-index: 2; }
.hero-img-container { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; }

/* CSS Animasi Glowing Orbs */
.hero-bg-animation {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; 
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(90px); 
    opacity: 0.6; animation: float-orb 15s infinite ease-in-out alternate;
}
.orb-1 { width: 450px; height: 450px; background: var(--primary-light); top: -10%; left: -10%; animation-duration: 20s; }
.orb-2 { width: 350px; height: 350px; background: #e0f2fe; bottom: 10%; right: -5%; animation-duration: 18s; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: var(--primary); top: 30%; left: 30%; opacity: 0.1; animation-duration: 25s; animation-delay: -10s; }
@keyframes float-orb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 50px) scale(1.1); }
    100% { transform: translate(-30px, 20px) scale(0.9); }
}

/* Typing Effect & Hero Teks */
.greeting-container { min-height: 28px; margin-bottom: 0.5rem; }
.greeting { color: var(--primary); font-weight: 600; font-size: 1.1rem; line-height: 1.5; display: inline-block; }
.typing-cursor { border-right: 2px solid var(--primary); padding-right: 4px; animation: blink 0.75s step-end infinite; }
@keyframes blink { 50% { border-color: transparent; } }

.hero-content h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem; }
.role { font-size: 1.5rem; color: var(--text-muted); font-weight: 500; margin-bottom: 1.5rem; }
.highlight { color: var(--primary); }
.bio { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.05rem; max-width: 90%; }
.action-btns { display: flex; gap: 1rem; margin-bottom: 2.5rem; }
.social-links { display: flex; gap: 1.2rem; }
.social-links a {
    display: flex; align-items: center; justify-content: center; width: 45px; height: 45px;
    border-radius: 50%; background-color: var(--bg-card); color: var(--text-dark);
    font-size: 1.3rem; box-shadow: var(--shadow-soft); transition: var(--transition);
}
.social-links a:hover { background-color: var(--primary); color: white; transform: translateY(-5px); }

/* Gradasi Navy untuk latar foto profil */
.profile-img {
    width: 380px; height: 380px; border-radius: 50%; object-fit: cover; object-position: center top; 
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe, var(--primary));
    box-shadow: 0 20px 50px rgba(30, 64, 175, 0.2); animation: float 6s ease-in-out infinite; border: 8px solid rgba(255, 255, 255, 0.8);
}

/* === ABOUT SECTION === */
.about { min-height: auto; background-color: var(--bg-card); border-radius: 30px; margin: 0 5%; padding: 5rem 5%; box-shadow: var(--shadow-soft); position: relative; z-index: 3;}
.about-content { display: flex; flex-direction: column; gap: 3rem; text-align: center; }
.about-text p { color: var(--text-muted); font-size: 1.05rem; max-width: 850px; margin: 0 auto; line-height: 1.8; }
.about-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.skill-box { padding: 2rem; background: var(--bg-main); border-radius: 20px; transition: var(--transition); border: 1px solid var(--primary-light); }
.skill-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-soft); background: #fff;}
.skill-box i { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }
.skill-box h4 { margin-bottom: 0.5rem; font-size: 1.2rem; color: var(--text-dark); }
.skill-box p { color: var(--text-muted); font-size: 0.95rem; }

/* --- TIMELINE PENGALAMAN --- */
.timeline { position: relative; max-width: 850px; margin: 0 auto; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: -26px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); z-index: 1;
}
.timeline-content {
    background: var(--bg-card); padding: 1.8rem; border-radius: 16px; border: 1px solid #e2e8f0;
    transition: all 0.3s ease; box-shadow: var(--shadow-soft);
}
.timeline-content:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15); border-color: var(--primary-light); }
.timeline-title { color: var(--text-dark); margin-bottom: 5px; font-size: 1.2rem; }
.timeline-subtitle { color: var(--primary); font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.timeline-subtitle span { color: #94a3b8; font-weight: 400; }
.timeline-desc { color: #64748b; font-size: 0.95rem; line-height: 1.6; }

/* --- SKILLS & TOOLS SECTION (PILLS) --- */
.skills-wrapper { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.skill-category h3 { font-size: 1.2rem; color: #64748b; margin-bottom: 1.5rem; text-align: center; text-transform: uppercase; letter-spacing: 2px; }
.skill-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.skill-item {
    display: flex; align-items: center; gap: 10px; background: white; padding: 12px 24px; border-radius: 50px; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03); border: 1px solid #e2e8f0; font-weight: 600; color: #475569; font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: default;
}
.skill-item i { font-size: 1.5rem; color: var(--primary); }
.skill-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(30, 64, 175, 0.15); border-color: var(--primary); color: var(--primary); }

/* === PROYEK SECTION === */
.project-card { 
    background-color: var(--bg-card); border-radius: 20px; 
    box-shadow: var(--shadow-soft); transition: var(--transition); border: 1px solid #e2e8f0; 
    overflow: hidden; display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(30, 64, 175, 0.15); border-bottom: 5px solid var(--primary); }
.project-img-wrapper {
    width: 100%; height: 200px; overflow: hidden;
    background-color: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
}
.project-img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.project-card:hover .project-img { transform: scale(1.05); }
.project-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column;}
.project-title { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.project-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; flex: 1;}
.btn-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--primary); font-weight: 600; font-size: 0.95rem; transition: var(--transition); align-self: flex-start;}
.btn-link:hover { color: var(--primary-dark); gap: 0.6rem; }

/* === KARTU SERTIFIKAT === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem;}
.cert-card { 
    background-color: var(--bg-card); padding: 1.5rem; border-radius: 20px; 
    box-shadow: var(--shadow-soft); transition: var(--transition); border: 1px solid #e2e8f0; 
    display: flex; flex-direction: column;
}
.cert-card:hover { transform: translateY(-10px); border-bottom: 5px solid var(--primary); box-shadow: 0 15px 35px rgba(30, 64, 175, 0.15); }

.cert-img-wrapper {
    width: 100%; height: 220px; border-radius: 12px; margin-bottom: 1.5rem; overflow: hidden;
    background-color: transparent; /* Diubah jadi transparan agar menyatu dengan kartu putih */
    /* border: 1px solid var(--primary-light); -- (Opsional) Dihilangkan agar tidak ada garis kotak ganda */
    display: flex; align-items: center; justify-content: center;
    /* padding: 10px; -- Dihapus agar gambar bisa full mentok ke batas */
}

.cert-img { 
    width: 100%; height: 100%; 
    object-fit: contain; /* Tetap contain agar gambar utuh 100% dan tidak ada yang ke-crop */
    transition: var(--transition); 
}

.cert-card:hover .cert-img { transform: scale(1.05); }
.cert-title { font-size: 1.2rem; margin-bottom: 0.3rem; color: var(--text-dark); text-align: center; }
.cert-issuer { color: var(--primary); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.8rem; text-align: center; }
.cert-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; text-align: center; }

/* --- KONTAK --- */
.contact { display: flex; justify-content: center; align-items: center; text-align: center; min-height: 70vh; }
.contact-card {
    max-width: 750px; margin: 20px auto 40px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px);
    border-radius: 30px; padding: 3.5rem 2rem; box-shadow: 0 25px 50px -12px rgba(30, 64, 175, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6); text-align: center;
}
.contact-badge { background: var(--primary-light); color: var(--primary-dark); padding: 5px 15px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; display: inline-block; }
.contact-badge i { font-size: 8px; vertical-align: middle; }
.contact-card h2 { margin-top: 1.5rem; font-size: 2.5rem; color: var(--text-dark); }
.contact-card p { color: #64748b; margin-top: 10px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin: 2.5rem 0; }
.contact-actions a { min-width: 200px; padding: 14px 24px; border-radius: 15px; font-weight: 600; text-decoration: none; transition: var(--transition); }
.contact-divider { margin: 2rem 0; border-top: 1px solid #e2e8f0; position: relative; }
.contact-divider span { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: white; padding: 0 15px; color: #94a3b8; font-size: 0.8rem; white-space: nowrap; }
.contact-socials { display: flex; justify-content: center; gap: 20px; margin-top: 2rem;}
.contact-socials a { font-size: 2rem; color: var(--primary); transition: 0.3s; }
.contact-socials a:hover { transform: translateY(-5px); color: var(--primary-dark); }

/* === FLOATING BACK TO TOP BUTTON (DISEMBUNYIKAN DI DESKTOP) === */
.back-to-top { display: none; }

footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid #e2e8f0; }

/* === ANIMASI FADE-UP === */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* === RESPONSIVE MOBILE & TABLET === */
@media (max-width: 991px) {
    header { padding: 1.2rem 5%; } header.scrolled { padding: 1rem 5%; } section { padding: 7rem 5% 4rem; }
    .hero { flex-direction: column-reverse; text-align: center; gap: 3rem; }
    .hero-content h1 { font-size: 2.8rem; } .bio { margin: 0 auto 2.5rem; }
    .action-btns, .social-links { justify-content: center; }
    .profile-img { width: 300px; height: 300px; }
    .about { margin: 0; padding: 4rem 2rem;}
}

@media (max-width: 768px) {
    .menu-icon { display: block; }
    
    /* Memunculkan Logo di HP & Menyembunyikan Spacer */
    .logo { display: block; }
    .desktop-spacer { display: none; }

    .navbar {
        position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-card);
        padding: 1rem 5%; flex-direction: column; gap: 1.5rem; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: var(--transition);
    }
    .navbar.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    
    .greeting-container { min-height: 45px; } 
    .greeting { font-size: 1rem; }
    
    .timeline { padding-left: 20px; } .timeline::before { left: 0px; } .timeline-dot { left: -7px; } .timeline-content { padding: 1.2rem; }
    .contact-card h2 { font-size: 1.8rem !important; line-height: 1.3 !important; word-wrap: break-word !important; padding: 0 10px !important; }
    #contact { height: auto !important; min-height: 100vh !important; padding-bottom: 80px !important; }
    .contact-card { padding: 2.5rem 1.5rem !important; margin: 20px; }
    .contact-actions a { width: 100%; }
    .cert-img-wrapper, .project-img-wrapper { height: 200px; }

    /* === MENGAKTIFKAN BACK TO TOP KHUSUS DI MOBILE === */
    .back-to-top {
        display: flex;
        position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px;
        background: var(--primary); color: #fff; border-radius: 50%;
        justify-content: center; align-items: center; font-size: 1.2rem;
        box-shadow: var(--shadow-soft); z-index: 999;
        opacity: 0; visibility: hidden; transition: var(--transition);
    }
    .back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
    .back-to-top:hover { background: var(--primary-dark); transform: translateY(-5px); color: #fff; }
}