/* ==========================================================================
   Halaman About Me - Gaya Spesifik (Tombol Home & Layout Responsif Mobile)
   ========================================================================== */

body {
    background-color: #000000 !important;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column; 
    justify-content: center; /* DIUBAH: Menjadi center agar konten di tengah secara vertikal */
    align-items: center;     /* Menengahkahkan secara horizontal */
    min-height: 100vh;
    margin: 0;
    padding: 20px;           /* Beri sedikit padding ruang aman */
    box-sizing: border-box;
    position: relative; 
    overflow-x: hidden;
    overflow-y: auto;
}


/* --- DEFINISI ANIMASI --- */
/* Animasi Slide Up untuk Semua Blok Elemen Teks */
@keyframes slideInOnAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PERBAIKAN: Animasi Khusus Slide-in dari Kiri Persis Seperti .search-link */
@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animasi Khusus Garis (Hanya Garis Fisik yang Melebar) */
@keyframes growLine {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Animasi Stroke SVG Berjalan Mengelilingi Kotak */
@keyframes drawStroke {
    from {
        stroke-dashoffset: 1170; /* Mulai dari kondisi kosong */
    }
    to {
        stroke-dashoffset: 0;    /* Berjalan sampai penuh */
    }
}

/* --- Tombol Kembali / Home (Pojok Kiri Atas Asli) --- */
.back-link {
    position: absolute; 
    top: 30px;
    left: 30px;          
    z-index: 100;
    animation: slideFromLeft 1.2s ease-in forwards; /* Tetapkan animasi Anda */
}

.back-link a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px; 
    
    border: 2px solid white; 
    border-radius: 50px;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500; 
    background-color: rgba(255, 255, 255, 0.2); 
    
    /* Efek Glow Awal menggunakan warna putih konstan transparan */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    
    /* Menyelaraskan efek transisi */
    transition: box-shadow 0.3s ease, border-color 0.3s ease; 
}

.back-link a:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2); 
    box-shadow: 0 0 25px #ffffff; 
}

/* --- Layout Grid Utama (Desktop) --- */
.about-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    margin: 0; /* DIUBAH: Mengunci margin agar flexbox dari body bekerja sempurna */
    transform: translateY(-20px); /* Opsional: sesuaikan sedikit untuk kenyamanan pandangan (optical center) */
    position: relative;
    z-index: 1; 
}

/* Kolom Kiri - Konten Teks */
.about-content {
    flex: 1;
    max-width: 600px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    animation: slideInOnAppear 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
    animation-fill-mode: backwards;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

/* BADGE */
.profile-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 2px solid #5ecef7; 
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 400;          
    color: #ffffff;            
    background: transparent;   
}

/* Garis Pembatas Utama (1.5px) */
.divider {
    border: none;
    border-top: 1.5px solid #ffffff; 
    margin: 20px 0; 
    width: 100%;
    transform-origin: left;
    animation: growLine 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.3s;
    animation-fill-mode: backwards;
}

/* Paragraf Bio */
.profile-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 400;
    margin: 0;
    animation: slideInOnAppear 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.4s;
    animation-fill-mode: backwards;
}

/* Bagian Informasi Data Diri */
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0; 
    animation: slideInOnAppear 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
    animation-fill-mode: backwards;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-bottom: 8px;
}

/* --- UNDERLINE MENGGUNAKAN PSEUDO-ELEMENT --- */
.detail-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
    padding-bottom: 8px; 
    width: fit-content;
    display: inline-block;
    position: relative;
}

.detail-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; 
    height: 1.5px; 
    background-color: #ffffff;
    transform-origin: left;
    animation: growLine 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.65s;  
    animation-fill-mode: backwards;
}

.detail-value {
    color: #ffffff;
    font-size: 0.95rem;
    text-align: right;
    padding-bottom: 8px; 
    width: fit-content;
    display: inline-block;
    position: relative;
}

.detail-value::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; 
    width: 100%; 
    height: 1.5px; 
    background-color: #ffffff;
    transform-origin: right;
    animation: growLine 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.65s; 
    animation-fill-mode: backwards;
}

.detail-row:last-child .detail-label::after,
.detail-row:last-child .detail-value::after {
    display: none !important;
}

.detail-value a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.detail-value a:hover {
    opacity: 0.8;
}

/* --- Kolom Kanan - Slot Gambar (Ratio 4:5) --- */
.about-image-wrapper {
    flex-shrink: 0;
    animation: slideInOnAppear 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.35s; 
    animation-fill-mode: backwards;
}

.profile-image-slot {
    width: 260px; 
    aspect-ratio: 4 / 5; 
    height: auto; 
    background-color: #262424;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    /* PERBAIKAN: Border manual dilepas karena diganti oleh garis stroke SVG */
    /* TAMBAHAN: Efek Glow Putih Santai (Pendaran luar & pendaran dalam di belakang foto) */
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.15), 
        inset 0 0 40px rgba(255, 255, 255, 0.3);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: slideInOnAppear 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s; 
}

/* --- Elemen Animasi Stroke SVG Overlay --- */
.border-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Mencegah bentrok aksi klik mouse pada gambar */
    z-index: 2;           /* Berada tepat di atas element gambar */
}

.border-animation rect {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #ffffff;      /* Warna garis tepi */
    stroke-width: 3px;    /* Ketebalan garis stroke */
    
    /* Keliling total aspek rasio kotak: (260 * 2) + (325 * 2) = 1170 */
    stroke-dasharray: 1170; 
    stroke-dashoffset: 1170; 
    
    /* Eksekusi animasi stroke berjalan */
    animation: drawStroke 2s ease-in forwards;
    animation-delay: 0.4s; /* Berjalan selaras saat kotak profil mulai muncul */
}


/* ==========================================================================
   Responsive Layout (Mobile & Tablet Breakpoints)
   ========================================================================== */

@media (max-width: 768px) {
    body {
        justify-content: flex-start; /* Kembali ke atas untuk layout mobile yang memanjang */
        padding-top: 80px;           /* Beri ruang di atas karena tombol Home sekarang absolute */
    }

    .back-link {
        position: absolute; /* Memastikan absolute aktif */
        top: 20px;          /* Samakan dengan .search-link di mobile */
        left: 20px;         /* Samakan dengan .search-link di mobile */
        padding-left: 0;    /* HAPUS/RESET padding bawaan lama agar tidak bergeser */
        margin-bottom: 0;   /* HAPUS/RESET margin bawaan lama */
        width: auto;        /* Mengunci lebar agar tidak penuh */
    }

    .back-link a {
        padding: 8px 16px;  /* Jarak padding dalam tombol (Sama dengan search-link) */
        font-size: 0.8rem;  /* Ukuran teks (Sama dengan search-link) */
    }

    .about-container {
        flex-direction: column;
        gap: 30px;
        padding: 10px;
        margin: 0 auto;
        transform: translateY(0);    /* Reset transform pada mobile */
    }

    .about-image-wrapper {
        order: -1; 
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .profile-image-slot {
        width: 100%;
        max-width: 240px; 
        height: auto; 
    }

    .about-content {
        width: 100%;
    }

    .about-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .profile-name {
        font-size: 2rem;
    }

    .profile-bio {
        text-align: center;
        font-size: 1rem;
    }
    
    .detail-row {
        flex-direction: row;
        justify-content: space-between;
    }

    .detail-label, .detail-value {
        width: fit-content; 
        min-width: 0;
        display: inline-block;
    }
}