:root {
    /* Color Palette: Dark Modern */
    --bg-dark: #0f172a;       /* Slate 900 */
    --bg-card: #1e293b;       /* Slate 800 */
    --accent: #22d3ee;        /* Cyan 400 */
    --accent-hover: #06b6d4;  /* Cyan 500 */
    --text-main: #f8fafc;     /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    --font-main: 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Mencegah scroll horizontal jika animasi slide */
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
}

.accent { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: 0.3s;
}

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

/* HERO SECTION FIXED */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center; /* Vertikal tengah */
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* Container hero-content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px; 
    margin-left: 0; /* Rata kiri */
    text-align: left;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

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

.text-gradient {
    background: linear-gradient(90deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: #e2e8f0;
}

.bio-short {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 90%;
}

/* BUTTONS */
.cta-group { display: flex; gap: 15px; }

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

.btn-filled {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-filled:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 211, 238, 0.3);
}

.btn-outline {
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* CODE BG (Hiasan Kanan) */
.code-bg {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    opacity: 0.9;
    box-shadow: -20px 20px 60px rgba(0,0,0,0.5);
    
    /* Animasi float looping */
    animation: float 6s ease-in-out infinite; 
    display: none;
}

@media (min-width: 992px) {
    .code-bg { display: block; }
}

@keyframes float {
    0% { transform: translateY(-50%) translateY(0px); }
    50% { transform: translateY(-50%) translateY(-15px); }
    100% { transform: translateY(-50%) translateY(0px); }
}

.code-bg code {
    font-family: var(--font-code);
    color: #a5b4fc;
    font-size: 0.9rem;
}

/* SECTIONS COMMON */
.section { padding: 100px 0; }
.bg-darker { background: #0b1120; }

.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ABOUT SECTION (Grid 50:50) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: center;
}

.about-text {
    padding-right: 20px;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent);
}

.img-box {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--accent);
    position: relative;
    margin: 0 auto;
}

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

/* SKILLS */
.skill-category { margin-bottom: 40px; }
.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.skill-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
    font-weight: 500;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(34, 211, 238, 0.05);
}

.skill-card i {
    margin-right: 8px;
    color: var(--accent);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.project-img {
    height: 180px;
    background: #334155;
    position: relative;
}

.placeholder-img { width: 100%; height: 100%; background: linear-gradient(45deg, #3b82f6, #8b5cf6); opacity: 0.8; }

.project-content { padding: 25px; }
.project-content h3 { margin-bottom: 10px; font-size: 1.3rem; }
.project-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.tech-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tech-tags span {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    color: var(--accent);
}

.project-links a {
    margin-right: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}
.project-links a:hover { color: var(--accent); }

/* EXPERIENCE (Timeline + Logo) */
.timeline {
    max-width: 800px;
    margin: 20px auto 0;
    position: relative;
    padding-left: 20px; 
}

.timeline::before {
    content: '';
    position: absolute;
    left: 45px; 
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255,255,255,0.1);
}

.timeline-item {
    position: relative;
    padding-left: 80px; 
    margin-bottom: 50px;
}

.timeline-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 55px;
    height: 55px;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    overflow: hidden;
}

.timeline-logo i {
    color: var(--accent);
    font-size: 1.6rem;
}

.timeline-logo img {
    width: 70%;
    height: auto;
    object-fit: contain;
}

.timeline-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent);
    transform: translateX(5px);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 12px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 15px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content .role {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 500;
}

.timeline-content ul {
    list-style: none;
    padding-left: 5px;
}

.timeline-content ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-content ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1.4rem;
}

/* CONTACT */
.contact-box {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-card), #1e1b4b);
    padding: 60px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.social-links-big {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer i { color: #ef4444; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero {
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin: 0 auto; 
        text-align: center;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .code-bg {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .stats { justify-content: center; }
    .nav-links { display: none; }
    
    /* Responsive Timeline */
    .timeline::before { left: 35px; }
    .timeline-logo { width: 45px; height: 45px; }
    .timeline-logo i { font-size: 1.3rem; }
    .timeline-item { padding-left: 65px; }
    .timeline-content { padding: 20px; }
    .timeline-content h3 { font-size: 1.1rem; }
}

/* =========================================
   ANIMATION & SCROLL REVEAL (NEW)
   ========================================= */

/* Base Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    filter: blur(5px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Slide Left */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide Right */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Delay */
.reveal.delay-100 { transition-delay: 0.1s; }
.reveal.delay-200 { transition-delay: 0.2s; }
.reveal.delay-300 { transition-delay: 0.3s; }
.reveal.delay-400 { transition-delay: 0.4s; }
.reveal.delay-500 { transition-delay: 0.5s; }
.reveal.delay-600 { transition-delay: 0.6s; }
.reveal.delay-700 { transition-delay: 0.7s; }
.reveal.delay-800 { transition-delay: 0.8s; }

/* Hero Animation (Load) */
.hero-animate {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* LANGUAGE TOGGLE BUTTON */
.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

.lang-btn img {
    border-radius: 2px;
    width: 20px;
}