/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0e12;
}
::-webkit-scrollbar-thumb {
    background: #FFD51E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ffe266;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

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

body {
    background: #0d0e12;
    color: #ffffff;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

.container {
    padding: 0 8%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Section & Particles */
#header {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #1c202b 0%, #0d0e12 100%), url('images/background.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 100px;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Sticky Nav Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 20, 26, 0.95);
    backdrop-filter: blur(12px);
    padding: 20px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 35px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: #FFD51E;
}

.navbar ul {
    display: flex;
    align-items: center;
}

.navbar ul li {
    display: inline-block;
    list-style: none;
    margin: 0 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    position: relative;
    transition: all 0.35s ease;
}

.navbar ul li a:hover, .navbar ul li a.active-menu {
    color: #FFD51E;
}

.navbar ul li a::after {
    content: '';
    width: 0;
    height: 3px;
    background: #FFD51E;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: all 0.35s ease;
    border-radius: 2px;
}

.navbar ul li a:hover::after, .navbar ul li a.active-menu::after {
    width: 100%;
}

.menu-btn, .close-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
}

/* Hero Section */
.header-text {
    margin: auto 0;
    padding: 140px 0 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.role-text {
    color: #ffffff;
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.cursor-blink {
    font-weight: 500;
    color: #FFD51E;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.author-name {
    font-size: 95px;
    font-weight: 800;
    line-height: 1.1;
    color: #FFD51E;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.header-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.35s ease;
    border: none;
    position: relative;
    z-index: 2;
}

.primary-btn {
    background: #FFD51E;
    color: #0f0f0f;
    box-shadow: 0 4px 20px rgba(255, 213, 30, 0.25);
}

.primary-btn:hover {
    background: #ffe266;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 213, 30, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* Titles */
.sub-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.sub-title3 {
    font-size: 48px;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
}

/* About Section */
#about {
    background: #151821;
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.about-1 { flex-basis: 38%; }

.img-wrapper {
    position: relative;
    border-radius: 20px;
}

.about-1 img {
    width: 100%;
    border-radius: 20px;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 2;
    transition: all 0.35s ease;
}

.img-border {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid #FFD51E;
    border-radius: 20px;
    z-index: 1;
    transition: all 0.35s ease;
}

.about-2 { flex-basis: 56%; }

.sub-title2 {
    font-size: 17px;
    font-weight: 400;
    color: #a1a1a1;
    line-height: 1.8;
    margin-bottom: 25px;
}

.sub-title2 span {
    color: #FFD51E;
    font-weight: 600;
}

/* Stats Counter */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 12px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 213, 30, 0.4);
}

.stat-box h3 {
    font-size: 26px;
    font-weight: 800;
    color: #FFD51E;
    margin-bottom: 4px;
}

.stat-box p {
    font-size: 13px;
    color: #a1a1a1;
    font-weight: 500;
}

.tab-titles {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
}

.tab-links {
    background: transparent;
    border: none;
    color: #a1a1a1;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.35s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-links:hover, .tab-links.active-links {
    color: #FFD51E;
    background: rgba(255, 213, 30, 0.08);
}

.tab-contents {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-contents.active-tabs { display: block; }

.tab-contents ul li {
    list-style: none;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.6;
}

.tab-contents ul li i {
    color: #FFD51E;
    margin-right: 8px;
}

.tab-contents ul li span {
    color: #FFD51E;
    font-size: 14px;
    font-weight: 600;
}

/* Tools Section */
#tools {
    padding: 100px 0;
    background: #0d0e12;
    text-align: center;
}

.tools-group {
    margin-bottom: 45px;
}

.tools-cat-title {
    font-size: 22px;
    font-weight: 600;
    color: #FFD51E;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.tool-card {
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px 20px;
    width: 160px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; 
}

.tool-card:hover {
    border-color: rgba(255, 213, 30, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tool-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
}

.tool-card span {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

/* Portfolio Section */
#portfolio {
    background: #151821;
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 45px;
}

.filter-btn {
    background: #1c202b;
    color: #a1a1a1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.35s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    transition: all 0.35s ease;
}

.filter-btn:hover {
    background: #1c202b;
    color: #ffffff;
    border-color: rgba(255, 213, 30, 0.4);
}

.filter-btn.active {
    background: #FFD51E;
    color: #0f0f0f;
    border-color: #FFD51E;
    font-weight: 600;
}

.filter-btn.active .count-badge {
    background: rgba(0, 0, 0, 0.2);
    color: #0f0f0f;
}

.work-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    width: 100%;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.work-list.fade-out {
    opacity: 0;
    transform: scale(0.97);
}

.work {
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4 / 5;
    width: calc((100% - (18px * 5)) / 6);
    box-sizing: border-box;
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.work:hover img {
    transform: scale(1.05);
}

.work:hover {
    border-color: rgba(255, 213, 30, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.media-link-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: #FFD51E;
    color: #0f0f0f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.35s ease;
    z-index: 10;
}

.media-link-btn:hover {
    transform: scale(1.15);
    background: #ffffff;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-img-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 90vh;
}

.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #ffffff;
    font-size: 17px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: #FFD51E;
    color: #0f0f0f;
}

.show-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 45px;
    width: 100%;
}

/* Contact Section */
#contact {
    padding: 100px 0 0;
    background: #0d0e12;
}

.contact-desc {
    color: #a1a1a1;
    margin-bottom: 30px;
    font-size: 16px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.info-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 28px;
    border-radius: 14px;
    transition: all 0.35s ease;
}

.info-card p {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    word-break: break-all;
}

.info-link-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    flex-grow: 1;
}

.info-link-wrapper i {
    font-size: 28px;
    color: #FFD51E;
}

.info-link-wrapper small {
    color: #a1a1a1;
    font-size: 17px;
    display: block;
    margin-bottom: 2px;
}

.info-link-wrapper p {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #a1a1a1;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
}

.copy-btn:hover {
    color: #FFD51E;
    background: rgba(255, 255, 255, 0.05);
}

.copy-btn.copied::after {
    content: "Copied!";
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD51E;
    color: #0f0f0f;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    animation: fadeInTooltip 0.2s ease;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.social-icon {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-icon a {
    width: 48px;
    height: 48px;
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.35s ease;
}

.social-icon a:hover {
    background: #FFD51E;
    color: #0f0f0f;
    border-color: #FFD51E;
    transform: translateY(-4px);
}

.cv-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cv-btn {
    background: #FFD51E;
    color: #0f0f0f;
    font-size: 14px;
    padding: 12px 20px;
}

.cv-btn:hover {
    background: #ffffff;
}

.form-wrapper {
    background: #1c202b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
}

.form-wrapper h3 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
}

.input-group {
    margin-bottom: 25px;
}

form input, form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    outline: none;
    background: #0d0e12;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.35s ease;
}

form input:focus, form textarea:focus {
    border-color: #FFD51E;
}

.submit-btn { width: 100%; }

.form-toast {
    margin-top: 15px;
    padding: 12px 16px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.form-toast.show-toast {
    opacity: 1;
    visibility: visible;
}

.copyright {
    width: 100%;
    text-align: center;
    padding: 30px 0;
    background: #0d0e12;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 80px;
    color: #a1a1a1;
    font-size: 14px;
}

.copyright span {
    color: #FFD51E;
    font-weight: 600;
}

/* Halaman Gallery: Masonry Kolom */
.gallery-page-section {
    padding: 110px 15px 80px 15px;
    background: #0d0e12;
    min-height: 80vh;
    width: 100%;
}

.gallery-full-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.gallery-justified-row {
    column-count: 4;
    column-gap: 15px;
    width: 100%;
}

.gallery-row-item {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border-radius: 8px;
    break-inside: avoid;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-row-item:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

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

/* Responsif Layar */
@media only screen and (max-width: 1200px) {
    .work { width: calc((100% - (18px * 2)) / 3); }
    .gallery-justified-row { column-count: 3; }
    .author-name { font-size: 60px; }
}

@media only screen and (max-width: 992px) {
    .work { width: calc((100% - 18px) / 2); }
    .row { flex-direction: column; }
    .about-1, .about-2 { flex-basis: 100%; }
}

@media only screen and (max-width: 768px) {
    .container { padding: 0 5%; width: 100%; box-sizing: border-box; }
    .navbar { padding: 15px 5%; width: 100%; box-sizing: border-box; }
    .author-name { font-size: 44px; word-break: break-word; }
    .role-text { font-size: 24px; }
    .header-text { padding: 120px 0 60px; width: 100%; }
    
    .work { width: 100%; }
    .gallery-justified-row { column-count: 2; }

    .menu-btn, .close-btn { display: block; }
    
    .navbar ul {
        background: rgba(18, 20, 26, 0.95);
        position: fixed;
        top: 0;
        right: -240px;
        width: 240px;
        height: 100vh;
        padding-top: 70px;
        z-index: 200;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar ul li {
        display: block;
        margin: 20px 30px;
    }

    .navbar ul .close-btn {
        position: absolute;
        top: 25px;
        left: 30px;
    }
}
/* Tambahan perbaikan khusus agar layar HP tidak bisa digeser ke samping (no horizontal scroll) */
@media only screen and (max-width: 768px) {
    body, html {
        max-width: 100vw;
        overflow-x: hidden !important;
    }
    .tool-card {
        width: calc(50% - 10px);
        max-width: 160px;
    }
    .tools-grid {
        gap: 12px;
        padding: 0 10px;
    }
}

/* Perbaikan khusus Mobile: Hapus scrollbar kuning & perbaiki teks agar tidak kepotong */
@media only screen and (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 0px !important;
        background: transparent !important;
    }
    body {
        scrollbar-width: none !important; /* Firefox */
    }
    .about-2 {
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }
    .sub-title2 {
        font-size: 15px;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .stats-container {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Perbaikan Total untuk Tampilan HP (Mobile Responsiveness v2) */
@media only screen and (max-width: 768px) {
    /* 1. Tab titles bisa di-scroll ke samping dengan rapi tanpa bikin layar ikut bergeser */
    .tab-titles {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .tab-titles::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .tab-links {
        flex-shrink: 0;
        font-size: 15px;
        padding: 6px 14px;
    }

    /* 2. Email agar full sebaris tidak terpotong 2 baris */
    .info-card p, .info-link-wrapper p {
        font-size: 13.5px !important;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .info-card {
        padding: 16px 18px;
    }

    /* 3. Logo IG dan LinkedIn jadi center */
    .social-icon {
        justify-content: center !important;
        width: 100%;
    }
}

/* Perbaikan Tambahan Khusus HP: Tombol CV Center & Hapus Shadow/Border Absolute di About Me */
@media only screen and (max-width: 768px) {
    .cv-buttons {
        justify-content: center !important;
        width: 100%;
    }
    .img-border {
        display: none !important; /* Menghilangkan border absolute yang bikin shadow/garis hitam di kanan */
    }
    .about-1 {
        padding: 0 10px;
        box-sizing: border-box;
    }
}