* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --footer-bg: transparent;
    --footer-fg: #ffffff;
    --footer-fg-dim: rgba(255, 255, 255, .85);
    --footer-accent: #ffffff;
    --footer-maxw: 1200px;
}


body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background: transparent !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #083d3b 0%, #0f8278 55%, #14b8a6 100%);
    transform: translateZ(0);
    will-change: transform;
}


body.no-scroll {
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .brand {
    margin-left: 0 !important;
    gap: .6rem;
}

.navbar .brand .back-btn {
    position: static !important;
    background: none !important;
    border: 0 !important;
    width: 28px;
    height: 28px;
    padding: 0;
    margin-right: .2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 0;
}

.navbar .brand .back-btn i {
    font-size: 24px;
    line-height: 1;
}

.navbar .brand .back-btn:hover {
    background: rgba(255, 255, 255, .12);
}

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

.navbar .back-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    padding: 0;
    color: #fff;
    border-radius: 6px;
    /* hanya untuk efek hover halus */
}

.navbar .back-btn i {
    font-size: 1.35rem;
    /* ~22px, pas di tengah slot 2rem */
    line-height: 1;
}

.navbar .back-btn:hover {
    background: rgba(255, 255, 255, .12);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.logo:hover {
    opacity: .9;
    text-decoration: none;
}

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

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: opacity .2s
}

.nav-links a:hover {
    opacity: .85
}

.main-content {
    margin-top: 95px;
    /* semula 80px */
    padding-top: 12px;
    /* beri ruang kecil saja */
}

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

.detail-header {
    text-align: center;
    margin-bottom: 2.1rem
}

.detail-header h1 {
    /* ukuran responsif + line-height rapat */
    font-size: clamp(2.25rem, 4vw, 3rem);
    line-height: 1.15;
    margin: 6px 0 10px;
    /* rapat ke atas & bawah */
    letter-spacing: .2px;
}

.detail-header .subtitle {
    max-width: 820px;
    /* agar baris tidak terlalu panjang */
    margin: 6px auto 16px;
    /* rapat ke heading, pendek ke bawah */
    opacity: .95;
    /* sedikit lebih jelas */
}

.skills-section {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.skills-section h1 {
    margin-bottom: 1.5rem;
    font-size: 2rem
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem
}

.skill-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px
}

.skill-item h3 {
    color: #4fd1c7;
    margin-bottom: .5rem
}

.projects-section {
    margin-bottom: 3rem
}

.projects-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: stretch;
    margin-top: 8px;
    /* semula “nempel” cukup tinggi */
    row-gap: 1.6rem;
}

.project-card {
    background: rgba(255, 255, 255, .10) !important;
    border-color: rgba(255, 255, 255, .20) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .30) !important;
}

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

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* <- rasio konsisten */
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #e6f7f5;
    /* fallback jika tanpa gambar */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    /* tampilan rapi seperti card certificate */
    border: 6px solid rgba(255, 255, 255, .85);
    /* bingkai putih bersih */
    position: relative;
    /* supaya tombol bisa absolute */
    overflow: hidden;
}

/* tombol panah di atas gambar */
.project-image .img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
}

.project-image .img-nav.left {
    left: 10px;
}

.project-image .img-nav.right {
    right: 10px;
}

.project-card:hover .project-image .img-nav {
    opacity: 1;
}

.container {
    padding: 0 14px;
}

/* muncul saat hover */
/* titik indikator */
.project-image .img-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    display: flex;
    gap: 6px;
}

.project-image .img-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
}

.project-image .img-dots .dot.active {
    background: #fff;
}

.project-card h3 {
    margin-bottom: .5rem;
    font-size: 1.5rem;
    color: #fff
}

.project-card p {
    color: rgba(255, 255, 255, .9);
    margin-bottom: 1rem
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem
}

.tech-tag {
    background: rgba(79, 209, 199, .3);
    color: #fff;
    padding: .3rem .8rem;
    border-radius: 20px;
    font-size: .8rem
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* tombol selalu di bawah */
.btn {
    background: linear-gradient(45deg, #4fd1c7, #667eea);
    color: #fff;
    padding: .5rem 1rem;
    text-decoration: none;
    border-radius: 25px;
    font-size: .9rem;
    transition: transform .2s;
}

.btn:hover {
    transform: translateY(-2px)
}

.btn-secondary {
    background: transparent;
    border: 2px solid #4fd1c7;
    color: #fff
}

.back-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: linear-gradient(45deg, #4fd1c7, #667eea);
    color: #fff;
    padding: 1rem;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    z-index: 1000;
    transition: transform .2s;
}

.back-btn:hover {
    transform: scale(1.1)
}

.chips {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
    /* semula .5rem */
    margin-bottom: 14px;
}

.chip {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox.open {
    display: grid;
    /* override rule sebelumnya yang pakai flex */
    grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
    align-items: center;
}

/* wadah gambar + caption */
.lb-body {
    grid-column: 2;
}

/* Frame untuk menjaga rasio 16:9 */
.lb-frame {
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

/* kartu caption */
.lb-caption {
    width: 100%;
    background: rgba(255, 255, 255, .96);
    color: #0f172a;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 1rem;
    max-height: 20vh;
    /* Batasi tinggi caption */
    overflow-y: auto;
    /* Tambah scroll jika konten terlalu panjang */
}

.lb-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.lb-tools .sep {
    width: 1px;
    height: 16px;
    background: #c7c7c7;
    margin: 0 4px;
}

.lb-tools button {
    background: #f1f5f9;
    /* slate-100 */
    border: 1px solid #cbd5e1;
    /* slate-300 */
    border-radius: 8px;
    padding: 4px 8px;
    font-size: .9rem;
    cursor: pointer;
}

.lb-tools button:hover {
    background: #e2e8f0;
}

.lb-text {
    font-size: 16px;
    /* default, bisa dioverride dari code */
    line-height: 1.55;
    word-break: break-word;
}


/* beri ruang untuk caption (kurangi tinggi maksimal gambar) */
#lbImg {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    /* Sesuaikan dengan lb-frame */
    height: auto;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.lb-caption::-webkit-scrollbar {
    width: 8px;
}

.lb-caption::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.lb-caption::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.lb-caption::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.lightbox button {
    position: absolute;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: transform .15s, background .15s;
    z-index: 2001;
}


.lightbox button:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, .6);
}

/* YANG BARU — samakan dengan ID di HTML */
#lbClose {
    top: 20px;
    right: 20px;
    position: absolute;
    z-index: 2002;
}

#lbPrev,
#lbNext {
    position: static;
    /* override absolute */
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    /* hilangkan translateY */
    margin: 0 8px;
    /* jarak kecil dari tepi gambar */
    width: 42px;
    height: 42px;
}

#lbPrev {
    grid-column: 1;
    justify-self: end;
}

#lbNext {
    grid-column: 3;
    justify-self: start;
}

#lbPrev:hover,
#lbNext:hover {
    background: rgba(0, 0, 0, .6);
}

/* footer section code */

/* ===== Footer ===== */
.footer {
    width: 100%;
    background: var(--footer-bg);
    padding: 20px 0 24px;
    /* ↓ lebih rapat dari 40px */
    position: relative;
}

.footer .footer-inner {
    max-width: var(--footer-maxw);
    margin: 0 auto;
    padding: 0 16px;
}

.footer .social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    /* kontrol jarak icon */
    margin-bottom: 10px;
    /* ↓ tadinya 25px */
}

.footer .social a {
    width: 40px;
    /* sedikit lebih kecil */
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    border: 1.5px solid var(--footer-accent);
    /* ↓ tipis, lebih halus */
    color: var(--footer-fg);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.footer .social a:hover {
    background: var(--footer-accent);
    color: #0f8278;
    /* kontras saat hover */
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    transform: translateY(-4px) scale(1.08);
    /* ↓ lebih elegan dari -10px & 1.2 */
}

.footer .copyright {
    margin: 6px 0 0;
    /* ↓ tadinya 20px */
    text-align: center;
    font-size: 14px;
    /* ↓ 16 → 14 agar tidak “berat” */
    color: var(--footer-fg-dim);
    letter-spacing: .2px;
}

.project-card {
    background: radial-gradient(1200px 500px at 10% -10%, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02) 40%, transparent 60%),
        linear-gradient(160deg, rgba(10, 16, 38, .6), rgba(18, 34, 60, .55) 40%, rgba(20, 28, 48, .5));
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
}

/* image container */
.project-card .project-image {
    background-color: #e6f7f5 !important;
    border: 6px solid rgba(255, 255, 255, .85) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25) !important;
}

/* typography */
.project-card h3 {
    font-weight: 800;
    font-size: clamp(1.1rem, 1.1rem + .4vw, 1.45rem);
    color: #eaf1ff;
    letter-spacing: .2px;
    margin: 6px 0 8px;
}


.tech-tag {
    background: rgba(79, 209, 199, .30) !important;
    border: none !important;
    color: #fff !important;
}

/* actions row */
.card-actions {
    display: flex;
    align-items: center;
    /* vertikal rata tengah */
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 4px;
}

.card-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    /* supaya rapi kalau mepet */
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    padding: .25rem 0;
    /* sentuhan kecil agar sejajar */
}


.card-link i {
    font-size: 1.05rem;
}

.card-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* right CTA */
.card-cta {
    display: inline-flex;
    /* pastikan ikon & teks sejajar */
    align-items: center;
    gap: 10px;
    padding: .5rem .9rem;
    /* bikin “pill” proporsional */
    border-radius: 25px !important;
    border: 2px solid #4fd1c7 !important;
    background: transparent !important;
    color: #fff !important;
    text-decoration: none;
    /* hilangkan underline */
    font-weight: 700;
    line-height: 1;
    /* cegah tinggi berlebih */
    white-space: nowrap;
    /* biar tidak patah */
    transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}

.card-cta i {
    font-size: 1.05rem;
    transform: translateX(0);
    transition: transform .18s;
}

.card-cta:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .26);
}

.card-cta:hover i {
    transform: translateX(2px);
}

/* responsif kecil */
/* === Fix: tombol Details tetap kanan di mobile === */
@media (max-width:600px) {
    .card-actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        gap: 12px;
    }

    .btn-bar {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .card-cta {
        flex: 0 0 auto;
        /* jangan ikut stretch */
        width: auto;
        /* biar nggak 100% */
        white-space: nowrap;
        /* teks tidak kepotong */
        padding: .5rem .9rem;
        /* ukuran pill tetap */
    }
}


.project-card p {
    color: rgba(235, 241, 255, .85);
    margin: 0 0 14px;
    display: -webkit-box;
    /* clamp 3 baris */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.code-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    line-height: 1;
    color: #cfe7ff;
    /* teks biru muda */
    opacity: .97;
    transition: opacity .18s ease, transform .18s ease;
}

.code-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.code-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid rgba(188, 216, 255, .9);
    /* lingkaran tipis */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.code-badge i {
    font-size: 17px;
    color: rgba(188, 216, 255, .95);
}

.code-text {
    font-weight: 600;
    letter-spacing: .2px;
}

/* kecil */
@media (max-width:600px) {
    .code-text {
        font-size: 0.95rem;
    }
}

.btn-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* responsif kecil */
@media (max-width:480px) {
    .footer .social {
        gap: 10px;
    }

    .footer .social a {
        width: 36px;
        height: 36px;
    }

    .footer .copyright {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-top: 90px;
        padding-top: 8px;
    }

    .detail-header {
        margin-bottom: 1.8rem;
    }

    .detail-header h1 {
        font-size: clamp(1.9rem, 6vw, 2.4rem);
        margin: 4px 0 8px;
    }

    .detail-header .subtitle {
        margin: 6px auto 14px;
    }

    .projects-grid {
        margin-top: 6px;
        row-gap: 1.4rem;
    }
}



@media (max-width:768px) {
    .nav-links {
        display: none
    }

    .detail-header h1 {
        font-size: 2rem
    }

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

@media (max-width:768px) {
    .lightbox.open {
        grid-template-columns: minmax(12px, 1fr) auto minmax(12px, 1fr);
    }

    #lbPrev,
    #lbNext {
        width: 38px;
        height: 38px;
    }
}

@media (min-width: 1400px) {
    .navbar .brand {
        margin-left: -2rem;
    }
}

/* === FIX: Samakan tinggi card TANPA ubah warna/elemen === */
.projects-grid {
    align-items: stretch;
    /* pastikan anak grid stretch */
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.project-card h3 {
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* max 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.25em * 2);
    /* kunci tinggi 2 baris */
}

.project-card p {
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* max 3 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.55em * 3);
    /* kunci tinggi 3 baris */
    /* margin-bottom sudah ada di atas, tidak diubah */
}

.card-actions {
    margin-top: auto;
    /* dorong ke bawah */
}

.btn-bar {
    flex-wrap: wrap;
    gap: .75rem;
}