/* RESET & PENGATURAN DASAR */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0f0f11; /* Warna background gelap/hitam ala gambar lo */
    color: #a0a0a0; /* Warna teks abu-abu terang */
}

/* WARNA AKSEN UNGU */
.accent {
    color: #6c5ce7; /* Warna ungu mirip gambar */
}

/* NAVIGASI */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex; /* Bikin Logo, Menu, dan Tombol Contact sejajar */
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    box-sizing: border-box;
    background-color: #0f0f11;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #6c5ce7;
}

/* HERO SECTION (HOME) - MENGGUNAKAN FLEXBOX */
.hero-section {
    min-height: 100vh;
    display: flex; /* INI KUNCI LAYOUT KIRI-KANAN */
    align-items: center;
    justify-content: space-between;
    padding: 0 10%; /* Jarak kiri kanan layar */
    box-sizing: border-box;
}

.hero-text {
    flex: 1; /* Kompartemen kiri ambil ruang sisa */
    padding-right: 50px;
}

.hero-text h3 {
    color: white;
    font-size: 24px;
    margin-bottom: 5px;
}

.hero-text h1 {
    color: white;
    font-size: 50px;
    margin: 0 0 10px 0;
}

.hero-text h4 {
    color: #a0a0a0;
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 20px;
}

.divider {
    width: 50px;
    height: 2px;
    background-color: #a0a0a0;
    margin-bottom: 20px;
}

.hero-text p {
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1; /* Kompartemen kanan ambil ruang sisa */
    display: flex;
    justify-content: center;
}

/* KOTAK TEMPAT FOTO (SEMENTARA) */
/* GAYA UNTUK FOTO ASLI LO */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center; /* Bikin foto rata tengah secara vertikal */
}

.hero-image-actual {
    max-width: 350px; /* Atur lebar maksimal foto, silakan sesuaikan */
    height: auto; /* Biar fotonya gak penyet, tinggi menyesuaikan lebar */
    border-radius: 30px; /* Bikin ujung melengkung ala Apple */
    border: 3px solid rgba(108, 92, 231, 0.3); /* Garis tepi tipis ungu transparan */
    box-shadow: 0 15px 50px rgba(108, 92, 231, 0.4); /* Bayangan ungu lembut biar makin pop-out */
    transition: transform 0.4s ease; /* Persiapan untuk efek hover nanti */
}

/* Sedikit sentuhan interaktif saat foto disentuh mouse */
.hero-image-actual:hover {
    transform: scale(1.05); /* Foto membesar sedikit 5% */
}

/* TOMBOL-TOMBOL */
.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 12px 25px;
    background-color: #6c5ce7;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

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

.btn-outline, .btn-outline-small {
    padding: 12px 25px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-outline-small {
    padding: 8px 15px;
    border-color: #6c5ce7;
    color: #6c5ce7;
}

.btn-outline:hover, .btn-outline-small:hover {
    background-color: #6c5ce7;
    border-color: #6c5ce7;
    color: white;
}

/* ABOUT SECTION */
.about-section {
    min-height: 100vh;
    padding: 100px 10%;
    display: flex;
    flex-direction: column; /* Nyusun elemen dari atas ke bawah */
    align-items: center; /* Ketengahin semua konten secara horizontal */
    justify-content: center; /* Ketengahin secara vertikal */
}

.section-title {
    font-size: 40px;
    color: white;
    margin-bottom: 50px;
    text-align: center;
}

/* KOTAK KACA UNTUK ABOUT */
.glass-card-alt {
    background: rgba(255, 255, 255, 0.03); /* Transparan banget */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Bayangan hitam biar pop-out */
}

.glass-card-alt p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #dcdcdc; /* Abu-abu terang biar enak dibaca di background gelap */
}

/* SKILLS TAGS (TOMBOL KEAHLIAN) */
.skills {
    display: flex;
    flex-wrap: wrap; /* Kalau layarnya sempit, otomatis turun ke bawah */
    justify-content: center;
    gap: 15px; /* Jarak antar tombol */
    margin-top: 30px;
}

.skill-tag {
    background-color: rgba(108, 92, 231, 0.1); /* Warna ungu aksen, tapi transparan */
    color: #6c5ce7;
    border: 1px solid #6c5ce7;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s ease;
}

/* Efek pas skill disentuh mouse */
.skill-tag:hover {
    background-color: #6c5ce7;
    color: white;
    transform: translateY(-3px); /* Naik sedikit */
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4); /* Keluar cahaya ungu */
}

/* ===============================
   PROJECT SECTION 
   =============================== */
.project-section {
    min-height: 100vh;
    padding: 100px 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ILMU BARU: CSS GRID */
.project-grid {
    display: grid;
    /* Ini kode ajaib biar kartunya otomatis turun ke bawah kalau layarnya sempit (kayak di iPhone) */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; /* Jarak antar kartu */
    width: 100%;
    max-width: 1000px;
}

/* DESAIN KARTU PROJECT */
.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden; /* Biar gambar di dalamnya gak keluar dari batas lengkungan kartu */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex; /* Tambahan biar info project nempel ke bawah */
    flex-direction: column; /* Biar flexbox nyusun elemen dari atas ke bawah */
}

/* Efek kartu melayang saat disentuh mouse */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.2); /* Cahaya ungu pudar */
}

/* DESAIN GAMBAR ASLI DI KARTU PROJECT */
.project-img-actual {
    width: 100%;
    height: 200px; /* Tinggi kotak gambar, silakan sesuaikan */
    
    /* INI KODE AJAIBNYA: */
    /* Bikin gambar otomatis kepotong pas di tengah kotak tanpa jadi peyang/penyet */
    object-fit: cover; 
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-info {
    padding: 25px;
    flex: 1; /* Biar info project ngambil sisa ruang di bawah */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Biar deskripsi dan tombol View Detail nempel ke bawah */
}

.project-info h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.project-info p {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ===============================
   CONTACT / FIND ME SECTION 
   =============================== */
.contact-section {
    min-height: 50vh; /* Setengah tinggi layar aja cukup buat penutup */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 10% 100px; /* Jarak bawah sedikit lebih luas */
}

/* Wadah tombol sosmed biar berjejer rapi */
.social-links {
    display: flex;
    gap: 20px; /* Jarak antar tombol */
    margin-top: 10px;
}

/* Desain Tombol Bulat Kaca */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Ini kunci bikin bentuknya bulat sempurna */
    background: rgba(255, 255, 255, 0.05); /* Kaca transparan */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 24px; /* Ukuran icon */
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efek pas disentuh mouse: nyala warna ungu dan naik sedikit */
.social-btn:hover {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: white;
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.5);
}

/* ===============================
   FOOTER SECTION 
   =============================== */
footer {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Garis batas tipis di atas footer */
    margin-top: auto; /* Memastikan dia selalu di bawah */
}

footer p {
    color: #555555; /* Warna abu-abu redup */
    font-size: 14px;
    margin: 0;
    letter-spacing: 1px; /* Jarak antar huruf biar agak renggang dan elegan */
}

/* ===============================
   RESPONSIVE DESIGN (HP / IPHONE)
   =============================== */

/* Instruksi: Jika lebar layar 768px ke bawah (seukuran HP/Tablet kecil) */
@media (max-width: 768px) {
    
    /* 1. Modifikasi Navigasi */
    nav {
        padding: 15px 20px; /* Jarak diperkecil */
    }
    
    .nav-links {
        display: none; /* Di HP, menu teks kita sembunyikan dulu biar gak kepenuhan. Nanti kalau lo udah belajar JavaScript, kita ubah ini jadi "Hamburger Menu" (garis tiga). */
    }

    /* 2. Modifikasi Hero Section (Home) */
    .hero-section {
        flex-direction: column-reverse; /* MAGIC! Teks dan Gambar yang tadinya Kiri-Kanan, sekarang ditumpuk. Foto di atas, teks di bawah. */
        padding: 120px 5% 50px;
        text-align: center; /* Teks jadi rata tengah */
    }

    .hero-text {
        padding-right: 0;
        margin-top: 40px;
    }

    .hero-text h1 {
        font-size: 38px; /* Ukuran font dikecilin dikit biar gak luber */
    }

    .divider {
        margin: 0 auto 20px; /* Bikin garisnya pindah ke tengah */
    }

    .hero-buttons {
        justify-content: center; /* Tombol dipindah ke tengah */
    }

    /* 3. Penyesuaian Ruang (Padding) */
    .about-section, .project-section, .contact-section {
        padding: 80px 5%; /* Jarak kiri-kanan dimaksimalkan biar layar HP gak banyak kosong */
    }
}

/* ===============================
   AI CHATBOT STYLING
   =============================== */
#ai-chat-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

#chat-toggle {
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
}

.glass-card-chat {
    display: none; /* Sembunyi dulu */
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: rgba(20, 20, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-header {
    padding: 15px 20px;
    background: rgba(108, 92, 231, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-status {
    color: white;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.6;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Style Balon Chat */
.msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.msg.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #dcdcdc;
    border-bottom-left-radius: 2px;
}

.msg.user {
    align-self: flex-end;
    background: #6c5ce7;
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    color: white;
    outline: none;
}

#send-chat {
    background: #6c5ce7;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
}

/* Responsive buat HP */
@media (max-width: 480px) {
    .glass-card-chat {
        width: calc(100vw - 40px);
        right: -10px;
    }
}

/* TOOLTIP DI ATAS TOMBOL AI */
.chat-tooltip {
    position: absolute;
    bottom: 75px; /* Jarak di atas tombol */
    right: 0;
    background: #6c5ce7;
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    animation: floatingBounce 2s infinite ease-in-out;
    pointer-events: none; /* Biar kalau diklik tembus ke tombol di bawahnya */
}

/* Bikin segitiga kecil (ekor tooltip) di bawah tulisan */
.chat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #6c5ce7;
}

/* Animasi melayang halus */
@keyframes floatingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Sembunyikan tulisan kalau chat lagi dibuka biar gak tumpuk */
#chat-window[style*="display: flex"] ~ .chat-tooltip {
    display: none;
}