/* Import Font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- Reset & Pengaturan Dasar --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d1117; /* Warna GitHub Dark Mode */
    color: #c9d1d9;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* --- Header & Navigasi --- */
.main-header {
    background-color: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid #21262d;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #58a6ff;
}

.admin-link {
    background-color: #4f98eb;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background-color: #0f3d72;
    color: #ffffff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 90vh;
    padding: 0 1.5rem;
    background-color: #0d1117;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Font responsif */
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.highlight {
    color: #58a6ff; /* Biru terang sebagai aksen */
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #8b949e;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: #8b949e;
}

.cta-button {
    display: inline-block;
    background-color: #58a6ff;
    color: #0d1117;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(88, 166, 255, 0.2);
}

/* --- Animasi Teks Mengetik --- */
.typed-text {
    color: #f0f6fc;
    font-weight: 600;
}

.cursor {
    display: inline-block;
    background-color: #58a6ff;
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
}

.cursor.typing {
    animation: none;
}

@keyframes blink {
    0%  { background-color: #58a6ff; }
    49% { background-color: #58a6ff; }
    50% { background-color: transparent; }
    99% { background-color: transparent; }
    100%  { background-color: #58a6ff; }
}

/* --- Bagian Proyek & Galeri --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #f0f6fc;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

/* Style untuk pesan "Belum ada proyek" */
.no-projects-message {
    grid-column: 1 / -1; 
    text-align: center;
    padding: 4rem 1rem;
    background-color: #161b22;
    border: 1px dashed #30363d;
    border-radius: 8px;
}

.no-projects-message p {
    font-size: 1.1rem;
    color: #8b949e;
}

.project-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #30363d;
}

/* ================================================== */
/* PERUBAHAN UTAMA ADA DI BAGIAN INI           */
/* ================================================== */
.project-item img {
    width: 100%;
    height: 220px; /* Memberi tinggi yang tetap untuk semua gambar */
    object-fit: cover; /* Mencegah gambar penyok/distorsi */
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.95) 0%, rgba(13, 17, 23, 0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-item:hover img {
    transform: scale(1.05);
}

.project-overlay h3 {
    font-size: 1.5rem;
    color: #f0f6fc;
    margin-bottom: 0.25rem;
}

.project-overlay span {
    color: #58a6ff;
    font-weight: 600;
}

/* --- Styling Halaman Detail Proyek --- */
.project-detail-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.back-link {
    display: inline-block;
    color: #58a6ff;
    text-decoration: none;
    margin-bottom: 2rem;
}

.project-detail-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.project-detail-date {
    display: block;
    color: #8b949e;
    margin-bottom: 2rem;
}

.project-detail-description h2 {
    color: #f0f6fc;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #30363d;
}

.detail-divider {
    border: 0;
    height: 1px;
    background-color: #30363d;
    margin: 3rem 0;
}


/* --- Galeri Gambar di Halaman Detail --- */
.project-images {
    display: grid;
    /* Membuat grid yang responsif secara otomatis */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-image-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #30363d;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-image-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.15);
}

.project-image-item img {
    width: 100%;
    height: 220px; /* Tinggi seragam untuk semua gambar */
    object-fit: cover; /* Mencegah gambar penyok/distorsi */
    display: block;
}


/* --- Styling Modal (Lightbox) --- */
.modal {
    display: none; /* Sembunyi secara default */
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(13, 17, 23, 0.95);
    animation: fadeIn 0.5s;
}

.modal-content {
    margin: auto;
    display: block;
    width: 85%;
    max-width: 800px;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mencegah scroll halaman saat modal terbuka */
.modal-open {
    overflow: hidden;
}

/* --- Styling Halaman Tentang Saya --- */
.page-heading {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #f0f6fc;
    margin-bottom: 3rem;
}

.about-section {
    margin-bottom: 3rem;
}

.cv-preview {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
}

.cv-description {
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    color: #8b949e;
    font-size: 1.1rem;
}

/* Menggunakan kembali style cta-button dari hero */
.cv-preview .cta-button {
    font-size: 1.1rem;
}


/* --- Grid Keterampilan --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.5rem;
}

.skill-category h3 {
    color: #f0f6fc;
    border-bottom: 1px solid #30363d;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}


/* --- Styling Bagian Kontak di Halaman About --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.contact-item {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: #21262d;
}

.contact-icon-wrapper {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: #21262d;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: #58a6ff;
}

.contact-text h3 {
    color: #f0f6fc;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-text p,
.contact-text a {
    color: #8b949e;
    text-decoration: none;
    word-break: break-all; /* Mencegah teks panjang merusak layout */
}

.contact-text a:hover {
    color: #58a6ff;
    text-decoration: underline;
}

/* --- Styling Riwayat Pendidikan --- */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.education-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 30px; /* Ruang untuk garis timeline */
}

/* Garis Timeline Vertikal */
.education-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #30363d;
}

/* Titik pada Timeline */
.education-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #58a6ff;
    border: 3px solid #161b22;
    z-index: 1;
}

.education-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 50%; /* Membuat bentuknya menjadi bulat */
    padding: 0.5rem;
}

.education-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.education-details h3 {
    color: #f0f6fc;
    font-size: 1.25rem;
}

.education-details .institution {
    font-weight: 600;
    color: #c9d1d9;
}

.education-details .period {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 0.5rem;
}

.education-details .description {
    font-size: 1rem;
    color: #8b949e;
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    background-color: #0d1117;
    margin-top: 3rem;
    border-top: 1px solid #21262d;
}

footer p {
    margin: 0;
    color: #8b949e;
}

/* --- Media Queries untuk Responsif --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background-color: #1a1a1a;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .main-nav.active .nav-links {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        min-height: 80vh;
        text-align: left;
    }

    .hero-content {
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }
}
@media (max-width: 576px) {
    .education-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .education-logo {
        width: 60px;
        height: 60px;
    }
}