/* Import font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    margin: auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #f5f5f5; /* Tambahkan background agar konten tidak tembus */
}

.logo {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.6rem;
}

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

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 1.2rem;
    font-weight: 600;
}

nav ul li a:hover {
    background-color: #333;
    color: #fff;
}

/* Hero section */
#home {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 40px; /* Kurangi margin top agar lebih seimbang */
    padding: 40px 20px;
}

#home h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #222;
}

#home p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

#home img {
    max-width: 240px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

#home img:hover {
    transform: scale(1.05);
}

#about, #sertifikat, #project, #contact {
    padding: 60px 20px;
    margin-top: 60px;
}

#about .card, #sertifikat .sertifikat, #project .project {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: auto;
}

#about .card > div, #project .project div {
    background-color: #f9f9f9;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.3s ease;
}

#about .card > div:hover, #project .project div:hover {
    transform: translateY(-5px);
}

#about h1, #project h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #222;
}

#about p, #project p {
    font-size: 1rem;
    color: #555;
}

#about ul {
    padding-left: 20px;
    list-style: disc;
    color: #555;
}

#about ul li {
    margin-bottom: 6px;
}

#sertifikat img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sertifikat img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#project img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#project button {
    background-color: #333;
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#project button:hover {
    background-color: #555;
}

#contact {
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#contact input, #contact textarea {
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
    width: 100%; /* Pastikan input memenuhi form */
}

#contact input:focus, #contact textarea:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

#contact button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact button:hover {
    background-color: #555;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #333;
}


/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .hamburger {
        display: block; /* Tampilkan hamburger di mobile */
    }

    .navbar {
        position: fixed;
        left: -100%; /* Sembunyikan navbar di luar layar */
        top: 70px; /* Sesuaikan dengan tinggi header Anda */
        gap: 0;
        flex-direction: column;
        background-color: #f5f5f5;
        width: 100%;
        text-align: center;
        transition: 0.3s;
    }

    .navbar.active {
        left: 0; /* Tampilkan navbar saat aktif */
    }

    .nav-links {
        flex-direction: column;
        padding: 20px 0;
    }

    .nav-links li {
        padding: 10px 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    nav ul {
        flex-direction: column; /* Ubah orientasi nav-link menjadi vertikal */
        gap: 10px;
        align-items: center; /* Pusatkan nav-link */
    }

    #home h1 {
        font-size: 2rem;
    }
    
    #home p {
        font-size: 1rem; /* Sesuaikan ukuran font */
    }

    #home img {
        max-width: 180px;
    }

    #about .card, #project .project {
        grid-template-columns: 1fr; /* Tampilkan satu kartu per baris */
    }

    #contact form {
        width: 90%; /* Sesuaikan lebar form */
    }
}

@media (max-width: 480px) {
    nav ul li a {
        font-size: 1rem; /* Kecilkan font di layar yang sangat kecil */
        padding: 4px 8px;
    }
    
    #home h1 {
        font-size: 1.8rem;
    }

    #home p {
        font-size: 0.9rem;
    }
}
