/* ==========================================================
   LAMZ — style.css
   Token → base → komponen → section → responsif
   ========================================================== */

:root {
  --ink: #0c0d12;
  --surface: #14151c;
  --raise: #1b1d26;
  --line: #292b37;
  --text: #e9e7ee;
  --muted: #8d8f9e;
  --accent: #a9b8ff;
  --ok: #7fd6a4;

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --nav-h: 4.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - var(--gutter) * 2, 72rem); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); }
.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 18ch;
  text-wrap: balance;
}

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--accent); color: var(--ink); border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center; gap: 1rem; justify-items: center;
  background: var(--ink);
  transition: opacity .5s var(--ease), visibility .5s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font: 700 1.6rem var(--font-display); letter-spacing: .3em; padding-left: .3em; }
.loader__bar { width: 7rem; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.loader__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: translateX(-100%); animation: load 1s var(--ease) infinite;
}
@keyframes load { to { transform: translateX(100%); } }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck, .nav.is-open {
  background: rgba(12, 13, 18, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__brand { font: 700 1.25rem var(--font-display); letter-spacing: .12em; }
.nav__menu { display: flex; align-items: center; gap: .25rem; }
.nav__link {
  position: relative; padding: .5rem .9rem; border-radius: 999px;
  color: var(--muted); font-size: .95rem; transition: color .2s, background .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: .1rem; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--accent);
}
.nav__link--cta { margin-left: .5rem; border: 1px solid var(--line); color: var(--text); }
.nav__link--cta:hover { background: var(--raise); }

.nav__toggle { display: none; width: 2.75rem; height: 2.75rem; position: relative; }
.nav__toggle span {
  position: absolute; left: .75rem; right: .75rem; height: 2px; background: var(--text);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav__toggle span:first-child { top: 1.1rem; }
.nav__toggle span:last-child { top: 1.6rem; }
.nav.is-open .nav__toggle span:first-child { top: 1.35rem; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { top: 1.35rem; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 3rem; padding: .75rem 1.5rem; border-radius: 999px;
  font-weight: 500; transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.96); }
.btn--solid { background: var(--accent); color: var(--ink); }
.btn--solid:hover { background: #c3ceff; }
.btn--solid i { transition: transform .25s var(--ease); }
.btn--solid:hover i { transform: translateY(3px); }
.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--raise); border-color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 4rem;
  display: flex; align-items: center;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(255,255,255,.035) calc(25% - 1px) 25%);
}
.hero__grid {
  width: min(100%, 78rem); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero__copy { display: grid; gap: 1.75rem; justify-items: start; }

.status {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.status__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.status__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

/* Kata LAMZ dengan garis panduan ala editor huruf */
.hero__word {
  position: relative; width: 100%;
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 21vw, 16rem);
  line-height: .8; letter-spacing: -.04em;
}
.hero__letters { display: flex; gap: .02em; }
.letter {
  display: inline-block;
  font-weight: 300; font-variation-settings: "wdth" 100;
  transform: translateY(105%);
  animation: rise .9s var(--ease) forwards;
  transition: font-weight .12s linear, font-variation-settings .12s linear;
}
.hero__letters { overflow: hidden; padding-block: .14em .1em; }
.letter:nth-child(1) { animation-delay: .35s; }
.letter:nth-child(2) { animation-delay: .45s; }
.letter:nth-child(3) { animation-delay: .55s; }
.letter:nth-child(4) { animation-delay: .65s; }
@keyframes rise { to { transform: translateY(0); } }

.guide {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed rgba(169, 184, 255, .4);
  opacity: 0; animation: fade .8s 1.1s forwards;
}
.guide--top { top: var(--g-cap, .2em); }
.guide--base { top: var(--g-base, 82%); }
.guide > span {
  position: absolute; right: 0;
  font: 500 clamp(.6rem, 1.1vw, .75rem)/1 var(--font-body); letter-spacing: .02em; color: var(--accent);
}
.guide--top > span { bottom: .4rem; }
.guide--base > span { top: .4rem; }
@keyframes fade { to { opacity: 1; } }

.hero__lead { max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Gift video ---------- */
.gift { justify-self: end; width: min(100%, 22rem); opacity: 0; animation: fade .9s .9s forwards; }
.gift__frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 1.5rem 1.5rem 1.5rem .4rem;
  border: 1px solid var(--line); background: var(--surface);
}
.gift__video { width: 100%; height: 100%; object-fit: cover; }
.gift__toggle {
  position: absolute; right: .9rem; bottom: .9rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(12, 13, 18, .6); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), background .2s;
}
.gift__toggle:hover { background: rgba(12, 13, 18, .85); }
.gift__toggle:active { transform: scale(.9); }
.gift__error { position: absolute; inset: auto 1rem 4.5rem 1rem; font-size: .85rem; color: var(--muted); }
.gift__error a { color: var(--accent); text-decoration: underline; }
.gift__caption { margin-top: .75rem; font-size: .85rem; color: var(--muted); }

/* ---------- Reveal (dipakai hemat) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Profile ---------- */
.profile__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.profile__text { display: grid; gap: 1.25rem; }
.profile__text .title { margin-bottom: .75rem; }
.profile__text p { color: var(--muted); max-width: 38rem; }
.facts { border-top: 1px solid var(--line); margin-top: .5rem; }
.facts__row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }

/* ---------- Skills ---------- */
.skills { background: var(--surface); border-block: 1px solid var(--line); }
.skills__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 3rem; background: var(--line); border: 1px solid var(--line); border-radius: 1.25rem; overflow: hidden; }
.skill { position: relative; padding: 2rem; background: var(--surface); transition: background .3s var(--ease); min-height: 13rem; display: flex; flex-direction: column; }
.skill:hover { background: var(--raise); }
.skill--w4 { grid-column: span 4; }
.skill--w3 { grid-column: span 3; }
.skill--w2 { grid-column: span 2; }
.skill__icon { font-size: 1.4rem; color: var(--accent); margin-bottom: auto; padding-bottom: 2rem; transition: transform .3s var(--ease); }
.skill:hover .skill__icon { transform: translateX(6px); }
.skill__name { font: 600 1.35rem var(--font-display); letter-spacing: -.01em; margin-bottom: .4rem; }
.skill__desc { color: var(--muted); font-size: .95rem; max-width: 30rem; }

/* ---------- Showcase ---------- */
.showcase__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: 3rem; }
.showcase__note { max-width: 22rem; color: var(--muted); font-size: .95rem; }
.gallery { columns: 3 16rem; column-gap: 1rem; }
.work {
  position: relative; display: block; width: 100%; margin: 0 0 1rem; break-inside: avoid;
  overflow: hidden; border-radius: 1rem; border: 1px solid var(--line); background: var(--surface);
  text-align: left; transition: border-color .3s, transform .3s var(--ease);
}
.work:hover { border-color: var(--accent); }
.work:active { transform: scale(.985); }
.work__media { width: 100%; aspect-ratio: var(--ratio, 4 / 5); display: block; object-fit: cover; transition: transform .6s var(--ease); }
.work:hover .work__media { transform: scale(1.04); }
.work__empty {
  width: 100%; aspect-ratio: var(--ratio, 4 / 5);
  display: grid; place-content: center; justify-items: center; gap: .6rem; color: var(--muted); font-size: .85rem;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.03) 10px 11px);
}
.work__empty i { font-size: 1.25rem; color: var(--muted); opacity: .6; }
.work__label { font: 500 1.05rem var(--font-display); color: var(--text); }
.work__soon { font-size: .8rem; }
.work__meta {
  position: absolute; inset: auto 0 0 0; padding: 1.25rem 1rem .9rem;
  background: linear-gradient(to top, rgba(12,13,18,.9), transparent);
  transform: translateY(40%); opacity: 0; transition: transform .35s var(--ease), opacity .35s;
}
.work:hover .work__meta, .work:focus-visible .work__meta { transform: none; opacity: 1; }
.work__title { display: block; font: 600 1rem var(--font-display); }
.work__cat { font-size: .8rem; color: var(--muted); }

/* Detail */
.detail {
  width: min(100% - 2rem, 56rem); max-height: calc(100svh - 2rem); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); color: var(--text);
}
.detail::backdrop { background: rgba(5, 5, 8, .8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.detail[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.detail__close {
  position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center; background: rgba(12,13,18,.7); border: 1px solid var(--line);
}
.detail__media img { width: 100%; max-height: 70svh; object-fit: contain; background: var(--ink); }
.detail__media .work__empty { aspect-ratio: 16 / 9; }
.detail__body { padding: 1.5rem 1.75rem 2rem; display: grid; gap: .5rem; }
.detail__cat { color: var(--accent); font-size: .85rem; }
.detail__title { font: 600 1.6rem var(--font-display); }
.detail__desc { color: var(--muted); max-width: 40rem; }

/* ---------- Music ---------- */
.music { background: var(--surface); border-block: 1px solid var(--line); }
.music__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.music__info { display: grid; gap: 1.25rem; justify-items: start; }
.music__song { font: 300 clamp(2rem, 5vw, 3.2rem)/1 var(--font-display); letter-spacing: -.03em; color: var(--accent); }
.music__hint { color: var(--muted); font-size: .95rem; max-width: 30rem; }
.player { padding: .75rem; border-radius: 1.5rem; background: var(--ink); border: 1px solid var(--line); }
.player__embed { width: 100%; height: 175px; border: 0; border-radius: 1rem; background: var(--raise); color-scheme: dark; }

/* ---------- Social ---------- */
.social__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; }
.link {
  display: flex; align-items: center; gap: 1.25rem; min-height: 5.5rem; padding: 1.25rem 1.5rem;
  border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.link:hover { border-color: var(--accent); background: var(--raise); transform: translateY(-3px); }
.link:active { transform: scale(.97); }
.link__icon { font-size: 1.9rem; width: 2rem; text-align: center; }
.link__text { display: grid; line-height: 1.3; min-width: 0; flex: 1; }
.link__text strong { font: 600 1.15rem var(--font-display); }
.link__text small { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.link__out { color: var(--muted); font-size: .85rem; transition: transform .25s var(--ease), color .25s; }
.link:hover .link__out { color: var(--accent); transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.footer { padding-block: 2.5rem; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; }
.footer__brand { font: 700 1.25rem var(--font-display); letter-spacing: .12em; }
.footer__meta { color: var(--muted); font-size: .85rem; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 50;
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--raise); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s, border-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); }
.to-top:active { transform: scale(.9); }

/* ---------- Cursor (desktop saja) ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: block; position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none;
  width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  transition: width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease), background .2s, opacity .2s;
  will-change: transform;
}
.has-cursor .cursor.is-on { opacity: .9; }
.has-cursor .cursor.is-link { width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; background: rgba(169, 184, 255, .12); }

/* ---------- Responsif ---------- */
@media (max-width: 56rem) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: .75rem var(--gutter) 1.5rem; background: rgba(12,13,18,.96);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-1rem); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .3s, visibility .3s;
  }
  .nav.is-open .nav__menu { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 1rem .25rem; font-size: 1.1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav__link.is-active::after { display: none; }
  .nav__link--cta { margin: 1rem 0 0; border: 1px solid var(--accent); border-radius: 999px; text-align: center; color: var(--accent); }

  .hero { align-items: start; }
  .hero__word { font-size: clamp(5.5rem, 27vw, 14rem); }
  .hero__grid, .profile__grid, .music__grid { grid-template-columns: minmax(0, 1fr); }
  .gift { justify-self: start; width: min(100%, 20rem); }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .skill--w4, .skill--w3 { grid-column: span 2; }
  .skill--w2 { grid-column: span 1; }
}

@media (max-width: 36rem) {
  .skill { padding: 1.5rem; min-height: 9rem; }
  .skill__icon { padding-bottom: 1.25rem; }
  .skill--w2 { grid-column: span 2; }
  .social__list { grid-template-columns: minmax(0, 1fr); }
  .facts__row { grid-template-columns: 7.5rem 1fr; }
  .detail__body { padding: 1.25rem; }
  .btn { flex: 1 1 auto; justify-content: center; }
}

@media (hover: none) {
  .work__meta { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .letter, .gift, .guide { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}
[hidden] { display: none !important; }
