/* General Styling */
:root {
    /* Warna Primer: Lebih terang, soft blue atau teal */
    --primary-color: #78C9E9; /* Pastel Sky Blue */
    /* Warna Sekunder: Pastel kuning/peach atau lavender */
    --secondary-color: #FFDAB9; /* Peach Puff - warna pastel yang hangat */

    /* Warna Aksen: Abu-abu terang untuk garis/elemen sekunder */
    --accent-color: #B0BEC5; /* Light Grey (dari sebelumnya, cocok untuk aksen terang) */

    /* Warna Teks: Lebih gelap agar kontras dengan latar terang */
    --text-color: #333333; /* Dark Charcoal (kontras dengan latar terang) */
    --light-text-color: #666666; /* Slightly lighter charcoal for secondary text */

    /* Latar Belakang: Warna yang sangat terang atau putih bersih */
    --dark-background: #F8F8F8; /* Hampir Putih (latar belakang utama) */
    --card-bg: #FFFFFF; /* Putih bersih (latar belakang kartu/konten) */

    /* Shadow: Lebih ringan agar tidak terlalu mencolok di tema terang */
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-dark: rgba(0,0,0,0.2);
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--dark-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- HEADER SECTION --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-dark);
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    flex-wrap: wrap;
    gap: 40px;
    z-index: 1;
    text-align: left;
}

/* Kolom Kiri: Video Logo */
.hero-left {
    flex: 1;
    min-width: 280px;
    max-width: 600px;
    text-align: center;
}

.hero-logo-animation {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    opacity: 0; 
    animation: slideInLeftFade 1.2s ease forwards;
}

/* Kolom Kanan: Teks dan Tombol */
.hero-right {
    flex: 1.5;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
}

.hero-right .welcome-heading {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 700;
    opacity: 0; 
    animation: scaleIn 1.2s ease forwards;
}

.hero-right .welcome-tagline {
    font-size: 1.5rem;
    color: var(--light-text-color);
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0; 
    animation: slideInUpFade 1s ease forwards 0.4s;
}

/* Tombol Scroll Down */
.scroll-down-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--card-bg);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 0px; 
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    animation: slideInUpFade 0.8s ease forwards 0.6s; 
}

.scroll-down-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.scroll-down-btn i {
    margin-left: 8px;
}

/* Social Icons di Hero */
.social-icons-hero {
    margin-top: 30px;
    display: flex;
    gap: 15px; 
    justify-content: flex-start;
    opacity: 0;
    animation: slideInUpFade 0.8s ease forwards 0.8s;
}

.social-icons-hero a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.social-icons-hero a:hover {
    color: var(--secondary-color);
}


/* --- Section Styling --- */
.section {
    padding: 4rem 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--accent-color);
    box-shadow: inset 0 2px 5px var(--shadow-light);
}

.section:nth-of-type(even) {
    background-color: var(--dark-background);
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ----------------------------------------------------------------- */
/* --- MODIFIKASI INTI: ABOUT SECTION UNTUK TATA LETAK FOTO & TEKS --- */
/* ----------------------------------------------------------------- */
.about-content-wrapper {
    display: flex; 
    flex-wrap: wrap; 
    gap: 3rem; 
    /* KUNCI: Memusatkan elemen secara vertikal untuk keseimbangan visual */
    align-items: center; 
    justify-content: center; 
    padding: 0 1rem; 
}

.about-text {
    flex: 3; 
    min-width: 350px; 
    max-width: 800px;
}

.about-image {
    flex: 1; 
    min-width: 250px;
    max-width: 400px; /* Ukuran foto yang lebih besar */
    text-align: center;
}

.profile-photo {
    width: 100%;
    height: auto;
    max-width: 400px; /* Ukuran maksimum foto */
    border-radius: 50%; 
    box-shadow: 0 8px 20px var(--shadow-dark); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

/* ----------------------------------------------------------------- */
/* --- Akhir Modifikasi About Section --- */
/* ----------------------------------------------------------------- */

.about-section p {
    margin-bottom: 1rem;
    text-align: justify;
    color: var(--text-color);
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.about-section ul li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--light-text-color);
}

.about-section ul li strong {
    color: var(--primary-color);
}

/* --- My Specialized Skills Section --- */
.skills-section {
    background-color: var(--dark-background);
    padding: 6rem 0;
}

/* Hapus padding horizontal dari container di dalam skills-section */
/* Ini penting agar skill-item bisa membentang penuh */
.skills-section .container {
    padding-left: 0;
    padding-right: 0;
}

.skill-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;

    position: relative;
    overflow: hidden;
    border-radius: 0px; 
    box-shadow: 0 5px 15px var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    min-height: 350px;

    /* Membentangkan skill-item ke lebar viewport */
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Efek Hover untuk skill-item (Gabungkan dengan transform full width) */
.skill-item:hover {
    transform: translateX(-50%) translateY(-5px); 
    box-shadow: 0 8px 20px var(--shadow-dark);
}


/* Gradien Overlay pada skill-item */
.skill-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* PERBAIKAN: Meningkatkan opasitas gradien agar teks lebih terlihat */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7), /* Opasitas lebih tinggi di atas */
        rgba(0, 0, 0, 0.4) 20%, /* Opasitas lebih tinggi di tengah */
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.7) /* Opasitas lebih tinggi di bawah */
    );
    z-index: 2;
}

.skill-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.skill-item .skill-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    color: var(--card-bg); /* Teks paragraf tetap putih agar kontras */
    box-sizing: border-box;

    width: 100%;
    flex-basis: 50%;
    max-width: 600px; 

    /* Tambahkan padding horizontal agar konten tidak terlalu menempel ke tepi viewport */
    padding-left: 2rem;
    padding-right: 2rem;
}

/* PERBAIKAN: Warna Judul H3 di dalam skill-item diubah menjadi putih */
.skill-item h3 {
    color: var(--card-bg); /* Diubah menjadi putih untuk kontras yang lebih baik */
}

/* Positioning for skill items on desktop */
.skill-item.content-right {
    justify-content: flex-end;
    text-align: right;
}

.skill-item.content-right .skill-content {
    margin-left: auto;
}


.skill-item.content-left {
    justify-content: flex-start;
    text-align: left;
}

.skill-item.content-left .skill-content {
    margin-right: auto;
}

/* Portfolio Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-dark);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-dark);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item h3 {
    margin: 1rem 1rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.gallery-item p {
    margin: 0 1rem 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--card-bg);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--text-color);
}

.primary-btn {
    display: block;
    width: fit-content;
    margin: 3rem auto 0;
}

/* Contact Form */
.contact-section {
    background-color: var(--card-bg);
    padding: 6rem 0;
    text-align: center;
}

.contact-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
    display: block;
    box-sizing: border-box;
    padding: 0 2rem;
    color: var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 2rem auto 0;
    gap: 1.2rem;
    padding: 0 2rem;
    align-items: center;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    background-color: var(--dark-background);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--light-text-color);
    opacity: 0.8;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(120,201,233,0.5); 
    background-color: var(--card-bg);
}

.contact-form button {
    align-self: center;
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

.email-info {
    text-align: center;
    margin-top: 10rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.email-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.email-info a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--card-bg);
    color: var(--light-text-color);
    text-align: center;
    padding: 1.5rem 2rem;
    margin-top: auto;
    box-shadow: 0 -2px 10px var(--shadow-dark);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDownFade {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUpFade {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeftFade {
    from {
        opacity: 0;
        transform: translateX(-50px); 
    }
    to {
        opacity: 1;
        transform: translateX(0); 
    }
}


/* Scroll Reveal Styling HANYA UNTUK ELEMEN YANG MEMAKAI CLASS INI */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Tombol Kembali ke Atas (MODIFIKASI DI SINI) */
#backToTopBtn {
    /* Hapus display: none dari sini */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: var(--card-bg);
    cursor: pointer;
    padding: 15px 18px;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-dark);
    
    /* Ganti/Tambahkan Transisi untuk Visibility dan Opacity */
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    
    /* Status Awal: Sembunyikan dan buat tidak terlihat */
    opacity: 0;
    visibility: hidden; 
    transform: translateY(20px); 
}

#backToTopBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* CLASS BARU untuk menampilkan tombol */
#backToTopBtn.show-btn {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}


/* Responsive Design */
@media (max-width: 768px) {
    /* Header/Hero Section Responsive */
    .hero-content {
        flex-direction: column; 
        text-align: center;
        gap: 20px;
    }

    .hero-left, .hero-right {
        max-width: 100%;
        min-width: unset;
        margin-bottom: 0;
    }

    .hero-logo-animation {
        max-width: 250px;
    }

    .hero-right .welcome-heading {
        font-size: 2.2rem;
    }

    .hero-right .welcome-tagline {
        font-size: 1rem;
    }

    .social-icons-hero {
        justify-content: center;
        margin-top: 20px;
    }
    
    /* PENTING! Pengaturan ini yang membuatnya "atas-bawah" (stacking) di mobile */
    .about-content-wrapper {
        flex-direction: column; /* Ubah ke satu kolom di layar kecil */
        align-items: center; /* Pusatkan item saat dalam satu kolom */
    }

    .about-text, .about-image {
        flex: none; 
        width: 100%; 
        max-width: 100%;
        text-align: center; /* Pusatkan teks di mobile */
    }

    .profile-photo {
        max-width: 200px; /* Sedikit lebih kecil di mobile */
        margin-bottom: 1.5rem; /* Tambahkan jarak di bawah foto */
    }
    
    .about-section p {
        text-align: center; /* Teks paragraf bisa dipusatkan di mobile */
    }
    /* END OF ABOUT SECTION RESPONSIF */


    /* Bagian lainnya (gallery, skill-item) responsive */
    .gallery {
        grid-template-columns: 1fr;
    }

    .skill-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 0;
        min-height: auto;

        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
    }

    .skill-item:hover {
        transform: translateX(-50%) translateY(-5px); 
    }

    .skill-item img {
        position: absolute;
        height: 100%;
        width: 100%;
    }

    .skill-item .skill-content {
        padding: 1.5rem;
        width: 100%;
        max-width: none;
        flex-basis: auto;
        margin: 0;

        /* Sesuaikan padding horizontal di mobile agar tidak terlalu menempel */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .skill-item.content-right,
    .skill-item.content-left {
        text-align: center;
        justify-content: center;
    }

    /* General responsive padding for container */
    .container {
        padding: 1.5rem;
    }
}