@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #ff85a2, #d40078);
    color: white;
    text-align: center;
    padding-top: 80px;
    overflow-x: hidden;
    position: relative;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    opacity: 0.5; /* Transparansi video */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 20, 147, 0.7);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}
.navbar img {
    height: 50px;
}
.menu-btn {
    font-size: 28px;
    cursor: pointer;
    color: white;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: -100%; /* Sidebar muncul dari atas */
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(255, 105, 180, 0.95);
    backdrop-filter: blur(15px);
    padding: 20px;
    text-align: center;
    transition: 0.5s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
}
.sidebar.open {
    top: 0; /* Sidebar muncul ke posisi awal */
}
.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: white;
    display: block;
    text-align: right;
}
.sidebar a {
    display: inline-block;
    padding: 12px 20px;
    text-decoration: none;
    color: white;
    font-size: 18px;
    transition: 0.3s;
    margin: 5px;
}
.sidebar a:hover {
    background: rgba(255, 192, 203, 0.5);
    color: black;
    border-radius: 8px;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px; /* Jarak dari navbar diperkecil */
    min-height: 80vh; /* Tinggi hero section diperkecil */
    position: relative;
}
.hero img {
    width: 300px;
    height: auto;
    animation: floating 3s infinite alternate ease-in-out;
}
@keyframes floating {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* Text Animation */
.hero-text {
    text-align: center;
    margin-bottom: 10px; /* Jarak teks dan gambar diperkecil */
}
.hero-text .greeting {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 5px; /* Jarak antara greeting dan name diperkecil */
}
.hero-text .name {
    font-size: 40px; /* Ukuran font diperkecil */
    font-weight: 700;
    overflow: hidden; /* Typing effect */
    white-space: nowrap;
    border-right: 2px solid white; /* Kursor typing */
    animation: typing 3s steps(20, end), blink-caret 0.75s step-end infinite;
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: white; }
}

/* Garis Pemisah di Bawah Tombol */
.divider {
    width: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px auto; /* Jarak garis pemisah diperkecil */
}

/* Sections */
section {
    padding: 20px 20px; /* Jarak section diperkecil */
    min-height: auto; /* Tidak perlu full height */
}
hr {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px auto; /* Jarak garis pemisah diperkecil */
    width: 50%;
}

/* Card Style */
.card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 10px auto; /* Jarak card diperkecil */
    max-width: 600px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Tombol Navigasi */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px; /* Jarak tombol dari gambar diperkecil */
    flex-wrap: wrap;
}
.nav-buttons a {
    padding: 12px 20px;
    background: linear-gradient(45deg, #FF1493, #FF69B4);
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    flex: 1 1 auto; /* Membuat tombol memiliki ukuran yang sama */
    text-align: center;
    min-width: 150px; /* Lebar minimal tombol */
}
.nav-buttons a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) rotate(45deg);
    transition: 0.5s;
}
.nav-buttons a:hover::after {
    width: 0;
    height: 0;
}
.nav-buttons a:hover {
    background: linear-gradient(45deg, #FF69B4, #FF1493);
    transform: scale(1.05);
}

/* Contact Icons */
.contact-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}
.contact-icons a {
    color: white;
    font-size: 24px;
    transition: 0.3s;
}
.contact-icons a:hover {
    color: #FF69B4;
    transform: scale(1.2);
}

/* Skill Icons */
.skill-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.skill-icons .skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 120px;
}
.skill-icons .skill i {
    font-size: 40px;
    color: white;
}
.skill-icons .skill p {
    font-size: 14px;
    text-align: center;
}

/* Projects Section */
.projects {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.project {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}
.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.project img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}
.project h3 {
    font-size: 20px;
    margin-bottom: 10px;
}
.project p {
    font-size: 14px;
    margin-bottom: 10px;
}
.project a {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(45deg, #FF1493, #FF69B4);
    color: white;
    text-decoration: none;
    font-size: 14px;
    border-radius: 5px;
    transition: 0.3s;
}
.project a:hover {
    background: linear-gradient(45deg, #FF69B4, #FF1493);
    transform: scale(1.05);
}

/* Form Komentar */
.comment-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.comment-form h2 {
    font-size: 24px;
    margin-bottom: 20px;
}
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
}
.comment-form input::placeholder, .comment-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.comment-form button {
    padding: 10px 20px;
    background: linear-gradient(45deg, #FF1493, #FF69B4);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.comment-form button:hover {
    background: linear-gradient(45deg, #FF69B4, #FF1493);
    transform: scale(1.05);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #FF1493, #FF69B4);
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    transition: 0.3s;
}
.back-to-top:hover {
    transform: scale(1.1);
}

/* Copyright */
.copyright {
    padding: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Karakter Lucu di Atas Kontak */
.contact-character {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    animation: floating 3s infinite alternate ease-in-out;
}

/* Media Query untuk Desktop */
@media (min-width: 768px) {
    .hero img {
        width: 400px; /* Gambar lebih besar di desktop */
    }
    .hero-text .greeting {
        font-size: 32px; /* Teks lebih besar di desktop */
    }
    .hero-text .name {
        font-size: 56px; /* Teks lebih besar di desktop */
    }
    .nav-buttons a {
        font-size: 18px; /* Tombol lebih besar di desktop */
        padding: 15px 25px;
    }
    .card {
        max-width: 800px; /* Card lebih lebar di desktop */
    }
    .skill-icons .skill {
        width: 150px; /* Skill icons lebih besar di desktop */
    }
    .skill-icons .skill i {
        font-size: 50px; /* Ikon lebih besar di desktop */
    }
    .skill-icons .skill p {
        font-size: 16px; /* Teks lebih besar di desktop */
    }
    .contact-character {
        width: 250px; /* Karakter lebih besar di desktop */
    }
    .project {
        width: 350px; /* Project card lebih besar di desktop */
    }
}