/* =====================================================================
   Studioworks — stylesheet tunggal
   ===================================================================== */

:root {
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --container: 1180px;
  --header-height: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Tema terang ---------- */
html[data-theme="light"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --ink: #141416;
  --muted: #5e5e66;
  --faint: #6f6f78;
  --line: rgba(20, 20, 22, .11);
  --line-strong: rgba(20, 20, 22, .2);
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 118, 110, .1);
  --invert: #141416;
  --invert-ink: #ffffff;
  --success: #1c7a4e;
  --danger: #b3261e;
  --shadow-sm: 0 8px 30px rgba(20, 20, 22, .06);
  --shadow-lg: 0 28px 80px rgba(20, 20, 22, .12);
  --glow-1: rgba(188, 199, 220, .34);
  --glow-2: rgba(15, 118, 110, .1);
  color-scheme: light;
}

/* ---------- Tema gelap ---------- */
html[data-theme="dark"] {
  --bg: #0e0f12;
  --surface: #16171b;
  --surface-2: #1d1f24;
  --ink: #f2f3f5;
  --muted: #a8abb4;
  --faint: #8f939d;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --accent: #34d399;
  --accent-ink: #0e0f12;
  --accent-soft: rgba(52, 211, 153, .14);
  --invert: #f2f3f5;
  --invert-ink: #0e0f12;
  --success: #34d399;
  --danger: #fca5a5;
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .55);
  --glow-1: rgba(52, 211, 153, .12);
  --glow-2: rgba(80, 100, 140, .18);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

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

.skip-link {
  position: fixed; z-index: 2000; top: 12px; left: 12px;
  padding: 10px 16px; color: var(--invert-ink); background: var(--invert);
  border-radius: 10px; transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { position: relative; padding: clamp(88px, 10vw, 140px) 0; }
.section-muted { background: var(--surface-2); }

/* ---------- Progress bar ---------- */
.read-progress {
  position: fixed; z-index: 1100; top: 0; left: 0;
  width: 100%; height: 3px; pointer-events: none;
}
.read-progress span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--invert));
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- Tipografi umum ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 16px; color: var(--muted);
  font-size: .82rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .12em;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.section-heading { max-width: 800px; margin-bottom: clamp(42px, 6vw, 68px); }
.section-heading h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.06; letter-spacing: -.05em;
}
.section-heading > p:last-child {
  max-width: 660px; margin-bottom: 0; color: var(--muted); font-size: 1.06rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; z-index: 1000; top: 0; width: 100%; height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.navbar { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.025em; text-decoration: none; }
.brand-mark {
  display: grid; width: 36px; height: 36px; place-items: center;
  color: var(--invert-ink); background: var(--invert);
  border-radius: 11px; font-size: .72rem; letter-spacing: -.03em;
}

.nav-links { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: flex; align-items: center; min-height: 42px; padding: 8px 13px;
  color: var(--muted); border-radius: 10px;
  font-size: .87rem; font-weight: 600; text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); background: var(--accent-soft); }

.nav-tools { display: flex; align-items: center; gap: 6px; }

.theme-toggle {
  display: grid; width: 42px; height: 42px; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.theme-toggle svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }

.menu-toggle {
  display: none; width: 42px; height: 42px; padding: 10px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.menu-toggle span {
  display: block; width: 100%; height: 2px; margin: 4px 0;
  background: var(--ink); transition: transform .25s, opacity .25s;
}

/* ---------- Hero ---------- */
.hero {
  display: grid; min-height: 100svh;
  padding-top: calc(var(--header-height) + 64px);
  overflow: hidden; place-items: center;
}
.hero-grid { position: relative; z-index: 1; display: grid; align-items: center;
  grid-template-columns: 1.05fr .95fr; gap: clamp(50px, 7vw, 90px); }

.hero-glow { position: absolute; border-radius: 50%; filter: blur(20px); pointer-events: none; }
.hero-glow-one { top: 4%; right: -8%; width: 540px; height: 540px;
  background: radial-gradient(circle, var(--glow-1), transparent 68%); }
.hero-glow-two { bottom: -12%; left: -10%; width: 440px; height: 440px;
  background: radial-gradient(circle, var(--glow-2), transparent 70%); }

.hero-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 72%);
}

.hero-copy h1 {
  max-width: 780px; margin-bottom: 26px;
  font-size: clamp(3rem, 6.2vw, 6rem); font-weight: 720;
  line-height: .98; letter-spacing: -.07em;
}
.hero-copy h1 span { display: block; }
.hero-brand {
  margin-bottom: 12px;
  background: linear-gradient(130deg, var(--ink), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-description { max-width: 620px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; gap: 10px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s;
}
.button-primary { color: var(--invert-ink); background: var(--invert); box-shadow: var(--shadow-sm); }
.button-primary:hover { box-shadow: var(--shadow-lg); }
.button-secondary { border-color: var(--line-strong); background: transparent; }
.button-secondary:hover { background: var(--accent-soft); }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 34px; margin: 40px 0 0;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  color: var(--faint); font-size: .74rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .1em;
}
.hero-stats dd {
  margin: 4px 0 0; font-size: 2rem; font-weight: 720;
  line-height: 1.1; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
}

/* ---------- Terminal hero ---------- */
.hero-visual { position: relative; min-height: 470px; }

.terminal {
  position: absolute; top: 0; left: 0; width: 100%;
  overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; } .dot-yellow { background: #febc2e; } .dot-green { background: #28c840; }
.terminal-name { margin-left: 10px; color: var(--faint); font-family: var(--mono); font-size: .72rem; }

.terminal-body { padding: 22px; font-family: var(--mono); font-size: .8rem; line-height: 1.85; }
.terminal-body p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-prompt { color: var(--accent); font-weight: 700; }
.t-cmd { color: var(--ink); }
.t-out { color: var(--muted); padding-left: 14px; }
.t-ok { color: var(--accent); }
.t-caret {
  display: inline-block; width: 8px; height: 1em; margin-left: 2px;
  background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.float-status { right: -4%; bottom: 96px; }
.float-stack { left: -6%; bottom: 8px; }

.live-status {
  display: flex; align-items: center; gap: 8px;
  color: var(--success); font-size: .8rem; font-weight: 700;
}
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.stack-icon {
  display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center;
  color: var(--accent-ink); background: var(--accent); border-radius: 14px;
  font-family: var(--mono); font-size: .9rem; font-weight: 700;
}
.card-label { margin: 0; color: var(--faint); font-size: .72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .08em; }
.float-stack strong { display: block; font-size: .92rem; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: .76rem; text-decoration: none; transform: translateX(-50%);
}
.scroll-hint i { width: 26px; height: 1px; background: currentColor; }

/* ---------- Tentang ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 8vw, 100px); }
.about-copy { color: var(--ink); font-size: clamp(1.08rem, 2vw, 1.32rem); }
.principles { display: grid; gap: 4px; }
.principle-card {
  display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line);
  transition: padding-left .3s var(--ease);
}
.principle-card:hover { padding-left: 10px; }
.principle-index { color: var(--accent); font-family: var(--mono); font-size: .8rem; font-weight: 700; padding-top: 4px; }
.principle-card h3 { margin: 0 0 6px; font-size: 1.18rem; letter-spacing: -.03em; }
.principle-card p { margin: 0; color: var(--muted); }

/* ---------- Keahlian ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-card {
  padding: clamp(24px, 3vw, 34px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.skill-card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.skill-card h3 { margin-bottom: 20px; font-size: 1.22rem; letter-spacing: -.03em; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip-list li {
  padding: 7px 13px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-size: .84rem; font-weight: 600;
}

/* ---------- Lab ---------- */
.section-dark { background: var(--surface); border-block: 1px solid var(--line); }

.lab-card {
  overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--shadow-sm);
}
.lab-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lab-tab {
  min-height: 42px; padding: 9px 18px; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  font-size: .88rem; font-weight: 650; cursor: pointer;
  transition: color .2s, background .2s;
}
.lab-tab:hover { color: var(--ink); background: var(--accent-soft); }
.lab-tab.is-active { color: var(--accent-ink); background: var(--accent); }

.lab-panel { padding: clamp(20px, 3.5vw, 34px); }
.lab-io { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lab-field { display: flex; flex-direction: column; }
.lab-field label { margin-bottom: 8px; font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.lab-field textarea {
  width: 100%; padding: 16px; resize: vertical; min-height: 140px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: 0;
  font-family: var(--mono); font-size: .88rem; line-height: 1.7;
  transition: border-color .2s, box-shadow .2s;
}
.lab-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.lab-output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy-button {
  margin-bottom: 8px; padding: 5px 12px; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  font-size: .75rem; font-weight: 700; cursor: pointer; transition: color .2s, background .2s;
}
.copy-button:hover { color: var(--ink); background: var(--accent-soft); }
.copy-button.is-done { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.lab-output {
  display: block; min-height: 140px; padding: 16px; overflow-wrap: anywhere;
  color: var(--accent); background: var(--surface-2);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: .88rem; line-height: 1.7;
}

.lab-controls { display: grid; gap: 18px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.lab-control label { display: block; margin-bottom: 10px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.lab-control label strong { color: var(--accent); font-family: var(--mono); }
.lab-control[hidden] { display: none; }

input[type="range"] {
  width: 100%; max-width: 420px; height: 6px; margin: 0;
  background: var(--surface-2); border-radius: 999px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border: 3px solid var(--bg);
  background: var(--accent); border-radius: 50%; box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border: 3px solid var(--bg);
  background: var(--accent); border-radius: 50%;
}

#lab-key {
  width: min(100%, 320px); padding: 11px 14px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: 0; font-family: var(--mono); font-size: .88rem;
}
#lab-key:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.lab-note { margin: 0; color: var(--faint); font-size: .84rem; }
.lab-disclaimer { max-width: 620px; margin: 22px auto 0; color: var(--faint); font-size: .84rem; text-align: center; }

/* ---------- Project ---------- */
.project-heading { display: grid; align-items: end; max-width: none;
  grid-template-columns: 1.2fr .8fr; gap: 40px; }
.project-heading h2 { margin: 0; }
.project-heading > p { margin: 0 0 8px; color: var(--muted); }

.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.filter-button {
  min-height: 44px; padding: 9px 18px; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 650; cursor: pointer; transition: color .2s, background .2s, border-color .2s;
}
.filter-button:hover { color: var(--ink); border-color: var(--line-strong); }
.filter-button.is-active { color: var(--invert-ink); background: var(--invert); border-color: var(--invert); }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.project-card {
  overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.project-card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); transform: translateY(-5px); }
.project-card[hidden] { display: none; }
.project-card.is-featured { grid-column: span 2; }
.project-grid.is-filtered .project-card.is-featured { grid-column: span 1; }
.project-grid.is-filtered .project-card.is-featured .project-image-wrap { aspect-ratio: 16 / 9; }

.project-image-wrap {
  positi
