* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #7c3aed;
    --dark-purple: #5b21b6;
    --deep-purple: #4c1d95;
    --light-purple: #a78bfa;
    --soft-pink: #f0abfc;
    --pink: #d946ef;
    --dark-bg: #1e1b4b;
    --very-dark-purple: #2e1065;
    --text-light: #f3f4f6;
    --text-gray: #d1d5db;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2e1065 0%, #5b21b6 40%, #7c3aed 70%, #d946ef 100%);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Lightning Canvas */
.lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
}

/* Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #f0abfc 0%, #d946ef 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #f0abfc, 0 0 20px #d946ef;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(var(--drift)) scale(1);
        opacity: 0;
    }
}

/* Electric Aura */
.electric-aura {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    margin: -300px 0 0 -300px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    background: radial-gradient(circle, #d946ef 0%, #a855f7 30%, transparent 70%);
    border-radius: 50%;
    animation: pulse-aura 4s ease-in-out infinite;
    filter: blur(60px);
}

@keyframes pulse-aura {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.25;
    }
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    mix-blend-mode: screen;
    animation: blob 10s infinite ease-in-out;
}

.blob-1 {
    background: #7c3aed;
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: #d946ef;
    top: -10%;
    right: -10%;
    animation-delay: 3s;
}

.blob-3 {
    background: #a78bfa;
    bottom: -10%;
    left: 50%;
    animation-delay: 6s;
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -80px) scale(1.2);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.8);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(46, 16, 101, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--soft-pink), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    color: var(--light-purple);
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border-radius: 0.7rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    display: block;
}

.nav-link:hover {
    background: rgba(124, 58, 237, 0.4);
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.6), rgba(217, 70, 239, 0.4));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Page Container - FIXED */
.page-container {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: 100vh;
}

.page {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: rotateY(90deg);
    transform-origin: left center;
    transition: none;
}

.page.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: rotateY(0deg);
    animation: pageFoldIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page.folding-out {
    animation: pageFoldOut 0.6s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes pageFoldIn {
    0% {
        transform: rotateY(90deg);
        opacity: 0;
    }
    60% {
        transform: rotateY(-8deg);
    }
    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes pageFoldOut {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: rotateY(-90deg);
        opacity: 0;
    }
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(46, 16, 101, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.page-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--soft-pink), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    font-weight: 700;
}

/* Home Page */
.hero-content {
    text-align: center;
    padding: 4rem 0;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: var(--soft-pink);
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
    font-weight: 500;
}

.name {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--soft-pink), var(--pink), var(--light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--light-purple);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1.2s ease;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    color: white;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.7);
}

.btn-secondary {
    background: transparent;
    color: var(--soft-pink);
    border: 2px solid var(--soft-pink);
}

.btn-secondary:hover {
    background: var(--soft-pink);
    color: var(--deep-purple);
    transform: translateY(-3px);
}

.hero-image {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* FRAME YANG BERPUTAR */
.image-frame {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    animation: rotate 20s linear infinite;
    box-sizing: border-box;
}

/* GLOW DI DALAM FRAME */
.image-glow {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--very-dark-purple),
        var(--deep-purple)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

/* GAMBAR */
.image-glow img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #000;
    
    /* BIKIN GAMBAR TETAP DIAM */
    animation: rotateReverse 20s linear infinite;
}

/* ROTASI */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ROTASI BALIK (ANTI MUTER) */
@keyframes rotateReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}


/* About Page */
.about-content {
    line-height: 1.8;
}

.about-intro {
    font-size: 1.4rem;
    color: var(--soft-pink);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-gray);
    font-size: 1.05rem;
}

.skills-section {
    margin-top: 3rem;
}

.skills-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--soft-pink);
    font-weight: 700;
}

.skills-grid {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    background: rgba(46, 16, 101, 0.5);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.skill-name {
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--light-purple);
    font-size: 1.1rem;
}

.skill-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--pink));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.5);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-purple), var(--pink));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -3.65rem;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pink);
    border: 4px solid var(--very-dark-purple);
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.7);
    z-index: 1;
}

.timeline-content {
    background: rgba(46, 16, 101, 0.5);
    padding: 2rem;
    border-radius: 1.2rem;
    border-left: 4px solid var(--pink);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
}

.institution {
    color: var(--soft-pink);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 1.05rem;
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.timeline-content li {
    color: var(--text-gray);
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

/* Projects Page */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(46, 16, 101, 0.5);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(124, 58, 237, 0.5);
    border-color: var(--pink);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        var(--deep-purple),
        var(--primary-purple),
        var(--pink)
    );
}

/* GAMBAR PROJECT */
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* OVERLAY */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* HOVER */
.project-card:hover .project-overlay {
    opacity: 1;
}

/* BUTTON */
.project-btn {
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, var(--soft-pink), var(--pink));
    color: white;
    border: none;
    border-radius: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.project-btn:hover {
    transform: scale(1.1);
}


.project-info {
    padding: 1.8rem;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: white;
    font-weight: 700;
}

.project-info p {
    color: var(--text-gray);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(124, 58, 237, 0.4);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--soft-pink);
    font-weight: 600;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--soft-pink);
    font-weight: 700;
}

.contact-info p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.3rem;
    background: rgba(46, 16, 101, 0.5);
    border-radius: 1rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: var(--pink);
}

.contact-icon {
    width: 50px;
    height: 50px;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    border-radius: 0.8rem;
    stroke-width: 2px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: white;
    font-weight: 700;
}

.contact-item p {
    margin: 0;
    color: var(--light-purple);
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 16, 101, 0.5);
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-purple), var(--pink));
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(217, 70, 239, 0.5);
}

.social-link svg {
    width: 28px;
    height: 28px;
    color: white;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.form-group label {
    color: var(--soft-pink);
    font-weight: 700;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background: rgba(46, 16, 101, 0.5);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.8rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(167, 139, 250, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.4);
    background: rgba(46, 16, 101, 0.7);
}

/* Responsive Design */
@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        background: rgba(46, 16, 101, 0.98);
        backdrop-filter: blur(20px);
        padding: 6rem 2rem 2rem;
        gap: 0;
        transform: translateX(-100%);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-link {
        padding: 1.2rem;
        text-align: center;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .content-wrapper {
        padding: 2rem 1.5rem;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .name {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }

    .timeline {
        padding-left: 2.5rem;
    }

    .timeline-dot {
        left: -3.3rem;
        width: 20px;
        height: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .image-frame {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }

    .page {
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .name {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }

    .content-wrapper {
        padding: 1.5rem 1.2rem;
        border-radius: 1.5rem;
    }
    
    .greeting {
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
    
    .skills-section h3,
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    .image-frame {
        width: 200px;
        height: 200px;
    }
}