/* ======== GLOBAL STYLES & RESET ======== */

/* Import font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #007BFF; /* Biru */
    --primary-hover: #0056b3;
    --secondary-color: #f8f9fa; /* Latar belakang cerah */
    --dark-color: #333;
    --light-color: #fff;
    --text-color: #555;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #777;
}

/* ======== HEADER / NAVIGASI ======== */
header {
    background-color: var(--light-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Tombol Hamburger */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* ======== BAGIAN HOME (HERO) ======== */
.hero {
    background-color: var(--secondary-color);
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content .highlight {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* ======== BAGIAN TENTANG SAYA (ABOUT) ======== */
#about {
    background-color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* ======== BAGIAN PORTOFOLIO ======== */
#portfolio {
    background-color: var(--secondary-color);
}

.portfolio-grid {
    display: grid;
    /* PERUBAHAN: Memaksa 2 kolom */
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem;
}

.project-card {
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-hover);
}

/* ======== BAGIAN KONTAK ======== */
#contact {
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item:hover {
    color: var(--primary-color);
}

/* ======== FOOTER ======== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0;
}

footer .fa-heart {
    color: #e25555;
}

/* ======== RESPONSIVE (MOBILE) ======== */

@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--light-color);
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 1.2rem;
        border-bottom: 1px solid #eee;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background-color: var(--secondary-color);
        border-bottom: 1px solid #eee;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        margin-bottom: 2rem;
    }
    
    .about-image img {
        margin: 0 auto;
    }

    /* PERUBAHAN: Memastikan di HP tetap 1 kolom, meskipun di PC 2 kolom */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}