/* --- Global Reset & General Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Palet Warna */
    --primary-color: #007bff; /* Biru Neon */
    --secondary-color: #6c757d;
    --background-color: #1a1a2e; /* Biru gelap/Ungu tua */
    --card-background: #2c2c4e;
    --text-color: #f0f0f0; /* Putih terang */
    --neon-glow: 0 0 10px rgba(0, 123, 255, 0.8), 0 0 20px rgba(0, 123, 255, 0.5);
    --background-dark: #1A1A2E; /* Background gelap */
    --navbar-bg: rgba(30, 30, 45, 0.95); /* Background card navbar (gelap transparan) */
    --card-bg: #ffffff;
    --light-bg: #f3f0ff; /* Warna background ungu muda */
    --text-color-2: #333;
    --label-color: #777;
    --border-radius-large: 20px;
    --field-height: 55px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(150deg, #1A1A2E 0%, #0F0F1A 100%);
    background-image: url(image/bgrnd.png);
    min-height: 100vh;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.section {
    padding: 80px 5%;
    min-height: 100vh;
    background-color: white;
}

hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    text-transform: uppercase;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* --- Navigation Bar --- */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    /* Gunakan blur untuk efek glassmorphism modern */
    background-color: none; 
    -webkit-backdrop-filter: blur(10px); /* Untuk kompatibilitas Safari */
    justify-content: space-between; 
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* Pastikan navbar selalu di atas konten lain */
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo img {
  width: 50%;
  height: 20%;
  margin-left: 24%;
}

/* --- 2.2. Styling Tautan Navigasi --- */
.nav-links {
    margin: auto;
    display: flex;
    gap: 30px; /* Jarak antar item */
    background-color: #fff; /* Latar belakang putih seperti di contoh gambar */
    padding: 10px 20px;
    border-radius: 12px; /* Sudut membulat */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item {
    color: #444; /* Warna teks tautan default (abu-abu gelap) */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 10px;
    
    /* Setup untuk underline */
    position: relative; 
    transition: color 0.3s ease;
    
    display: flex;
    align-items: center;
    white-space: nowrap; /* Mencegah item melompat ke baris baru */
}

/* Styling Ikon */
.nav-item i {
    margin-right: 8px;
    font-size: 1.1rem;
    color: #888; /* Warna ikon default */
    transition: color 0.3s ease;
}

/* 2.3. Efek Aktif dan Hover (Garis Bawah Biru) */

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color); /* Teks menjadi warna biru saat aktif/hover */
}

.nav-item:hover i,
.nav-item.active i {
    color: var(--primary-color); /* Ikon menjadi warna biru saat aktif/hover */
}

/* Garis Bawah (Underline) */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Jarak dari bawah item */
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

/* Garis Bawah saat Hover dan Aktif */
.nav-item:hover::after,
.nav-item.active::after {
    width: 100%; /* Lebar garis menjadi 100% */
    left: 0;
}

/*2.2. Tombol Burger Menu*/
.menu-toggle {
    display: none; /* Sembunyikan secara default di desktop */
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001; /* Pastikan di atas menu */
}

/*2.3. Media Query (Hanya berlaku di perangkat kecil)*/
@media (max-width: 992px) {
    
    .menu-toggle {
        display: block;      /* Tampilkan tombol burger */
        position: fixed;     /* Tetapkan posisi relatif terhadap viewport */
        top: 20px;           /* Jarak 20px dari atas */
        right: 5%;           /* Jarak 5% dari kanan (sesuai padding section) */
        background-color: var(--navbar-bg); /* Beri background agar tidak transparan */
        padding: 8px 12px;   /* Beri sedikit padding */
        border-radius: 8px;  /* Bulatkan sudut */
    }

    .nav-links {
        /* Posisikan menu di luar layar (Off-Canvas) */
        position: fixed;
        top: 0;
        right: -100%; /* Sembunyikan di luar layar */
        width: 70%; /* Lebar menu yang muncul */
        max-width: 300px;
        height: 100vh;
        
        background-color: var(--background-dark); /* Latar belakang gelap */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        
        flex-direction: column; /* Tumpuk tautan secara vertikal */
        align-items: flex-start; /* Rata kiri */
        padding: 80px 30px 20px;
        
        /* Efek smooth untuk sliding */
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }
    
    /* Tampilkan menu saat kelas 'nav-active' ditambahkan oleh JS */
    .nav-links.nav-active {
        right: 0; /* Geser menu hingga terlihat */
    }

    .nav-item {
        width: 100%; /* Item menu ambil lebar penuh */
        padding: 15px 0;
        color: var(--text-color); /* Ubah warna teks menjadi terang */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Garis pemisah */
    }
    
    /* Hilangkan underline di menu mobile, gunakan warna teks aktif saja */
    .nav-item::after {
        display: none; 
    }
}



/* --- 1. Home Section --- */
.home-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: none;
}

.home-content {
    flex: 1;
    animation: slideInFromLeft 1s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-intro {
    font-size: 1.5em;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 300;
}

.hero-name {
    font-size: 4.5em; /* Sedikit disesuaikan */
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-color); /* Menggunakan warna teks utama */
    font-family: 'Poppins', sans-serif; /* Menggunakan font utama yang modern */
    line-height: 1.1;
}

.hero-title {
    font-size: 2em;
    color: var(--text-color); /* Menggunakan warna teks utama */
    margin-bottom: 20px;
    font-weight: 300;
}

.hero-title .typing-text {
    color: var(--primary-color); /* Memberi warna neon pada teks yang diketik */
    font-weight: 600;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-btn {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: var(--neon-glow);
    padding: 10px 25px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 150%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.contact-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 0 15px rgba(0, 123, 255, 1);
}

.home-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.2s ease-in;
}

.profile-photo {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    /* Shadow Menyala (Neon Effect) */
    box-shadow: var(--neon-glow);
    transition: all 0.4s ease-in-out;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 123, 255, 1), 0 0 30px rgba(0, 123, 255, 0.7);
}


/* --- 2. Profil Section (ID Card) --- */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.id-card-container {
    width: 100%;
    max-width: 700px;
    perspective: 1000px;
}

.id-card {
    display: flex;
    background-color: #caf4ed;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-left: 5px solid var(--primary-color);
    /* Transisi untuk mengembalikan kartu ke posisi semula saat mouse keluar */
    transition: transform 0.4s ease-out;
    transform-style: preserve-3d;
}

.card-details {
    flex: 2;
}

.card-details h1 {
    color: #0F0F1A;
}

.card-details h3 {
    color: rgb(255, 2, 2);
    margin-bottom: 20px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.card-details table {
    width: 100%;
    border-collapse: collapse;
}

.card-details th, .card-details td {
    padding: 8px 0;
    text-align: left;
}

.card-details th {
    color: blue;
    width: 180px;
    font-weight: 400;
}

.card-details td {
    color: #0F0F1A;
}

.card-photo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 20px;
}

.profile-thumb {
    width: 120px;
    height: 165px;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}


/* --- 3. About Me Section --- */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: justify;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    display: flex;
}

.about-content img {
    width: 300px;
    height: 440px;
    margin: 30px;
}

.about-content p {
    margin: 15px;
    font-size: 1.1em;
}


/* --- 4. Skills Section (Circular Progress Bar) --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.skill-item {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-10px);
}

.circular-progress {
    position: relative;
    height: 120px;
    width: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    /* AWALNYA DIISI DENGAN WARNA BACKGROUND (0 DEGREE) */
    background: conic-gradient(#444 0deg, #444 0deg); /* Warna dasar 0% */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.circular-progress::before {
    content: "";
    position: absolute;
    height: 100px;
    width: 100px;
    border-radius: 50%;
    background-color: var(--card-background);
}

.inner-circle {
    position: relative;
    font-size: 1.5em;
    font-weight: 600;
    /* Awalnya, beri nilai 0% */
    color: var(--primary-color);
}


/* --- 5. Achievement Section --- */
.achievement-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap; /* Untuk responsif */
}

.achievement-card {
    flex: 1;
    min-width: 300px;
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border-top: 5px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card img {
  width: 100%;
  height: 56%;
}

.achievement-card:hover {
    transform: scale(1.05);
    box-shadow: var(--neon-glow);
}

.achievement-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}


/* --- 6. Project Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
    margin-top: 10px;
}

.project-card h3 {
    margin-top: 15px;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 15px;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.view-btn {
    background-color: var(--primary-color);
    color: var(--background-color);
    margin-bottom: 15px;
}

.view-btn:hover {
    background-color: #0056b3;
}

/* --- Popup Overlay --- */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: flex-end; /* Posisi awal di bawah untuk efek slide */
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
}

/* --- Popup Box --- */
.popup-content {
  background: #1e1e3a;
  color: white;
  width: 90%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 25px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s ease;
}

/* --- Slide Up Effect --- */
.popup-overlay.active .popup-content {
  transform: translateY(0);
  opacity: 1;
}

/* --- Close Button --- */
.close-btn {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s;
}
.close-btn:hover {
  color: #00b4ff;
}

/* --- Image Styling --- */
.popup-content img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

/* --- Text --- */
.popup-content h3 {
  color: #00b4ff;
  margin-bottom: 10px;
}

.popup-content p {
  font-size: 15px;
  line-height: 1.6;
}


/* --- 7. Contact Section --- */
.contact-section {
    justify-items: center;
}
/* --- Container Profil Utama (Kartu) --- */
.profile-container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 400px; /* Batasi lebar maksimum seperti pada aplikasi mobile */
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(155, 0, 0, 0.899);
    padding: 30px 25px;
    text-align: center;
}

/* --- Header Profil (Nama & Avatar) --- */
.profile-header {
    padding-bottom: 20px;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #a770ef, #cf8bf3, #fcc2c1); /* Gradient seperti warna ungu di gambar */
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3); /* Bayangan untuk menonjolkan */
}

.avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    /* Atur agar emotikon atau gambar avatar terlihat jelas di dalam lingkaran */
    background-size: cover;
}

.profile-header h1 {
    font-size: 1.6em;
    color: var(--text-color-2);
    margin-bottom: 5px;
    font-weight: 600;
}

.profile-header .role {
    font-size: 0.9em;
    color: var(--label-color);
    margin-bottom: 20px;
    font-weight: 400;
}

/* --- Bagian Kontak --- */
.contact-section h2 {
    /* Judul section ini hanya sebagai label di HTML, di desain tidak ada */
    display: none; 
}

.contact-item {
    text-align: left;
    margin-bottom: 18px;
    min-width: 98%;
    max-width: 98%;
}

.contact-item label {
    display: block;
    font-size: 0.8em;
    color: var(--label-color);
    margin-bottom: 5px;
    font-weight: 400;
}

.contact-field {
    display: flex;
    align-items: center;
    height: var(--field-height);
    background-color: var(--light-bg);
    border-radius: 12px;
    padding: 0 15px;
    font-size: 1em;
    color: var(--text-color-2);
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Bayangan dalam tipis */
}

.contact-field .value {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Pastikan teks panjang terpotong dengan elipsis */
}

.contact-field .icon-right {
    color: var(--label-color); /* Warna ikon di sebelah kanan */
    font-size: 1.2em;
    margin-left: 10px;
}


/* --- 8. Donation Section --- */
.donation-section {
    min-height: auto;
    text-align: center;
    padding-bottom: 100px;
}

.donation-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.donation-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: var(--neon-glow);
}

.qr-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin-top: 20px;
}

.qr-btn:hover {
    background-color: #5a6268;
}

.qr-code-area {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
}

.qr-caption {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 5px;
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #111;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Responsive Design (Media Queries) --- */

/* Untuk layar kecil (Ponsel) */
@media (max-width: 768px) {
    .section {
        padding: 50px 5%;
    }

    .navbar {
        flex-direction: column;
        padding: 15px 5%;
    }

    .navbar nav {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar a {
        margin: 5px 10px;
    }

    /* Home Section Adjustment */
    .home-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        min-height: 100vh;
    }

    .home-image {
        order: -1; /* Pindahkan gambar ke atas di layar kecil */
        margin-bottom: 30px;
    }

    .hero-name {
        font-size: 70px;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .hero-actions {
        justify-content: center;
    }

    /* ID Card Adjustment */
    .id-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-photo {
        padding: 0;
        margin-bottom: 20px;
    }

    .card-details th, .card-details td {
        display: block;
        width: 100%;
        text-align: center;
    }

    .card-details td {
        color: #0F0F1A;
    }

    .card-details th {
        font-weight: 600;
        color: blue; /* Ubah warna agar terlihat di tengah */
    }

    /* --- 3. About Me Section --- */
.about-content {
    max-width: 700px;
    margin: 0 0;
    text-align: justify;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    display: inline-block;
}

.about-content img {
    width: 300px;
    height: 440px;
    margin: 5px;
}

.about-content p {
    margin: 15px;
    font-size: 1.1em;
}

    /* Grid Adjustments */
    .skills-grid, .achievement-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card {
        min-width: 100%;
    }
}