/* --- 1. RESET & VARIABEL (PENTING) --- */
/* Ini menghapus settingan bawaan browser yang jelek */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* Agar saat diklik link, scrollnya halus */
}

/* Kita simpan warna di sini agar mudah diganti nanti */
:root {
    --bg-color: #0a0a0a;       /* Hitam pekat */
    --text-color: #e0e0e0;     /* Putih agak abu (biar gak sakit mata) */
    --accent-color: #00f2ff;   /* Biru Neon (Cyan) */
    --nav-bg: rgba(10, 10, 10, 0.9); /* Transparan dikit */
}

/* --- 2. PENGATURAN UMUM --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none; /* Hilangkan garis bawah link */
    color: var(--text-color);
    transition: 0.3s; /* Efek transisi halus */
}

ul {
    list-style: none; /* Hilangkan titik-titik pada list */
}

/* --- 3. NAVIGATION BAR (Menu Atas) --- */
nav {
    display: flex;             /* Jajarkan logo & menu ke samping */
    justify-content: space-between; /* Beri jarak mentok kiri & kanan */
    align-items: center;       /* Rata tengah secara vertikal */
    padding: 20px 50px;
    position: fixed;           /* Menu nempel terus di atas saat scroll */
    width: 100%;
    top: 0;
    z-index: 1000;             /* Pastikan menu selalu di atas layer lain */
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px); /* Efek kaca buram (keren!) */
    transition: 0.3s; /* Animasi halus jika berubah */
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color); /* Warna logo jadi biru neon */
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px; /* Jarak antar menu */
}

.nav-links a:hover {
    color: var(--accent-color); /* Saat di-hover berubah warna */
}

/* === [BARU] ACTIVE STATE NAV MENU === */
/* Ini kelas yang otomatis ditambahkan Javascript saat discroll */
.nav-links a.active {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.8); /* Glow lebih kuat */
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color); /* Garis bawah neon */
    padding-bottom: 5px; /* Jarak garis ke tulisan */
}

/* --- 4. HERO SECTION (Tampilan Awal) --- */
#home {
    height: 100vh; /* Tinggi section = 100% tinggi layar monitor */
    display: flex;
    justify-content: center; /* Konten di tengah horizontal */
    align-items: center;     /* Konten di tengah vertikal */
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem; /* Ukuran font besar */
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent-color); /* Warnai nama kamu */
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5); /* Efek cahaya neon */
}

.hero-content p {
    font-size: 1.2rem;
    color: #888;
    opacity: 0;                /* Transparan penuh (hilang) */
    transform: translateY(20px); /* Geser ke bawah sedikit */
    transition: all 1s ease;   /* Durasi animasi muncul 1 detik */
}

/* Kelas ini nanti dipanggil Javascript biar teksnya muncul */
.hero-content p.muncul {
    opacity: 1;                /* Jadi terlihat */
    transform: translateY(0);  /* Kembali ke posisi semula */
}

/* --- 5. FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #111;
    margin-top: 50px;
}

/* --- 6. CONTAINER & SECTION UMUM --- */
section {
    padding: 80px 20px; /* Jarak atas/bawah biar lega */
    min-height: 100vh;  /* Minimal setinggi layar */
}

.container {
    max-width: 1000px; /* Batas lebar konten biar gak melar banget di layar lebar */
    margin: 0 auto;    /* Rata tengah */
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color); /* Garis bawah neon */
    display: inline-block;
    padding-bottom: 10px;
    position: relative; 
    left: 50%;
    transform: translateX(-50%);
}

/* --- 7. ABOUT SECTION (Updated) --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap; /* Kalau di HP, fotonya turun ke bawah */
    justify-content: center;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Jadi bulat */
    object-fit: cover;
    border: 3px solid var(--accent-color); /* Bingkai neon */
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3); /* Efek cahaya */
}

.text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    max-width: 600px;
    text-align: justify;  /* Membuat tulisan rata kiri DAN kanan */
}

/* === Styling Tambahan untuk Statistik & Sosmed === */

.about-content .text h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* Kotak Statistik */
.stats-row {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 15px 0;
}

.stat-box {
    text-align: center;
}

.stat-box .number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.stat-box .label {
    font-size: 0.85rem;
    color: #aaa;
}

/* Grup Tombol & Sosmed */
.action-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* Tombol CV Khusus */
.cv-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Jarak teks dengan ikon download */
}

.cv-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* Ikon Sosmed */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    transition: 0.3s;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px); /* Efek naik dikit pas di-hover */
}

/* --- 8. SKILLS SECTION (GRID SYSTEM) --- */
.skills-grid {
    display: grid;
    /* Algoritma Grid Responsif: */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 30px;
}

.skill-card {
    background: #1a1a1a; /* Lebih terang dikit dari background utama */
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: 0.3s; /* Animasi halus saat hover */
    border: 1px solid transparent;
    cursor: default;
}

/* === Styling Ikon Skill agar Besar & Bagus === */
.skill-card i {
    font-size: 3rem; /* Ukuran ikon besar */
    color: var(--accent-color);
    margin-bottom: 20px;
}

.skill-card:hover i {
    color: #fff; /* Saat di-hover, ikon jadi putih */
    transition: 0.3s;
}

.skill-card h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* EFEK INTERAKTIF: Saat Mouse Menyentuh Kartu */
.skill-card:hover {
    transform: translateY(-10px); /* Kartu melayang naik sedikit */
    border-color: var(--accent-color); /* Bingkai menyala */
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2); /* Bayangan neon */
}

/* --- 9. PROJECTS SECTION --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden; /* Agar gambar tidak keluar dari kotak saat di-zoom */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-10px); /* Naik dikit saat hover */
}

/* Bagian Gambar */
.card-image {
    height: 200px;
    overflow: hidden;
}

/* Selector 'video' agar style ini berlaku untuk gambar DAN video */
.card-image img, 
.card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Agar video/gambar memenuhi kotak tanpa gepeng */
    transition: 0.5s;  /* Animasi zoom halus */
}

/* EFEK ZOOM: Saat kartu di-hover, gambar ATAU video membesar */
.project-card:hover .card-image img,
.project-card:hover .card-image video {
    transform: scale(1.1); 
}

/* Bagian Info (Judul & Teks) */
.card-info {
    padding: 25px;
}

.card-info h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.card-info p {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Tombol "Lihat Kode" */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 25px;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background-color: var(--accent-color); /* Isi warna penuh */
    color: #000; /* Tulisan jadi hitam */
    box-shadow: 0 0 15px var(--accent-color); /* Efek cahaya neon */
}

/* --- 10. CONTACT SECTION (DIPERBAIKI) --- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap; /* Agar di HP dia turun ke bawah */
    gap: 50px;
    background: #1a1a1a;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Bagian Kiri (Info) */
.contact-info {
    flex: 1; /* Ambil ruang 1 bagian */
    min-width: 300px;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.contact-info p {
    color: #aaa;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* --- PERBAIKAN DI SINI: Alignment Ikon dan Teks --- */
.info-item {
    display: flex;
    align-items: center;    /* Agar ikon dan teks sejajar vertikal (tengah) */
    gap: 20px;              /* Jarak antara ikon dan teks */
    margin-bottom: 20px;
    padding: 15px;          /* Memberi ruang dalam */
    background: rgba(255, 255, 255, 0.05); /* Latar belakang tipis */
    border-radius: 12px;
    transition: 0.3s;
}

.info-item:hover {
    background: rgba(0, 242, 255, 0.1); /* Efek warna saat disentuh */
    transform: translateX(5px);          /* Geser sedikit ke kanan */
}

/* Styling Khusus Ikon */
.info-item .icon {
    font-size: 1.8rem;
    min-width: 50px;        /* Lebar tetap agar semua teks lurus rata */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styling Teks */
.info-item .text {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
}

/* Bagian Kanan (Form) */
.contact-form {
    flex: 1; /* Ambil ruang 1 bagian juga */
    min-width: 300px;
}

.input-group {
    margin-bottom: 20px;
}

/* Styling Kotak Input */
input, textarea {
    width: 100%;
    padding: 15px;
    background: #0a0a0a; /* Warna lebih gelap dari background kartu */
    border: 2px solid #333; /* Border abu-abu gelap */
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    outline: none; /* Hapus garis biru standar browser */
    transition: 0.3s;
}

/* EFEK FOKUS: Saat diklik, border jadi NEON */
input:focus, textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.send-btn {
    width: 100%;
    cursor: pointer;
    background: transparent;
}

.send-btn:hover {
    background: var(--accent-color);
}

/* --- 11. MEDIA QUERIES (DIPERBAIKI UNTUK HP) --- */
@media (max-width: 768px) {
    
    /* 1. PERBAIKAN NAVIGASI (Menu muncul & tersusun ke bawah) */
    nav {
        flex-direction: column; /* Logo di atas, menu di bawah */
        padding: 15px;
        background-color: #0a0a0a; /* Gelap pekat biar tulisan jelas */
    }

    .nav-links {
        display: flex;       /* Munculkan kembali menunya (JANGAN NONE) */
        flex-wrap: wrap;     /* Biar kalau kepanjangan dia turun */
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }

    .nav-links a {
        font-size: 0.9rem;   /* Ukuran font menu agak dikecilkan */
    }

    /* 2. HERO SECTION (Tampilan Awal) */
    .hero-content h1 {
        font-size: 1.8rem;   /* Kecilkan font nama biar gak nabrak */
        padding: 0 10px;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* 3. JUDUL SECTION (About, Skills, dll) */
    h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    section {
        padding: 50px 20px; /* Kurangi jarak antar section */
    }

    /* 4. ABOUT SECTION */
    .about-content {
        flex-direction: column; /* Foto di atas, teks di bawah */
        text-align: center;     /* Rata tengah biar rapi di HP */
    }

    .text p {
        text-align: left;       /* Teks paragraf tetap rata kiri biar enak dibaca */
    }

    .stats-row {
        flex-direction: row;    /* Statistik tetap ke samping */
        justify-content: center;
        flex-wrap: wrap;        /* Kalau layar sempit banget, turun ke bawah */
        gap: 20px;
    }

    .action-group {
        justify-content: center; /* Tombol rata tengah */
    }

    /* 5. SKILLS & PROJECTS */
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr; /* Paksa jadi 1 kolom (memanjang ke bawah) */
    }

    /* 6. CONTACT FORM */
    .contact-wrapper {
        padding: 20px;         /* Padding dalam diperkecil */
        flex-direction: column; 
    }

    .contact-info {
        margin-bottom: 40px;   /* Beri jarak antara info dan form */
        min-width: 100%;
    }

    .contact-form {
        min-width: 100%;
    }

    .info-item {
        flex-direction: row;   /* Ikon & teks tetap sejajar ke samping */
        text-align: left;
    }
}