/* ===== Tema: gelap + aksen lime (variabel) ===== */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --lime: #c5f82a; --on-lime: #101010;
  --bg: #f6f6f1; --bg-alt: #ecece4; --card: #ffffff;
  --text: #111111; --muted: #55564f; --border: #d9d9cf;
  --accent: #4d6900; --link: #4d6900;
  --radius: 8px; --nav-h: 68px; --max: 1080px;
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 5rem;
  --asterisk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 4v92M10 27l80 46M10 73l80-46' stroke='%23000' stroke-width='12' fill='none'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] {
  --bg: #0c0c0c; --bg-alt: #131313; --card: #1a1a1a;
  --text: #f5f5f0; --muted: #a8a8a0; --border: #2b2b2b;
  --accent: #c5f82a; --link: #c5f82a;
}

/* ===== Dasar ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; transition: background .3s, color .3s; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--lime); color: var(--on-lime); padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }

/* ===== Navbar ===== */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.nav__logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -.01em; }
.nav__logo::before { content: ""; width: 22px; height: 22px; background: var(--lime); -webkit-mask: var(--asterisk) center / contain no-repeat; mask: var(--asterisk) center / contain no-repeat; }
.nav__menu { display: flex; gap: var(--s3); }
.nav__link { position: relative; color: var(--muted); font-weight: 500; font-size: .92rem; padding: .3rem 0; transition: color .2s; }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; gap: .5rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font-size: 1.05rem; cursor: pointer; transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--lime); color: var(--accent); }
.nav__toggle { display: none; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ===== Tombol ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .85rem 1.5rem; border-radius: 4px; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--lime); cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--lime); color: var(--on-lime); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--lime); color: var(--accent); }
.btn--sm { padding: .55rem 1rem; font-size: .72rem; }
.btn.is-disabled { opacity: .45; pointer-events: none; border-style: dashed; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: calc(var(--nav-h) + var(--s5)) 0 var(--s5); }
.hero::after { content: ""; position: absolute; right: -30px; bottom: 30px; width: 170px; height: 170px; background: var(--lime); opacity: .9; -webkit-mask: var(--asterisk) center / contain no-repeat; mask: var(--asterisk) center / contain no-repeat; pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--s4); align-items: center; }
.hero__hello { color: var(--accent); font-weight: 600; margin-bottom: var(--s1); }
.hero__name { font-size: clamp(2.3rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.hero__headline { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 600; margin: var(--s2) 0; }
.hero__headline em { color: var(--accent); font-size: 1.1em; }
.hero__desc { color: var(--muted); max-width: 52ch; margin-bottom: var(--s3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero__media { justify-self: center; width: min(100%, 320px); }
.hero__frame { position: relative; }
.hero__frame::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 2px solid var(--lime); border-radius: 999px 999px var(--radius) var(--radius); z-index: 0; }
.hero__frame img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 999px 999px var(--radius) var(--radius); background: var(--card); }

/* ===== Section ===== */
.section { padding: var(--s5) 0; }
.section--alt { background: var(--bg-alt); }
.section__title { text-align: center; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-bottom: var(--s4); }
.section__title::before { content: ""; display: block; width: 22px; height: 22px; margin: 0 auto .7rem; background: var(--lime); -webkit-mask: var(--asterisk) center / contain no-repeat; mask: var(--asterisk) center / contain no-repeat; }
.section__sub { text-align: center; color: var(--muted); max-width: 60ch; margin: calc(-1 * var(--s2)) auto var(--s3); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s4); }
.about__lead { font-size: 1.5rem; font-weight: 700; line-height: 1.35; padding-left: var(--s2); border-left: 3px solid var(--lime); }
.about__body { display: grid; gap: var(--s2); color: var(--muted); max-width: 62ch; }

/* Grid & card */
.grid { display: grid; gap: var(--s3); }
.grid--skills { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3); transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--lime); }
.skill__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px; background: var(--lime); color: var(--on-lime); margin-bottom: var(--s2); }
.skill__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* Project */
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project__thumb { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; object-position: center top; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.project__body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: .5rem; }
.tag { font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.project__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: var(--s2); }
.project__more { margin-top: auto; padding-top: var(--s2); font-weight: 700; font-size: .85rem; color: var(--accent); }

/* Carousel project */
.carousel { display: flex; align-items: center; gap: var(--s2); }
.carousel__track { flex: 1; min-width: 0; display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--s2) 4px var(--s3); scrollbar-width: thin; scrollbar-color: var(--lime) transparent; }
.carousel__track .project { flex: 0 0 min(280px, 75%); scroll-snap-align: center; cursor: pointer; }
.carousel__btn { flex: none; width: 44px; height: 44px; font-size: 1.4rem; }
@media (max-width: 860px) { .carousel__btn { display: none; } }

/* Jendela detail project */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: var(--s2); background: rgba(0,0,0,.7); }
.modal[hidden] { display: none; }
.modal__box { position: relative; width: min(100%, 560px); max-height: 90vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); animation: pop .25s ease; }
.modal__close { position: absolute; top: 12px; right: 12px; }
.modal__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-alt); }
.modal__content { padding: var(--s3); display: grid; gap: var(--s1); }
.modal__content h3 { font-size: 1.4rem; }
.modal__content p { color: var(--muted); }
body.modal-open { overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

/* Timeline */
.timeline { position: relative; display: grid; gap: var(--s3); padding-left: var(--s4); max-width: 720px; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline__item { position: relative; }
.timeline__item::before { content: ""; position: absolute; left: calc(-1 * var(--s4)); top: 1.55rem; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--lime); }
.timeline__year { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: .2rem; }

/* Kontak */
.contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.contact a { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); transition: border-color .2s, transform .2s; overflow-wrap: anywhere; }
.contact a:hover { border-color: var(--lime); transform: translateY(-2px); }
.contact small { color: var(--muted); }
.contact__info { display: flex; flex-direction: column; min-width: 0; }
.contact__icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: var(--lime); color: var(--on-lime); }
.contact__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact .is-disabled { opacity: .5; pointer-events: none; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: var(--s3) 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; align-items: center; }

/* Efek mengetik */
.typing__rest { color: transparent; }
.typing__done::after { content: ""; display: inline-block; width: 4px; height: .85em; margin-left: 4px; background: var(--lime); vertical-align: -.05em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Animasi muncul saat scroll */
.reveal { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.reveal.from-left { transform: translateX(-60px); }
.reveal.from-right { transform: translateX(60px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsif ===== */
@media (max-width: 860px) {
  .nav__toggle { display: grid; }
  .nav__menu { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--s1) 1.25rem var(--s2); transform: translateY(-120%); visibility: hidden; transition: transform .3s, visibility .3s; }
  .nav__menu.is-open { transform: none; visibility: visible; }
  .nav__link { display: block; padding: .8rem 0; }
  .hero__grid, .about { grid-template-columns: 1fr; }
  .hero__media { order: -1; width: min(70%, 240px); justify-self: start; margin-right: 14px; }
  .hero::after { width: 110px; height: 110px; right: -20px; }
  .section { padding: 3.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== DESAIN BARU ===== */
:root {
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #fff; --bg-alt: #f1f0ee; --card: #f1f0ee;
  --text: #111; --muted: #5d5c58; --border: #e6e5e2;
  --accent: #b15f2c; --link: #b15f2c;
  --lime: #0a0a0a; --on-lime: #fff;
  --hero-bg: #c9c9c9; --veil: rgba(255,255,255,.35); --wm: rgba(255,255,255,.45);
}
:root[data-theme="dark"] {
  --bg: #0a0a0a; --bg-alt: #121212; --card: #171717;
  --text: #f3f3f1; --muted: #a3a29c; --border: #2a2a28;
  --accent: #e0925a; --link: #e0925a;
  --lime: #f3f3f1; --on-lime: #0a0a0a;
  --hero-bg: #1b1b1b; --veil: rgba(0,0,0,.4); --wm: rgba(255,255,255,.06);
}
em { font-family: var(--font); font-style: normal; font-weight: 600; }
.nav__logo::before { background: var(--accent); }

/* Tombol pil */
.btn { border-radius: 999px; text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 500; padding: .9rem 1.8rem; }
.btn--sm { padding: .55rem 1.1rem; font-size: .8rem; }
.btn--ghost:hover { color: var(--text); border-color: var(--text); }
.hero .btn--primary { padding: .4rem .4rem .4rem 1.6rem; gap: .8rem; }
.hero .btn--primary::after { content: "\2192"; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--on-lime); color: var(--lime); }

/* Hero */
.hero { display: flex; align-items: center; min-height: 100svh; padding: calc(var(--nav-h) + 2rem) 0 6rem; background: var(--hero-bg); border-radius: 0 0 2rem 2rem; isolation: isolate; }
.hero::after { display: none; }
.hero__frame { position: absolute; inset: 0; z-index: 0; width: auto; opacity: .5; }
.hero__frame::before { display: none; }
.hero__frame::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(to bottom, var(--veil), transparent, var(--veil)); }
.hero__frame img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center top; border-radius: 0; box-shadow: none; background: transparent; }
.liquid { border-radius: 0; z-index: 2; }
.hero__wm { position: absolute; left: 50%; bottom: -.1em; transform: translateX(-50%); z-index: 1; font-size: clamp(4.5rem, 21vw, 19rem); font-weight: 700; line-height: .8; letter-spacing: -.04em; text-transform: uppercase; white-space: nowrap; color: var(--wm); pointer-events: none; }
.hero__text { position: relative; z-index: 4; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: var(--s2); font-size: .9rem; color: var(--muted); }
.hero__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero__name { font-size: clamp(2.6rem, 6.5vw, 5.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; text-transform: none; }
.hero__headline { font-weight: 500; }
.hero__headline em { color: var(--accent); }
@media (min-width: 1024px) {
  .hero__frame { inset: 0 auto 0 50%; aspect-ratio: 3 / 4; transform: translateX(-50%); opacity: 1;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent); }
  .hero__text > * { max-width: 36rem; }
}

/* Section & kartu */
.section__title { font-family: var(--font); font-style: normal; font-weight: 600; letter-spacing: -.03em; font-size: clamp(2rem, 5vw, 3.4rem); }
.section__title::before { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); -webkit-mask: none; mask: none; margin-bottom: .9rem; }
.card, .contact a { border-radius: 20px; }
.skill__icon, .contact__icon { border-radius: 50%; }
.tag { border-radius: 999px; }

/* Footer gelap */
.footer { position: relative; overflow: hidden; padding: 3.5rem 0 0; background: #0a0a0a; color: #a3a29c; border-top: 0; border-radius: 2rem 2rem 0 0; }
.footer .btn--ghost { color: #f3f3f1; border-color: rgba(255,255,255,.25); }
.footer .btn--ghost:hover { border-color: #fff; color: #fff; }
.fw { margin-top: 2rem; text-align: center; font-size: clamp(4rem, 19vw, 16rem); font-weight: 700; line-height: .8; letter-spacing: -.04em; text-transform: uppercase; white-space: nowrap; color: rgba(255,255,255,.05); pointer-events: none; user-select: none; }