/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #2b2b2b;
    background-color: #fff;
    line-height: 1.7;
    padding-top: 80px; /* Mencegah konten Hero tertutup Navbar Fixed */
}

h1, h2, h3, h4, .logo, .hero-quote, .buku-quote {
    font-family: 'Cormorant Garamond', serif;
    color: #1a1512;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.max-width-md { max-width: 800px; }
.max-width-sm { max-width: 600px; }

.section {
    padding: 100px 0;
    scroll-margin-top: 40px;
}

.bg-light { background-color: #fdfbf7; }
.bg-dark { background-color: #1a1512; }
.text-white { color: #fdfbf7; }

/* ==========================================================================
   2. SECTION COMMONS & GRIDS
   ========================================================================== */
.section-title {
    font-size: 2.4rem;
    margin-bottom: 40px;
    font-weight: 600;
}
.section-subtitle { color: #777; margin-top: -30px; margin-bottom: 50px; }
.subtitle-white { color: #b5a494; margin-top: -30px; margin-bottom: 50px; }

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: start; 
}
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }

/* ==========================================================================
   3. NAVBAR COMPONENT
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid #eaeaea;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
}
.logo span { color: #8c6239; }

.nav-avatar-free {
    width: auto;
    height: 40px;
    object-fit: contain;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
    display: block;
}

.logo:hover .nav-avatar-free {
    transform: scale(1.05) translateY(-2px);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 5px 15px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #8c6239;
}

/* HAMBURGER MENU BUTTON SYSTEM */
.menu-toggle {
    display: none; /* Tersembunyi di Desktop secara default */
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 19px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #1a1512;
    transition: all 0.3s ease-in-out;
}

/* Animasi Tombol Hamburger Berubah Jadi Huruf 'X' saat Aktif */
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
    height: calc(85vh - 80px);
    display: flex;
    align-items: center;
    background-color: #fdfbf7;
}

.hero-tagline {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8c6239;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-quote {
    font-size: 1.8rem;
    font-style: italic;
    color: #555;
    max-width: 750px;
    border-left: 3px solid #8c6239;
    padding-left: 25px;
}

/* ==========================================================================
   5. PROFIL SECTION
   ========================================================================== */
.profil-image {
    position: -webkit-sticky;
    position: sticky;
    top: 120px; 
}

.profil-img-premium {
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(26, 21, 18, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: block;
    margin: 0 auto;
}

.profil-img-premium:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 25px 50px rgba(140, 98, 57, 0.15);
}

.profil-text h3 { font-size: 1.6rem; margin: 25px 0 10px 0; font-weight: 600; }
.lead { font-size: 1.15rem; color: #1a1512; margin-bottom: 20px; }
.profil-text p { margin-bottom: 15px; color: #444; }

/* ==========================================================================
   6. JEDA SECTION (EDITORIAL DYNAMIC SCRAPING)
   ========================================================================== */
.blog-list { 
    margin-top: 30px; 
}

.blog-item-with-img {
    display: flex;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid #eaeaea;
    align-items: center;
}

.blog-img-wrapper {
    flex: 0 0 180px;
    height: 120px;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-item-with-img:hover .blog-img-wrapper img {
    transform: scale(1.05);
}

.blog-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 20px;
}

.jeda-title {
    font-size: 1.55rem; 
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 10px;
}

.jeda-title a {
    text-decoration: none;
    color: #1a1512;
    transition: color 0.3s ease;
}

.jeda-title a:hover {
    color: #8c6239;
}

.jeda-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ==========================================================================
   7. BUKU SECTION
   ========================================================================== */
.buku-status { font-size: 0.8rem; text-transform: uppercase; color: #8c6239; letter-spacing: 1px; }
.buku-info h3 { font-size: 2.2rem; margin-bottom: 15px; }
.buku-desc { margin-bottom: 20px; }
.buku-quote { font-size: 1.25rem; font-style: italic; margin-bottom: 30px; color: #555; border-left: 2px solid #8c6239; padding-left: 15px; }

.buku-cover-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
}

.buku-img-premium {
    width: 100%;
    max-width: 440px;
    height: auto;
    max-height: 340px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(26, 21, 18, 0.15);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    display: block;
}

.buku-img-premium:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 35px rgba(140, 98, 57, 0.22);
}

/* ==========================================================================
   8. PROJECT SECTION (FIXED LOGO SIZES)
   ========================================================================== */
.project-card {
    background: #fff;
    padding: 30px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
}

.project-logo-wrapper {
    width: 100%;
    height: 220px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    background-color: #fafafa; 
    border-radius: 4px;
    overflow: hidden;
    padding: 15px;
}

.project-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
}

.project-card h4 { 
    font-size: 1.4rem; 
    margin-bottom: 15px; 
}

.project-card p { 
    font-size: 0.9rem; 
    color: #666; 
    margin-bottom: 20px; 
    min-height: 70px; 
}

.project-link { 
    text-decoration: none; 
    color: #8c6239; 
    font-weight: 500; 
    font-size: 0.9rem; 
    margin-top: auto; 
}

/* ==========================================================================
   9. BUTTONS, CONTACT FORM, & FOOTER
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #1a1512;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover { background-color: #8c6239; }
.btn-light { background-color: #fdfbf7; color: #1a1512; }
.btn-light:hover { background-color: #b5a494; color: #1a1512; }

.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-family: inherit;
    border-radius: 4px;
}
.contact-form select option { background: #1a1512; color: #fff; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #8c6239;
}

.footer { text-align: center; padding: 40px; background-color: #110e0c; color: #555; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.05); }

/* ==========================================================================
   10. ANIMATION ENGINE
   ========================================================================== */
.animate-fade { opacity: 0; transform: translateY(20px); animation: fadeIn 1s forwards 0.2s; }
.animate-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-scroll.appeared { opacity: 1; transform: translateY(0); }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   11. GLOBAL MEDIA QUERIES (RESPONSIVE ENGINE)
   ========================================================================== */
@media (max-width: 768px) {
    .grid-2 { align-items: stretch; } 
    .profil-image { position: static; } 

    .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 30px; }
    .hero h1 { font-size: 2.6rem; }
    .section { padding: 60px 0; }
    
    /* REVISI SISTEM HAMBURGER DI SINI */
    .menu-toggle {
        display: flex; /* Aktifkan tombol hamburger di HP */
    }

    .nav-menu {
        display: flex; /* Batalkan display none bawaan lama */
        flex-direction: column;
        position: absolute;
        top: 80px; /* Pas di bawah batas navbar */
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #eaeaea;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        
        /* Animasi Masuk: Efek Slide Down & Fade Mulus */
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none; /* Cegah link diklik saat menu tertutup */
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    }

    /* Trigger Aktif saat Hamburgernya Diklik (di-handle oleh JS) */
    .nav-menu.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto; /* Aktifkan kembali link */
    }

    .nav-link {
        display: block;
        padding: 12px 5%;
        font-size: 1.1rem;
        text-align: center;
    }
    
    .profil-img-premium {
        max-width: 320px;
        max-height: 400px;
        margin-bottom: 20px;
    }
    .buku-cover-wrapper {
        margin-top: 20px;
    }
    .buku-img-premium {
        max-width: 100%;
        max-height: 260px;
    }
    
    .jeda-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .blog-content-wrapper {
        padding: 10px 0;
    }

    .project-logo-wrapper {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .blog-item-with-img {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .blog-img-wrapper {
        width: 100%;
        flex: 0 0 auto;
        height: 180px;
    }
}

/* ==========================================================================
   12. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #1a1512; /* Warna gelap senada tema web */
    color: #fdfbf7; /* Warna krem pucat text-white kamu */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px; /* Kotak dengan lengkungan halus mirip .project-card */
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    
    /* Efek transisi saat muncul dan di-hover */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* State ketika tombol aktif (dimunculkan via JS) */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #8c6239; /* Berubah cokelat khas aksenmu saat di-hover */
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(140, 98, 57, 0.3);
}

/* Responsif: Sedikit disesuaikan posisinya di HP agar tidak menutupi konten utama */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}