/* Umum */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #111;
    color: #fff;
    line-height: 1.6;
    scroll-behavior: smooth;
}


header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #000, #333);
    color: white;
}


h1 {
    font-size: 2.5rem;
    margin: 0;
}


p {
    font-size: 1.1rem;
}

/* Menghilangkan bullet points di Riwayat Pendidikan */

#about ul {
    list-style: none; /* Hilangkan bullet */
    padding: 0;       /* Hilangkan padding bawaan */
}


/* Navbar styling */


nav {
    display: flex;
    justify-content: center;
    background: linear-gradient(90deg, #070707, #252525);
    padding: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}


nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}


nav ul li {
    margin: 0 20px;
    position: relative;
}


nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative;
}

/* Efek underline animasi saat hover */


nav ul li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 3px;
    background: #6b6868;
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #ffcc00;
}

/* Efek klik dengan animasi scale */

nav ul li a:active {
    transform: scale(0.95);
    color: #f7f7f2;
}

/* Efek saat navbar dihover */

nav:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(90deg, #000000, #000000);
}

/* Hamburger Menu (Untuk Layar Kecil) */

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    background: white;
    height: 3px;
    width: 30px;
    margin: 5px 0;
    transition: 0.4s;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        display: none;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Animasi Hamburger Menu */


.menu-toggle.open span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}


.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}


.menu-toggle.open span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* Efek slide-up */


.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Animasi */

.fade-in {
    animation: fadeIn 2s ease-in;
}

.slide-up {
    animation: slideUp 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Animasi Scroll */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    white-space: nowrap;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll-loop 10s linear infinite;
}

.skill-item {
    flex: 0 0 auto;
    width: 200px;
    text-align: center;
    white-space: normal;
}

/* Animasi geser ke kiri terus tanpa jeda */

@keyframes scroll-loop {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}



/* Duplikat konten untuk menciptakan efek loop */

.carousel-track::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 100%;
}


/* Bagian Tentang Saya */

#about {
    text-align: center;
    padding: 3rem 1rem;
}

.project-image.small {
    width: 150px;
    border-radius: 10%;
    margin: 20px 0;
    transition: transform 0.5s ease;
}

.project-image.small:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Bagian Skill */

#skills {
    text-align: center;
    padding: 3rem 1rem;
}

.skill-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 200px;
    padding: 15px;
    background: #222;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.skill-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.1);
}

/* Bagian Proyek */

#projects {
    text-align: center;
    padding: 3rem 1rem;
}

.project {
    text-align: center;
    margin-bottom: 2rem;
}

.project img {
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    transition: transform 0.5s ease;
}

.project img:hover {
    transform: scale(1.1) rotate(-3deg);
}

/* Bagian Kontak */

#contact {
    text-align: center;
    padding: 3rem 1rem;
    background: #000;
    color: white;
}

#contact p {
    margin: 10px 0;
}

/* Responsif */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .skill-container {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
    }

    .project img {
        max-width: 300px;
    }
}