/* ===== Token: warna, huruf, jarak ===== */
:root {
  --abu: #8e8e8e;      /* sama dengan latar foto hasil edit */
  --ink: #1d1f1e;
  --kertas: #e6e7e6;
  --teal: #266e8a;     /* diambil dari warna kemeja */
  --pad: clamp(20px, 4vw, 56px);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
body { font: 400 1rem/1.55 var(--body); color: var(--ink); background: var(--kertas); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }
small { font-size: .875rem; opacity: .75; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.no-scroll { overflow: hidden; }

/* Lenis (scroll halus) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }

/* ===== Preloader ===== */
.loader { display: none; position: fixed; inset: 0; z-index: 300; place-items: center; background: var(--ink); color: var(--kertas); }
.js .loader { display: grid; }
.loader__word { font: 800 clamp(2.8rem, 10vw, 8rem)/1 var(--display); letter-spacing: -.04em; }

/* ===== Kursor & pratinjau ===== */
.cursor, .preview { display: none; position: fixed; left: 0; top: 0; pointer-events: none; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor .cursor, .has-cursor .preview { display: block; }
.cursor { z-index: 200; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--teal); display: none; transition: width .3s, height .3s, margin .3s; }
.has-cursor .cursor { display: grid; place-items: center; }
.cursor span { font-size: .9rem; font-weight: 500; color: var(--kertas); opacity: 0; transition: opacity .2s; }
.is-row .cursor { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.is-row .cursor span { opacity: 1; }
.is-link .cursor { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.preview { z-index: 150; width: min(22vw, 300px); aspect-ratio: 3 / 4; margin: -190px 0 0 70px; background: #7a7a7a center / cover no-repeat; clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease); }
.is-row .preview { clip-path: inset(0); }

/* ===== Bar & menu ===== */
.bar__logo { position: absolute; z-index: 60; top: var(--pad); left: var(--pad); color: #fff; font: 700 1.15rem/1 var(--display); }
.bar__menu { position: fixed; z-index: 90; top: var(--pad); right: var(--pad); padding: .7rem 1.3rem; border-radius: 999px; background: var(--kertas); color: var(--ink); border: 1.5px solid var(--ink); font-weight: 500; }

.menu { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--pad); background: var(--ink); color: var(--kertas); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .7s var(--ease), visibility 0s .7s; }
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--ease); }
.menu a { font: 800 clamp(3rem, 12vw, 9rem)/1 var(--display); letter-spacing: -.045em; transition: color .3s; }
.menu a:hover { color: var(--abu); }

/* ===== Hero ===== */
.hero { position: relative; height: 100svh; min-height: 560px; background: var(--abu); overflow: hidden; }
/* "Nama" di kiri atas, "Kamu" di kanan bawah */
.hero__name { position: absolute; z-index: 3; color: #fff; pointer-events: none; inset: calc(var(--pad) + 3.5rem) var(--pad) calc(var(--pad) + 4rem); display: flex; flex-direction: column; justify-content: space-between; font: 800 clamp(4rem, 23vw, 19rem)/.9 var(--display); letter-spacing: -.045em; }
.hero__name .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__name .line:nth-child(2) { text-align: right; }
.hero__name .line > span { display: inline-block; }
/* GANTI nama file foto di sini */
/* Lapisan 1 (paling belakang): foto latar. Atur potongan lewat background-position (mis. center 20%) */
.hero__photo { position: absolute; inset: -24px; z-index: 1; background: url("images/foto-portfolio-transparan.png") no-repeat center / cover; }
/* Lapisan 3 (paling depan): foto potongan, di depan teks nama. Pengaturan ukuran dan posisinya HARUS sama dengan .hero__photo */
.hero__cutout { position: absolute; inset: -24px; z-index: 4; pointer-events: none; background: url("images/foto-portfolio-transparan2.png") no-repeat center / cover; }
.hero__role, .hero__scroll { position: absolute; z-index: 5; bottom: var(--pad); color: #fff; }
.hero__role { right: var(--pad); text-align: right; }
.hero__scroll { left: var(--pad); }

/* ===== Perkenalan ===== */
.intro { padding: clamp(6rem, 16vw, 14rem) var(--pad); background: var(--kertas); }
.intro__text { max-width: 22em; font: 500 clamp(1.8rem, 4.2vw, 4rem)/1.15 var(--display); letter-spacing: -.02em; }

/* ===== Karya: tumpukan kartu yang dikocok saat scroll ===== */
.work { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--pad); min-height: 100svh; padding: var(--pad); background: #e4e4e4; color: var(--ink); }
.work.is-stack { overflow: hidden; }
.work__text { text-align: center; }
.work__title { font: 500 clamp(3rem, 6.5vw, 6.5rem)/.95 var(--display); letter-spacing: -.04em; }
.work__title span { display: block; }
.work__sub { margin-top: 1.5rem; font-size: .8rem; text-transform: uppercase; }
.work__count { display: none; margin-top: 2rem; font: 500 1.1rem/1 var(--display); }
.is-stack .work__count { display: block; }

/* Tanpa JavaScript / mode kurangi gerak: kartu tampil sebagai kisi biasa */
.deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.deck__card { position: relative; display: block; aspect-ratio: 4 / 5; }

/* Mode tumpukan (diaktifkan oleh script.js) */
.is-stack .deck { position: relative; display: block; height: min(70vh, 640px); touch-action: pan-y; }
.is-stack .deck__card { position: absolute; left: 50%; top: 50%; width: min(100%, calc(min(70vh, 640px) * .8)); transform-origin: 50% 80%; will-change: transform; pointer-events: none; }
.is-stack .deck__card.is-front { pointer-events: auto; }

.deck__inner { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 16px; background: var(--tone, #cfcfcb); box-shadow: 0 24px 48px rgb(29 31 30 / .18); }
.deck__img { position: absolute; inset: 0; background: var(--img) center / cover no-repeat; transition: transform .9s var(--ease); }
.deck__card:hover .deck__img, .deck__card:focus-visible .deck__img { transform: scale(1.07); }

.deck__cap { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .85rem 1rem; border-radius: 10px; background: rgb(244 244 242 / .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .5s var(--ease); }
.deck__card:hover .deck__cap, .deck__card:focus-visible .deck__cap { transform: translateY(-6px); }
.deck__name { font: 500 1.15rem/1.15 var(--display); letter-spacing: -.01em; }
.deck__name b { margin-right: .4em; font-weight: 500; }
.deck__cat { font-size: .7rem; text-transform: uppercase; white-space: nowrap; opacity: .75; }

.deck__cta { position: absolute; left: 50%; top: 50%; display: inline-flex; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; background: var(--kertas); color: var(--ink); font: 500 1rem/1 var(--display); white-space: nowrap; opacity: 0; transform: translate(-50%, -30%); transition: opacity .35s, transform .5s var(--ease); }
.deck__cta i { font-style: normal; }
.deck__card:hover .deck__cta, .deck__card:focus-visible .deck__cta { opacity: 1; transform: translate(-50%, -50%); }

@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; gap: 1rem; padding-top: 5rem; }
  .work__title { font-size: clamp(2.4rem, 11vw, 4rem); }
  .work__title span { display: inline; }
  .is-stack .deck { height: min(54vh, 480px); }
}

/* ===== Tentang ===== */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(5rem, 12vw, 10rem) var(--pad); background: var(--kertas); }
.about__text { max-width: 30em; font: 500 clamp(1.3rem, 2.2vw, 2rem)/1.3 var(--display); }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.about h3 { margin-bottom: .75rem; font: 700 1.1rem/1.2 var(--display); }

/* ===== Kontak ===== */
.contact { padding: clamp(5rem, 12vw, 11rem) var(--pad) var(--pad); background: var(--teal); color: var(--kertas); }
.contact__title { font: 800 clamp(3rem, 11vw, 10rem)/.9 var(--display); letter-spacing: -.045em; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 2.5rem; }
.contact__mail { font: 500 clamp(1.1rem, 2.4vw, 2rem)/1.2 var(--display); border-bottom: 2px solid currentColor; }
.contact__btn { display: grid; place-items: center; width: clamp(110px, 14vw, 180px); aspect-ratio: 1; border-radius: 50%; background: var(--kertas); color: var(--ink); font-weight: 500; text-align: center; }
.meta { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin-top: clamp(4rem, 10vw, 9rem); padding-top: 1.5rem; border-top: 1px solid rgb(230 231 230 / .35); }
.meta div { display: flex; flex-direction: column; }
.meta a:hover { text-decoration: underline; }

/* ===== Responsif ===== */
@media (max-width: 700px) {
  .hero__name { font-size: clamp(5rem, 28vw, 9rem); }
  .hero__scroll { display: none; }
  .hero__role { left: var(--pad); right: auto; text-align: left; padding: .5rem .75rem; border-radius: .5rem; background: var(--kertas); color: var(--ink); }
  .row { grid-template-columns: 1fr auto; }
  .row__cat { grid-row: 2; }
  .row__year { grid-row: 2; }
  .about { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ===== Nama hero berjalan seperti running text TV (dibuat oleh script.js) ===== */
.hero__name { left: -40px; right: -40px; }                 /* melebar sampai tepi layar */
.hero__name .line > .marquee { display: block; overflow: hidden; }
.marquee__track { display: flex; width: max-content; will-change: transform; animation: geser-kiri 30s linear infinite; }
.marquee--kanan .marquee__track { animation-name: geser-kanan; }
.marquee__word { flex: none; padding-right: .4em; white-space: nowrap; }
@keyframes geser-kiri { to { transform: translateX(-50%); } }
@keyframes geser-kanan { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ===== Detail proyek (jendela yang terbuka saat kartu diklik) ===== */
.detail { position: fixed; inset: 0; z-index: 120; background: #f4f4f2; color: var(--ink); visibility: hidden; pointer-events: none; }
.detail.is-open { visibility: visible; pointer-events: auto; }
.detail__close { position: absolute; z-index: 2; top: var(--pad); right: var(--pad); padding: .7rem 1.3rem; border-radius: 999px; background: var(--kertas); color: var(--ink); border: 1.5px solid var(--ink); font-weight: 500; }
.detail__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.detail__inner { max-width: 1400px; margin: 0 auto; padding: calc(var(--pad) + 4.5rem) var(--pad) 6rem; }

.proyek h3 { font: 500 clamp(2.4rem, 7vw, 7rem)/.95 var(--display); letter-spacing: -.04em; }
.proyek h3 span { margin-right: .3em; opacity: .5; }
.proyek__kat { margin-top: 1rem; font-size: .8rem; text-transform: uppercase; }
.proyek__meta { display: flex; flex-wrap: wrap; gap: 1.5rem 4rem; margin: 2.5rem 0 0; }
.proyek__meta dt { font-size: .8rem; opacity: .65; }
.proyek__meta dd { margin: 0; font-weight: 500; }
.proyek__teks { display: grid; gap: 1rem; max-width: 40rem; margin-top: 2.5rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.6; }
.proyek__teks p { margin: 0; }
.proyek__foto { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.75rem, 1.5vw, 1.5rem); margin-top: clamp(3rem, 6vw, 5rem); }
.proyek__foto figure { margin: 0; aspect-ratio: var(--r, 3 / 2); border-radius: 12px; background: var(--tone, #cfcfcb) var(--img, none) center / cover no-repeat; }
.proyek__foto .lebar { grid-column: 1 / -1; }
@media (max-width: 700px) { .proyek__foto { grid-template-columns: 1fr; } }


/* ===== Pengalaman kerja: kartu kecil menumpuk, membesar saat di-hover ===== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.exp { background: #1d1d1d; padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(3rem, 7vw, 6rem); }
.exp__list { display: flex; justify-content: safe center; padding: 3rem 1.5rem; overflow-x: auto; }

.exp__card { --r: 0deg; --y: 0rem; position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: clamp(200px, 19vw, 270px); min-height: clamp(11rem, 12vw, 14rem); margin-left: clamp(-2.6rem, -2.4vw, -1.4rem); padding: 1.5rem 1.4rem; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 .6rem 1.4rem rgb(29 31 30 / .12); transform: translateY(var(--y)) rotate(var(--r)); transition: transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .55s cubic-bezier(.2, .8, .2, 1); }
.exp__card:first-child { margin-left: 0; }
.exp__card:hover { z-index: 5; transform: translateY(calc(var(--y) - 1.2rem)) rotate(0deg) scale(1.12); box-shadow: 0 1.4rem 2.6rem rgb(29 31 30 / .22); }

/* Kemiringan dan tinggi tiap kartu (pola berulang tiap 5 kartu) */
.exp__card:nth-child(5n + 1) { --r: -4deg; --y: .8rem; }
.exp__card:nth-child(5n + 2) { --r: 3deg; --y: 1.8rem; }
.exp__card:nth-child(5n + 3) { --r: -2deg; --y: .2rem; }
.exp__card:nth-child(5n + 4) { --r: 3.5deg; --y: 1.4rem; }
.exp__card:nth-child(5n + 5) { --r: -3deg; --y: 0rem; }

.exp__tahun { font: 500 .85rem/1.3 var(--body); opacity: .7; }
.exp__jabatan { margin-top: .75rem; font: 700 1.25rem/1.15 var(--display); letter-spacing: -.01em; }
.exp__org { margin-top: .25rem; font-size: .95rem; }
.exp__desk { margin-top: .9rem; font-size: .85rem; line-height: 1.45; opacity: .8; }

@media (max-width: 700px) {
  .exp__list { justify-content: flex-start; scroll-snap-type: x proximity; }
  .exp__card { width: min(70vw, 260px); scroll-snap-align: center; }
}

/* Saat kartu pengalaman dilempar (animasi masuk) */
.exp.is-dealing .exp__card { transition: none; }
.exp.is-dealing .exp__list { overflow: visible; }