/* Reset and Variables */
:root {
    /* Smart Home Gradient Background */
    --bg-gradient: linear-gradient(135deg, #c4dcfc 0%, #e2f0fd 100%);
    --bg-color: #dbeafe; /* Fallback */
    
    /* Text Colors */
    --text-main: #1a1625; /* Dark Purple/Black */
    --text-muted: #6b7280;
    
    /* Primary / Dark Accents */
    --primary-dark: #271e3a; /* Deep Purple for start buttons */
    --primary-blue: #3b82f6; 
    
    /* Pastel Colors for Cards */
    --pastel-purple: #e9dcf8;
    --pastel-blue: #d4f0ff;
    --pastel-yellow: #fdedb9;
    --pastel-peach: #ffdbcc;
    --pastel-gray: #f5f6fa;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    
    /* Border Radius (Soft 3D look) */
    --radius-large: 35px;
    --radius-medium: 20px;
    --radius-pill: 50px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(-45deg, #c4dcfc, #e2f0fd, #e9dcf8, #d4f0ff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    background-color: var(--bg-color); /* Fallback */
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs (Soft, matching the gradient) */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #ffffff;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #a3cfff;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mouse Glow Effect */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    opacity: 0;
}

/* Navigation (Glass Pill) */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--glass-shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 2rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

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

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Glassmorphism Cards (Smart App Style) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

.glass-card h3 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 5rem 2rem;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

.location-badge {
    margin-top: 2.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--pastel-gray);
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
}

/* Buttons (Dark Pill) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--primary-dark);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-dark);
    margin: 0 0.5rem;
    box-shadow: 0 8px 20px rgba(39, 30, 58, 0.2);
}

.btn:hover {
    background: #1a1427;
    border-color: #1a1427;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 30, 58, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    box-shadow: none;
}

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

/* Education & Skills */
.mt-4 {
    margin-top: 2rem;
}

.education-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.education-item p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.year-badge {
    display: inline-block;
    background: var(--pastel-gray);
    color: var(--text-main);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--pastel-gray);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: var(--primary-dark);
    color: white;
}

/* Timeline (Pengalaman Kerja) */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-dark);
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e2e8f0;
}

.timeline-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.timeline-content h5 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
}

/* Projects Grid (Smart App Device Grid) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Project Card Soft Colors */
.project-card {
    border-radius: var(--radius-medium);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.card-purple { background: var(--pastel-purple); }
.card-blue { background: var(--pastel-blue); }
.card-yellow { background: var(--pastel-yellow); }
.card-peach { background: var(--pastel-peach); }
.card-gray { background: var(--pastel-gray); }

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.project-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.project-info p {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.5);
}

/* Smart Toggle Switch inside Card */
.smart-toggle {
    position: absolute;
    top: 1.8rem;
    right: 1.8rem;
    width: 40px;
    height: 22px;
    background: var(--text-main);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 2px;
}

.smart-toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    margin-left: auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin-top: 4rem;
    background: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-nav {
        width: 95%;
        padding: 1rem;
        top: 10px;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .btn {
        margin: 0;
    }
    .glass-card {
        padding: 2rem;
    }
}

/* Animations & Alive Effects */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Pulse effect for main buttons */
@keyframes soft-pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 30, 58, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(39, 30, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 30, 58, 0); }
}

.btn-pulse {
    animation: soft-pulse 2s infinite;
}

/* Typing effect for subtitle */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-dark);
    animation: typing 3s steps(40, end), blink-caret .75s step-end infinite;
    display: inline-block;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-dark); }
}
