/* ------------------------------------------------------------------
   Imanuel Maranatha: portfolio
   Plain CSS, no framework. Tokens first, then base, layout, parts.
------------------------------------------------------------------- */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 44px);
  --nav-h: 66px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --bg: #0f1a26;
  --band: #132131;
  --card: #16283b;
  --bg-2: #17283a;
  --bg-3: #1e3349;
  --line: #2a4059;
  --text: #e8eef4;
  --text-2: #c3d0dd;
  --muted: #98aabd;
  --accent: #5ecfbf;
  --accent-ink: #05241f;
  --accent-soft: rgba(94, 207, 191, 0.14);
  --warn: #f0b866;
  --shadow: rgba(0, 0, 0, 0.45);

  --con-bg: #0b1520;
  --con-text: #d8e3ee;
  --con-line: #223448;

  --sky: #7fcdf7;
  --navy: #0b2a44;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f5f8;
  --band: #e9eff4;
  --card: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #dfe8ef;
  --line: #cbd7e1;
  --text: #14212e;
  --text-2: #2c3f52;
  --muted: #566a7e;
  --accent: #0e7c70;
  --accent-ink: #ffffff;
  --accent-soft: rgba(14, 124, 112, 0.12);
  --warn: #9a5b00;
  --shadow: rgba(20, 33, 46, 0.2);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f2f5f8;
    --band: #e9eff4;
    --card: #ffffff;
    --bg-2: #ffffff;
    --bg-3: #dfe8ef;
    --line: #cbd7e1;
    --text: #14212e;
    --text-2: #2c3f52;
    --muted: #566a7e;
    --accent: #0e7c70;
    --accent-ink: #ffffff;
    --accent-soft: rgba(14, 124, 112, 0.12);
    --warn: #9a5b00;
    --shadow: rgba(20, 33, 46, 0.2);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

.icon {
  flex: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- type ---------- */
h1 {
  font-size: clamp(2.3rem, 1.15rem + 4.3vw, 3.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.5vw, 3rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 48ch;
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section__head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section__head h2 {
  max-width: 22ch;
}

.section__intro {
  margin-top: 14px;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px var(--accent);
}

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--navy);
  color: #fff;
}
.btn--dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(11, 42, 68, 0.8);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--bg-3);
  border-color: var(--accent);
}
.icon-btn:active {
  transform: scale(0.94);
}

/* ---------- navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
  view-transition-name: nav;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav__links {
  display: none;
  gap: 30px;
  margin-left: auto;
  margin-right: 8px;
}
.nav__links a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.2s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}
.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  view-transition-name: lang;
}
.lang a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 40px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.25s;
}
.lang a[aria-current="true"] {
  color: var(--accent-ink);
}
.lang__pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.35s var(--ease);
}
.lang[data-current="id"] .lang__pill {
  transform: translateX(100%);
}

.i-sun, .i-moon {
  grid-area: 1 / 1;
}
:root[data-theme="dark"] .i-moon,
:root[data-theme="light"] .i-sun {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .i-sun { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .i-moon { display: none; }
}

.menu-btn {
  display: inline-grid;
}
.menu-btn .i-open, .menu-btn .i-close {
  grid-area: 1 / 1;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.menu-btn .i-close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}
.menu-btn[aria-expanded="true"] .i-open {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}
.menu-btn[aria-expanded="true"] .i-close {
  opacity: 1;
  transform: none;
}

.menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s 0.25s;
}
.menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.menu__links {
  display: flex;
  flex-direction: column;
  padding-block: 8px 24px;
}
.menu__links > a:not(.btn) {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 650;
  text-decoration: none;
}
.menu__cta {
  margin-top: 20px;
}

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .menu-btn, .menu { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(36px, 7vw, 96px) clamp(64px, 9vw, 120px);
}

.hero__grid {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 550;
}
.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

.hero h1 {
  margin-top: 22px;
}
.hero .lead {
  margin-top: 22px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px clamp(14px, 3vw, 40px);
  margin-top: clamp(36px, 5vw, 52px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.stats li {
  display: flex;
  flex-direction: column;
}
.stats strong {
  font-size: clamp(1.8rem, 6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(0.82rem, 2.6vw, 0.9rem);
  line-height: 1.35;
}

/* The console: the one memorable moment. Pure CSS, so it plays even before scripts load. */
.console {
  overflow: hidden;
  border: 1px solid var(--con-line);
  border-radius: 16px;
  background: var(--con-bg);
  color: var(--con-text);
  box-shadow: 0 40px 80px -40px var(--shadow);
}
.console__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-bottom: 1px solid var(--con-line);
}
.console__dots {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 7px;
}
.console__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3f55;
}
.console__title {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #7f93a8;
}
.console__body {
  padding: 22px clamp(18px, 3vw, 26px) 26px;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 0.7rem + 0.4vw, 0.93rem);
  line-height: 1.55;
}
.cl {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.cl__prompt {
  color: var(--accent);
  font-weight: 700;
}
.cl__typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: calc(var(--n) * 1ch);
  animation: type 1.1s steps(var(--n)) 0.5s both;
}
@keyframes type {
  from { width: 0; }
  to { width: calc(var(--n) * 1ch); }
}
.cl__caret {
  align-self: center;
  width: 0.55em;
  height: 1.15em;
  margin-left: -6px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite 0.5s;
}
@keyframes blink {
  50% { opacity: 0; }
}
.cl--ok {
  align-items: flex-start;
  opacity: 1;
  animation: line-in 0.45s var(--ease) both;
}
.cl--ok:nth-of-type(2) { animation-delay: 1.9s; }
.cl--ok:nth-of-type(3) { animation-delay: 2.5s; }
.cl--ok:nth-of-type(4) { animation-delay: 3.1s; }
.cl--ok:nth-of-type(5) { animation-delay: 3.7s; }
.cl--ok:nth-of-type(6) { animation-delay: 4.3s; }
.cl__tick {
  margin-top: 0.22em;
  color: var(--accent);
}
/* The bug line starts amber (found), then turns green (fixed). */
.cl--ok:nth-of-type(5) .cl__tick {
  animation: found 0.6s var(--ease) 3.95s both;
}
@keyframes found {
  from { color: var(--warn); transform: scale(1.25); }
  to { color: var(--accent); transform: scale(1); }
}
@keyframes line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}
.cl--done {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--con-line);
  color: var(--accent);
  font-weight: 700;
  animation: line-in 0.5s var(--ease) 4.9s both;
}

/* ---------- about ---------- */
.about__grid {
  display: grid;
  gap: clamp(28px, 4vw, 48px) clamp(32px, 6vw, 80px);
}
.about__body {
  display: grid;
  gap: 18px;
  color: var(--text-2);
  max-width: 62ch;
}
.facts {
  display: grid;
  gap: 20px 32px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.facts div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
  font-size: 0.9rem;
}
.facts dd {
  margin-top: 4px;
  font-weight: 650;
}
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .facts {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
}

/* ---------- services ---------- */
.svc {
  border-bottom: 1px solid var(--line);
}
.svc__row {
  display: grid;
  gap: 16px 48px;
  align-items: start;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  transition: border-color 0.3s;
}
.svc__row:hover {
  border-top-color: var(--accent);
}
.svc__title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.svc__text {
  color: var(--text-2);
  max-width: 58ch;
}
.svc__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.svc__points li {
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
}
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.link-cta .icon {
  transition: transform 0.25s var(--ease);
}
.link-cta:hover .icon {
  transform: translateX(5px);
}
@media (min-width: 860px) {
  .svc__row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.7fr) auto;
  }
}

.process {
  margin-top: clamp(56px, 8vw, 96px);
}
.process__title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.steps {
  display: grid;
  gap: 28px 24px;
  margin-top: 28px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 54px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 750;
  font-size: 0.95rem;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50px;
  right: -12px;
  height: 1px;
  background: var(--line);
}
.steps li:last-child::after {
  display: none;
}
.steps h4 {
  font-size: 1.08rem;
  font-weight: 700;
}
.steps p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.97rem;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 859px) {
  .steps li { padding-top: 0; padding-left: 54px; }
  .steps li::after { top: 40px; bottom: -22px; left: 18px; right: auto; width: 1px; height: auto; }
}

/* ---------- work ---------- */
#work {
  background: var(--band);
}

.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 24px 40px -28px var(--shadow);
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card__tag {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}
.badge {
  padding: 2px 10px;
  border: 1px solid var(--warn);
  border-radius: 999px;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 650;
}
.card__title {
  margin-top: 18px;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.card__summary {
  margin-top: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.card__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 650;
  cursor: pointer;
}
.card__more::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card__more .icon {
  transition: transform 0.25s var(--ease);
}
.card:hover .card__more .icon {
  transform: translateX(5px);
}
.card__more:focus-visible {
  outline: none;
}
.card__more:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 20px;
}

/* closing card: turns a browsing visitor into a conversation */
.card--cta {
  border-style: dashed;
  background: transparent;
}
.card--cta:hover {
  box-shadow: none;
}
.card__cta {
  margin-top: auto;
}
.card--cta:hover .link-cta .icon {
  transform: translateX(5px);
}

/* featured card: the Kiya hub keeps its own bright, toy-like colours in both themes */
.card--featured {
  grid-column: 1 / -1;
  display: grid;
  gap: 24px;
  min-height: 0;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  border-color: transparent;
  background: var(--sky);
  color: var(--navy);
}
.card--featured:hover {
  border-color: transparent;
  box-shadow: 0 30px 50px -30px rgba(127, 205, 247, 0.6);
}
.card--featured .card__icon {
  background: rgba(255, 255, 255, 0.6);
  color: var(--navy);
}
.card--featured .card__tag {
  color: #1c4767;
}
.badge--solid {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.card--featured .card__title {
  margin-top: 16px;
  font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.card--featured .card__summary {
  max-width: 46ch;
  margin-bottom: 18px;
  color: #163f5e;
  font-size: 1.05rem;
}
.card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 26px;
}
.card__play {
  position: relative;
  z-index: 2;
}
.card__more--featured {
  margin-top: 0;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.card--featured .card__more:focus-visible::after {
  outline-color: var(--navy);
}

.card__art {
  position: relative;
  min-height: 150px;
}
.tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(48px, 8vw, 74px);
  aspect-ratio: 1;
  border-radius: 18px;
  color: var(--navy);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 800;
  box-shadow: 0 7px 0 rgba(11, 42, 68, 0.2);
  animation: float 6s ease-in-out infinite alternate;
}
.tile--1 { left: 4%;  top: 12%; background: #ffd54a; --r: -6deg; }
.tile--2 { left: 30%; top: 2%;  background: #ff8a80; --r: 5deg;  animation-delay: -1.2s; }
.tile--3 { left: 56%; top: 14%; background: #8fe7bf; --r: -4deg; animation-delay: -2.4s; }
.tile--4 { left: 80%; top: 4%;  background: #ffffff; --r: 7deg;  animation-delay: -3.1s; }
.tile--5 { left: 12%; top: 58%; background: #ffffff; --r: 4deg;  animation-delay: -4.2s; }
.tile--6 { left: 38%; top: 54%; background: #ffd54a; --r: -7deg; animation-delay: -0.6s; }
.tile--7 { left: 64%; top: 60%; background: #ff8a80; --r: 3deg;  animation-delay: -2.9s; }
.tile--8 { left: 86%; top: 52%; background: #8fe7bf; --r: -5deg; animation-delay: -1.8s; }
@keyframes float {
  from { transform: translateY(-7px) rotate(var(--r)); }
  to { transform: translateY(9px) rotate(calc(var(--r) * -0.6)); }
}
@media (min-width: 860px) {
  .card--featured {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 40px;
  }
  .card__art {
    min-height: 260px;
  }
}
@media (max-width: 859px) {
  .card__art { order: -1; min-height: 130px; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.88rem;
}
.chips--solid li {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.6);
  color: var(--navy);
  font-weight: 600;
}
.chips--accent li {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.chips--small li {
  padding: 2px 10px;
  font-size: 0.8rem;
}

.note {
  margin-top: 32px;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.93rem;
}

/* ---------- experience ---------- */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
}
.timeline::before {
  background: var(--line);
}
.timeline::after {
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(var(--p, 1));
}
.tl__item {
  position: relative;
  display: grid;
  gap: 10px;
  padding-bottom: 48px;
}
.tl__item:last-child {
  padding-bottom: 0;
}
.tl__item::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -30px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}
.tl__meta {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.92rem;
}
.tl__period {
  color: var(--text);
  font-weight: 650;
}
.tl__org {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.role {
  margin-top: 16px;
}
.role__title {
  font-size: 1.02rem;
  font-weight: 650;
}
.role__period {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.role p {
  margin-top: 6px;
  color: var(--text-2);
  max-width: 66ch;
}
@media (min-width: 860px) {
  .timeline {
    padding-left: 0;
  }
  .timeline::before,
  .timeline::after {
    left: 214px;
  }
  .tl__item {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 0 48px;
  }
  .tl__item::before {
    left: 209px;
  }
  .tl__meta {
    padding-top: 3px;
    text-align: right;
  }
}

.edu {
  display: grid;
  gap: 40px;
  margin-top: clamp(56px, 8vw, 88px);
}
.edu h3 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  font-weight: 700;
}
.plain li {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.plain li:last-child {
  border-bottom: 1px solid var(--line);
}
.plain strong {
  font-weight: 650;
}
.plain span {
  color: var(--muted);
  font-size: 0.93rem;
}
@media (min-width: 760px) {
  .edu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
}

/* ---------- skills ---------- */
#skills {
  padding-top: 0;
}
.skills {
  display: grid;
  gap: 36px 44px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.skills__group h3 {
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 700;
}
.skills .chips li {
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.skills .chips li:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------- contact ---------- */
.contact {
  background: var(--band);
}
.contact__grid {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.3rem);
  max-width: 16ch;
}
.contact .lead {
  margin-top: 18px;
}
.contact__or {
  margin-top: 36px;
  margin-bottom: 8px;
  font-weight: 650;
}
.direct li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.direct li:last-child {
  border-bottom: 1px solid var(--line);
}
.direct .icon {
  color: var(--accent);
}
.direct__label {
  min-width: 78px;
  color: var(--muted);
  font-size: 0.92rem;
}
.direct a {
  font-weight: 600;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s, color 0.2s;
  overflow-wrap: anywhere;
}
.direct a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.copy:hover {
  border-color: var(--accent);
  color: var(--text);
}
.copy.is-done {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.composer {
  padding: clamp(20px, 3.4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}
.composer__pick {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.composer__pick legend {
  padding: 0;
  margin-bottom: 14px;
  font-weight: 700;
}
.composer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pick {
  position: relative;
  cursor: pointer;
}
.pick input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.pick span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 550;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.pick:hover span {
  border-color: var(--accent);
}
.pick input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.pick input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.pick:active span {
  transform: scale(0.97);
}
.pick__tick {
  width: 0;
  margin-right: 0;
  opacity: 0;
  color: var(--accent);
  transition: width 0.25s var(--ease), margin 0.25s var(--ease), opacity 0.2s;
}
.pick input:checked + span .pick__tick {
  width: 16px;
  margin-right: 8px;
  opacity: 1;
}

.field {
  margin-top: 26px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.preview {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.preview__label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.preview p {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 559px) {
  .composer__actions .btn { width: 100%; }
}
@media (min-width: 960px) {
  .contact__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

/* ---------- footer + floating chat ---------- */
.footer {
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.footer__top:hover {
  color: var(--accent);
}

.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px 0 17px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 30px -12px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s, box-shadow 0.25s;
}
.fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.fab.is-visible:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -12px var(--accent);
}
.fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ring 5s var(--ease) infinite 2s;
  pointer-events: none;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.6; }
  35%, 100% { transform: scale(1.35, 1.6); opacity: 0; }
}

/* ---------- project dialog ---------- */
.dlg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}
.dlg[open] {
  display: grid;
  place-items: center;
}
.dlg::backdrop {
  background: rgba(5, 11, 18, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.dlg.is-open::backdrop {
  opacity: 1;
}
.dlg__panel {
  display: flex;
  flex-direction: column;
  width: min(760px, 100% - 32px);
  max-height: min(88vh, 880px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
}
.dlg.is-open .dlg__panel {
  opacity: 1;
  transform: none;
}
.dlg__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 6px 28px;
}
.dlg__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
}
.dlg__scroll {
  flex: 1;
  min-height: 0;
  padding: 6px 28px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dlg__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.dlg__count {
  color: var(--muted);
  font-size: 0.9rem;
}
.detail__title {
  margin-top: 6px;
  font-size: clamp(1.55rem, 1rem + 1.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.028em;
}
.detail .chips--accent {
  margin-top: 16px;
}
.dsec {
  margin-top: 26px;
}
.dsec h4 {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
}
.dsec p {
  color: var(--text-2);
  max-width: 62ch;
}
.games {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.games li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.games strong {
  font-weight: 700;
}
.games li p {
  margin: 4px 0 10px;
  font-size: 0.97rem;
}
.games__soon {
  border-style: dashed !important;
  background: transparent !important;
}
.games__soon p {
  margin: 0 !important;
  color: var(--muted);
}
.detail__play {
  margin-top: 18px;
}
.detail__hint {
  margin-left: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}
.detail[hidden] {
  display: none;
}
.detail.is-entering {
  animation: detail-in 0.4s var(--ease) both;
}
@keyframes detail-in {
  from { opacity: 0; transform: translateX(var(--dx, 16px)); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 639px) {
  .dlg[open] { place-items: end center; }
  .dlg__panel {
    width: 100%;
    max-height: 92dvh;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
  }
  .dlg__top { padding-left: 22px; }
  .dlg__scroll { padding-inline: 22px; }
  .dlg__foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

body.is-locked {
  overflow: hidden;
}

/* ---------- scroll reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
/* cards keep their hover transform transition once revealed */
html.js .card[data-reveal].is-in {
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
  transition-delay: 0s;
}

/* ---------- page-to-page (EN <-> ID) crossfade ---------- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .cl__typed {
    width: auto;
  }
  .cl__caret {
    display: none;
  }
  @view-transition {
    navigation: none;
  }
}
