@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --bg-dark: #0a0a0c;
    --text-white: #ffffff;
    --accent-color: #bb86fc;
    --overlay-color: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a0a0a;
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

main,
header,
section,
footer {
    position: relative;
    z-index: 1;
}

/* Navbar Styling */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hero {
    height: 100vh;
    width: 100%;
    background: linear-gradient(var(--overlay-color), var(--overlay-color)),
        url('images/dreamy_night.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.profile-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(187, 134, 252, 0.3);
    transition: transform 0.3s ease;
}

.profile-container:hover {
    transform: scale(1.05);
}

.profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    color: #e0e0e0;
}

.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

/* Animations */
.hero>* {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.profile-container {
    animation-delay: 0.2s;
}

.hero h1 {
    animation-delay: 0.4s;
}

.hero p {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Software & Tools Section */
.tools-section {
    padding: 40px 0;
    background-color: transparent;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tools-marquee {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.marquee-track {
    display: flex;
    gap: 40px;
    padding-left: 40px;
    animation: scroll-left 40s linear infinite;
    width: max-content;
}

/* Strict rule: No pause on hover, as requested */

.tool-card {
    flex: 0 0 100px;
    height: 100px;
    aspect-ratio: 1/1;
    background: #151518;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    cursor: default;
}

.tool-card:hover {
    background: rgba(187, 134, 252, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
    transform: translateY(-5px);
}

.tool-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Video Gallery Section with Swiper */
.gallery-section {
    padding: 100px 0 50px 0;
    background-color: transparent;
}

.tools-section h2,
.gallery-section h2,
.experience-section h2,
.education-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.gallery-section h2 {
    margin-bottom: 20px;
}

.sub-heading {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-white);
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 150px));
    justify-content: center;
    gap: 15px;
    padding: 0 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item-portrait {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.gallery-item-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Efek Hover Ajaib Video Gallery */
.video-gallery:has(.gallery-item-portrait:hover) .gallery-item-portrait:not(:hover) {
    -webkit-filter: grayscale(100%) blur(2px);
    filter: grayscale(100%) blur(2px);
}

.video-gallery .gallery-item-portrait:hover {
    -webkit-filter: grayscale(0) blur(0);
    filter: grayscale(0) blur(0);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(187, 134, 252, 0.4);
    z-index: 2;
    position: relative;
}

/* Videography Gallery Section */
.videography-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 15px;
    padding: 0 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.videography-gallery .gallery-item-landscape {
    width: 100%;
    max-width: 650px;
    aspect-ratio: 16 / 9;
}

.gallery-item-landscape {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.gallery-item-landscape img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Efek Hover Cerdas Videography Gallery */
.videography-gallery:has(.gallery-item-landscape:hover) .gallery-item-landscape:not(:hover) {
    -webkit-filter: grayscale(100%) blur(2px);
    filter: grayscale(100%) blur(2px);
}

.videography-gallery .gallery-item-landscape:hover {
    transform: scale(1.05);
    z-index: 2;
    -webkit-filter: grayscale(0) blur(0);
    filter: grayscale(0) blur(0);
    box-shadow: 0 10px 20px rgba(187, 134, 252, 0.4);
    position: relative;
}

/* Photography Gallery Section */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 0 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
}

/* Efek Hover Ajaib */
.photo-gallery:has(.gallery-item:hover) .gallery-item:not(:hover) {
    -webkit-filter: grayscale(100%) blur(2px);
    filter: grayscale(100%) blur(2px);
}

.photo-gallery .gallery-item:hover {
    filter: grayscale(0) blur(0);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(187, 134, 252, 0.4);
    z-index: 2;
    position: relative;
}

/* Modal Lightbox Photography */
.modal-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(187, 134, 252, 0.3);
}

.modal-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.3s ease;
    z-index: 10000;
}

.modal-lightbox .close-btn:hover {
    color: var(--accent-color);
}

/* More Works Button Section */
#more-works {
    padding: 30px 20px;
    margin: 0;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.drive-btn {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding: 15px 40px;
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    background-size: 200% auto;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.drive-btn:hover {
    transform: translateY(-3px);
    background-position: right center;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Timeline Experience Section */
.experience-section {
    padding: 80px 20px 40px 20px;
    margin: 0;
    background-color: transparent;
}

.education-section {
    padding: 40px 20px 40px 20px;
    margin: 0;
    background-color: transparent;
}

.timeline-container {
    max-width: 900px;
    margin: 50px auto 0;
    position: relative;
    padding-left: 50px;
}

/* Garis Tengah Timeline */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 5px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-color), rgba(187, 134, 252, 0.1));
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

/* Titik Timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    left: -42px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-content {
    background: #151518;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
    position: relative;
}

/* Company Logo in Timeline */
.company-logo {
    position: absolute;
    top: 30px;
    right: 30px;
    max-width: 60px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 10px;
}

.timeline-content:hover {
    transform: translateX(10px);
    background: #1a1a1f;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.timeline-date {
    display: inline-block;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: rgba(187, 134, 252, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.timeline-content .company {
    color: #aaa;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .timeline-container {
        padding-left: 40px;
    }

    .timeline-container::before {
        left: 7px;
    }

    .timeline-item::after {
        left: -42px;
    }
}

/* Contact Section */
.contact-section {
    padding: 40px 20px 100px 20px;
    background-color: transparent;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-section p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.social-btn {
    text-decoration: none;
    color: var(--text-white);
    background: #151518;
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid rgba(187, 134, 252, 0.2);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(187, 134, 252, 0.3);
}

/* Footer */
footer {
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: transparent;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    color: #666;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Video Modal / Lightbox */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 400px;
    /* Lebar maksimal cocok untuk rasio vertical 9:16 */
}

.close-modal {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.3s ease;
    z-index: 10000;
}

.close-modal:hover {
    color: var(--accent-color);
}

.iframe-container {
    width: 100%;
    padding-top: 177.78%;
    /* Aspect Ratio 9:16 -> (16/9)*100 */
    position: relative;
    background: #151518;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(187, 134, 252, 0.2);
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Flashlight Spotlight Reveal */
.flashlight-reveal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-image: url('images/mountain-bg-fixs.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    --x: 50vw;
    --y: 50vh;
    -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), black 0%, black 80px, transparent 350px);
    mask-image: radial-gradient(circle at var(--x) var(--y), black 0%, black 80px, transparent 350px);
}

/* ========================================= */
/* Media Queries untuk Tampilan Mobile (HP)  */
/* ========================================= */
@media (max-width: 768px) {

    .hero,
    .flashlight-reveal {
        background-position: 20% 50%;
    }

    /* Navbar Mobile */
    .navbar {
        padding: 15px 20px;
    }

    .logo img {
        height: 30px;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Efek X untuk Hamburger Menu */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px 0;
        gap: 20px;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);

        /* Smooth dropdown animation */
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    /* 1. Foto Profil */
    .profile-container {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        margin-bottom: 1.5rem;
    }

    .profile-container img {
        object-fit: cover;
    }

    /* 2. Tipografi (Teks & Judul) */
    .hero h1,
    .tools-section h2,
    .gallery-section h2,
    .experience-section h2,
    .education-section h2,
    .contact-section h2 {
        font-size: 28px;
    }

    .hero p,
    .timeline-content p,
    .contact-section p {
        font-size: 14px;
        max-width: 100%;
    }

    /* 3. Logo Tools/Aplikasi */
    .marquee-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px;
        padding-left: 20px;
        width: max-content;
        animation: scroll-left 40s linear infinite;
    }

    .tool-card {
        flex: 0 0 45px;
        height: 45px;
        padding: 10px;
    }

    /* 4. Tombol Drive */
    .drive-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Tombol Kontak (Mari Berkolaborasi) */
    .social-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .social-btn {
        padding: 10px 20px;
        min-width: 120px;
        flex: 1 1 30%;
        justify-content: center;
        /* Teks ke tengah */
    }

    .social-btn span {
        font-size: 14px;
    }

    /* Pangkas Jarak Antar Section */
    .tools-section,
    .gallery-section,
    .experience-section,
    .education-section,
    .contact-section,
    #more-works {
        padding: 40px 15px;
    }

    /* Video, Videography, & Photography Section Mobile Adjustments */
    .video-gallery,
    .videography-gallery,
    .photo-gallery {
        padding: 0 15px 15px 15px;
    }

    .video-gallery:has(.gallery-item-portrait:hover) .gallery-item-portrait:not(:hover),
    .videography-gallery:has(.gallery-item-landscape:hover) .gallery-item-landscape:not(:hover),
    .photo-gallery:has(.gallery-item:hover) .gallery-item:not(:hover) {
        -webkit-filter: none;
        filter: none;
    }

    .video-gallery .gallery-item-portrait:hover,
    .videography-gallery .gallery-item-landscape:hover,
    .photo-gallery .gallery-item:hover {
        -webkit-filter: none;
        filter: none;
        transform: none;
        box-shadow: none;
        z-index: auto;
        position: static;
    }

    .modal-lightbox .close-btn {
        top: 15px;
        right: 20px;
        font-size: 3.5rem;
        padding: 10px;
    }

    /* 5. Career Journey (Timeline) */
    .timeline-container {
        padding-left: 20px;
    }

    .timeline-container::before {
        left: 0px;
    }

    .timeline-item::after {
        left: -29px;
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        padding: 15px;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .company-logo {
        max-width: 40px;
        top: 15px;
        right: 15px;
        padding: 5px;
    }
}

/* ========================================= */
/* Media Queries khusus Layar Sangat Kecil (HP < 480px) */
/* ========================================= */
@media (max-width: 480px) {

    /* 1. Kunci Layar (Anti-Horizontal Scroll) */
    html,
    body {
        overflow-x: hidden;
        width: 100vw;
    }

    /* 2. Fluid Elements (Sistem Karet) */
    .timeline-content,
    .contact-container,
    .video-gallery,
    .videography-gallery,
    .hero {
        width: 100%;
        box-sizing: border-box;
    }

    /* 3. Foto Profil */
    .profile-container {
        width: 100px;
        height: 100px;
        border-radius: 50%;
    }

    .profile-container img {
        object-fit: cover;
    }

    /* 4. Teks & Jarak */
    .hero h1,
    .tools-section h2,
    .gallery-section h2,
    .experience-section h2,
    .education-section h2,
    .contact-section h2 {
        font-size: 26px;
    }

    .hero p,
    .timeline-content p,
    .contact-section p {
        font-size: 14px;
    }

    /* Kurangi padding vertikal & horizontal pada semua section */
    .tools-section,
    .gallery-section,
    .experience-section,
    .education-section,
    .contact-section,
    #more-works {
        padding: 30px 15px;
        box-sizing: border-box;
    }

    .hero {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* 5. Ikon Tools */
    .marquee-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 15px;
        padding-left: 15px;
    }

    .tool-card {
        flex: 0 0 35px;
        height: 35px;
        padding: 8px;
    }

    /* Tombol Kontak (Mari Berkolaborasi) di layar 480px */
    .social-links {
        gap: 8px;
    }

    .social-btn {
        padding: 8px 16px;
        min-width: 110px;
        flex: 1 1 30%;
    }

    .social-btn span {
        font-size: 13px;
    }

    /* Tombol Panah Swiper di HP kecil */
    .swiper-button-next {
        right: 5px !important;
        width: 35px !important;
        height: 35px !important;
    }

    .swiper-button-prev {
        left: 5px !important;
        width: 35px !important;
        height: 35px !important;
    }

    /* 6. Garis Timeline Career Journey */
    .timeline-container {
        padding-left: 30px;
    }

    .timeline-container::before {
        left: 10px;
    }

    .timeline-item::after {
        left: -29px;
        width: 14px;
        height: 14px;
        top: 8px;
    }
}