/* RESET DAN GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: #fff;
    background: #0a0a1a;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Semua elemen non-cursor */
body *:not(.cursor):not(.cursor-dot):not(.cursor-circle) {
    cursor: none !important;
}

/* BACKGROUND STYLES */
#bg-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, 
        #000428 0%, 
        #004e92 25%, 
        #0a0a1a 50%, 
        #001233 75%, 
        #000428 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Grid Lines */
.grid-lines {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 100, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 100, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.3;
}

/* PARTICLE CONTAINER - HARUS DIBAWAH CURSOR */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* HEADER */
header {
    padding: 80px 10% 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5rem;
    color: #00ccff;
    text-shadow: 
        0 0 20px #00ccff,
        0 0 40px #0066ff,
        0 0 60px #0066ff;
    margin-bottom: 10px;
    animation: glowText 3s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

header p {
    margin-top: 10px;
    font-size: 1.4rem;
    color: #a3e4ff;
    text-shadow: 0 0 10px rgba(163, 228, 255, 0.5);
}

/* SECTIONS */
section {
    padding: 60px 10%;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #00ccff;
    text-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #00ccff, transparent);
    border-radius: 2px;
}

/* PROFILE SECTION */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 204, 255, 0.1);
    transition: all 0.5s ease;
}

.profile-section:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.7),
        inset 0 0 40px rgba(0, 204, 255, 0.2);
}

.profile-image {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(0, 204, 255, 0.3);
    transition: all 0.5s ease;
}

.profile-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.profile-image:hover img {
    transform: scale(1.1);
}

.profile-info h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #00ccff;
    text-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
}

.profile-info .title {
    font-size: 1.4rem;
    color: #80d4ff;
    margin-bottom: 25px;
    display: block;
    font-weight: 600;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 40, 80, 0.3);
    border-radius: 12px;
    border-left: 3px solid #00ccff;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(0, 60, 120, 0.5);
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.detail-item i {
    color: #00ccff;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

/* TEMPLATE 2: CENTER PROFILE */
.profile-center {
    text-align: center;
    margin-bottom: 80px;
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 60px 40px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 204, 255, 0.1);
}

.profile-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 40px;
    border: 5px solid rgba(0, 204, 255, 0.3);
    box-shadow: 
        0 0 50px rgba(0, 204, 255, 0.5),
        inset 0 0 30px rgba(0, 204, 255, 0.2);
    transition: all 0.5s ease;
}

.profile-circle:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 80px rgba(0, 204, 255, 0.8),
        inset 0 0 40px rgba(0, 204, 255, 0.3);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-badge {
    display: inline-block;
    background: linear-gradient(45deg, rgba(0, 102, 255, 0.3), rgba(0, 204, 255, 0.3));
    padding: 12px 30px;
    border-radius: 30px;
    margin: 20px 0;
    border: 2px solid rgba(0, 204, 255, 0.4);
    font-weight: 600;
    color: #a3e4ff;
    text-shadow: 0 0 10px rgba(163, 228, 255, 0.5);
}

/* TEMPLATE 3: CARD PROFILE */
.profile-card {
    display: flex;
    flex-direction: column;
    background: rgba(0, 20, 40, 0.8);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(0, 204, 255, 0.1);
    margin-bottom: 80px;
    transition: all 0.5s ease;
}

.profile-card-header {
    padding: 50px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 60, 180, 0.3), rgba(0, 204, 255, 0.2));
    border-bottom: 2px solid rgba(0, 204, 255, 0.3);
}

.profile-card-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 30px;
    border: 5px solid rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 40px rgba(0, 204, 255, 0.4);
}

.profile-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-body {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-box {
    background: rgba(0, 40, 120, 0.3);
    padding: 30px;
    border-radius: 20px;
    border-left: 5px solid #00ccff;
    transition: all 0.4s ease;
}

.info-box:hover {
    transform: translateY(-10px);
    background: rgba(0, 60, 150, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ABOUT, SKILLS, PROJECTS */
.about, .skills, .projects {
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 204, 255, 0.1);
    transition: all 0.5s ease;
}

.skills ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    list-style: none;
}

.skills li {
    background: linear-gradient(45deg, rgba(0, 80, 200, 0.3), rgba(0, 204, 255, 0.2));
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(0, 150, 255, 0.3);
    transition: all 0.4s ease;
    font-weight: 600;
    color: #a3e4ff;
}

.skills li:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 150, 255, 0.4);
}

.projects .card {
    background: rgba(0, 60, 180, 0.2);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    border: 2px solid rgba(63, 169, 245, 0.2);
}

.projects .card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 150, 255, 0.4);
    border-color: #00ccff;
}

/* SOCIAL LINKS */
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 80, 200, 0.3);
    border-radius: 50%;
    color: #a3e4ff;
    font-size: 1.8rem;
    transition: all 0.4s ease;
    border: 2px solid rgba(0, 204, 255, 0.3);
}

.social-links a:hover {
    color: #fff;
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 204, 255, 0.4);
    background: linear-gradient(45deg, #00ccff, #0066ff);
}

/* TEMPLATE TOGGLE */
.template-toggle {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.template-btn {
    background: linear-gradient(45deg, rgba(0, 80, 200, 0.3), rgba(0, 204, 255, 0.2));
    color: #a3e4ff;
    border: 2px solid rgba(0, 204, 255, 0.3);
    padding: 15px 30px;
    border-radius: 30px;
    cursor: none;
    transition: all 0.4s ease;
    font-weight: 600;
    font-size: 1.1rem;
}

.template-btn.active {
    background: linear-gradient(45deg, rgba(0, 102, 255, 0.4), rgba(0, 204, 255, 0.3));
    color: #fff;
    border-color: #00ccff;
    box-shadow: 0 10px 30px rgba(0, 204, 255, 0.3);
    transform: translateY(-5px);
}

.template-btn:hover {
    background: linear-gradient(45deg, rgba(0, 102, 255, 0.4), rgba(0, 204, 255, 0.3));
    color: #fff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 204, 255, 0.4);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 60px 40px;
    font-size: 1rem;
    color: #80d4ff;
    background: rgba(5, 15, 40, 0.9);
    border-top: 2px solid rgba(0, 204, 255, 0.2);
}

/* ANIMATIONS */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glowText {
    from { text-shadow: 0 0 20px #00ccff, 0 0 40px #0066ff, 0 0 60px #0066ff; }
    to { text-shadow: 0 0 25px #00ccff, 0 0 50px #0066ff, 0 0 75px #0066ff; }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .profile-section {
        grid-template-columns: 1fr;
    }
    
    .profile-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Header & Font Sizing */
    header h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    header {
        padding: 60px 20px 30px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Reset cursor for touch devices */
    body *:not(.cursor):not(.cursor-dot):not(.cursor-circle) {
        cursor: auto !important;
    }

    /* LAYOUT FIXES: Force vertical stack and containment */
    .profile-section, 
    .profile-details, 
    .profile-card-body, 
    .skills ul {
        grid-template-columns: 1fr !important;
        display: grid;
        width: 100%;
        gap: 20px;
    }

    section {
        padding: 40px 0; /* Remove horizontal padding from section */
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        width: 100%;
    }

    /* Card Content Fixes */
    .profile-section, .profile-center, .profile-card, .about, .skills, .projects {
        padding: 25px 15px; /* Reduce internal padding */
        width: 100%;
        margin: 0 auto 30px;
        box-sizing: border-box;
    }

    /* Image Sizing */
    .profile-circle {
        width: 200px;
        height: 200px;
    }

    .profile-card-img {
        width: 150px;
        height: 150px;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Template Toggle Buttons */
    .template-toggle {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .template-btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 10px;
    }

    /* TEXT OVERFLOW PROTECTION */
    h1, h2, h3, h4, p, a, span, li, div, .detail-item {
        overflow-wrap: break-word;
        word-break: break-word;
        word-wrap: break-word; /* Legacy support */
        hyphens: auto;
        max-width: 100%;
    }
}