/* ============================================================
   Portfolio - clean monochrome
   ============================================================ */

:root {
  --ink: #08080a;
  --navy: #0d1017;
  --navy-2: #11141d;
  --panel: #14171f;
  --panel-2: #191d27;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f4f5f7;
  --muted: #9aa1ad;
  --muted-2: #6b7280;
  --accent: #ffffff;
  --accent-soft: #b9c0cc;
  --text-soft: #cfd3da;
  --text-soft-2: #d7dae0;
  --tint: 255, 255, 255;
  --tint-4: rgba(255, 255, 255, 0.04);
  --tint-6: rgba(255, 255, 255, 0.06);
  --tint-8: rgba(255, 255, 255, 0.08);
  --tint-10: rgba(255, 255, 255, 0.1);
  --tint-16: rgba(255, 255, 255, 0.16);
  --accent-hover: #e6e8ec;
  --hero-scrim: rgba(8, 8, 10, 0.92);
  --hero-scrim-mid: rgba(8, 8, 10, 0.72);
  --header-bg: rgba(8, 8, 10, 0.6);
  --header-bg-scrolled: rgba(8, 8, 10, 0.86);
  --lightbox-bg: rgba(4, 4, 6, 0.92);
  --pill-bg: rgba(10, 10, 12, 0.82);
  --radius: 22px;
  --radius-sm: 16px;
  --radius-button: 999px;
  --wrap: 1180px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
  --ease-pop: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-head: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
}

:root[data-theme="light"] {
  --ink: #f3f4f7;
  --navy: #ffffff;
  --navy-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --line: rgba(15, 18, 28, 0.12);
  --line-strong: rgba(15, 18, 28, 0.26);
  --text: #14161c;
  --muted: #565e6c;
  --muted-2: #7a828f;
  --accent: #14161c;
  --accent-soft: #3f4653;
  --text-soft: #2c313b;
  --text-soft-2: #2c313b;
  --tint: 15, 18, 28;
  --tint-4: rgba(15, 18, 28, 0.04);
  --tint-6: rgba(15, 18, 28, 0.06);
  --tint-8: rgba(15, 18, 28, 0.08);
  --tint-10: rgba(15, 18, 28, 0.1);
  --tint-16: rgba(15, 18, 28, 0.14);
  --accent-hover: #2a2e38;
  --hero-scrim: rgba(243, 244, 247, 0.94);
  --hero-scrim-mid: rgba(243, 244, 247, 0.72);
  --header-bg: rgba(243, 244, 247, 0.72);
  --header-bg-scrolled: rgba(243, 244, 247, 0.9);
  --lightbox-bg: rgba(240, 241, 245, 0.94);
  --pill-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 60px -34px rgba(15, 18, 28, 0.35);
}

html {
  scroll-behavior: smooth;
}

/* Invert monochrome (white) icon art for light mode */
:root[data-theme="light"] .brand__logo,
:root[data-theme="light"] .hero__mark img,
:root[data-theme="light"] .engine__badge img,
:root[data-theme="light"] .skill__icon,
:root[data-theme="light"] .social img,
:root[data-theme="light"] .achievement__trophy,
:root[data-theme="light"] .bxl-invert {
  filter: invert(1);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}

body.page-ready {
  animation: pageFadeIn 0.38s ease both;
}

body.page-fade-out {
  opacity: 0;
  transition: opacity 0.38s ease;
}

/* Theme colors change atomically; the whole viewport crossfades together. */
html.theme-changing *, html.theme-changing *::before, html.theme-changing *::after {
  transition: none !important;
}
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: ease-in-out;
}
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--line);
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand__logo {
  width: 172px;
  height: auto;
  transform: none;
}

.brand:hover .brand__logo {
  transform: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.site-nav a {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:not(.site-nav__cta):hover {
  color: var(--text);
  background: var(--tint-6);
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease,
    transform 0.3s var(--ease-pop);
}

.theme-toggle:hover {
  border-color: var(--text);
  transform: scale(1.08);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}









.theme-toggle__icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  transform: rotate(0deg);
  transition: transform 0.5s var(--ease-pop);
}

.theme-toggle__icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.theme-toggle__moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition: transform 0.5s var(--ease-pop), opacity 0.35s ease;
}

.theme-toggle__sun {
  opacity: 0;
  transform: scale(0.2) rotate(-90deg);
  transition: transform 0.5s var(--ease-pop), opacity 0.35s ease;
}

:root[data-theme="light"] .theme-toggle__icon {
  transform: rotate(140deg);
}

:root[data-theme="light"] .theme-toggle__moon {
  opacity: 0;
  transform: scale(0.2) rotate(90deg);
}

:root[data-theme="light"] .theme-toggle__sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle--float {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 80;
}

.site-nav__cta {
  color: var(--text);
  padding: 9px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s var(--ease-pop);
}

.site-nav__cta:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s var(--ease-pop), background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

.btn::after { display: none; }

.btn:hover::after {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--solid {
  background: var(--accent);
  color: var(--ink);
}

.btn--solid:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 30px -14px rgba(var(--tint), 0.45);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--tint-8);
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.48s ease;
}


.hero::before { display: none; }

.hero__glow { display: none; }

.blob { display: none; }

.blob--1 {
  width: 360px;
  height: 360px;
  top: -90px;
  right: 6%;
  background: var(--tint-10);
  animation: none;
}

.blob--2 {
  width: 260px;
  height: 260px;
  bottom: -70px;
  right: 26%;
  background: rgba(var(--tint), 0.05);
  animation: none;
}

@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-26px, 30px);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, -22px);
  }
}

.hero__grid {
  position: relative;
  z-index: 2;
  min-height: 80vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero__intro {
  max-width: 100%;
}

.hero__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__tagline {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__mark {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.hero__mark-halo { display: none; }

.hero__mark img {
  position: relative;
  width: min(360px, 72%);
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 40px rgba(var(--tint), 0.25));
  animation: none;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(3deg);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}

.section#work {
  padding-bottom: 48px;
}

.section#stack {
  padding-top: 48px;
  padding-bottom: 48px;
}

.section#stack,
.section#contact {
  border-bottom: none;
}

.section__head {
  margin-bottom: 38px;
}

.section__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

/* ---------- About ---------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 42px;
  align-items: start;
}

.about__lead {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.7;
  max-width: 60ch;
}

.about__visual {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(var(--tint), 0.1);
  border-radius: var(--radius);
  background: var(--panel);
  perspective: 800px;
}

.about__visual::after { display: none; }

.about__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: translate3d(var(--visual-x, 0px), var(--visual-y, 0px), 0)
    rotateX(var(--visual-rx, 0deg)) rotateY(var(--visual-ry, 0deg)) scale(1.03);
  transition: transform 0.22s ease, filter 0.3s ease;
  filter: none;
}

.about__visual:hover img {
  filter: contrast(1.08);
}

.engine {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  width: min(100%, 760px);
  padding: 30px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease-pop), border-color 0.3s ease;
}

.engine:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.engine__top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.engine__badge {
  flex: none;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  transition: transform 0.4s var(--ease-pop);
}

.engine:hover .engine__badge {
  transform: rotate(-6deg) scale(1.06);
}

.engine__badge img {
  width: 32px;
  height: 32px;
}

.engine__kicker {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
}

.engine__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.engine__facts {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.engine__facts li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--tint-4);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ---------- Games ---------- */

.games {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.game {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  column-gap: 48px;
  row-gap: 24px;
  align-items: center;
}

.game--flip .game__info {
  order: 2;
}

.game--flip .rail {
  order: 1;
}

.game__info {
  min-width: 0;
}

.game__head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.game__icon {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease-pop);
}

.game__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game__titles {
  min-width: 0;
}

.game__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.game__order {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted-2);
}

.game__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.1;
}

.game__desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 56ch;
}

.game__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ---------- Badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.badge {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0) scale(1);
  filter: brightness(1) saturate(1);
  transition: transform 0.45s var(--ease-pop), filter 0.4s ease,
    box-shadow 0.45s ease;
}

.badge img {
  height: 46px;
  width: auto;
  border-radius: 0;
  display: block;
}

.badge--store {
  border-radius: 0;
}

.badge--store img {
  height: 48px;
  border-radius: 0;
  outline: none;
}

.badge::after { display: none; }

.badge:hover::after,
.badge:focus-visible::after {
  left: 160%;
}

.badge:hover,
.badge:focus-visible {
  transform: translateY(-5px) scale(1.035);
  filter: brightness(1.08) saturate(1.05);
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(var(--tint), 0.22),
    0 0 26px -4px rgba(var(--tint), 0.28);
  outline: none;
}

.badge:active {
  transform: translateY(-2px) scale(1.01);
}

@media (prefers-reduced-motion: reduce) {
  .badge::after {
    display: none;
  }
}

/* ---------- Image rail ---------- */

.rail {
  position: relative;
  min-width: 0;
}

.rail__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 20px;
  margin: 0 -4px;
  scrollbar-width: auto;
  scrollbar-color: rgba(var(--tint), 0.5) var(--tint-8);
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.rail__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.rail__track::-webkit-scrollbar {
  height: 12px;
}

.rail__track::-webkit-scrollbar-thumb {
  background: rgba(var(--tint), 0.45);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.rail__track::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--tint), 0.7);
  background-clip: padding-box;
}

.rail__track::-webkit-scrollbar-track {
  background: rgba(var(--tint), 0.07);
  border-radius: 999px;
}

.rail__item {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(var(--tint), 0.1);
  background: var(--panel);
  transition: transform 0.4s var(--ease-pop), border-color 0.45s ease,
    box-shadow 0.45s ease;
}

.rail__item img {
  width: auto;
  height: 240px;
  object-fit: cover;
  cursor: zoom-in;
}

.rail__item img[data-shape="wide"] {
  width: auto;
  height: 202px;
}

.rail__item img[data-shape="tall"] {
  width: auto;
  height: 232px;
}

.rail__item:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--tint), 0.22);
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.8);
}

.rail__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pill-bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.25s var(--ease-pop), background 0.25s ease,
    opacity 0.25s ease;
}

.rail:hover .rail__nav,
.rail:focus-within .rail__nav {
  opacity: 1;
  pointer-events: auto;
}

.rail__nav:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-50%) scale(1.1);
}

.rail__nav--prev {
  left: -14px;
}

.rail__nav--next {
  right: -14px;
}

.rail.is-start .rail__nav--prev,
.rail.is-end .rail__nav--next,
.rail.is-static .rail__nav {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Skills ---------- */

.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.3s var(--ease-pop),
    background 0.25s ease;
}

.skill:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  transform: translateX(5px);
}

.skill__top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  width: 190px;
}

.skill__icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: none;
}

.skill__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.skill__meter {
  display: flex;
  gap: 8px;
  flex: 1;
}

.skill__seg {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--tint-10);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.skill__seg.is-on {
  background: var(--accent);
  box-shadow: none;
}

.skill:hover .skill__seg.is-on {
  box-shadow: none;
}

/* ---------- Socials ---------- */

.socials {
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social {
  flex: 1 1 0;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.3s var(--ease-pop),
    background 0.25s ease;
}

.social:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  transform: translateY(-5px);
}

.social img {
  width: 32px;
  height: 32px;
  flex: none;
}

.social span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-soft-2);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: none;
  background: transparent;
}

.site-footer__inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  justify-content: center;
  text-align: center;
  font-family: var(--font-head);
  color: var(--muted-2);
  font-size: 0.85rem;
}

.site-footer__inner p {
  margin: 0;
}

/* ---------- Game detail page ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 44px 0 0;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    transform 0.25s var(--ease-pop);
}

.back-link:hover {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateX(-4px);
}

.back-link__arrow {
  font-size: 22px;
  line-height: 0.9;
  transition: transform 0.25s var(--ease-pop);
}

.back-link:hover .back-link__arrow {
  transform: translateX(-3px);
}

.back-link__text {
  padding-top: 1px;
}

.detail__hero {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 48px;
  align-items: center;
  padding: 44px 0 20px;
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.detail__intro {
  min-width: 0;
}

.detail__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.detail__desc {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
  max-width: 62ch;
}

.detail__icon {
  justify-self: center;
  width: min(240px, 70%);
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  animation: none;
}

.detail__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.detail__section-title {
  margin: 0 0 22px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.panel {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease-pop), border-color 0.3s ease;
}

.panel:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.panel__label {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}

.panel__value {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.5;
}

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.point {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease-pop), border-color 0.3s ease;
}

.point:hover {
  transform: translateX(5px);
  border-color: var(--line-strong);
}

.point__mark {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.point:hover .point__mark {
  background: var(--accent);
  border-color: var(--accent);
}

.points--learning .point__mark {
  border-color: var(--accent);
}

.point__text {
  color: var(--text-soft-2);
  line-height: 1.7;
}

/* ---------- Achievements ---------- */

.achievements {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game > .achievements {
  grid-column: 1 / -1;
  order: 3;
  margin-top: 0;
}

.achievement {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.38s var(--ease-pop), border-color 0.38s ease,
    box-shadow 0.38s ease;
}

.achievement:disabled {
  cursor: default;
}

.achievement:not(:disabled):hover,
.achievement:not(:disabled):focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px -20px rgba(0, 0, 0, 0.9),
    0 0 24px -8px rgba(var(--tint), 0.22);
  outline: none;
}

.achievement__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.achievement__trophy {
  width: 26px;
  height: 26px;
  flex: none;
  opacity: 0.85;
  transition: transform 0.35s var(--ease-pop), opacity 0.3s ease;
}

.achievement:not(:disabled):hover .achievement__trophy {
  transform: rotate(-8deg) scale(1.1);
  opacity: 1;
}

.achievement__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.achievement__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.achievement__event {
  font-size: 0.86rem;
  color: var(--muted);
}

.achievement__certificate {
  display: none;
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.achievement__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-soft);
  white-space: nowrap;
}

.achievement__arrow {
  transition: transform 0.3s var(--ease-pop);
}

.achievement:hover .achievement__arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.detail__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
}

.detail__nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease-pop), border-color 0.3s ease,
    background 0.3s ease;
}

.detail__nav-link:hover {
  border-color: var(--line-strong);
  background: var(--panel);
}

.detail__nav-link--prev {
  grid-column: 1;
}

.detail__nav-link--prev:hover {
  transform: translateX(-5px);
}

.detail__nav-link--next {
  grid-column: 2;
  justify-content: flex-end;
  text-align: right;
}

.detail__nav-link--next:hover {
  transform: translateX(5px);
}

.detail__nav-arrow {
  flex: none;
  font-size: 1.5rem;
  color: var(--accent-soft);
  transition: transform 0.3s var(--ease-pop), color 0.3s ease;
}

.detail__nav-link--prev:hover .detail__nav-arrow {
  transform: translateX(-4px);
  color: var(--accent);
}

.detail__nav-link--next:hover .detail__nav-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.detail__nav-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
}

.detail__nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__nav-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.detail__nav-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.detail__nav-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
}

.detail__missing {
  padding: 120px 32px;
  text-align: center;
}

.detail__missing h1 {
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 12px;
}

.detail__missing p {
  color: var(--muted);
  margin-bottom: 24px;
}

.load-error {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.load-error h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 8px;
}

.load-error p {
  color: var(--muted);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vw;
  background: var(--lightbox-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.38s ease, transform 0.38s ease;
}









@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox__close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--pill-bg);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease-pop);
}

.lightbox__close:hover {
  background: var(--accent);
  color: var(--ink);
  transform: rotate(90deg);
}

.lightbox__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  pointer-events: none;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 1;
  transform: none;
}

/* ---------- 404 ---------- */

body.error-page .not-found-container1 {
  min-height: 100vh;
  background: var(--panel);
}

/* ---------- Responsive: iPad / tablet ---------- */

@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 76px;
    padding-bottom: 76px;
    gap: 32px;
  }

  .hero__mark {
    min-height: 300px;
  }

  .hero__mark img {
    width: min(300px, 60%);
  }

  .about__grid,
  .detail__hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__lead,
  .about__visual,
  .engine {
    grid-column: 1;
    grid-row: auto;
  }

  .about__visual {
    justify-self: center;
  }

  .detail__icon {
    justify-self: start;
    width: 180px;
  }

  .game,
  .game--flip {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .game--flip .game__info,
  .game--flip .rail {
    order: initial;
  }

  .rail__item img,
  .rail__item img[data-shape="wide"] {
    height: 210px;
    width: auto;
  }

  .rail__item img[data-shape="tall"] {
    height: 210px;
    width: auto;
  }

  .rail__nav--prev {
    left: 6px;
  }

  .rail__nav--next {
    right: 6px;
  }
}

/* ---------- Responsive: phone ---------- */

@media (max-width: 640px) {
  .wrap,
  .site-header__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header__inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-nav {
    gap: 4px;
    font-size: 13px;
  }

  .site-nav a:not(.site-nav__cta) {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .section__head {
    margin-bottom: 36px;
  }

  .brand__logo {
    width: 124px;
  }

  .about__visual {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.2rem, 11vw, 3rem);
    white-space: normal;
    text-wrap: balance;
  }

  .hero__mark {
    min-height: 240px;
  }

  .hero__mark img {
    width: min(240px, 62%);
  }

  .games {
    gap: 72px;
  }

  .game__head {
    gap: 16px;
  }

  .game__icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .game__actions {
    gap: 12px;
  }

  .btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 13px 20px;
  }

  .rail__item img,
  .rail__item img[data-shape="wide"],
  .rail__item img[data-shape="tall"] {
    height: 170px;
    width: auto;
  }

  .rail__nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .stack {
    gap: 10px;
  }

  .socials {
    gap: 10px;
  }

  .skill {
    padding: 16px;
    gap: 14px;
  }

  .skill__top {
    width: 130px;
    gap: 12px;
  }

  .social {
    padding: 16px;
    gap: 12px;
  }

  .skill__icon,
  .social img {
    width: 26px;
    height: 26px;
  }

  .skill__name,
  .social span {
    font-size: 0.9rem;
  }

  .skill__seg {
    height: 6px;
  }

  .detail__nav {
    grid-template-columns: 1fr;
  }

  .detail__nav-link--next {
    text-align: left;
  }

  .back-link {
    margin-top: 28px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox__close {
    top: 14px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Quiet borders and restrained feedback keep the existing layout focused. */
.hero { background: var(--ink); }
.engine, .panel, .point, .achievement, .detail__icon { box-shadow: none; }
.engine:hover, .skill:hover, .social:hover, .panel:hover, .point:hover,
.achievement:hover, .badge:hover, .badge:focus-visible, .rail__item:hover,
.detail__nav-link:hover { transform: none; }
.btn:hover { transform: translateY(-1px); }
.btn--solid:hover { box-shadow: none; }
.about__visual img, .about__visual:hover img { transform: none; filter: none; }
.detail__icon { border-radius: var(--radius); }
.site-footer { border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* One pill shape for text actions; square icon actions become circles. */
.btn, .site-nav a, .theme-toggle, .back-link, .rail__nav,
.lightbox__close, .achievement, .detail__nav-link, .social, .not-found-link {
  border-radius: var(--radius-button);
}

.game__icon { border-radius: 24px; overflow: hidden; }
.detail__icon, .detail__nav-icon { border-radius: 22%; overflow: hidden; }
.game__icon img, .detail__icon img { border-radius: inherit; }
.rail__item { border-radius: 20px; }
.language-slot { flex: none; }
.language-switch { position: relative; display: flex; align-items: center; gap: 2px; width: 76px; padding: 3px; height: 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); cursor: pointer; }
.language-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 34px; height: 32px; border-radius: 999px; background: var(--tint-16); transform: translateX(0); transition: transform .25s ease; }
.language-switch[aria-checked="true"]::before { transform: translateX(34px); }
.language-flag { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 32px; opacity: .5; transition: opacity .25s ease, transform .25s ease; }
.language-switch[aria-checked="false"] .language-flag--en,
.language-switch[aria-checked="true"] .language-flag--id { opacity: 1; transform: scale(1.05); }
.language-switch:hover .language-flag { opacity: 1; }
.language-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.language-flag img { width: 24px; height: 16px; border-radius: 3px; }
.language-slot--float { position: fixed; top: 20px; right: 76px; z-index: 80; }
@media (max-width: 640px) { .site-header__inner { gap: 8px; } .brand__logo { width: 110px; } .site-nav__cta { padding: 9px 10px; } }
@media (max-width: 360px) { .brand__logo { width: 92px; } .site-header__inner { padding-left: 12px; padding-right: 12px; } }


.lightbox.is-open img { opacity: 1; transform: scale(1); }

.rail__item img { object-fit: contain; }

@media (max-width: 640px) { .detail__nav-link--prev, .detail__nav-link--next { grid-column: 1; min-width: 0; } .detail__nav-text { min-width: 0; overflow-wrap: anywhere; } }

/* Fluid layout between desktop, tablet and phone widths. */
.wrap, .site-header__inner {
  padding-left: clamp(16px, 3vw, 32px);
  padding-right: clamp(16px, 3vw, 32px);
}
.wrap { max-width: calc(var(--wrap) + 64px); }
.hero__grid {
  min-height: min(680px, 76svh);
  padding-block: clamp(64px, 8vw, 112px);
}
.hero__title { font-size: clamp(2.2rem, 6vw, 5.2rem); }
.section { padding-block: clamp(48px, 6vw, 68px); }
.game { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); column-gap: clamp(24px, 4vw, 48px); }
.about__grid { gap: clamp(24px, 4vw, 42px); }
.detail__hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
.engine, .panel, .point, .skill, .detail__nav-link { min-width: 0; }
.game__title, .detail__title, .engine__kicker, .panel__value, .point__text,
.achievement__event, .detail__nav-title { overflow-wrap: anywhere; }
.panels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.social { min-width: min(100%, 180px); }
.rail { container-type: inline-size; }
.rail__item img, .rail__item img[data-shape="wide"], .rail__item img[data-shape="tall"] {
  width: min(calc(clamp(170px, 22vw, 260px) * var(--image-ratio, 1.6)), calc(100cqw - 8px));
  height: auto;
}
section[id] { scroll-margin-top: 100px; }
@media (max-width: 1024px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr); }
  .about__lead, .engine { grid-column: 1; }
  .about__lead { grid-row: 1; }
  .engine { grid-row: 2; padding: 24px; }
  .about__visual { grid-column: 2; grid-row: 1 / span 2; }
  .detail__hero { grid-template-columns: minmax(0, 1fr) minmax(140px, .35fr); }
  .detail__icon { width: min(100%, 180px); }
  .site-header__inner { gap: 12px; }
  .site-nav { gap: 4px; font-size: 14px; }
  .site-nav a { padding: 10px 12px; }
  .brand__logo { width: 145px; }
}
@media (max-width: 760px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 4px;
    padding-block: 10px;
  }
  .brand { grid-column: 1 / span 2; grid-row: 1; justify-self: start; }
  .brand__logo { width: clamp(110px, 20vw, 145px); }
  .site-nav { display: contents; }
  .site-nav a, .site-nav a:not(.site-nav__cta) {
    display: flex;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    min-height: 44px;
    font-size: 13px;
  }
  .theme-toggle { grid-column: 3; grid-row: 1; justify-self: end; width: 44px; height: 44px; }
  .language-slot { grid-column: 4; grid-row: 1; justify-self: end; }
  .language-switch { height: 44px; }
  .language-switch::before { top: 5px; }
  .hero__grid { min-height: auto; padding-block: clamp(64px, 12vw, 90px); }
  .hero__title { font-size: clamp(2.2rem, 7.5vw, 3.5rem); }
  .hero__actions { margin-top: 28px; }
  .about__grid, .detail__hero { grid-template-columns: minmax(0, 1fr); }
  .about__lead, .engine { grid-column: 1; grid-row: auto; }
  .about__visual { display: none; }
  .detail__hero { gap: 24px; }
  .detail__icon { width: 120px; }
  .achievement { flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius); }
  .achievement__main { flex-basis: 100%; }
  .achievement__cta { margin-left: 40px; white-space: normal; }
  .detail__nav { grid-template-columns: minmax(0, 1fr); }
  .detail__nav-link--prev, .detail__nav-link--next { grid-column: 1; }
  .detail__nav-link--next { justify-content: flex-start; text-align: left; }
  .detail__nav-link { border-radius: var(--radius); padding: 18px; }
  .btn, .back-link { min-height: 44px; }
  .lightbox { padding: 72px 16px; }
  .lightbox img { max-height: calc(100dvh - 144px); }
  section[id] { scroll-margin-top: 122px; }
}
@media (max-width: 400px) {
  .skill { flex-direction: column; align-items: stretch; gap: 12px; }
  .skill__top { width: auto; }
  .skill__meter { min-height: 6px; gap: 5px; }
  .game__head { gap: 12px; }
  .game__icon { width: 56px; height: 56px; border-radius: 16px; }
  .game__meta { gap: 8px; }
  .game__title { font-size: 1.5rem; }
  .engine { padding: 20px; }
  .engine__top { gap: 12px; }
  .point { padding: 18px; gap: 12px; }
}
@media (hover: none) {
  .rail__nav { opacity: 1; pointer-events: auto; width: 44px; height: 44px; }
}
/* Phones in landscape can be wider than the portrait breakpoint. */
@media (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  .about__visual { display: none; }
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .about__lead, .engine { grid-column: 1; grid-row: auto; }
}

/* Animate the icon separately so the page can crossfade as one surface. */
/* Background copy and engine panel no longer reserve a portrait column. */
.about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.about__lead { grid-column: 1; grid-row: 1; }
.engine { grid-column: 2; grid-row: 1; width: 100%; }
.current { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.current__intro { padding: clamp(20px, 3vw, 32px); }
.current__desc { margin: 0; max-width: 80ch; color: var(--muted); }
.current__controls { margin: 14px 0 0; color: var(--text-soft); font-size: .9rem; }
.current__controls--touch { display: none; }
.current__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #08080a; isolation: isolate; }
.current__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.current__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; }
.current__stage[data-state="running"] .current__frame { opacity: 1; pointer-events: auto; }
.current__stage[data-state="running"] .current__preview,
.current__stage[data-state="running"] .current__overlay { display: none; }
.current__overlay { position: absolute; inset: 0; padding: clamp(12px, 3vw, 24px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(8,8,10,.32); color: #f4f5f7; }
.current__status { font-size: .9rem; margin: 0; text-align: center; max-width: 44ch; padding: 8px 14px; border-radius: 14px; background: rgba(8,8,10,.8); }
.current__play { min-height: 64px; padding: 18px 34px; font-size: 1.1rem; background: #fff; color: #08080a; box-shadow: 0 8px 30px rgba(0,0,0,.3); flex: none; }
.current__play:hover { background: #e6e8ec; }
.current__play-icon { font-size: 1.1em; }
.current__fullscreen { min-height: 52px; gap: 10px; padding: 14px 24px; }
.current__fullscreen > span:first-child { font-size: 1.6em; line-height: 1; }
#prototype-progress { display: block; width: 100%; height: 8px; margin-top: 14px; accent-color: #fff; }
.current__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; }
.current__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.current__note { margin: 0; flex: 1 1 280px; color: var(--muted); font-size: .85rem; }
.current button:disabled { opacity: .5; cursor: default; }
.current [hidden] { display: none !important; }
.current__stage:fullscreen { aspect-ratio: auto; width: 100vw; height: 100dvh; }
.play-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px; }
.play-header__controls { display: flex; align-items: center; gap: 10px; }
.play-page { padding-top: 24px; padding-bottom: 48px; }
.hero__actions .btn--ghost { background: transparent; border-color: var(--accent); }
@media (max-width: 760px) {
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .about__lead, .engine { grid-column: 1; grid-row: auto; }
  .current__toolbar, .current__overlay { padding: 20px; }
  .current__actions { flex: 1 1 100%; }
  .current__play { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
  .current__overlay { gap: 10px; }
  .current__status { font-size: .8rem; padding: 6px 10px; }
  .hero__actions .btn { flex: 0 1 auto; }
  .play-header .btn { flex: 0 1 auto; padding: 12px 16px; }
  .play-header__controls { flex: none; }
}
@media (max-width: 400px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .play-header { flex-wrap: wrap; }
  .current__toolbar { padding: 16px; }
}
@media (pointer: coarse) {
  .current__controls--desktop { display: none; }
  .current__controls--touch { display: block; }
}

.theme-toggle__icon { view-transition-name: theme-icon; }
::view-transition-group(theme-icon) { animation-duration: 500ms; }
::view-transition-old(theme-icon) { animation: theme-icon-out 500ms ease both; }
::view-transition-new(theme-icon) { animation: theme-icon-in 500ms ease both; }
@keyframes theme-icon-out { from { opacity: 1; transform: rotate(0) scale(1); } to { opacity: 0; transform: rotate(-140deg) scale(.2); } }
@keyframes theme-icon-in { from { opacity: 0; transform: rotate(140deg) scale(.2); } to { opacity: 1; transform: rotate(0) scale(1); } }
html.theme-changing:not(.theme-snapshot) .theme-toggle__icon,
html.theme-changing:not(.theme-snapshot) .theme-toggle__moon,
html.theme-changing:not(.theme-snapshot) .theme-toggle__sun {
  transition: transform .5s var(--ease-pop), opacity .35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle__icon { view-transition-name: none; }
  ::view-transition-old(theme-icon), ::view-transition-new(theme-icon) { animation: none; }
}
