:root {
    --primary-color: #0ea5e9;
    --secondary-color: #10b981;
    --accent-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* --- Tema Gelap --- */
/* Tambahkan blok ini di bawah :root */
[data-theme="dark"] {
    --primary-color: #38bdf8; /* Sedikit lebih terang untuk kontras */
    --secondary-color: #34d399;
    --accent-color: #60a5fa;
    --dark-color: #f1f5f9; /* Warna teks utama di mode gelap */
    --light-color: #0f172a; /* Warna background utama di mode gelap */
    --text-color: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #334155;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-color);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

    h2::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        border-radius: 2px;
    }

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

h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

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

    a:hover {
        color: var(--accent-color);
    }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.2);
        transition: left 0.5s ease;
    }

    .btn:hover::before {
        left: 100%;
    }

    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
    }

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

    .btn-outline:hover {
        background: var(--primary-color);
        color: white;
    }

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Header & Navigation */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px; /* Beri jarak dengan tombol menu */
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Transisi Halus Saat Ganti Tema --- */
/* Cari selector body dan tambahkan properti transition */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    /* Tambahkan baris ini */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Perbaikan Warna Footer (PENTING) --- */
/* Cari selector footer dan ubah backgroundnya */
footer {
    /* Sebelumnya: background: var(--dark-color); */
    /* Ubah menjadi: */
    background: var(--dark-color); 
    color: var(--text-color);
    /* ... sisanya tetap */
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg); /* Menggunakan variabel kartu */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 1px 10px rgba(6, 145, 226, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .logo i {
        color: var(--primary-color);
    }

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

    nav a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: var(--transition);
    }

    nav a:hover::after,
    nav a.active::after {
        width: 100%;
    }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230ea5e9" fill-opacity="0.03" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
        background-size: cover;
    }

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

    .hero-text h1 span {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.typing-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    min-height: 30px;
}

    .typing-text::after {
        content: '|';
        animation: blink 1s infinite;
        color: var(--primary-color);
    }

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 400px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    z-index: 1;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

    .social-link:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-3px);
    }

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-info {
    margin-top: 2rem;
}

.info-item {
    display: flex;
    margin-bottom: 15px;
}

    .info-item i {
        color: var(--primary-color);
        margin-right: 15px;
        font-size: 1.2rem;
        width: 24px;
    }

    .info-item strong {
        color: var(--dark-color);
        margin-right: 10px;
        min-width: 100px;
    }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

    .skill-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    }

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.skill-name {
    font-weight: 600;
    color: var(--dark-color);
}

.skill-level {
    color: var(--primary-color);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

    .filter-btn.active,
    .filter-btn:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

    .portfolio-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    }

.portfolio-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

    .portfolio-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-links {
    display: flex;
    gap: 15px;
}

.portfolio-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    transition: var(--transition);
}

    .portfolio-link:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-3px);
    }

.portfolio-content {
    padding: 25px;
}

.portfolio-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.portfolio-category {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.portfolio-description {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

    .blog-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    }

.blog-img {
    height: 200px;
    overflow: hidden;
}

    .blog-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

    .blog-meta i {
        color: var(--primary-color);
        margin-right: 5px;
    }

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .read-more i {
        transition: var(--transition);
    }

    .read-more:hover i {
        transform: translateX(5px);
    }

/* Contact Section */
.contact {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 5px;
}

.contact-details p {
    margin-bottom: 0;
    color: var(--text-light);
}

.contact-form {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: var(--dark-color);
    }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    }

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

    .form-message.success {
        background: rgba(16, 185, 129, 0.1);
        color: var(--secondary-color);
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .form-message.error {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }
    /* ============================================= */
/* FORM VALIDATION & ENHANCEMENTS (TAMBAHAN) */
/* ============================================= */

/* Form Validation States */
.form-group {
    position: relative;
}

.form-group.valid .form-control {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group.error .form-control {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.valid::after {
    content: '✓';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
}

.form-group.error::after {
    content: '✗';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ef4444;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Enhanced Form Message (UPDATE existing) */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 4px solid;
}

.form-message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-color: #3b82f6;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-color: #10b981;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: #ef4444;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Disabled State */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover {
    box-shadow: none !important;
}

/* Form Input Focus Enhancement */
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    transform: translateY(-1px);
}

/* Form Group Animation */
.form-group {
    transition: all 0.3s ease;
}

.form-group:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--light-color);
    color: var(--text-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .footer-logo i {
        color: var(--primary-color);
    }

.footer-text {
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-links h4 {
    color: var(--text-light);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .footer-links h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 40px;
        height: 2px;
        background: var(--primary-color);
    }

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

    .footer-links a:hover {
        color: var(--primary-color);
    }

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

    .footer-social a {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--text-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        transition: var(--transition);
    }

        .footer-social a:hover {
            background: var(--primary-color);
            transform: translateY(-3px);
        }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: var(--text-light);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

    .scroll-top.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-top:hover {
        background: var(--accent-color);
        transform: translateY(-5px);
    }

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

    .loader.hidden {
        opacity: 0;
        pointer-events: none;
    }

.loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
