/* Pengaturan Dasar & Variabel Warna */
:root {
    --bg-color: #fdfdfd; 
    --text-main: #333333;
    --text-muted: #666666;
    --accent-blue: #0056b3; 
    --accent-hover: #004494;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Mengatur jarak gulir agar tidak tertutup sticky navbar */
section, header {
    scroll-margin-top: 80px; 
}

.accent {
    color: var(--accent-blue);
}

.section-padding {
    padding: 80px 10%;
}

/* Navigasi */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Beranda / Hero */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #111;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent-blue);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px); 
}

/* --- TAMBAHAN: Gaya Foto Profil --- */
.profile-photo-container {
    margin-bottom: 30px; 
}

.profile-photo {
    width: 180px; 
    height: 180px;
    object-fit: cover; 
    border-radius: 50%; 
    border: 5px solid #ffffff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
/* --- SELESAI TAMBAHAN --- */

/* Tentang Saya */
.about h2, .projects h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.skills-container {
    margin-top: 40px;
}

.skills-container h3 {
    margin-bottom: 15px;
}

/* Pengaturan Grid Keahlian (Bisa di-scroll / Carousel) */
.skills-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto; 
    padding-bottom: 10px; 
    scroll-behavior: smooth;
    scrollbar-width: none; 
}

.skills-grid::-webkit-scrollbar {
    display: none; 
}

.skill-card {
    background-color: #ffffff;
    padding: 20px 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 140px; 
    flex-shrink: 0; 
}

.skill-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.skill-icons {
    display: flex;
    gap: 10px;
}

/* ========================================= */
/* BAGIAN PROYEK KARTU (UPDATE)              */
/* ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative; /* PENTING: Untuk menahan posisi efek cahaya */
}

/* ANIMASI CAHAYA (SHINE EFFECT) */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; 
    width: 50%;
    height: 180px; /* Tingginya disamakan dengan tinggi gambar */
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); 
    z-index: 2; 
    pointer-events: none; 
}

/* EFEK HOVER PADA KARTU PROYEK */
.project-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 12px 20px rgba(0, 86, 179, 0.15); 
    border-color: var(--accent-blue); 
}

/* Menjalankan animasi cahaya saat hover */
.project-card:hover::before {
    left: 150%; 
    transition: left 0.7s ease; 
}

/* EFEK ZOOM PADA GAMBAR */
.project-image {
    width: 100%;
    height: 180px;
    object-fit: cover; 
    border-bottom: 1px solid #e0e0e0;
    transition: transform 0.5s ease; 
}

.project-card:hover .project-image {
    transform: scale(1.08); 
}

/* Konten Proyek */
.project-content {
    padding: 20px;
    position: relative;
    z-index: 3; /* Pastikan teks tetap di atas */
    background-color: #fff; /* Latar belakang untuk mencegah animasi tembus ke teks jika tidak diinginkan */
}

.project-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.project-link {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.project-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* KELAS ANIMASI SCROLL */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MODAL / POP-UP DETAIL PROYEK */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(30px);
    transition: transform 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-blue);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eeeeee;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* ========================================= */
/* KONTAK ADMIN & FOOTER                     */
/* ========================================= */

.contact-header {
    margin-bottom: 40px;
    text-align: left; 
}

.contact-header h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    padding-left: 15px;
    border-left: 5px solid var(--accent-blue);
    display: inline-block;
}

.contact-flex {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 30px; 
    flex-wrap: wrap; 
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    gap: 12px; 
}

.contact-item:hover {
    transform: translateY(-5px); 
}

.icon-wrapper {
    width: 75px; 
    height: 75px;
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); 
    transition: box-shadow 0.3s ease;
}

.contact-item:hover .icon-wrapper {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.icon-wrapper.telegram {
    background-color: #e6f2f8; 
    color: #0088cc;
}

.icon-wrapper.whatsapp {
    background-color: #eaf7ec; 
    color: #25D366;
}

.icon-wrapper.discord {
    background-color: #eef0fb; 
    color: #5865F2;
}

.contact-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer {
    text-align: center;
    padding: 30px 10%;
    border-top: 1px solid #eeeeee;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Penyesuaian jarak spesifik untuk layar HP yang sangat kecil */
@media screen and (max-width: 400px) {
    .contact-flex {
        gap: 15px; 
    }
    .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
    .contact-name {
        font-size: 0.8rem;
    }
}

/* ========================================= */
/* PENGATURAN RESPONSIVE (UNTUK LAYAR HP)    */
/* ========================================= */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px; 
        padding: 15px 5%;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap; 
        gap: 15px;
    }

    .section-padding {
        padding: 50px 5%;
    }

    .hero h1 {
        font-size: 2.2rem; 
    }

    .hero p {
        font-size: 1rem;
    }

    .profile-photo {
        width: 140px; 
        height: 140px;
    }
}
