:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #38bdf8;
    --dark: #0f172a;
    --light: #f8fafc;
    --text-gray: #64748b;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--dark); background-color: var(--light); scroll-behavior: smooth; }

.container { max-width: 1200px; margin: auto; padding: 0 20px; }

/* Header & Nav */
header { background: rgba(255,255,255,0.95); padding: 15px 0; box-shadow: 0 2px 15px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(5px); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--primary); }
.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-left: 30px; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 600; font-size: 0.95rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }

/* Hero Section */
/* Hero Section dengan Background Image */
.hero-with-bg {
    padding: 160px 0 120px; /* Tambah padding atas/bawah untuk nampak lebih luas */
    
    /* Gantikan 'hero-bg.jpg' dengan nama file gambar anda */
    /* Pastikan gambar berada dalam folder yang sama atau folder 'img' */
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('../img/hero-bg.png'); 
    
    background-size: cover;      /* Gambar penuh */
    background-position: center; /* Gambar di tengah */
    background-attachment: fixed; /* Kesan Parallax (gambar kekal bila scroll) - OPTIONAL */
    background-repeat: no-repeat;
    color: white;
    text-align: center;
}

/* Memastikan content hero berada di tengah */
.hero-content {
    max-width: 800px; /* Hadkan lebar teks supaya senang dibaca */
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.8rem; /* Besarkan sedikit font h1 */
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -1px; /* Rapatkan sedikit huruf */
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 45px;
    opacity: 0.95; /* Kekalkan opacity tinggi untuk readability */
    color: #e2e8f0; /* Warna kelabu cair sedikit */
}

/* Memperkemaskan badge */
.badge {
    background: rgba(56, 189, 248, 0.15); /* Warna biru muda cair */
    color: var(--accent); /* Gunakan warna accent dari :root */
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    display: inline-block;
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(5px); /* Kesan blur pada badge background */
}

.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; font-weight: 800; }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto 40px; opacity: 0.9; }

/* Buttons */
.btn-primary { background: var(--primary); color: white; padding: 14px 30px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: 0.3s; display: inline-block; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3); }
.btn-secondary { color: white; padding: 14px 30px; border-radius: 8px; text-decoration: none; font-weight: 600; border: 1px solid rgba(255,255,255,0.3); margin-left: 15px; transition: 0.3s; display: inline-block; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }
.btn-nav { background: var(--dark); color: white !important; padding: 10px 20px; border-radius: 6px; }

/* Sections */
.section-header { text-align: center; margin-bottom: 50px; margin-top: 80px; }
.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

/* Cards */
.card { background: white; padding: 40px; border-radius: 15px; transition: 0.3s; border: 1px solid #eee; }
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.icon-main { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; display: block; }
.card h3 { margin-bottom: 15px; }

/* Portfolio */
.portfolio-section { background: #f1f5f9; padding: 80px 0; }
.portfolio-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.portfolio-img { height: 200px; width: 100%; }
.portfolio-info { padding: 20px; }

/* Tech Stack */
.tech-stack { padding: 50px 0; background: white; text-align: center; border-bottom: 1px solid #eee; }
.tech-icons { display: flex; justify-content: center; gap: 30px; margin-top: 20px; flex-wrap: wrap; }
.tech-icons span { font-weight: 700; color: var(--text-gray); font-size: 1.1rem; }
.tech-icons i { color: var(--primary); margin-right: 5px; }

/* Contact Section */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin: 80px 0; align-items: center; }
.contact-info h2 { font-size: 2.5rem; margin-bottom: 20px; }
.info-item { display: flex; align-items: center; margin-bottom: 15px; font-size: 1.1rem; }
.info-item i { margin-right: 15px; color: var(--primary); font-size: 1.5rem; }
.contact-box { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-family: inherit; }
.full-width { width: 100%; }

footer { background: var(--dark); color: white; padding: 40px 0; text-align: center; font-size: 0.9rem; opacity: 0.9; }

/* --- RESPONSIVE SETTINGS --- */

/* Tunjukkan butang hamburger secara default tapi sembunyi di Desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

@media (max-width: 768px) {
    /* 1. Tunjukkan butang hamburger di Mobile */
    .menu-toggle {
        display: block;
    }

    /* 2. Susun semula Nav Links untuk Mobile */
    .nav-links {
        display: none; /* Sembunyi asal */
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 70px; /* Ikut ketinggian header */
        left: 0;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    /* 3. Class 'active' yang akan dipanggil oleh JavaScript */
    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links li {
        margin-left: 0; /* Buang margin kiri desktop */
    }

    /* 4. Kecilkan saiz font Hero untuk Mobile */
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* 5. Tukar grid kepada 1 kolom sahaja */
    .contact-wrapper, .grid {
        grid-template-columns: 1fr;
    }
}