html, body {
    overflow-x: hidden;
}

body {
    scroll-behavior: smooth;
}

section {
    margin-bottom: 3rem;
}

#hero {
    position: relative;
    background-image: url('img/hero.jpg');
    background-repeat: no-repeat;
    background-size: cover; 
    background-position: center; 
    width: 100%; 
    height: 100vh; /* Sesuaikan agar hero section memenuhi layar */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden; /* Untuk memastikan elemen tidak keluar dari container */
}

#hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Lapisan overlay untuk kontras */
    z-index: 1;
}

#hero .text-center {
    position: relative;
    z-index: 2;
    animation: fadeInUp 2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    #hero {
        height: 80vh; 
    }

    #hero h2 {
        font-size: 1.75rem; 
    }

    #hero p {
        font-size: 1rem; 
    }
}

@media (max-width: 480px) {
    #hero {
        height: 60vh; 
    }

    #hero h2 {
        font-size: 1.5rem;
    }

    #hero p {
        font-size: 0.875rem; 
    }
}


#hero div {
    position: relative;
    z-index: 2;
}

header nav a {
    transition: color 0.3s;
}

#skills img {
    transition: transform 0.3s;
}

#skills img:hover {
    transform: scale(1.1);
}

#education img {
    transition: transform 0.3s, border-color 0.3s;
}

#education img:hover {
    transform: scale(1.05);
    border-color: #4f46e5; 
}

@media (max-width: 768px) {
    #education img {
        width: 96px;
        height: 96px;
    }

    #hero {
        position: relative;
        background-repeat: no-repeat;
        background-size: contain;
    }
}

form input, form textarea {
    transition: border-color 0.3s;
}

form input:focus, form textarea:focus {
    border-color: #4f46e5; 
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(90deg);
    }
}

#menuButton.open i {
    animation: rotate 0.5s forwards;
}