:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --dark: #111827;
    --light: #f9fafb;
    --gray: #9ca3af;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
}

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

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

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

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary);
}

.nav-link:hover:after {
    width: 100%;
}

.hero {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.highlight {
    color: var(--secondary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    transition: transform 0.5s ease;
}

.about-image {
    flex: 1;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    height: 400px;
}

.about-image:hover .profile-img {
    transform: scale(1.05);
}

.about-image-inner {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    /* Pusatkan item grid ketika sedikit */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.skill-card {
    background: linear-gradient(145deg, #1a1f2e, #111827);
    padding: 2rem 1rem;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
}

.skill-card:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
}

.skill-card:hover:before {
    left: 150%;
    top: 150%;
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-name {
    font-weight: 600;
    font-size: 1.2rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    background-color: #1e2233;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.project-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--secondary);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--secondary);
    color: var(--dark);
}

.social-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.social-item {
    text-align: center;
}

.social-link {
    display: inline-block;
    width: 80px;
    height: 80px;
    background-color: #1e2233;
    border-radius: 50%;
    line-height: 80px;
    font-size: 2rem;
    color: var(--light);
    transition: var(--transition);
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    transform: translateY(-10px) scale(1.1);
    color: var(--secondary);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.2);
}

.social-name {
    font-weight: 500;
    color: var(--gray);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #1e2233;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background-color: #2d3348;
    border: none;
    border-radius: 0.5rem;
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--secondary);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

footer {
    padding: 3rem 0;
    text-align: center;
    background-color: #0c111b;
}

.footer-text {
    color: var(--gray);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
}

/* Particles background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    display: block;
    pointer-events: none;
    opacity: 0.5;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }

    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        height: 100vh;
        width: 250px;
        background-color: var(--dark);
        flex-direction: column;
        padding: 4rem 2rem;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .about-image {
        height: 300px;
        width: 100%;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-card {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .social-container {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .skills-grid.many-items {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-image {
        height: 250px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}