/* ---------- Dasar ---------- */
:root {
    --latar: #f4f0e8;
    --teks: #1f1d1a;
    --redup: #6b655c;
    --garis: #d3cbbd;
    --aksen: #8a3b2a;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --lebar: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
    background: var(--latar);
    color: var(--teks);
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--aksen);
    outline-offset: 4px;
}

.wadah { width: min(var(--lebar), 100% - 3rem); margin-inline: auto; }

/* Teks kecil bergaya UI memakai sans-serif */
.label, .meta, .nomor, dt, figcaption, .urutan, .kaki, nav a, .tombol-menu {
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- Bar navigasi ---------- */
.bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
    padding-inline: max(1.5rem, calc((100% - var(--lebar)) / 2));
    background: var(--latar);
    border-bottom: 1px solid var(--garis);
}

.merek { font-style: italic; font-size: 1.15rem; }

nav ul { display: flex; gap: 2rem; }

nav a {
    padding-block: 0.4rem;
    color: var(--redup);
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

nav a:hover { color: var(--teks); }
nav a[aria-current="true"] { color: var(--teks); border-bottom-color: var(--aksen); }

.tombol-menu {
    display: none;
    background: none;
    border: 0;
    color: var(--teks);
    cursor: pointer;
}

/* ---------- Beranda ---------- */
.beranda {
    display: flex;
    align-items: flex-end;
    min-height: 88vh;
    padding: 9rem 0 5rem;
}

.beranda .wadah { padding-left: clamp(0rem, 8vw, 7rem); }

.label { color: var(--redup); margin-bottom: 1.5rem; }

h1 {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ringkas {
    max-width: 30ch;
    margin-top: 2rem;
    margin-left: clamp(0rem, 6vw, 5rem);
    font-style: italic;
    color: var(--redup);
}

/* ---------- Bagian umum ---------- */
.bagian { padding: 6rem 0; border-top: 1px solid var(--garis); }

.kepala-bagian {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.nomor { color: var(--aksen); }

h2 { font-size: 2rem; font-weight: 400; letter-spacing: -0.01em; }

/* Placeholder dan bingkai foto */
.foto { overflow: hidden; background: #e8e1d3; }

.kosong {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px dashed var(--garis);
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--redup);
}

/* ---------- Biodata ---------- */
.biodata {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
    align-items: start;
}

.foto-profil { aspect-ratio: 4 / 5; margin-top: 1.5rem; }

dl > div {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--garis);
}

dl > div:first-child { border-top: 1px solid var(--garis); }
dt { color: var(--redup); padding-top: 0.35rem; }
dd { font-size: 1.2rem; }

/* ---------- Biografi ---------- */
.tulisan { max-width: 36rem; margin-left: clamp(0rem, 16vw, 14rem); }
.tulisan p + p { margin-top: 1.5rem; }
.tulisan .pembuka { font-size: 1.4rem; line-height: 1.55; }

/* ---------- Galeri ---------- */
.grid-galeri {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem 1.5rem;
    align-items: end;
}

.kolom-4 { grid-column: span 4; }
.kolom-5 { grid-column: span 5; }
.kolom-6 { grid-column: span 6; }
.kolom-7 { grid-column: span 7; }

.grid-galeri .foto { aspect-ratio: 4 / 3; }
.grid-galeri img { transition: transform 0.5s ease; }
.grid-galeri figure:hover img { transform: scale(1.03); }

figcaption { margin-top: 0.7rem; color: var(--teks); letter-spacing: 0.06em; }
figcaption span { display: block; margin-top: 0.15rem; color: var(--redup); text-transform: none; letter-spacing: 0.02em; font-size: 0.8rem; }

/* ---------- Projek ---------- */
.projek {
    display: grid;
    grid-template-columns: 4rem 1fr 15rem;
    gap: 2rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--garis);
}

.projek:last-child { border-bottom: 1px solid var(--garis); }

.urutan { color: var(--aksen); padding-top: 0.6rem; }

h3 { font-size: 1.8rem; font-weight: 400; line-height: 1.2; transition: color 0.2s; }
.projek:hover h3 { color: var(--aksen); }

.isi-projek p { max-width: 38ch; margin-top: 0.75rem; color: var(--redup); }

.tautan {
    display: inline-block;
    margin-top: 1.25rem;
    border-bottom: 1px solid var(--aksen);
    font-style: italic;
}

.tautan-kosong { border-bottom-style: dashed; color: var(--redup); }

.meta { color: var(--redup); letter-spacing: 0.06em; text-transform: none; font-size: 0.8rem; }
.meta + .meta { margin-top: 0.2rem; }
.meta-projek .foto { aspect-ratio: 4 / 3; margin-top: 1rem; }

/* ---------- Kontak & kaki ---------- */
.email {
    display: inline-block;
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-style: italic;
    border-bottom: 1px solid var(--garis);
    transition: border-color 0.2s, color 0.2s;
}

a.email:hover { color: var(--aksen); border-color: var(--aksen); }

.kaki { padding: 2rem 0 3rem; border-top: 1px solid var(--garis); color: var(--redup); }
.kaki .wadah { display: flex; justify-content: space-between; gap: 1rem; }
.kaki a:hover { color: var(--teks); }

/* ---------- Muncul halus saat di-scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.terlihat { opacity: 1; transform: none; }

/* ---------- Cursor khusus ---------- */
.cursor-aktif, .cursor-aktif a, .cursor-aktif button { cursor: none; }

.titik, .cincin {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: difference;
}

.titik { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }

.cincin {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid #fff;
    transition: width 0.25s, height 0.25s, margin 0.25s;
}

.cincin.membesar { width: 56px; height: 56px; margin: -28px 0 0 -28px; }

/* ---------- Easter egg: halaman slash ---------- */
.halaman-slash {
    height: 100vh;
    overflow: hidden;
    background: #111;
    color: #fff;
    font-family: "Courier New", Courier, monospace;
}

#chat {
    position: fixed;
    left: 0.75rem;
    bottom: 0.75rem;
    width: min(34rem, 100% - 1.5rem);
    font-size: 0.85rem;
    line-height: 1.4;
}

.baris {
    width: fit-content;
    max-width: 100%;
    padding: 0.1rem 0.4rem;
    background: rgba(0, 0, 0, 0.45);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
    word-break: break-word;
    transition: opacity 1.5s ease;
}

.baris.sistem { color: #ffe27a; }
.baris.hilang { opacity: 0; }
.baris-ketik { margin-top: 0.4rem; background: rgba(255, 255, 255, 0.08); }
.kedip { animation: kedip 1s steps(1) infinite; }

@keyframes kedip { 50% { opacity: 0; } }

.keluar {
    position: fixed;
    right: 0.75rem;
    bottom: 0.75rem;
    font-family: var(--sans);
    font-size: 0.7rem;
    opacity: 0.25;
    color: #fff;
}

.keluar:hover, .keluar:focus-visible { opacity: 0.8; }

@media (max-width: 860px) {
    .biodata { grid-template-columns: 1fr; gap: 2.5rem; }
    .foto-profil { max-width: 20rem; margin-top: 0; }
    .tulisan { margin-left: 0; }

    .projek { grid-template-columns: 2.5rem 1fr; }
    .meta-projek { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
    .meta-projek .foto { grid-column: 1 / -1; }

    .kolom-4, .kolom-5, .kolom-6, .kolom-7 { grid-column: span 6; }
}

@media (max-width: 640px) {
    body { font-size: 1.05rem; }
    .bagian { padding: 4rem 0; }
    .kepala-bagian { margin-bottom: 2.5rem; }
    .beranda { min-height: 80vh; padding-top: 7rem; }

    .tombol-menu { display: block; }

    nav {
        position: absolute;
        top: 3.5rem;
        left: 0;
        right: 0;
        display: none;
        padding: 1rem 1.5rem 1.5rem;
        background: var(--latar);
        border-bottom: 1px solid var(--garis);
    }

    nav.terbuka { display: block; }
    nav ul { flex-direction: column; gap: 0.5rem; }
    nav a { display: inline-block; padding-block: 0.5rem; }

    dl > div { grid-template-columns: 1fr; gap: 0; }

    .grid-galeri { gap: 2rem 1rem; }
    .kolom-4, .kolom-5, .kolom-6, .kolom-7 { grid-column: 1 / -1; }

    .projek { grid-template-columns: 1fr; gap: 1rem; }
    .meta-projek { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Lapisan transparan di atas gambar agar klik kanan tidak mengenai <img> */
.foto { position: relative; }

.foto::after {
    content: "";
    position: absolute;
    inset: 0;
}

.foto img { -webkit-touch-callout: none; }