/* =========================================================
   KANAKA ZIVEN — 3D ARTIST & ANIMATOR PORTFOLIO
   Theme: "Playful Studio" (light + dark)
   ---------------------------------------------------------
   Ubah warna & ukuran di bagian 1 (TOKENS).
   ========================================================= */

/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
  color-scheme: light;

  /* Surfaces & text */
  --bg: #FFF8EE;
  --bg-alt: #FFEFDA;
  --surface: #FFFFFF;
  --surface-2: #FFF4E5;
  --indicator: #FFFFFF;
  --ink: #1E1A33;
  --ink-2: #3A3552;
  --muted: #625D7A;
  --line: rgba(30, 26, 51, 0.12);
  --line-strong: rgba(30, 26, 51, 0.55);
  --nav-bg: rgba(255, 250, 243, 0.78);
  --backdrop: rgba(30, 26, 51, 0.42);
  --dark-ink: #1E1A33;            /* teks di atas warna aksen (selalu gelap) */
  --logo-tile: #1E1A33;           /* latar logo software */

  /* Playful accents */
  --coral: #FF5A4E;
  --coral-text: #D3362B;          /* coral yang lebih gelap untuk teks kecil (kontras AA) */
  --sun: #FFC23D;
  --sky: #3D8BFF;
  --mint: #1FC39E;
  --grape: #8B5CF6;
  --pink: #FF77B7;
  --btn-shadow: var(--coral);

  /* Typography */
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --fs-h3: clamp(1.2rem, 1.08rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(2.4rem, 1.6rem + 3.4vw, 4.5rem);
  --fs-h1: clamp(3.6rem, 1.6rem + 8vw, 8.25rem);

  /* Shape & spacing */
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --radius-xl: clamp(28px, 4vw, 48px);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(84px, 11vw, 150px);
  --nav-h: 76px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-soft: 0 24px 50px -24px rgba(30, 26, 51, 0.4);
  --shadow-card: 0 1px 0 rgba(30, 26, 51, 0.03), 0 14px 30px -18px rgba(30, 26, 51, 0.3);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120F1E;
  --bg-alt: #19152A;
  --surface: #1F1A34;
  --surface-2: #272042;
  --indicator: #322A55;
  --ink: #F5F1FF;
  --ink-2: #D8D2EC;
  --muted: #A7A1C1;
  --line: rgba(245, 241, 255, 0.11);
  --line-strong: rgba(245, 241, 255, 0.5);
  --nav-bg: rgba(26, 21, 44, 0.74);
  --backdrop: rgba(6, 4, 14, 0.72);
  --logo-tile: #0D0A17;

  --coral: #FF6B5F;
  --coral-text: #FF7B70;
  --sun: #FFCC4D;
  --sky: #5E9EFF;
  --mint: #36D8B2;
  --grape: #A78BFF;
  --pink: #FF8DC4;
  --btn-shadow: var(--grape);

  --shadow-soft: 0 24px 50px -24px rgba(0, 0, 0, 0.75);
  --shadow-card: 0 14px 30px -18px rgba(0, 0, 0, 0.65);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(255, 90, 78, 0.18);
  text-rendering: optimizeLegibility;
}

html.scroll-locked, body.is-loading { overflow: hidden; }
html.scroll-locked { padding-right: var(--sbw, 0px); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.1; }

::selection { background: var(--sun); color: var(--dark-ink); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { position: relative; padding: var(--section-y) 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10001;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* Theme switch animation helpers */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out),
              color 0.5s var(--ease-out), fill 0.5s, stroke 0.5s, box-shadow 0.5s !important;
}

.theme-wipe {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  clip-path: circle(0 at var(--x, 50%) var(--y, 0));
}

/* =========================================================
   3. SHARED COMPONENTS
   ========================================================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow .num { color: var(--coral-text); }
.eyebrow::before {
  content: ''; width: 28px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.6;
}

.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.head-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: end; column-gap: 48px;
}
.section-head.head-split .section-head-text { display: grid; gap: 16px; }

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.section-subtitle { font-size: var(--fs-lead); color: var(--muted); max-width: 52ch; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px;
  border-radius: 999px; border: 2px solid var(--ink);
  font-weight: 700; font-size: 1rem; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring),
              background-color 0.3s, color 0.3s, border-color 0.3s;
}
.cta-button {
  background: var(--ink); color: var(--bg);
  box-shadow: 4px 4px 0 var(--btn-shadow);
}
.cta-button:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--btn-shadow); }
.cta-button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--btn-shadow); }
.cta-button .arrow { display: inline-block; transition: transform 0.4s var(--ease-spring); }
.cta-button:hover .arrow { transform: translateX(5px); }

.reel-btn { background: var(--surface); color: var(--ink); padding-left: 10px; }
.reel-btn:hover { background: var(--sun); border-color: var(--dark-ink); color: var(--dark-ink); transform: translateY(-3px); }
.reel-btn:active { transform: scale(0.97); }

.play-icon {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--coral); color: #fff; flex: none;
}
.play-icon svg { width: 13px; height: 13px; margin-left: 2px; }
.play-icon::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--coral); animation: ping 2.2s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 0.875rem; font-weight: 600; line-height: 1.3;
}

/* =========================================================
   4. LOADING SCREEN
   ========================================================= */
#loading-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
  cursor: pointer; overflow: hidden;
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1) 0.1s,
              border-radius 0.95s cubic-bezier(0.76, 0, 0.24, 1) 0.1s;
}
#loading-overlay.is-leaving {
  transform: translateY(-105%);
  border-radius: 0 0 50% 50% / 0 0 140px 140px;
  pointer-events: none;
}
#loading-overlay.is-leaving .loader-container,
#loading-overlay.is-leaving .loader-skip { opacity: 0; transform: translateY(-30px); }

.loader-container {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.loader-stage { position: relative; width: 120px; height: 150px; }
.loader-ball {
  position: absolute; left: 50%; bottom: 14px;
  width: 52px; height: 52px; margin-left: -26px; border-radius: 50%;
  background: var(--coral);
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.12), inset 6px 6px 0 rgba(255, 255, 255, 0.35);
  transform-origin: 50% 100%;
  animation: ballBounce 0.9s infinite, ballColor 3.6s steps(1) infinite;
}
.loader-shadow {
  position: absolute; left: 50%; bottom: 4px;
  width: 64px; height: 12px; margin-left: -32px; border-radius: 50%;
  background: var(--ink); opacity: 0.18;
  animation: ballShadow 0.9s infinite;
}
@keyframes ballBounce {
  0%   { transform: translateY(-96px) scale(1, 1); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  44%  { transform: translateY(-4px) scale(0.86, 1.16); }
  50%  { transform: translateY(0) scale(1.4, 0.66); animation-timing-function: cubic-bezier(0.1, 0.4, 0.5, 1); }
  58%  { transform: translateY(-18px) scale(0.9, 1.12); }
  100% { transform: translateY(-96px) scale(1, 1); }
}
@keyframes ballShadow {
  0%, 100% { transform: scale(0.45); opacity: 0.08; }
  50%      { transform: scale(1.15); opacity: 0.24; }
}
@keyframes ballColor {
  0%  { background-color: var(--coral); }
  25% { background-color: var(--sun); }
  50% { background-color: var(--sky); }
  75% { background-color: var(--mint); }
}
.loader-brand {
  margin-top: 26px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.6rem; letter-spacing: -0.05em; line-height: 1;
}
.loader-brand span { color: var(--coral); }
.loading-text {
  margin-top: 14px; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.progress-bar-container {
  width: 220px; height: 6px; margin-top: 14px; border-radius: 99px;
  background: var(--line); overflow: hidden;
}
.progress-bar {
  width: 100%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--sky));
  transform: scaleX(0); transform-origin: 0 50%;
}
.loader-skip {
  position: absolute; bottom: 32px; left: 0; right: 0; text-align: center;
  font-size: var(--fs-xs); color: var(--muted); font-weight: 600;
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
  animation: softBlink 2.4s ease-in-out infinite;
}
@keyframes softBlink { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.9; } }
.loader-shapes span {
  position: absolute; border-radius: 50%; opacity: 0.85;
  animation: floatY 6s ease-in-out infinite;
}
.loader-shapes span:nth-child(1) { width: 18px; height: 18px; background: var(--sun); top: 22%; left: 18%; }
.loader-shapes span:nth-child(2) { width: 12px; height: 12px; background: var(--sky); top: 30%; right: 22%; animation-delay: -2s; }
.loader-shapes span:nth-child(3) { width: 26px; height: 26px; border: 4px solid var(--pink); background: transparent; bottom: 24%; left: 26%; animation-delay: -4s; }
.loader-shapes span:nth-child(4) { width: 14px; height: 14px; background: var(--mint); bottom: 30%; right: 18%; border-radius: 4px; animation-delay: -1s; }

/* =========================================================
   5. SCROLL PROGRESS + CUSTOM CURSOR + TOAST
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 980; height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--sky), var(--grape));
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* Custom cursor "squash & stretch" (app.js → initCustomCursor, hanya desktop) */
html.has-custom-cursor,
html.has-custom-cursor *,
html.has-custom-cursor *::before,
html.has-custom-cursor *::after { cursor: none !important; }

.kz-cursor, .kz-cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 10002;
  width: 0; height: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.25s;
  will-change: transform;
}
.kz-cursor.is-visible, .kz-cursor-dot.is-visible { opacity: 1; }

/* Titik presisi (tanpa jeda) */
.kz-cursor-dot::before {
  content: ''; position: absolute; left: -4px; top: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px var(--surface);
  transition: transform 0.35s var(--ease-spring), opacity 0.2s;
}
.kz-cursor-dot.is-down::before { transform: scale(0.55); }
.kz-cursor-dot:is([data-state="view"], [data-state="drag"], [data-state="play"], [data-state="hug"], [data-state="skip"])::before {
  transform: scale(0); opacity: 0;
}

/* Ring / bola yang mengikuti (posisi & squash diatur JS, ukuran per state diatur CSS) */
.kz-cursor { --cursor-ring: var(--coral); }
.kz-cursor-shape {
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--cursor-ring); background: transparent;
  transition: width 0.5s var(--ease-spring), height 0.5s var(--ease-spring),
              background-color 0.3s, border-color 0.3s;
}
.kz-cursor-label {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-body); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; line-height: 1;
  color: var(--bg);
  opacity: 0; transform: translate(-50%, -50%) scale(0.4);
  transition: transform 0.45s var(--ease-spring), opacity 0.2s;
}
.kz-cursor-label svg { width: 14px; height: 14px; flex: none; }
.kz-cursor-label .kz-arrow { font-size: 1rem; opacity: 0.75; }

.kz-cursor[data-state="link"] .kz-cursor-shape {
  width: 58px; height: 58px;
  background: color-mix(in srgb, var(--cursor-ring) 22%, transparent);
}
.kz-cursor:is([data-state="view"], [data-state="drag"], [data-state="play"], [data-state="skip"]) .kz-cursor-shape { border-color: transparent; }
.kz-cursor:is([data-state="view"], [data-state="drag"], [data-state="play"], [data-state="skip"]) .kz-cursor-label {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}
.kz-cursor[data-state="view"] .kz-cursor-shape { width: 88px; height: 88px; background: var(--cursor-accent, var(--ink)); }
.kz-cursor[data-state="view"].has-accent .kz-cursor-label { color: var(--dark-ink); }
.kz-cursor[data-state="drag"] .kz-cursor-shape { width: 96px; height: 96px; background: var(--ink); }
.kz-cursor[data-state="play"] .kz-cursor-shape { width: 72px; height: 72px; background: var(--coral); }
.kz-cursor[data-state="play"] .kz-cursor-label { color: #fff; }
.kz-cursor[data-state="play"] .kz-cursor-label svg { width: 18px; height: 18px; margin-left: 3px; }
.kz-cursor[data-state="skip"] .kz-cursor-shape { width: 64px; height: 64px; background: var(--ink); }

/* Percikan bintang saat klik */
.kz-spark {
  position: fixed; z-index: 10001; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  pointer-events: none;
  animation: kzSpark 0.6s var(--ease-out) forwards;
}
.kz-spark svg { width: 100%; height: 100%; }
@keyframes kzSpark {
  0%   { transform: translate(0, 0) scale(0.2) rotate(0deg); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r)); opacity: 0; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 1300;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--fs-sm);
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* =========================================================
   6. NAVIGATION
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 960;
  padding: 14px var(--gutter) 0;
  pointer-events: none;
  transition: transform 0.55s var(--ease-out);
}
html.scroll-locked .site-header { padding-right: calc(var(--gutter) + var(--sbw, 0px)); }
.site-header.nav-hidden { transform: translateY(-130%); }

.navbar {
  pointer-events: auto;
  max-width: var(--container); height: 62px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 22px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 999px;
  transition: max-width 0.6s var(--ease-out), box-shadow 0.4s, background-color 0.4s;
}
.site-header.scrolled .navbar { max-width: 1000px; box-shadow: var(--shadow-soft); }

.logo {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.6rem; letter-spacing: -0.05em; line-height: 1;
}
.logo span { display: inline-block; color: var(--coral); transition: transform 0.5s var(--ease-spring); }
.logo:hover span { transform: translateY(-7px) scale(1.35); }

.nav-links {
  position: relative; display: flex; gap: 2px; padding: 5px;
  border-radius: 999px; background: var(--line);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nav-links li { position: relative; z-index: 1; }
.nav-links a {
  display: block; padding: 8px 18px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links .nav-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 999px; background: var(--indicator);
  box-shadow: 0 3px 12px -4px rgba(30, 26, 51, 0.3);
  opacity: 0;
  transition: transform 0.55s var(--ease-spring), width 0.55s var(--ease-spring), opacity 0.3s;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink);
  transition: background-color 0.3s, color 0.3s, transform 0.6s var(--ease-spring);
}
.theme-toggle-btn:hover { background: var(--sun); color: var(--dark-ink); transform: rotate(-14deg) scale(1.06); }
[data-theme="dark"] .theme-toggle-btn:hover { background: var(--grape); color: var(--dark-ink); }
.theme-toggle-btn.is-switching { animation: togglePop 0.7s var(--ease-spring); }
@keyframes togglePop { 0% { transform: scale(1); } 35% { transform: scale(0.8) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }

.theme-icon { width: 22px; height: 22px; overflow: visible; }
.theme-icon .sun-core {
  fill: currentColor; transform-box: fill-box; transform-origin: center;
  transition: transform 0.7s var(--ease-spring);
}
.theme-icon .moon-cut { transition: transform 0.7s var(--ease-out); }
.theme-icon .sun-rays {
  stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  transform-origin: 12px 12px;
  transition: transform 0.7s var(--ease-spring), opacity 0.4s;
}
[data-theme="dark"] .theme-icon .sun-core { transform: scale(1.7); }
[data-theme="dark"] .theme-icon .moon-cut { transform: translate(-9px, 3px); }
[data-theme="dark"] .theme-icon .sun-rays { transform: rotate(90deg) scale(0.3); opacity: 0; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: var(--fs-sm);
  transition: transform 0.4s var(--ease-spring), background-color 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); background: var(--coral); color: var(--dark-ink); }
.nav-cta .spark { width: 14px; height: 14px; color: var(--sun); transition: transform 0.7s var(--ease-spring), color 0.3s; }
.nav-cta:hover .spark { transform: rotate(180deg) scale(1.25); color: var(--dark-ink); }

.mobile-menu-btn {
  display: none; position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
}
.mobile-menu-btn span {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform 0.45s var(--ease-spring), opacity 0.25s, top 0.35s var(--ease-out);
}
.mobile-menu-btn span:nth-child(1) { top: 16px; }
.mobile-menu-btn span:nth-child(2) { top: 22px; }
.mobile-menu-btn span:nth-child(3) { top: 28px; }
.mobile-menu-btn.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-btn.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile slide-in menu */
.menu-overlay {
  position: fixed; inset: 0; z-index: 940;
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}
.menu-overlay.active { opacity: 1; pointer-events: auto; }

.nav-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 950;
  width: min(88vw, 400px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: calc(var(--nav-h) + 48px) 32px calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: 32px 0 0 32px;
  box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(100% + 100px));
  visibility: hidden;
  transition: transform 0.65s var(--ease-out), visibility 0s linear 0.65s;
  overflow-y: auto;
}
.nav-menu.active { transform: none; visibility: visible; transition-delay: 0s; }
.nav-menu li { overflow: hidden; }
.nav-menu ul a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 4px 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.3rem, 10vw, 3.1rem); letter-spacing: -0.04em; line-height: 1.15;
  transform: translateY(110%);
  transition: transform 0.6s var(--ease-out), color 0.3s;
}
.nav-menu ul a small {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.05em; color: var(--coral-text);
}
.nav-menu.active ul a { transform: none; transition-delay: calc(0.15s + var(--i, 0) * 0.07s); }
.nav-menu ul a:hover, .nav-menu ul a.active { color: var(--coral); }
.nav-menu-foot { display: grid; gap: 10px; color: var(--muted); font-size: var(--fs-sm); }
.nav-menu-foot strong { color: var(--ink); font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; }
.nav-menu-foot a { font-weight: 600; color: var(--ink); word-break: break-all; }
.nav-menu-socials { display: flex; gap: 10px; }
.nav-menu-socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.nav-menu-socials img { width: 24px; height: 24px; }

/* =========================================================
   7. HERO
   ========================================================= */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 56px) 0 110px;
  overflow: hidden; isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--line-strong) 1.1px, transparent 1.3px);
  background-size: 30px 30px; opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 55% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 55% 45%, #000 20%, transparent 75%);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
  animation: blobMorph 20s ease-in-out infinite;
}
[data-theme="dark"] .blob { opacity: 0.28; }
.blob-1 { width: 560px; height: 560px; top: -180px; right: -140px; background: var(--sun); }
.blob-2 { width: 480px; height: 480px; bottom: -200px; left: -160px; background: var(--pink); animation-delay: -7s; }
.blob-3 { width: 380px; height: 380px; top: 34%; left: 42%; background: var(--sky); opacity: 0.25; animation-delay: -13s; }
@keyframes blobMorph {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%; }
  33%      { transform: translate(40px, -36px) scale(1.08); border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; }
  66%      { transform: translate(-34px, 30px) scale(0.94); border-radius: 40% 60% 55% 45% / 35% 50% 50% 65%; }
}

/* Floating geometric shapes (parallax wrapper + floating inner) */
.geometric-anim { position: absolute; inset: 0; }
.geo { position: absolute; will-change: transform; }
.geo-shape { display: block; animation: floatY 7s ease-in-out infinite; }
.geo-1 { bottom: 4%; left: 58%; }
.geo-2 { top: 12%; left: 46%; }
.geo-3 { bottom: 13%; left: 44%; }
.geo-4 { top: 26%; left: 47%; }
.geo-5 { top: 62%; right: 3%; }
.geo-6 { top: 9%; right: 36%; }
.geo-ring { width: 46px; height: 46px; border-radius: 50%; border: 6px solid var(--sky); }
.geo-square { width: 34px; height: 34px; border-radius: 9px; background: var(--mint); animation: floatSpin 9s ease-in-out infinite; }
.geo-pill { width: 70px; height: 26px; border-radius: 999px; background: var(--pink); animation: floatY 8s ease-in-out infinite reverse; }
.geo-star { width: 40px; height: 40px; color: var(--sun); animation: spinFloat 12s linear infinite; }
.geo-squiggle { width: 90px; height: 30px; color: var(--coral); animation-duration: 9s; }
.geo-tri { width: 38px; height: 38px; color: var(--grape); animation: floatSpin 11s ease-in-out infinite reverse; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes floatSpin { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-20px) rotate(45deg); } }
@keyframes spinFloat { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-10px); } 100% { transform: rotate(360deg) translateY(0); } }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}
.hero-text { position: relative; z-index: 2; will-change: transform; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; margin-bottom: 26px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 700; box-shadow: var(--shadow-card);
}
.hero-badge .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--mint);
  animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(31, 195, 158, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(31, 195, 158, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 800; line-height: 0.88; letter-spacing: -0.055em;
  margin-bottom: 22px;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .line + .line { padding-left: 0.5em; }
.hero-title .accent-dot { color: var(--coral); }
.hero-title .char { display: inline-block; }
.hero-title .char-in { display: inline-block; transform-origin: 50% 100%; cursor: default; }
.hero-title .char-in.rubber { animation: rubber 0.8s var(--ease-out); }
@keyframes rubber {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.25, 0.75); }
  40% { transform: scale(0.8, 1.2) translateY(-12px); }
  60% { transform: scale(1.1, 0.9); }
  80% { transform: scale(0.97, 1.03); }
  100% { transform: scale(1, 1); }
}

.subtitle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.2rem); letter-spacing: -0.025em; line-height: 1.15;
  margin-bottom: 20px;
}
.subtitle .amp { color: var(--coral); font-style: italic; font-weight: 600; }
.subtitle .underline { position: relative; display: inline-block; }
.subtitle .underline svg {
  position: absolute; left: -4%; bottom: -0.32em; width: 108%; height: 0.45em;
  color: var(--sun); overflow: visible;
}
.subtitle .underline path { stroke-dasharray: 220; stroke-dashoffset: 220; }
.is-ready .subtitle .underline path, .no-js .subtitle .underline path {
  animation: drawLine 1s var(--ease-out) 1.25s forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.hero-lead { font-size: var(--fs-lead); color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.word-rotator {
  position: relative; display: inline-flex; vertical-align: bottom;
  height: 1.7em; padding: 0 12px; margin: 0 2px;
  border-radius: 10px; overflow: hidden;
  background: var(--rot-color, var(--sun)); color: var(--dark-ink);
  font-weight: 700;
  transition: width 0.55s var(--ease-spring), background-color 0.4s;
}
.word-rotator span {
  position: absolute; left: 12px; top: 0; white-space: nowrap; line-height: 1.7em;
  transform: translateY(110%);
  transition: transform 0.6s var(--ease-out);
}
.word-rotator span.is-active { transform: none; }
.word-rotator span.is-leaving { transform: translateY(-110%); }
.no-js .word-rotator span.is-active { position: relative; left: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero visual: poster stack + characters */
.hero-visual {
  position: relative; z-index: 1;
  width: 100%; max-width: 540px; aspect-ratio: 1 / 1.08;
  justify-self: end;
  will-change: transform;
}
.poster-stack { position: absolute; inset: 0; }
.poster {
  position: absolute; width: 50%; aspect-ratio: 3 / 4;
  transform: translate3d(calc(var(--px, 0px) + var(--sx, 0px)), calc(var(--py, 0px) + var(--sy, 0px)), 0) rotate(var(--r, 0deg));
  transition: transform 0.9s var(--ease-out);
  cursor: pointer;
}
.poster-1 { left: 0; top: 16%; --r: -11deg; z-index: 1; }
.poster-2 { right: 0; top: 4%; --r: 9deg; z-index: 2; }
.poster-3 { left: 24%; top: 25%; width: 53%; --r: -2deg; z-index: 3; }
.poster-stack:hover .poster-1 { --sx: -26px; --r: -15deg; }
.poster-stack:hover .poster-2 { --sx: 26px; --sy: -10px; --r: 13deg; }
.poster-stack:hover .poster-3 { --sy: 14px; }
.poster-card {
  position: relative; width: 100%; height: 100%;
  border-radius: var(--radius); overflow: hidden;
  border: 6px solid var(--surface);
  background: var(--surface-2);
  box-shadow: 0 34px 60px -28px rgba(30, 26, 51, 0.55);
  transition: transform 0.5s var(--ease-spring);
}
.poster:hover .poster-card { transform: scale(1.04); }
.poster-card img { width: 100%; height: 100%; object-fit: cover; }
.poster-label {
  position: absolute; left: 10px; bottom: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 0.78rem; font-weight: 700;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.4s var(--ease-spring);
}
.poster:hover .poster-label, .poster:focus-visible .poster-label { opacity: 1; transform: none; }

.character-shape { position: absolute; z-index: 5; will-change: transform; pointer-events: none; }
.character-shape .float { display: block; width: 100%; animation: floatY 6s ease-in-out infinite; }
/* Stiker karakter 2D (gajah, monyet merah, bayi) */
.character-shape .char-sticker {
  display: block; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: 50%; border: 4px solid var(--surface); background: var(--sticker-bg, #FFE59A);
  box-shadow: 4px 4px 0 var(--sticker-shadow, var(--coral)), 0 18px 30px -12px rgba(30, 26, 51, 0.45);
  transform: rotate(var(--tilt, 0deg));
}
.character-shape .char-sticker svg { display: block; width: 100%; height: 100%; }
/* Versi 3D (three-scene.js): bingkai stiker dilepas, kepala 3D digambar di canvas */
.has-3d-chars .character-shape .char-sticker {
  position: relative; overflow: visible;
  background: none; border: 0; border-radius: 0; box-shadow: none; transform: none;
}
.has-3d-chars .character-shape .char-sticker svg { visibility: hidden; }
.char-3d {
  position: absolute; left: -42%; top: -42%; width: 184%; height: 184%;
  pointer-events: none;
  filter: drop-shadow(0 14px 14px rgba(30, 26, 51, 0.32));
}
[data-theme="dark"] .char-3d { filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }
:root:not(.has-3d-chars) .char-3d { display: none; }
.char-a { width: 19%; top: -3%; left: -2%; --sticker-bg: #FFD0E5; --sticker-shadow: var(--sun); --tilt: -8deg; }
.char-b { width: 18%; bottom: -1%; right: -1%; --sticker-bg: #FFE59A; --sticker-shadow: var(--coral); --tilt: 6deg; }
.char-b .float { animation-duration: 7s; animation-delay: -2s; }
.char-c { width: 16%; top: -3%; right: -3%; --sticker-bg: #BFF0E1; --sticker-shadow: var(--mint); --tilt: 10deg; }
.char-c .float { animation: ghostFloat 5s ease-in-out infinite; }
@keyframes ghostFloat { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(6px, -16px) rotate(5deg); } }

.reel-ring-wrap { position: absolute; z-index: 6; left: -3%; bottom: 3%; width: 24%; will-change: transform; }
.reel-ring {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-spring);
}
.reel-ring:hover { transform: scale(1.08) rotate(-6deg); }
.reel-ring svg.ring-text { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 14s linear infinite; }
.reel-ring svg.ring-text text { fill: currentColor; font-family: var(--font-body); font-size: 11.5px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; }
.reel-ring .ring-play {
  width: 38%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--coral); color: #fff;
}
.reel-ring .ring-play svg { width: 34%; margin-left: 8%; }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue .mouse {
  width: 24px; height: 38px; border-radius: 14px; border: 2px solid currentColor; position: relative;
}
.scroll-cue .mouse::after {
  content: ''; position: absolute; left: 50%; top: 7px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--coral);
  animation: wheel 1.6s var(--ease-in-out) infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* Hero intro (setelah loading selesai) */
.js .hero [data-intro] { opacity: 0; }
.js .is-ready .hero [data-intro] {
  animation: introUp 1s var(--ease-out) both;
  animation-delay: var(--delay, 0s);
}
.js .is-ready .hero [data-intro="pop"] { animation-name: introPop; animation-timing-function: var(--ease-spring); animation-duration: 0.9s; }
.js .is-ready .hero [data-intro="fly"] { animation-name: introFly; animation-duration: 1.2s; }
.js .is-ready .hero [data-intro="fade"] { animation-name: introFade; animation-duration: 1.4s; }
.js .hero-title .char { opacity: 0; transform: translateY(70%) rotate(10deg); }
.js .is-ready .hero-title .char {
  animation: charRise 0.9s var(--ease-spring) both;
  animation-delay: calc(0.25s + var(--ci) * 0.04s);
}
@keyframes introUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes introPop { from { opacity: 0; transform: scale(0.4) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes introFly { from { opacity: 0; transform: translateY(140px) rotate(14deg) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes introFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes charRise { from { opacity: 0; transform: translateY(70%) rotate(10deg); } to { opacity: 1; transform: none; } }

/* =========================================================
   8. MARQUEE TAPES
   ========================================================= */
.marquee-wrap {
  position: relative; height: clamp(150px, 18vw, 220px);
  overflow: hidden; margin: -10px 0;
}
.marquee {
  position: absolute; left: -5%; width: 110%; top: 50%;
  padding: 16px 0; overflow: hidden;
  border-block: 2px solid var(--ink);
}
.marquee-a { background: var(--coral); color: var(--dark-ink); transform: translateY(-62%) rotate(-3deg); z-index: 2; }
.marquee-b { background: var(--ink); color: var(--bg); transform: translateY(-38%) rotate(2.4deg); z-index: 1; }
.marquee-track {
  display: flex; width: max-content; will-change: transform;
}
.marquee-track span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem); letter-spacing: -0.02em; white-space: nowrap; line-height: 1.1;
}
.marquee-track svg { width: 0.85em; height: 0.85em; flex: none; }
.marquee-a svg { color: var(--dark-ink); }
.marquee-b svg { color: var(--sun); }

/* =========================================================
   9. WORK / PROJECT GRID
   ========================================================= */
.work-count {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px; font-weight: 700; font-size: var(--fs-sm);
}
.work-count b {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 999px; background: var(--sun); color: var(--dark-ink);
  font-family: var(--font-display); font-size: 1.1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}

.project-card { position: relative; cursor: pointer; outline: none; border-radius: var(--radius); }
.card-body {
  position: relative; height: 100%;
  padding: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring), border-color 0.3s;
}
.project-card:hover .card-body,
.project-card:focus-visible .card-body {
  transform: translate(-5px, -5px);
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--accent, var(--coral));
}
.project-card:focus-visible .card-body { outline: 3px solid var(--sky); outline-offset: 4px; }
.project-card:active .card-body { transform: translate(0, 0) scale(0.985); box-shadow: 2px 2px 0 var(--accent, var(--coral)); }

.project-media {
  position: relative; aspect-ratio: 3 / 4;
  border-radius: calc(var(--radius) - 8px); overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
}
.project-media .hero-render {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.5s, opacity 0.5s;
}
.project-media .hero-render.is-loading { opacity: 0; }
.project-card:hover .hero-render { transform: scale(1.07); filter: saturate(1.12); }
.project-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(18, 15, 30, 0.35));
  opacity: 0; transition: opacity 0.4s;
}
.project-card:hover .project-media::after { opacity: 1; }

.placeholder-content {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--muted);
}

.year-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 11px; border-radius: 999px;
  background: var(--sun); color: var(--dark-ink);
  border: 1.5px solid var(--dark-ink);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1.2;
  box-shadow: 2px 2px 0 var(--dark-ink);
  transform: rotate(-6deg);
  transition: transform 0.5s var(--ease-spring);
}
.project-card:hover .year-badge { transform: rotate(5deg) scale(1.1); }

.project-meta { display: flex; align-items: center; gap: 12px; padding: 14px 6px 6px; }
.project-index {
  align-self: flex-start; margin-top: 3px;
  font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
}
.project-text { flex: 1; min-width: 0; }
.project-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.3rem); letter-spacing: -0.02em; line-height: 1.2;
}
.project-category { display: block; margin-top: 3px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.project-arrow {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.55s var(--ease-spring);
}
.project-arrow svg { width: 16px; height: 16px; }
.project-card:hover .project-arrow {
  background: var(--accent, var(--coral)); border-color: var(--dark-ink); color: var(--dark-ink);
  transform: rotate(45deg);
}

/* =========================================================
   9b. 3D LAYER (three.js — three-scene.js)
   Class .has-webgl / .has-carousel ditambahkan oleh JS.
   Tanpa class itu → background CSS hero & grid biasa (fallback).
   ========================================================= */
/* Background 3D tetap (fixed) di belakang seluruh halaman */
.bg3d {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.2s var(--ease-out);
}
.has-webgl .bg3d { opacity: 1; }
.bg3d canvas { display: block; width: 100%; height: 100%; }
.bg3d::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line-strong) 1.1px, transparent 1.3px);
  background-size: 30px 30px; opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 55% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 55% 45%, #000 20%, transparent 75%);
}
main, .footer { position: relative; z-index: 1; }
.has-webgl .hero-bg { display: none; }
/* Panel About tembus pandang supaya background 3D tetap terlihat */
.has-webgl .about {
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}

/* Carousel 3D (Featured Work) */
.has-carousel .project-grid { display: none; }
.work { overflow-x: clip; }

.carousel-stage {
  position: relative;
  width: 100vw; margin-left: calc(50% - 50vw);
  height: clamp(470px, 50vw, 620px);
  cursor: grab; touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.carousel-stage.is-dragging { cursor: grabbing; }
.carousel-stage.is-dragging .card-body { transition: none; }
.carousel-view { outline: none; }

.c3d-card { will-change: transform, opacity; }
.c3d-card::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  border-radius: var(--radius); background: var(--bg);
  opacity: var(--shade, 0); pointer-events: none;
}
.c3d-card img { pointer-events: none; -webkit-user-drag: none; }
.c3d-card .project-card { outline: none; }
.c3d-card.is-front .card-body {
  transform: translate(-5px, -5px);
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--accent, var(--coral));
}
.c3d-card.is-front .project-card:hover .card-body { transform: translate(-7px, -7px); box-shadow: 11px 11px 0 var(--accent, var(--coral)); }
.c3d-card.is-front .project-arrow {
  background: var(--accent, var(--coral)); border-color: var(--dark-ink); color: var(--dark-ink);
  transform: rotate(45deg);
}

.carousel-ui {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 3vw, 36px);
  margin-top: clamp(4px, 1.2vw, 16px);
}
.carousel-btn {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--btn-shadow);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), background-color 0.3s, color 0.3s;
}
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--btn-shadow); background: var(--sun); color: var(--dark-ink); border-color: var(--dark-ink); }
.carousel-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--btn-shadow); }

.carousel-caption {
  display: grid; justify-items: center; gap: 6px;
  width: min(380px, 56vw); text-align: center;
}
.carousel-count {
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent, var(--sun)); color: var(--dark-ink);
  border: 1.5px solid var(--dark-ink); box-shadow: 2px 2px 0 var(--dark-ink);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  transform: rotate(-4deg);
  transition: background-color 0.4s;
}
.carousel-title {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.3rem); line-height: 1.05; letter-spacing: -0.035em;
  text-wrap: balance;
}
.carousel-meta { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.carousel-caption.is-swap .carousel-title,
.carousel-caption.is-swap .carousel-meta { animation: captionSwap 0.55s var(--ease-out) both; }
.carousel-caption.is-swap .carousel-meta { animation-delay: 0.06s; }
@keyframes captionSwap { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.carousel-hint {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 22px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.hint-drag {
  position: relative; width: 38px; height: 20px; border-radius: 999px;
  border: 2px solid currentColor; flex: none;
}
.hint-drag::after {
  content: ''; position: absolute; top: 50%; left: 5px;
  width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--coral);
  animation: hintSlide 1.8s var(--ease-in-out) infinite;
}
@keyframes hintSlide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }

/* =========================================================
   10. ABOUT
   ========================================================= */
.about {
  margin: 0 clamp(8px, 1.4vw, 20px);
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  overflow: hidden;
  overflow: clip; /* clip (bukan hidden) supaya foto sticky tetap bisa mengikuti scroll */
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(44px, 6vw, 96px);
  align-items: center;
}

/* Foto mengikuti scroll (desktop): menempel di layar selama teks About di-scroll */
@media (min-width: 901px) {
  .about-grid { align-items: start; }
  .about-visual { position: sticky; top: calc(var(--nav-h) + 36px); }
}

.avatar-frame { position: relative; width: 100%; max-width: 450px; margin: 0 auto; }
.avatar-blob {
  position: absolute; inset: 9% -5% -5% 10%; z-index: 0;
  background: var(--coral);
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  animation: avatarBlob 14s ease-in-out infinite;
}
/* Gerakan blob dibuat kecil supaya tidak melebar ke kolom teks (Software Skills) */
@keyframes avatarBlob {
  0%, 100% { transform: translate(0, 0) rotate(0deg); border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%; }
  33%      { transform: translate(6px, -5px) rotate(2deg); border-radius: 58% 42% 40% 60% / 52% 58% 42% 48%; }
  66%      { transform: translate(-5px, 5px) rotate(-2deg); border-radius: 45% 55% 60% 40% / 40% 50% 50% 60%; }
}
.artist-avatar {
  position: relative; z-index: 1;
  aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 7px solid var(--surface);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
  transition: transform 0.7s var(--ease-spring);
}
.avatar-frame:hover .artist-avatar { transform: rotate(0deg) scale(1.02); }
.artist-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

.avatar-sticker {
  position: absolute; z-index: 2;
  padding: 10px 18px; border-radius: 999px;
  border: 2px solid var(--dark-ink); color: var(--dark-ink);
  box-shadow: 3px 3px 0 var(--dark-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1;
  white-space: nowrap;
}
.sticker-hello { top: 7%; right: -5%; background: var(--sun); --rot: 8deg; animation: wobble 4s ease-in-out infinite; }
.sticker-role { bottom: 9%; left: -7%; background: var(--mint); --rot: -6deg; animation: wobble 5s ease-in-out infinite reverse; }
@keyframes wobble { 0%, 100% { transform: rotate(var(--rot)) translateY(0); } 50% { transform: rotate(calc(var(--rot) * -0.6)) translateY(-8px); } }

.about-body { display: grid; gap: 28px; }
.about-body .section-head { margin-bottom: 0; }
.bio-text { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.75; }

.about-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); line-height: 1; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.stat:nth-child(1) .stat-num span { color: var(--coral); }
.stat:nth-child(2) .stat-num span { color: var(--sky); }
.stat:nth-child(3) .stat-num span { color: var(--mint); }
.stat-label { margin-top: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); line-height: 1.35; }

.block-label {
  margin-bottom: 14px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.skill-list { display: grid; gap: 10px; }
.skill-item {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 12px 16px 12px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring), border-color 0.3s;
}
.skill-item:hover { transform: translateX(6px); border-color: var(--ink); box-shadow: -6px 6px 0 var(--accent); }
.skill-mono {
  width: 50px; height: 50px; border-radius: 15px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--dark-ink);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.03em;
  transition: transform 0.5s var(--ease-spring);
}
.skill-item:hover .skill-mono { transform: rotate(-10deg) scale(1.06); }
/* Logo software (Maya, Blender, Unreal) di atas tile gelap agar terbaca di kedua tema */
.skill-logo { background: transparent; padding: 5px; }
.skill-logo img { width: 100%; height: 100%; object-fit: contain; }
.skill-name { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.skill-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.4; }
.skill-level {
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface-2); border: 1.5px solid var(--accent); color: var(--ink);
}

.about-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-card {
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.info-card h3 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: var(--fs-h3); letter-spacing: -0.02em; margin-bottom: 12px;
}
.info-card p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.info-card .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.availability { background: var(--ink); color: var(--bg); border-color: transparent; }
.availability h3 { color: var(--bg); }
.availability p { color: var(--bg); opacity: 0.78; }
.availability .dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--mint);
  animation: pulseDot 2s ease-out infinite;
}

/* =========================================================
   10b. JOURNEY (work experience timeline)
   ========================================================= */
.journey { overflow: hidden; }
.journey-head-text { text-align: center; justify-items: center; max-width: 720px; margin-inline: auto; }
.journey-head-text .eyebrow::after { content: ''; width: 28px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.6; }

.journey-track { position: relative; max-width: 1080px; margin: 0 auto; padding-top: 28px; }
.journey-svg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; overflow: visible; pointer-events: none;
}
.journey-path-bg {
  fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 0.5 12; opacity: 0.55;
}
.journey-path { fill: none; stroke: url(#journeyGrad); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.journey-head { opacity: 0; transition: opacity 0.3s; }
.journey-head.is-visible { opacity: 1; }
.journey-head .halo {
  fill: var(--coral); opacity: 0.25;
  transform-box: fill-box; transform-origin: center;
  animation: haloPulse 1.6s ease-out infinite;
}
.journey-head .core { fill: var(--coral); stroke: var(--surface); stroke-width: 4; }
@keyframes haloPulse { 0% { transform: scale(0.6); opacity: 0.45; } 100% { transform: scale(1.5); opacity: 0; } }

.journey-list { position: relative; z-index: 1; list-style: none; display: grid; gap: clamp(64px, 9vw, 120px); }
.journey-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
  align-items: center;
}
.journey-item[data-side="left"] .journey-card { grid-column: 1; grid-row: 1; }
.journey-item[data-side="left"] .journey-year { grid-column: 3; grid-row: 1; justify-self: start; }
.journey-item[data-side="right"] .journey-card { grid-column: 3; grid-row: 1; }
.journey-item[data-side="right"] .journey-year { grid-column: 1; grid-row: 1; justify-self: end; }

.journey-node {
  grid-column: 2; grid-row: 1; justify-self: center;
  position: relative; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 3px solid var(--line-strong);
  transition: border-color 0.4s, background-color 0.4s, transform 0.6s var(--ease-spring);
}
.journey-node span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-strong);
  transition: background-color 0.4s, transform 0.6s var(--ease-spring);
}
.journey-node.is-on { border-color: var(--accent, var(--coral)); background: var(--surface); transform: scale(1.18); }
.journey-node.is-on span { background: var(--accent, var(--coral)); transform: scale(1.2); }

.journey-card {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  opacity: 0.45; transform: translateY(26px) scale(0.97);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-spring),
              box-shadow 0.6s var(--ease-spring), border-color 0.4s;
}
.journey-item.is-reached .journey-card { opacity: 1; transform: none; border-color: var(--ink); }
.journey-item[data-side="left"].is-reached .journey-card { box-shadow: -8px 8px 0 var(--accent); }
.journey-item[data-side="right"].is-reached .journey-card { box-shadow: 8px 8px 0 var(--accent); }

.journey-period {
  display: inline-flex; padding: 5px 12px; border-radius: 999px;
  background: var(--sun); color: var(--dark-ink); border: 1.5px solid var(--dark-ink);
  box-shadow: 2px 2px 0 var(--dark-ink);
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  transform: rotate(-3deg);
}
.journey-company {
  margin-top: 16px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); line-height: 1.05; letter-spacing: -0.035em;
  text-wrap: balance;
}
.journey-role { margin-top: 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--coral-text); }
.journey-points { margin-top: 18px; display: grid; gap: 10px; color: var(--ink-2); line-height: 1.65; }
.journey-points li { position: relative; padding-left: 26px; }
.journey-points li::before {
  content: ''; position: absolute; left: 0; top: 0.45em;
  width: 13px; height: 13px; background: var(--accent, var(--coral));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.journey-year {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4rem, 1.8rem + 6.5vw, 8.5rem); line-height: 0.85; letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums; user-select: none;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-strong);
  opacity: 0.55; transform: translateY(24px) rotate(-4deg);
  transition: color 0.6s, -webkit-text-stroke-color 0.6s, opacity 0.6s, transform 0.9s var(--ease-spring);
}
.journey-item.is-reached .journey-year {
  color: var(--accent); -webkit-text-stroke-color: transparent; opacity: 1; transform: rotate(-4deg);
}

.journey-end {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 18px;
  margin-top: clamp(64px, 9vw, 110px); padding-bottom: 8px; text-align: center;
}
.journey-end-text { display: grid; justify-items: center; gap: 14px; opacity: 0.45; transform: translateY(16px); transition: opacity 0.6s, transform 0.8s var(--ease-spring); }
.journey-track.is-complete .journey-end-text { opacity: 1; transform: none; }
.journey-next { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.03em; }
.journey-end-node { --accent: var(--sky); }
.journey-end .journey-node { grid-column: 1; grid-row: auto; }

/* =========================================================
   11. CONTACT
   ========================================================= */
.contact-panel {
  --p-fg: var(--bg);
  --p-muted: color-mix(in srgb, var(--bg) 68%, transparent);
  --p-line: color-mix(in srgb, var(--bg) 16%, transparent);
  --p-surface: color-mix(in srgb, var(--bg) 7%, transparent);
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(32px, 6vw, 84px);
  border-radius: var(--radius-xl);
  background: var(--ink); color: var(--p-fg);
}
.contact-panel .eyebrow { color: var(--p-muted); }
.contact-panel .eyebrow .num { color: var(--coral); }
[data-theme="dark"] .contact-panel .eyebrow .num { color: #D3362B; }
[data-theme="dark"] .contact-title .accent { color: #E5483D; }
.contact-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.contact-deco .c-blob {
  position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55;
  animation: blobMorph 18s ease-in-out infinite;
}
.contact-deco .c-blob:nth-child(1) { width: 380px; height: 380px; right: -100px; top: -120px; background: var(--coral); }
.contact-deco .c-blob:nth-child(2) { width: 300px; height: 300px; left: 30%; bottom: -200px; background: var(--grape); animation-delay: -6s; }
.contact-deco .c-star { position: absolute; right: 8%; bottom: 14%; width: 70px; color: var(--sun); animation: spin 16s linear infinite; }
.contact-deco .c-ring { position: absolute; right: 36%; top: 11%; width: 36px; height: 36px; border-radius: 50%; border: 5px solid var(--mint); animation: floatY 6s ease-in-out infinite; }

.contact-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }
.contact-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.8rem, 1.6rem + 5vw, 6rem); line-height: 0.92; letter-spacing: -0.05em;
}
.contact-title .accent { color: var(--coral); }
.contact-lead { font-size: var(--fs-lead); color: var(--p-muted); max-width: 48ch; }

.contact-content {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px); align-items: stretch;
}
.contact-info { display: grid; gap: 12px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px 14px 14px; border-radius: var(--radius);
  background: var(--p-surface); border: 1px solid var(--p-line);
  transition: transform 0.45s var(--ease-spring), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.contact-item:hover { transform: translateX(8px); background: var(--sun); border-color: var(--sun); color: var(--dark-ink); }
.contact-item .icon-wrap {
  width: 52px; height: 52px; flex: none; border-radius: 16px;
  display: grid; place-items: center; background: transparent;
  transition: transform 0.5s var(--ease-spring);
}
.contact-item:hover .icon-wrap { transform: rotate(-8deg) scale(1.06); }
.contact-item .social-icon { width: 44px; height: 44px; }
.contact-item .ci-text { flex: 1; min-width: 0; display: grid; }
.contact-item .ci-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.contact-item .ci-value { font-weight: 700; font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.12rem); overflow-wrap: anywhere; line-height: 1.35; }
.contact-item .ci-arrow { width: 20px; height: 20px; flex: none; transition: transform 0.5s var(--ease-spring); }
.contact-item:hover .ci-arrow { transform: rotate(45deg); }

.contact-me {
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--radius);
  background: var(--coral); color: var(--dark-ink);
}
.contact-me h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); letter-spacing: -0.03em; margin-bottom: 8px; }
.contact-me p { font-size: var(--fs-base); line-height: 1.6; opacity: 0.85; }
.contact-me .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-me .cta-button { background: var(--dark-ink); color: #FFF8EE; border-color: var(--dark-ink); --btn-shadow: #FFF8EE; }
.copy-btn { background: transparent; color: var(--dark-ink); border-color: var(--dark-ink); min-height: 54px; }
.copy-btn:hover { background: var(--dark-ink); color: #FFF8EE; transform: translateY(-2px); }

/* =========================================================
   12. FOOTER
   ========================================================= */
.footer { padding: clamp(56px, 8vw, 96px) 0 calc(28px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-nav a {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: var(--fs-sm); transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-spring);
}
.footer-nav a:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.back-to-top {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: var(--fs-sm);
}
.back-to-top .circle {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--dark-ink); border: 2px solid var(--dark-ink);
  transition: transform 0.5s var(--ease-spring);
}
.back-to-top:hover .circle { transform: translateY(-6px); }
.back-to-top svg { width: 18px; height: 18px; }

.footer-wordmark {
  margin: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px);
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 13.2vw, 12.5rem); line-height: 0.82; letter-spacing: -0.06em;
  text-align: center; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-strong);
  user-select: none;
}
.footer-wordmark .fw-char { display: inline-block; transition: color 0.4s, -webkit-text-stroke-color 0.4s, transform 0.5s var(--ease-spring); }
.footer-wordmark .fw-char:hover { color: var(--accent, var(--coral)); -webkit-text-stroke-color: transparent; transform: translateY(-8%) rotate(-4deg); }
.js .footer-wordmark .fw-char { transform: translateY(60%); opacity: 0; transition: transform 1s var(--ease-out), opacity 0.8s, color 0.4s; transition-delay: calc(var(--ci) * 40ms); }
.js .footer-wordmark.is-visible .fw-char { transform: none; opacity: 1; }
.js .footer-wordmark.is-visible .fw-char:hover { transform: translateY(-8%) rotate(-4deg); transition-delay: 0s; }

.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--muted); font-weight: 500;
}

/* =========================================================
   13. MODALS
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.55s;
}
.modal.active { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.45s var(--ease-out);
}
.modal.active .modal-backdrop { opacity: 1; }
.modal-content {
  position: relative; z-index: 1;
  width: 100%; max-height: calc(100vh - clamp(24px, 6vw, 80px));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(50px) scale(0.94);
  transition: transform 0.6s var(--ease-spring), opacity 0.35s var(--ease-out);
  scrollbar-width: thin;
}
.modal.active .modal-content { opacity: 1; transform: none; }
.modal-content.is-dragging { transition: none; }

.close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-size: 1.7rem; line-height: 1;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease-spring), background-color 0.3s, color 0.3s;
}
.close-btn svg { width: 20px; height: 20px; }
.close-btn:hover { transform: rotate(90deg); background: var(--coral); color: var(--dark-ink); }
.sheet-handle { display: none; }

/* Showreel modal */
.reel-modal { max-width: 1080px; padding: clamp(12px, 1.8vw, 20px); }
.reel-modal .close-btn { top: clamp(12px, 1.8vw, 20px); right: clamp(12px, 1.8vw, 20px); }
.reel-head { display: flex; align-items: center; min-height: 46px; padding: 0 64px 14px 6px; }
.reel-title { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1; }
.reel-title small { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.reel-title .rec { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); animation: recBlink 1.4s ease-in-out infinite; }
@keyframes recBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.video-player-container {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 12px); overflow: hidden; background: #000;
}
.video-player-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.featured-projects { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 18px 6px 6px; }
.featured-projects h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
#reelProjectsList { display: flex; flex-wrap: wrap; gap: 8px; }
#reelProjectsList li {
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 700; font-size: 0.875rem;
  animation: introPop 0.6s var(--ease-spring) both; animation-delay: calc(0.25s + var(--i, 0) * 0.07s);
}

/* Project modal */
.project-modal { max-width: 1080px; }
.project-modal-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
.project-hero {
  position: relative; padding: clamp(14px, 2vw, 22px);
  background: var(--surface-2);
}
.project-hero-media {
  position: sticky; top: clamp(14px, 2vw, 22px);
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-alt);
}
.project-hero-media img, .project-hero-media video { width: 100%; height: 100%; object-fit: cover; }
.project-info { display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 4vw, 48px); padding-top: clamp(28px, 4vw, 56px); }
.project-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 50px; }
.project-tags .year-badge { position: static; transform: rotate(-4deg); }
.client-tag { padding: 5px 12px; border-radius: 999px; background: var(--mint); color: var(--dark-ink); font-weight: 700; font-size: 0.78rem; }
.cat-tag { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700; font-size: 0.78rem; color: var(--muted); }
#projectTitle {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); line-height: 0.98; letter-spacing: -0.045em;
}
.role-badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  font-weight: 700; font-size: var(--fs-sm); color: var(--coral-text);
}
.role-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.project-description { color: var(--ink-2); line-height: 1.75; font-size: var(--fs-base); }
.software-block h4, .gallery-block h4 {
  margin-bottom: 10px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.software-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.software-badge {
  padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--ink); font-weight: 700; font-size: 0.84rem;
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-spring);
}
.software-badge:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.software-badge.has-icon { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; }
.sw-icon { width: 24px; height: 24px; flex: none; display: grid; place-items: center; background: transparent; }
.sw-icon img { width: 20px; height: 20px; object-fit: contain; }
/* Logo Unreal Engine berwarna putih: dibuat gelap di light mode agar tetap terlihat tanpa latar */
:root:not([data-theme="dark"]) .skill-logo img[src*="unreal-engine"],
:root:not([data-theme="dark"]) .sw-icon img[src*="unreal-engine"] { filter: invert(1); }
.software-badge:hover .sw-icon img[src*="unreal-engine"] { filter: none; }
[data-theme="dark"] .software-badge:hover .sw-icon img[src*="unreal-engine"] { filter: invert(1); }
.gallery-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.project-nav {
  margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.project-nav button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
  font-weight: 700; font-size: var(--fs-sm);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease-spring);
}
.project-nav button:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#prevProject:hover { transform: translateX(-3px); }
#nextProject:hover { transform: translateX(3px); }
.project-counter { font-weight: 700; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }

.project-modal.swap-out .project-info > *,
.project-modal.swap-out .project-hero-media { opacity: 0; transform: translateY(14px); }
.project-info > *, .project-hero-media { transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out); }
.modal.is-opening .project-info > *,
.modal.is-opening .project-hero-media { animation: introUp 0.7s var(--ease-out) both; animation-delay: calc(0.12s + var(--i, 0) * 0.05s); }

/* =========================================================
   14. SCROLL REVEAL
   ========================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 48px, 0);
  transition: opacity 0.9s var(--ease-out), transform 1.05s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="left"] { transform: translate3d(-70px, 0, 0) rotate(-3deg); }
.js [data-reveal="right"] { transform: translate3d(70px, 0, 0); }
.js [data-reveal="scale"] { transform: scale(0.92); }
.js [data-reveal="pop"] { transform: scale(0.7) rotate(-5deg); transition-timing-function: var(--ease-out), var(--ease-spring); }
.js [data-reveal="tilt"] { transform: translate3d(0, 70px, 0) rotate(3deg); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Padding kiri-kanan (dibatalkan margin negatif) supaya huruf terakhir tidak terpotong
   oleh overflow:hidden — letter-spacing judul negatif membuat glyph melewati kotak kata */
.js .split .word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.1em 0.1em; margin: 0 -0.1em -0.1em; }
.js .split .word > span {
  display: inline-block; transform: translateY(110%) rotate(6deg); transform-origin: 0 100%;
  transition: transform 1s var(--ease-out); transition-delay: calc(var(--wi, 0) * 80ms);
}
.js .split.is-visible .word > span { transform: none; }

/* =========================================================
   15. RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
  .about-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .about-cards { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --nav-h: 70px; }
  .nav-links, .nav-cta { display: none; }
  .mobile-menu-btn { display: block; }
  .navbar { height: 58px; padding-left: 20px; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 96px; }
  .scroll-cue { display: none; }
  .geo-2, .geo-3, .geo-4, .geo-6 { display: none; }

  .section-head.head-split { grid-template-columns: 1fr; row-gap: 16px; }

  .about-grid { grid-template-columns: 1fr; }
  .avatar-frame { max-width: 360px; }

  .contact-content { grid-template-columns: 1fr; }
  .project-modal-grid { grid-template-columns: 1fr; }
  .project-hero-media { position: relative; top: 0; max-width: 380px; margin: 0 auto; }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .hero { min-height: auto; padding-bottom: 80px; }
}

@media (max-width: 700px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { justify-self: center; max-width: 460px; }
}

@media (max-width: 760px) {
  /* Modal jadi bottom sheet di HP */
  .modal { align-items: flex-end; padding: 0; }
  .modal-content {
    max-height: 92vh; max-height: 92dvh;
    border-radius: 28px 28px 0 0; border-bottom: 0;
    transform: translateY(100%);
    transition: transform 0.6s var(--ease-out), opacity 0.3s;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sheet-handle {
    display: block; position: absolute; top: 0; left: 0; right: 0; z-index: 6;
    height: 26px; pointer-events: none;
  }
  .sheet-handle::after {
    content: ''; position: absolute; left: 50%; top: 9px;
    width: 44px; height: 5px; margin-left: -22px; border-radius: 5px;
    background: var(--line-strong); opacity: 0.6;
  }
  .reel-modal { padding: 28px 12px 12px; }
  .reel-modal .close-btn { top: 28px; right: 12px; }
  .reel-head { padding-bottom: 12px; }
  .project-hero { padding-top: 34px; }
  .project-hero-media { max-width: min(320px, 82%); }
  .project-modal .close-btn { top: 12px; right: 12px; }
}

@media (max-width: 760px) {
  .journey-item { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .journey-item[data-side] .journey-card { grid-column: 2; grid-row: 1; }
  .journey-item .journey-node { grid-column: 1; margin-top: 22px; }
  .journey-item .journey-year { display: none; }
  .journey-item[data-side].is-reached .journey-card { box-shadow: 6px 6px 0 var(--accent); }
  .journey-list { gap: 40px; }
  .journey-end { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; justify-items: start; text-align: left; align-items: center; }
  .journey-end .journey-node { justify-self: center; }
  .journey-end-text { justify-items: start; }
}

@media (max-width: 600px) {
  :root { --fs-base: 1rem; }
  .blob { filter: blur(50px); }
  .blob-1 { width: 320px; height: 320px; top: -100px; right: -110px; }
  .blob-2 { width: 300px; height: 300px; }
  .blob-3 { width: 220px; height: 220px; }
  .geo-5 { display: none; }

  .hero-badge { margin-bottom: 20px; }
  .hero-title .line + .line { padding-left: 0.35em; }
  .btn { min-height: 50px; padding: 0 20px; font-size: 0.95rem; }
  .reel-btn { padding-left: 8px; }
  .play-icon { width: 32px; height: 32px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-visual { max-width: 380px; }

  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 6px; border-radius: 18px; }
  .project-media { border-radius: 13px; }
  .project-meta { padding: 10px 4px 4px; gap: 8px; }
  .project-index { display: none; }
  .project-title { font-size: 0.98rem; }
  .project-category { font-size: 0.72rem; }
  .project-arrow { width: 30px; height: 30px; }
  .project-arrow svg { width: 13px; height: 13px; }
  .year-badge { top: 8px; left: 8px; font-size: 0.68rem; padding: 4px 9px; }
  .project-card:hover .card-body { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--accent, var(--coral)); }

  .carousel-stage { height: 440px; }
  .c3d-card.is-front .card-body { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--accent, var(--coral)); }
  .carousel-ui { gap: 12px; }
  .carousel-btn { width: 48px; height: 48px; }
  .carousel-btn svg { width: 19px; height: 19px; }
  .carousel-caption { width: auto; flex: 1; min-width: 0; }
  .carousel-hint { margin-top: 16px; font-size: 0.7rem; letter-spacing: 0.1em; }

  .about { margin: 0 8px; }
  .about-stats { gap: 8px; }
  .stat { padding: 14px 12px; border-radius: 18px; }
  .skill-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .skill-mono { width: 44px; height: 44px; border-radius: 13px; font-size: 1rem; }
  .skill-level { grid-column: 2; justify-self: start; margin-top: -4px; }
  .sticker-hello { right: -2%; }
  .sticker-role { left: -2%; }

  .contact-panel { border-radius: 28px; padding: 32px 20px 22px; }
  .contact-deco .c-ring { top: auto; right: 10%; bottom: 3%; }
  .contact-item { gap: 12px; padding: 12px; }
  .contact-item .icon-wrap { width: 44px; height: 44px; border-radius: 14px; }
  .contact-item .social-icon { width: 38px; height: 38px; }
  .contact-item .ci-arrow { width: 16px; height: 16px; }
  .contact-me { padding: 22px; }
  .contact-me .actions .btn { flex: 1 1 auto; }

  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; }

  .project-nav button span.lbl { display: none; }
}

@media (max-width: 380px) {
  .project-grid { gap: 10px; }
  .hero-title { letter-spacing: -0.05em; }
}

/* Perangkat sentuh: matikan efek hover yang "nyangkut" */
@media (hover: none) {
  .project-card:hover .card-body { transform: none; box-shadow: var(--shadow-card); border-color: var(--line); }
  .project-card:hover .hero-render { transform: none; }
  .project-card:hover .project-arrow { background: transparent; border-color: var(--line); color: inherit; transform: none; }
  .project-card:hover .year-badge { transform: rotate(-6deg); }
  .skill-item:hover, .contact-item:hover { transform: none; box-shadow: none; }
  .contact-item:hover { background: var(--p-surface); border-color: var(--p-line); color: inherit; }
  .poster-stack:hover .poster-1, .poster-stack:hover .poster-2, .poster-stack:hover .poster-3 { --sx: 0px; --sy: 0px; }
  .poster-stack:hover .poster-1 { --r: -11deg; }
  .poster-stack:hover .poster-2 { --r: 9deg; }
}

/* =========================================================
   16. ACCESSIBILITY PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal], .js .split .word > span, .js .footer-wordmark .fw-char { opacity: 1 !important; transform: none !important; }
  .journey-card, .journey-end-text { opacity: 1 !important; transform: none !important; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(30, 26, 51, 0.45); --muted: #3A3552; }
  [data-theme="dark"] { --line: rgba(245, 241, 255, 0.45); --muted: #E1DCF2; }
  .card-body, .stat, .skill-item, .info-card { border-width: 2px; }
  .has-webgl .about { background: var(--bg-alt); }
}
