:root {
    --primary-color: #58a6ff;
    --secondary-color: #00eaff;
    --background-color: #0b1520;
    --card-background: #11202E;
    --text-color: #cfd9e8;
}

body {
    background: #0b1520;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;  
}

/* NAVBAR */
nav {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(4, 21, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
}

nav a {
    color: #cfd9e8;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    position: relative;
    transition: 0.3s;
}

/* Hover Neon */
nav a:hover {
    color: #58a6ff;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #58a6ff;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
}

nav a:hover::after {
    width: 100%;
    opacity: 1;
    visibility: visible;
}

.lang-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 12px 18px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    width: fit-content;
    transition: all 0.3s ease;
}

.lang-box:hover {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 10px rgba(237, 233, 233, 0.829);
    transform: translateY(-5px);
}

.lang-box img {
    width: auto;
    height: 20px;
    object-fit: contain;
    border-radius: 3px; 
}

#langLabel {
    font-weight: 500;
}

/* Select disembunyikan, tapi tetap berfungsi */
#langSwitcher {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Panah dropdown */
.lang-box::after {
    content: "▼";
    position: static;
    right: 15px;
    color: white;
    font-size: 14px;
    pointer-events: none;
}

/* ------------------- ABOUT ME ------------------- */
.about-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 100px;
    gap: 40px;
    margin-top: 120px;
}

.about-text {
    max-width: 600px;
}

.about-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.about-photo {
    width: 350px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.5);
    transition: 0.5s ease-in-out;
}

.about-photo:hover {
    transform: translateY(-10px) scale(1.05);
}

#element {
    font-size: 28px;
    font-weight: 600;
    color: #00eaff;
    border-right: 3px solid #00eaff;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    min-width: 0;
    margin: 0.5px 0;
    animation: element 0.7s infinite;
}

@keyframes element {
    0%, 100% { border-color: #00eaff; }
    50% { border-color: transparent; }
}

.floating-button {
            margin-top: 30px;
        }
        
        .scroll-down-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 12px 24px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-decoration: none;
            border-radius: 50px;
            transition: all 0.3s ease;
            animation: bounce 2s infinite;
        }
        
        .scroll-down-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
        }
        
        .scroll-down-btn span {
            animation: upDown 1s infinite alternate;
        }
        
        /* Keyframe Animations */
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 0.8; }
            50% { opacity: 1; }
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }
        
        @keyframes glow {
            0% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        
        @keyframes gradient {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes slideIn {
            from { transform: translateX(-20px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        @keyframes upDown {
            0% { transform: translateY(0); }
            100% { transform: translateY(-5px); }
        }

/* ------------------- PROJECTS ------------------- */
.projects {
    text-align: center;
    padding: 80px 60px;
}

.projects h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.projects-sub {
    max-width: 900px;
    opacity: 0.8;
    margin: 0 auto 60px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: #11202E;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(88, 166, 255, 0.4);
    border-radius: 20px;
}

.project-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .card-body .link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.project-card .card-body .link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 234, 255, 0.4);
}

.card-body {
    padding: 20px;
    text-align: left;
}

.tag {
    color: #58a6ff;
    font-size: 12px;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 10px;
}

.meta {
    display: flex;
    justify-content: space-between;
    opacity: 0.7;
    margin-top: 15px;
    font-size: 14px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 60px 20px;
    background: #081c31;
    font-size: 14px;
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.container-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.footer a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #00eaff;
    text-decoration: underline;
}

.socialmedia {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.socialmedia a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(88, 166, 255, 0.1);
    transition: all 0.3s ease;
}

.socialmedia a:hover {
    background: rgba(79, 161, 255, 0.584);
    transform: translateY(-5px) scale(1.1);
}

.socialmedia svg {
    width: 20px;
    height: 20px;
    fill: #58a6ff;
    transition: fill 0.3s ease;
}

.socialmedia a:hover svg {
    fill: #00eaff;
}

.copyright {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 14px;
    text-align: center
}

/* ====== Hamburger Menu ====== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: none;
    border: none;
    padding: 10px;
}

.hamburger span {
    width: 30px;
    height: 3.5px;
    background: white;
    border-radius: 2px;
    transition: 0.3s ease;
    transform-origin: center;
}

/* Loding Scren */
.loading-screen {
   position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 3s ease, visibility 2s ease;
}

.loading-content {
text-align: center;
color: white;
}
        
        .loader {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 2s ease-in-out infinite;
            margin: 0 auto 20px;
        }
        
        .loading-text {
            font-size: 1.5rem;
            opacity: 0.8;
            animation: pulse 1.5s ease-in-out infinite;
        }

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.photo-container {
    position: relative;
    display: inline-block;
}

.floating-photo {
    animation: float 6s ease-in-out infinite;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(110, 183, 212, 0.3);
}

.floating-photo:hover {
    transform: scale(1.05);
}

.photo-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    border-radius: 20px;
    z-index: -1;
    animation: glow 3s ease-in-out infinite alternate;
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* amimasi */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Hp */
@media (max-width: 768px) {
    .hamburger {
    display: flex;
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
  }

    .menu {
        position: fixed;
        top: 70px; 
        right: 20px;
        width: 100%;
        background: rgba(17, 17, 17, 0.95);


    .menu a.highlight {
      background: rgba(88, 166, 255, 0.12);
      color: var(--secondary-color);
      border-radius: 8px;
      outline: none;
    }

    .menu a:focus {
      outline: none;
    }
        backdrop-filter: blur(10px);
        flex-direction: column;
        text-align: center;
        padding: 0;
        gap: 18px;
        box-sizing: border-box;
        z-index: 998;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.5s ease;
        display: flex; 
    }
    
 
    .menu.active {
        max-height: 500px;
        padding: 20px 0;
        opacity: 1;
        text-align: center;
    }
    

    .menu a {
        font-size: 16px;
        padding: 12px 0;
        display: block;
        width: 100%;
        text-align: center;
        color: #cfd9e8;
    }
    
    .menu a:hover {
        background: rgba(88, 166, 255, 0.1);
    }
    

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    .menu-overlay {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100% - 70px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 997;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    .about-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        margin-top: 90px;
        gap: 30px;
    }
    
    .about-text h1 {
        font-size: 32px;
    }
    
    #element {
        font-size: 28px;
        border-right: 4px solid #00eaff;
    }
    
    .about-photo {
        width: 80%;
        max-width: 300px;
    }
    
    .projects {
        padding: 40px 20px;
    }
    
    .projects h1 {
        font-size: 32px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    /* Footer */
    .footer {
        padding: 30px 15px;
    }
    
    .socialmedia {
        gap: 15px;
    }
    
    .copyright {
        font-size: 12px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .copyright {
        margin-top: 10px;
        opacity: 0.7;
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-text h1 {
        font-size: 24px;
    }

    #element {
        font-size: 20px;
        border-right: 2px solid #00eaff;
    }

    .about-photo {
        width: 100%;
        max-width: 250px;
    }

    .projects h1 {
        font-size: 24px;
    }

    .project-card .card-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    body {
    overflow-x: hidden;
  }

  section {
    padding: 60px 14px;
  }

  /* ===== NAVBAR ===== */
  nav {
    height: 64px;
    padding: 0 12px;
  }

  nav a {
    margin-left: 0;
    font-size: 15px;
  }

  /* ===== LANGUAGE SWITCH ===== */
  .lang-box {
    padding: 8px 12px;
    gap: 8px;
    font-size: 13px;
  }

  .lang-box img {
    height: 16px;
  }
}