.hero {
    padding: 96px 0;
    background-color: var(--color-white);
}

.hero__container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero__avatar {
    width: 300px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
}

.hero__avatar img {
    border-radius: 200px;
}

.hero__subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-light); /* Pastikan variabel warna Anda aktif */
    margin: 0; /* Dihapus agar tidak merusak perataan flexbox */
    height: 30px;
    line-height: 30px; /* Memastikan teks berada tepat di tengah secara vertikal */
}

.text-wrapper {
    overflow: hidden;
    position: relative;
    height: 30px; /* Harus sama dengan height subtitle */
    display: block;
}

.item {
    display: block;
    height: 30px; /* Disamakan dengan wrapper */
    line-height: 30px;
    /* Menggunakan durasi 6 detik dengan efek transisi yang mulus */
    animation: role-change 4s ease-in-out infinite; 
}

@keyframes role-change {
    0%, 35% {
        transform: translateY(0);
    }
    45%, 85% {
        transform: translateY(-100%);
    }
    95%, 100% {
        transform: translateY(-200%);
    }
}

.hero__title {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary-teal);
    margin-bottom: 16px;
}

.hero__description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-dark);
}

.hero__description b {
    font-weight: 600;
    color: var(--color-text-dark);
}

.projects {
    padding: 120px 0; /* Padding diperbesar agar transisi terasa lebih lega */
}

/* --- PROJECT FILTER PILLS (GLASSMORPHISM) --- */
.projects__header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 48px; 
}

.project-filter {
    position: relative; /* Wajib agar slider bisa bergerak di dalamnya */
    display: inline-flex;
    gap: 8px;
    padding: 8px; 
    border-radius: 999px; 

    /* Efek Frosted Glass (Tidak berubah) */
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(10px) brightness(1.13);
    -webkit-backdrop-filter: blur(10px) brightness(1.13); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.pill-slider {
    position: absolute;
    background-color: var(--color-primary-teal); /* Warna hijau aktif */
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 0; /* Taruh di belakang teks */
    /* Animasi meluncurnya (smooth ease-out) */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}

.filter-pill {
    position: relative; /* Wajib agar teks ada di atas slider */
    z-index: 1; /* Taruh di atas slider */
    background: transparent !important; /* Hapus background dari tombol */
    border: none;
    color: var(--color-text-dark); 
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-pill:hover{
    color: var(--color-primary-teal);
}


.filter-pill.active {
    color: #FFFFFF; 
}

/* --- ANIMASI KARTU SAAT DIFILTER --- */
@keyframes cardPopIn {
    0% {
        opacity: 0;
        transform: scale(0) translateY(30px);
    }

    50%{
        opacity: 1;
        transform: scale(0.5) translateY(15);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Class untuk menyembunyikan kartu */
.project-card.hide {
    display: none !important;
}

/* Animasi akan berjalan saat class .hide dilepas dari kartu */
.project-card:not(.hide) {
    animation: cardPopIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.projects .container {
    position: relative;
    z-index: 1; 
}

.projects__grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}

.project-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-normal);
    box-shadow: var(--box-shadow-soft);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    width: 336px;
    flex-shrink: 0;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px -3px rgba(0,0,0,0.08), 0 4px 8px -2px rgba(0,0,0,0.06);
}

.project-card__image-wrapper {
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card__image {
    transform: scale(1.05);
}

.project-card__content {
    background-color: var(--color-white);
    padding: 24px;
    margin-top: -30px;
    position: relative;
    border-top-left-radius: var(--border-radius-normal);
    border-top-right-radius: var(--border-radius-normal);
    transition: margin-top 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card:hover .project-card__content {
    margin-top: 0;
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.project-card__tag {
    background-color: var(--color-primary-dark-teal);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 999px;
    flex-shrink: 0;
}

.project-card__description {
    font-size: 13px;
    flex-grow: 1;
    font-weight: 500; 
    color: var(--color-text-light);
}

.project-card__button {
    display: inline-block;
    width: 100%;
    background-color: var(--color-primary-teal);
    color: #FFFFFF;
    text-align: center;
    text-decoration: none;
    padding: 7px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 15px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-top 0.4s ease, background-color 0.3s ease;
}

.project-card:hover .project-card__button {
    opacity: 1;
    max-height: 50px;
    margin-top: 24px;
}

.project-card__button:hover,
.project-card__button:active {
    background-color: var(--color-primary-dark-teal);
    cursor: pointer;
}

/* --- HERO CTA BUTTONS --- */
.hero__cta-group {
    display: flex;
    gap: 16px;
    margin-top: 32px; /* Memberi jarak napas antara teks deskripsi dan tombol */
}

/* Style Dasar Button */
.btn-up {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 7px 32px;
    border-radius: 999px; /* Bentuk kapsul yang konsisten dengan tema web */
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

/* Button Primary (Download CV - Warna Solid) */
.btn--primary {
    background-color: var(--color-primary-teal);
    color: #FFFFFF;
    border: 2px solid var(--color-primary-teal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Bayangan halus */
}

.btn--primary:hover {
    background-color: var(--color-primary-dark-teal);
    border-color: var(--color-primary-dark-teal);
    transform: translateY(-3px); /* Efek melayang saat di-hover */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Button Secondary (Contact Me - Gaya Outline) */
.btn--secondary {
    background-color: transparent;
    color: var(--color-primary-teal);
    border: 1.7px solid var(--color-primary-teal);
}

.btn--secondary:hover {
    background-color: var(--color-primary-dark-teal);
    border: 2px solid var(--color-primary-dark-teal);
    color: #FFFFFF;
    transform: translateY(-3px);
}


@media (max-width:1071px) {
    .container {
        padding: 0 32px;
    }

    .hero__container {
        flex-direction: column;
        text-align: center;
        gap: 48px;
    }
    
    .contact__container {
        flex-direction: column;
        gap: 64px;
    }

    .project-card {
        min-height: unset;
    }
    
    .project-card:hover {
        transform: none;
    }

    .project-card__content {
        margin-top: 0;
    }
    
    .project-card__image-wrapper {
        height: 200px;
    }

    .project-card__button {
        opacity: 1;
        max-height: 50px;
        margin-top: 24px;
    }

    .hero__cta-group {
        justify-content: center; /* Memastikan tombol ke tengah saat layar mengecil/di HP */
    }
}

@media (max-width: 768px) {
    .project-card {
        width: 100%;
    }

    .section-title {
        font-size: 30px;
    }

    .hero__cta-group {
        flex-direction: column; /* Tombol bertumpuk atas-bawah di HP layarnya sempit */
        width: 100%;
        gap: 12px;
    }
    
    .btn {
        width: 100%; /* Tombol melebar penuh di HP */
    }
}