/* General Styles */
:root {
    --primary-color: #007bff; /* Biru */
    --secondary-color: #6c757d; /* Abu-abu */
    --tertiary-color: #28a745; /* Hijau */
    --background-light: #f8f9fa; /* Latar belakang terang */
    --background-dark: #212529; /* Latar belakang gelap */
    --text-color-light: #343a40; /* Teks gelap */
    --text-color-dark: #e9ecef; /* Teks terang */
    --highlight-color: #ffc107; /* Kuning */
    --navbar-height: 70px;
}

/* Dark Mode */
body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-color-dark);
}

body.dark-mode header,
body.dark-mode footer {
    background-color: #343a40;
    border-color: #495057;
}

body.dark-mode .nav-links a,
body.dark-mode .logo {
    color: var(--text-color-dark);
}

body.dark-mode .hero-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

body.dark-mode .bg-light {
    background-color: #2c3135; /* sedikit lebih terang dari background dark */
    color: var(--text-color-dark);
}

body.dark-mode .portfolio-item,
body.dark-mode .skill-item,
body.dark-mode .blog-post {
    background-color: #343a40;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: #495057;
    color: var(--text-color-dark);
    border: 1px solid #6c757d;
}

body.dark-mode .read-more {
    color: var(--highlight-color);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color-light);
    background-color: var(--background-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--text-color-light); /* Akan berubah di dark mode */
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--background-light);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-tertiary {
    background-color: var(--tertiary-color);
    color: #fff;
    margin-top: 20px;
}
.btn-tertiary:hover {
    background-color: #218838;
}

/* Header/Navbar */
#navbar {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-light);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color-light);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-color-light);
    margin-left: 20px;
    transition: color 0.3s ease;
}

.dark-mode-toggle:hover {
    color: var(--primary-color);
}

.burger-menu {
    display: none; /* Hidden on desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-color-light);
}

/* Hero Section */
.hero-section {
    background-image: url('latar-belakang-hero.jpg'); /* Ganti dengan gambar latar belakang Anda */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Gelapkan gambar latar */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    margin-bottom: 25px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #fff;
}

.hero-section .tagline {
    font-size: 1.4em;
    margin-bottom: 40px;
    opacity: 0.9;
}

.highlight {
    color: var(--highlight-color);
}

/* About Section */
#about p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: center;
}

/* Portfolio Grid */
.portfolio-grid, .skills-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item, .skill-item, .blog-post {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover, .skill-item:hover, .blog-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-item img, .blog-post img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.portfolio-item h3, .skill-item h3, .blog-post h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

.skill-item i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 10px;
    display: inline-block;
}
.read-more:hover {
    text-decoration: none;
    color: #0056b3;
}

.blog-post .post-meta {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Footer */
footer {
    background-color: #343a40;
    color: #fff;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #495057;
}

footer .social-links a {
    color: #fff;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: var(--primary-color);
}

footer p {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    #navbar .container {
        flex-wrap: wrap;
        padding: 0 15px;
    }

    .nav-links {
        display: none; /* Hide on mobile by default */
        width: 100%;
        flex-direction: column;
        background-color: #fff;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        border-top: 1px solid #eee;
        transition: all 0.3s ease;
    }
    body.dark-mode .nav-links {
         background-color: #343a40;
         border-top: 1px solid #495057;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links li {
        text-align: center;
        margin: 10px 0;
    }

    .nav-links a {
        font-size: 1.1em;
    }

    .burger-menu {
        display: block; /* Show on mobile */
        margin-left: auto; /* Push to right */
    }

    .dark-mode-toggle {
        margin-left: 15px;
    }

    .hero-section {
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section .tagline {
        font-size: 1.1em;
    }

    h2 {
        font-size: 2em;
    }

    .section-padding {
        padding: 60px 0;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.8em;
    }
}