/* --- Variabel & Reset --- */
:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #60a5fa;
    --secondary-color: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Disembunyikan untuk custom cursor */
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loader-text {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- Custom Cursor --- */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: width 0.2s, height 0.2s;
}

@media (max-width: 768px) {
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
}

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0; width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    background-color: rgba(var(--bg-color), 0.8);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-color); text-decoration: none; font-weight: 600; transition: var(--transition); }
.nav-links a:hover { color: var(--primary-color); }
#theme-toggle { background: none; border: none; font-size: 1.2rem; color: var(--text-color); }

/* --- Global Sections --- */
section { padding: 8rem 5% 4rem; max-width: 1200px; margin: 0 auto; }
.section-title { margin-bottom: 3rem; text-align: center; }
.section-title h2 { font-size: 2.5rem; position: relative; display: inline-block; margin-bottom: 1.5rem; }
.section-title p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.section-title h2::after {
    content: ''; position: absolute; width: 50%; height: 4px;
    background-color: var(--primary-color); bottom: -10px; left: 25%; border-radius: 2px;
}

/* --- Hero Section --- */
.hero { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.greeting { font-size: 1.2rem; color: var(--primary-color); margin-bottom: 0.5rem; font-weight: 600; }
.name { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; letter-spacing: -2px; }
.role { font-size: 1.5rem; color: var(--secondary-color); margin-bottom: 1.5rem; font-weight: 400; }
.hero-desc { max-width: 600px; margin-bottom: 2.5rem; color: var(--secondary-color); font-size: 1.1rem; }
.btn-primary {
    padding: 1rem 2rem; background-color: var(--primary-color); color: #fff;
    text-decoration: none; border-radius: 50px; font-weight: 600;
    transition: var(--transition); box-shadow: 0 10px 20px -10px var(--primary-color);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -10px var(--primary-color); }

/* --- Marquee --- */
.marquee-container { background-color: var(--primary-color); color: #fff; padding: 1.5rem 0; overflow: hidden; white-space: nowrap; transform: rotate(-2deg); margin: 4rem -5%; }
.marquee-content { display: inline-block; animation: scrollText 20s linear infinite; font-size: 1.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Cards (Skills & Projects) --- */
.skills-grid, .projects-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.skill-card, .project-card {
    background-color: var(--card-bg); padding: 2.5rem; border-radius: 20px;
    border: 1px solid var(--border-color); transition: var(--transition);
}
.skill-card:hover, .project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.skill-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.skill-card h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.project-date { font-size: 0.9rem; color: var(--primary-color); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.project-sub { color: var(--secondary-color); margin-bottom: 1rem; font-weight: 600; }
.btn-outline {
    display: inline-block; margin-top: 1.5rem; padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color); color: var(--text-color);
    text-decoration: none; border-radius: 50px; font-weight: 600; transition: var(--transition);
}
.btn-outline:hover { background-color: var(--primary-color); color: #fff; }

/* --- Contact Section --- */
.contact-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
.contact-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.5rem 2rem;
    background-color: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 50px; text-decoration: none; color: var(--text-color);
    font-weight: 600; transition: var(--transition);
}
.contact-item i { font-size: 1.5rem; color: var(--primary-color); }
.contact-item:hover { transform: scale(1.05); border-color: var(--primary-color); }

/* --- Footer --- */
footer { text-align: center; padding: 3rem; color: var(--secondary-color); font-size: 0.9rem; border-top: 1px solid var(--border-color); margin-top: 4rem; }

/* --- Animations / Scroll Reveal --- */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .name { font-size: 3rem; }
    .nav-links { display: none; } /* Bisa ditambah hamburger menu nanti */
    section { padding: 6rem 5% 3rem; }
}
