:root {
    --bg: #07080a;
    --card: #0f1418;
    --muted: #9aa8bd;
    --accent: #6b7cff;
    /* accent */
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 14px;
    --max-w: 1200px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, var(--bg) 0%, #05060a 100%);
    color: #e9f2ff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

.wrap {
    max-width: var(--max-w);
    margin: 0px auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center
}

.brand .initial {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
    box-shadow: 0 8px 30px rgba(75, 85, 255, 0.12)
}

.brand h1 {
    margin: 0;
    font-size: 18px
}

.brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

.btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.btn.active {
    background: linear-gradient(90deg, var(--accent), #848484);
    color: white;
    border: 0;
    box-shadow: 0 8px 30px rgba(75, 85, 255, 0.12)
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent), #06b6d4);
    color: white;
    border: 0;
    box-shadow: 0 8px 30px rgba(75, 85, 255, 0.12)
}

.btn.primary:hover {
    border-color: var(--accent);
    color: #fff;
    background: linear-gradient(90deg, var(--accent), #848484);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    transition: all 0.3s ease;
}

.btn:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(79, 70, 229, 0.15);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}


/* HERO */
.hero {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 20px;
}

.hero-card {
    background: var(--card);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 40px rgba(2, 6, 23, 0.6);
}

/* image column */
.hero-img {
    width: 420px;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0%) contrast(0.95) brightness(0.95);
    transform: scale(1.03);
    transition: filter .45s ease, transform .6s ease;
}

.hero-img:hover img {
    filter: none;
    transform: scale(1.0);
}

/* text column */
.hero-body {
    padding: 36px 36px 36px 34px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.hero-body h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.6px
}

.hero-body p.lead {
    margin: 0;
    color: var(--muted);
    max-width: 720px
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px
}

/* layout main */
.grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    align-items: start;
}

.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.section-title {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px
}

.meta {
    font-size: 13px;
    color: var(--muted)
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px
}

.skill {
    padding: 6px 10px;
    background: var(--glass);
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
}

/* === Layout Project: teks kiri, gambar kanan === */
.project {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Kolom teks */
.project .meta {
    flex: 1;
}

/* Gambar di kanan */
.project img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.project {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: transform .24s, box-shadow .24s
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.6)
}

.project h3 {
    margin: 0;
    font-size: 15px
}

.project .meta {
    color: var(--muted);
    font-size: 13px
}

.links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px
}

.chip {
    background: rgba(255, 255, 255, 0.03);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    margin: 14px 0;
    border-radius: 2px
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 18px
}

/* reveal */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s ease, transform .6s ease
}

.reveal.visible {
    opacity: 1;
    transform: none
}

a {
    color: inherit
}

/* Floating Navigation Bar */
.floating-nav {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: rgba(15, 20, 25, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 10px 14px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: bottom 0.6s ease;
    z-index: 100;
}

.floating-nav.visible {
    bottom: 20px;
}

.floating-nav a {
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #06b6d4);
    transition: opacity 0.25s;
}

.floating-nav a:hover {
    opacity: 0.85;
}

/* Responsive (optional for smaller screens) */
@media (max-width: 820px) {
    .floating-nav {
        gap: 8px;
        padding: 8px 10px;
    }

    .floating-nav a {
        font-size: 13px;
        padding: 6px 10px;
    }

    /* Sembunyikan tombol hero di mobile */
    .hero-actions {
        display: none !important;
    }

    #tentang {
        display: none !important;
    }

    .project {
        flex-direction: column;
        align-items: center;
        text-align: start;
    }

    .project img {
        width: 100%;
        max-width: 320px;
        height: auto;
    }
}

/* Sticky sidebar (desktop only) */
#sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    height: fit-content;
    z-index: 5;
}

/* Nonaktifkan sticky di mobile/tablet */
@media (max-width: 820px) {
    #sidebar {
        position: relative;
        top: auto;
        z-index: auto;
    }
}

/* === Popup / Modal Gambar === */
.image-popup {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.image-popup.show img {
    transform: scale(1.03);
}

/* === Gaya untuk gambar di dalam section #projects === */
#projects img {
    border-radius: 50%;           /* Membuat gambar menjadi lingkaran */
    object-fit: cover;            /* Potong gambar agar tetap proporsional */
    aspect-ratio: 1 / 1;          /* Pastikan bentuknya benar-benar bulat */
    width: 60px;                 /* Ukuran default thumbnail */
    height: 60px;
    margin-top: 8px;
    margin-bottom: 6px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Efek hover: sedikit membesar + glow lembut */
#projects img:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(107, 124, 255, 0.45);
    cursor: zoom-in;
}

/* === Tema Terang === */
:root.light {
    --bg: #f6f7fb;
    --card: #ffffff;
    --muted: #4c5560;
    --accent: #4a5cff;
    --glass: rgba(0, 0, 0, 0.05);
    color: #1b1b1f;
}

:root.light body {
    background: linear-gradient(180deg, #fdfdff 0%, #eceef4 100%);
    color: #1b1b1f;
}

/* Ubah warna elemen penting di mode terang */
:root.light .card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.05);
}

:root.light .btn.primary {
    background: linear-gradient(90deg, #4a5cff, #06b6d4);
    color: #fff;
}

:root.light .btn.ghost {
    border-color: rgba(0, 0, 0, 0.1);
    color: #444;
}

:root.light .btn.ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

:root.light .meta {
    color: #555;
}

:root.light .brand .initial {
    background: linear-gradient(135deg, #4a5cff, #06b6d4);
}

:root.light #sidebar {
    background: #ffffff;
}

* {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* === Aturan khusus untuk tampilan PDF === */
@media print {
    header, .top-actions, .floating-nav, #themeToggle, .btn, .links, footer {
        display: none !important;
    }
    #projects img {
        display: none !important; /* sembunyikan gambar proyek */
    }
    .hero-img img {
        display: block !important; /* foto utama tetap tampil */
    }
}

/* responsive */
@media (max-width:1100px) {
    .hero {
        grid-template-columns: 360px 1fr
    }

    .hero-img {
        width: 360px;
        height: 360px
    }

    .grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:820px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .hero-img {
        width: 100%;
        height: 380px
    }

    .hero-body {
        padding: 22px
    }

    .hero-body h2 {
        font-size: 28px
    }

    .wrap {
        padding: 14px;
        margin: 12px auto
    }

    /* Hero container */
    .hero-card.hero {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        width: 100%;
        height: auto !important;
        overflow: visible !important;
    }

    /* Gambar di atas */
    .hero-img {
        width: 100%;
        max-width: 420px;
        height: auto !important;
        display: block;
        overflow: hidden;
        border-radius: 16px;
    }

    .hero-img img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
        border-radius: 16px;
    }

    /* Konten teks di bawah gambar */
    .hero-body {
        display: block;
        width: 100%;
        padding: 18px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 12px;
        text-align: center;
        /* color: #e9f2ff; */
    }

    .hero-body h2 {
        font-size: 26px;
        margin-bottom: 6px;
    }

    .hero-body .lead {
        font-size: 15px;
        line-height: 1.5;
        color: var(--muted);
    }

    .hero-actions {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 12px;
    }
}

/* Responsif — biar pas di HP */
@media (max-width: 600px) {
    #projects img {
        width: 90px;
        height: 90px;
    }
}

@media (max-width:420px) {
    .hero-img {
        height: 320px
    }

    .hero-body h2 {
        font-size: 24px
    }
}