/* --- RESET & GLOBAL --- */
:root {
    --bg-main: #0a0a0c;       /* Hitam Pekat */
    --bg-sec: #131316;        /* Hitam Abu */
    --accent: #7d2ae8;        /* Ungu Neon */
    --accent-glow: rgba(125, 42, 232, 0.5); 
    --text-main: #ffffff;
    --text-sec: #b3b3b3;
    --card-bg: rgba(30, 30, 36, 0.7); /* Background kartu semi-transparan */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(10, 10, 12, 0.95); /* Lebih gelap dikit biar teks jelas */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 3000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.dot { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent); }

.hamburger { 
    display: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
    color: white;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 100px 20px 50px 20px;
    
    /* BACKGROUND */
    background: linear-gradient(to right, rgba(10, 10, 12, 0.9), rgba(10, 10, 12, 0.7)), 
                url('bg.png'); /* Pastikan file bg.png ada */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content { z-index: 2; max-width: 800px; }

.badge {
    background: rgba(125, 42, 232, 0.15);
    color: #c49eff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(125, 42, 232, 0.3);
}

.hero h1 {
    font-size: 3.5rem;
    margin: 10px 0 20px 0;
    line-height: 1.2;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(to right, #7d2ae8, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-sec);
    font-size: 1.1rem;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* FOTO PROFIL GLOWING */
.profile-pic-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    padding: 4px;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 40px rgba(125, 42, 232, 0.6); /* Glow efek */
    transition: 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(125, 42, 232, 0.9);
}

/* Tombol */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    margin-right: 15px;
}

.btn-secondary {
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 30px var(--accent-glow); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }


/* --- SECTIONS UMUM --- */
.section-padding { padding: 90px 5%; }
.bg-darker { background-color: var(--bg-sec); }
.container { max-width: 1200px; margin: 0 auto; }

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- ABOUT SECTION (STYLE: NORMAL & ELEGANT) --- */

.about-card {
    background: #1e1e24; /* Warna kartu gelap */
    padding: 50px;       /* Jarak dalam lega untuk Laptop */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;  /* Teks rata tengah biar elegan */
    max-width: 900px;    /* Lebar maksimal biar tidak terlalu panjang */
    margin: 0 auto;      /* Posisi tengah */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); /* Bayangan halus */
}

/* Teks Highlight (Kutipan di atas) */
.highlight-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
}

.text-accent {
    color: var(--accent); /* Warna Ungu */
}

/* Paragraf biasa */
.about-card p {
    color: #b3b3b3;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* --- PERBAIKAN KHUSUS HP (Supaya Tidak Gepeng) --- */
@media (max-width: 768px) {
    .about-card {
        padding: 30px 20px; /* Padding saya kecilkan agar ruang teks luas */
        text-align: left;   /* Di HP lebih enak baca rata kiri */
    }

    .highlight-text {
        font-size: 1.2rem; /* Ukuran font judul disesuaikan */
        text-align: center; /* Judul tetap rata tengah */
    }

    .about-card p {
        font-size: 0.95rem; /* Ukuran font isi pas di mata */
    }
}


/* --- SKILLS SECTION (YANG TADI RUSAK, INI FIXNYA) --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsif */
    gap: 30px;
}

.skill-card {
    background: #151518;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--accent); /* Garis ungu di atas */
    transition: 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 42, 232, 0.5);
}

.skill-card h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Styling List di dalam Skill */
.skill-card ul {
    list-style: none; /* Hilangkan titik bullet */
    padding: 0;
}

.skill-card li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Garis tipis pemisah */
    color: #ccc;
    font-size: 0.95rem;
}

.skill-card li:last-child { border-bottom: none; }

.skill-card li i {
    width: 30px;
    font-size: 1.2rem;
    color: var(--accent);
    margin-right: 10px;
    text-align: center;
}


/* --- PROJECT CARD STYLE (GAMBAR + TEKS) --- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    background: #1e1e24; /* Warna kartu gelap */
    border-radius: 15px;
    overflow: hidden; /* Agar gambar tidak keluar dari sudut bulat */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px); /* Efek naik saat di-hover */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent); /* Border jadi ungu saat hover */
}

/* Bagian Gambar */
.card-image {
    position: relative;
    height: 220px; /* Tinggi gambar fix */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar full tanpa gepeng */
    transition: transform 0.5s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.1); /* Gambar nge-zoom dikit saat hover */
}

/* Overlay Hitam + Tombol saat hover gambar */
.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Tersembunyi awalnya */
    transition: 0.3s;
}

.project-card:hover .overlay {
    opacity: 1; /* Muncul saat hover */
}

.view-btn {
    padding: 10px 25px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transform: translateY(20px);
    transition: 0.3s;
}

.project-card:hover .view-btn {
    transform: translateY(0);
}

/* Bagian Teks di Bawah Gambar */
.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-content h3 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 0.95rem;
    color: #b3b3b3; /* Teks abu-abu */
    margin-bottom: 20px;
    line-height: 1.6;
}

.text-link {
    margin-top: auto; /* Dorong ke paling bawah */
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.text-link:hover {
    color: var(--accent);
}

/* Responsive HP */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr; /* 1 Kolom di HP */
    }
    
    .card-image {
        height: 200px; /* Sedikit lebih pendek di HP */
    }
}

/* Placeholder warna background untuk proyek */
.eudra-bg { background: linear-gradient(45deg, #000, #434343); }
.fad-bg { background: linear-gradient(45deg, #134E5E, #71B280); }

.project-img-wrapper .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
}

.project-info {
    padding: 25px;
    flex-grow: 1;
}

.project-info h3 { margin-bottom: 10px; font-size: 1.2rem; }
.project-info p { font-size: 0.9rem; color: var(--text-sec); margin-bottom: 20px; line-height: 1.5; }

.link-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* --- KONTAK / SOCIAL --- */
.contact-wrapper { text-align: center; max-width: 700px; margin: 0 auto; }
.contact-desc { margin-bottom: 40px; color: var(--text-sec); }

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.social-card {
    background: #1e1e24;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.social-card i { font-size: 1.8rem; margin-bottom: 10px; }
.social-card span { font-size: 0.9rem; font-weight: 500; }

.social-card:hover { background: rgba(125, 42, 232, 0.1); border-color: var(--accent); }

/* --- FOOTER --- */
.footer-bottom {
    padding: 30px;
    text-align: center;
    background: #050507;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    color: #777;
    margin-top: 50px;
}

/* --- RESPONSIVE MOBILE (FIXED) --- */
@media (max-width: 768px) {
    /* Navbar HP */
    .navbar { padding: 15px 20px; }
    .hamburger { display: block; }

    .nav-links {
        position: fixed;
        right: 0; top: 0;
        height: 100vh;
        width: 75%;
        background: #0d0d0f;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: 0.3s;
        border-left: 1px solid #333;
        box-shadow: -10px 0 20px rgba(0,0,0,0.5);
    }
    
    .nav-links.active { transform: translateX(0); }

    /* Hero HP */
    .hero { 
        padding-top: 120px; 
        padding-bottom: 60px;
        background-attachment: scroll; /* Biar enteng di HP */
    }
    
    .hero h1 { font-size: 2.2rem; }
    .profile-img { width: 140px; height: 140px; }
    
    .btn-primary, .btn-secondary { 
        width: 100%; 
        margin: 10px 0 0 0; 
        text-align: center; 
    }

    /* Grid HP jadi 1 Kolom */
    .skills-grid, .project-grid, .social-grid {
        grid-template-columns: 1fr;
    }
    
    .section-padding { padding: 60px 5%; }
}

/* Perbaikan Navigasi Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: flex; /* Pastikan terlihat sebagai flex */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 70%;
        background: #0d0d0f;
        transform: translateX(100%); /* Sembunyi di kanan */
        transition: 0.3s ease-in-out;
        z-index: 2999;
    }

    /* Munculkan menu saat class 'active' ada */
    .nav-links.active {
        transform: translateX(0);
    }
}