:root {
    --bg-color: #f0f4f8;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --blob-1: #c4b5fd;
    --blob-2: #93c5fd;
    --blob-3: #fcd34d;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs for Glassmorphism pop */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: var(--blob-1);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background-color: var(--blob-2);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background-color: var(--blob-3);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

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

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Typography & Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.hero-text.glass-card {
    padding: 4rem 3rem;
}

.greeting {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.name {
    font-size: 4rem;
    font-weight: 700;
    margin: 0.5rem 0;
    background: linear-gradient(to right, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.bio {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.personal-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* About Section */
.tech-stack-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    font-weight: 600;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.tech-item:hover {
    transform: translateY(-5px);
    background: white;
}

.tech-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Projects Section */
.mt-5 {
    margin-top: 4rem;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
}

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

.category-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-note i {
    color: var(--primary-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
}

.project-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    flex-grow: 1;
}

/* Footer */
.glass-footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .name {
        font-size: 2.8rem;
    }
    
    .role {
        font-size: 1.5rem;
    }
    
    .hero-text.glass-card {
        padding: 2rem 1.5rem;
    }

    .nav-links {
        display: none; /* Simple approach for mobile */
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content-glass {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ef4444;
}

.modal-body {
    flex-grow: 1;
    padding: 0;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Preview Button */
.btn-preview {
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: inherit;
}

.btn-preview i {
    margin-right: 5px;
}

.btn-preview:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Timeline / Experience Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--blob-2));
    top: 0;
    bottom: 0;
    left: 20px;
    border-radius: 2px;
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 60px;
}

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

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    left: 12px;
    top: 25px;
    box-shadow: 0 0 0 5px var(--bg-color);
    z-index: 1;
}

.timeline-content {
    padding: 1.5rem 2rem;
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
}

.timeline-date {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.timeline-content strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }
    .timeline-dot {
        left: 7px;
    }
    .timeline-item {
        padding-left: 45px;
    }
}

/* Print / PDF Export Styles */
@media print {
    body {
        background: #f0f4f8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #000 !important;
    }
    
    /* Sembunyikan elemen dekoratif dan interaktif saat di-print */
    .blob, 
    .glass-nav,
    .btn-preview,
    #exportPdfBtn {
        display: none !important;
    }

    /* Pastikan section tidak terpotong sembarangan di tengah halaman */
    section {
        padding: 2rem 0 !important;
        page-break-inside: avoid;
    }

    .project-card, .timeline-item, .tech-item {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Hilangkan efek glass saat di-print agar teks lebih jelas terbaca */
    .glass-card {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Penyesuaian layout agar muat di kertas A4 */
    main {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}
