/* ========== GLOBAL VARIABLES ========== */
:root {
    --bg-color: #f7f9fc;
    --text-main: #2d3748;
    --text-muted: #718096;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    --glass-shadow-hover: 0 25px 45px rgba(8, 15, 30, 0.08);
    --primary-color: #4299e1;
    --primary-light: #ebf8ff;
    --accent: #ed8936;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ========== RESET & TYPOGRAPHY ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #1a202c;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== LIQUID GLASS & FLOATING LOGIC ========== */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.floating-element {
    transition: var(--transition-smooth);
    will-change: transform, box-shadow;
}

.floating-element:hover, .smooth-hover:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--glass-shadow-hover);
}

/* ========== BACKGROUND ANIMATIONS ========== */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(60px);
    z-index: 0;
    border-radius: 50%;
    animation: moveBlob 20s infinite alternate ease-in-out;
}

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

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

.blob-3 {
    width: 300px;
    height: 300px;
    background: #f0f4f8;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes moveBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 150px) scale(1.2); }
    100% { transform: translate(-50px, 80px) scale(0.9); }
}

/* Floating Programming Logos */
.floating-icon {
    position: absolute;
    font-size: 3rem;
    color: rgba(160, 174, 192, 0.2); /* Sangat pudar */
    animation: floatIcon linear infinite;
    z-index: 1;
}

/* We will assign random positions in JS, but let's define the keyframe */
@keyframes floatIcon {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20vh) rotate(360deg); opacity: 0; }
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 100;
    border-radius: 50px; /* Pill shape */
}

.nav-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2b6cb0, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px;
}

.section {
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2d3748;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== HERO / LINK TREE ========== */
.hero-section {
    align-items: center;
}

.profile-card {
    text-align: center;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
}

.profile-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #e2e8f0, #ffffff);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

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

.profile-name {
    font-size: 2rem;
    margin-bottom: 10px;
}

.profile-bio {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.link-tree {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.link-btn i, .link-btn svg {
    font-size: 1.2rem;
}

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

.card {
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========== PORTFOLIO SINGLE PREMIUM WIDGET ========== */
.portfolio-grid {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.portfolio-grid .card {
    width: 100%;
    max-width: 380px;
    border-radius: 35px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    background: rgba(43, 108, 176, 0.05); /* Sedikit aksen warna agar tidak mati */
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06);
}

.portfolio-grid .card-img {
    width: 100%;
    height: 320px;
    border-radius: 25px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.portfolio-grid .card-content {
    padding: 25px 15px 10px;
    text-align: center;
}

.portfolio-grid .card-content h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.portfolio-grid .tags {
    justify-content: center;
    margin-top: 15px;
}

/* ========== ACTIVITIES TIMELINE ========== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(203, 213, 224, 0.5);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 35px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(66, 153, 225, 0.2);
}

.time {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-item h4 {
    margin-bottom: 5px;
}

/* ========== MARKET SECTION ========== */
.product-card {
    text-align: center;
    padding: 40px 25px;
}

.product-icon {
    font-size: 4rem;
    color: #2b6cb0;
    margin-bottom: 20px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2f855a;
    margin-bottom: 15px;
}

.btn-buy {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    padding: 12px 25px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

.btn-buy:hover {
    background: #fff;
    color: var(--primary-color);
}

/* ========== PAYMENT MODAL (CLAIDEX) ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    padding: 30px;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-header h3::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
}

.total-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 10px 0 25px;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 25px;
}

.method-btn {
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.6);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.method-btn:hover, .method-btn.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.method-btn:nth-child(3) {
    grid-column: span 2;
}

.btn-confirm {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4299e1, #3182ce) !important;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.btn-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(66, 153, 225, 0.3);
}

.loading-animation {
    text-align: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(66, 153, 225, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

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

/* ========== FOOTER ========== */
footer {
    margin-top: 50px;
}
.doc-footer {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        margin-left: 40px;
    }
    .timeline-item::before {
        left: -26px;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 350px;
    }
    .portfolio-grid .card:nth-child(1),
    .portfolio-grid .card:nth-child(2),
    .portfolio-grid .card:nth-child(3) {
        grid-column: span 1;
        grid-row: span 1;
    }
}
