/* portfolio styles */

@font-face {
  font-family: "Roberte";
  src: url("fonts/Roberte-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "BasicallyAMono";
  src: url("fonts/BasicallyAMono-Light.otf") format("opentype");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  /* default palette */
  --bg: #FFFDF9;
  --bg-mid: #FBEFE3;
  --bg-bot: #F1DACB;
  --surface: rgba(35, 28, 25, 0.055);
  --surface-unlit: rgba(35, 28, 25, 0.095);
  --ink: #231C19;
  --ink-muted: #82736A;
  --ink-faint: rgba(35, 28, 25, 0.34);
  --line: rgba(35, 28, 25, 0.13);
  --cursor-fill: rgba(255, 253, 249, 0.48);

  --noise-opacity: 0.18;
  --max-w: 1120px;
  --img-radius: 6px;
  --list-gap: 44px;

  --font-title: "Roberte", Georgia, serif;
  --font-body: "BasicallyAMono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.35s ease;
}

body {
  position: relative;
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg);
  background-image: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg-mid) 52%,
    var(--bg-bot) 100%
  );
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: color 0.35s ease;
}

a { color: inherit; text-decoration: none; font-family: inherit; }
button { font-family: var(--font-body); font-size: inherit; font-weight: 400; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 4px;
}

/* paper grain overlay */
.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='1.6' intercept='-0.3'/%3E%3CfeFuncG type='linear' slope='1.6' intercept='-0.3'/%3E%3CfeFuncB type='linear' slope='1.6' intercept='-0.3'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

/* custom cursor */
.custom-cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor [data-cursor] {
    cursor: none !important;
  }

  /* Let native controls keep their proper OS cursor */
  body.has-custom-cursor select,
  body.has-custom-cursor select[data-cursor] {
    cursor: pointer !important;
  }

  body.has-custom-cursor video,
  body.has-custom-cursor iframe,
  body.has-custom-cursor .obj-stage,
  body.has-custom-cursor .obj-stage canvas,
  body.has-custom-cursor .rig-stage,
  body.has-custom-cursor .rig-stage canvas {
    cursor: auto !important;
  }

  body.has-custom-cursor .rig-stage button,
  body.has-custom-cursor .rig-stage select,
  body.has-custom-cursor .rig-stage input {
    cursor: pointer !important;
  }

  body.has-custom-cursor .obj-stage {
    cursor: grab !important;
  }

  body.has-custom-cursor .obj-stage:active {
    cursor: grabbing !important;
  }

  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink);
    border: 1.25px solid transparent;
    pointer-events: none;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    opacity: 0;
    transition:
      width 0.18s cubic-bezier(0.22, 1, 0.36, 1),
      height 0.18s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.16s ease,
      border-color 0.16s ease,
      opacity 0.14s ease;
    will-change: transform, width, height;
  }

  .custom-cursor.is-visible {
    opacity: 1;
  }

  .custom-cursor[data-state="hidden"] {
    opacity: 0 !important;
  }

  .custom-cursor[data-state="link"] {
    width: 24px;
    height: 24px;
    background: var(--cursor-fill);
    border-color: var(--ink);
  }

  .custom-cursor[data-state="zoom"],
  .custom-cursor[data-state="close"] {
    width: 38px;
    height: 38px;
    background: var(--cursor-fill);
    border-color: var(--ink);
    backdrop-filter: blur(2px);
  }

  .custom-cursor[data-state="slide"] {
    width: 34px;
    height: 34px;
    background: var(--cursor-fill);
    border-color: var(--ink);
    backdrop-filter: blur(2px);
  }

  .cursor-symbol {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1;
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.12s ease;
  }

  .custom-cursor[data-state="zoom"] .cursor-symbol,
  .custom-cursor[data-state="close"] .cursor-symbol,
  .custom-cursor[data-state="slide"] .cursor-symbol {
    opacity: 1;
  }
}

/* pinned sticky header (basteleur title + steady fish + basicallyamono nav) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
  background: transparent;
}

.site-header.is-static {
  position: relative;
}

.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(1.3rem, 2.8vw, 2rem) clamp(1.25rem, 3.5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--ink);
}

/* Roberte Regular for the title */
.brand-text {
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* header motif */
.brand-fish {
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Egyptian Hieroglyphs", var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.85;
  display: inline-block;
  line-height: 1;
}

.brand-fish:empty {
  display: none;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-item {
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.nav-item:hover {
  opacity: 0.58;
}

.nav-item.is-active {
  border-bottom-color: var(--ink);
}

.nav-slash {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink-muted);
  user-select: none;
}

.nav-logo-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.nav-logo-n:hover {
  opacity: 1;
}

.nav-logo-n.is-active svg rect {
  fill: var(--ink);
}

.nav-logo-n.is-active svg path {
  stroke: var(--bg);
}

/* main page container & views */
.page-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.35rem clamp(1.25rem, 3.5vw, 2.5rem) 0;
  flex: 1;
}

.page-view[hidden] {
  display: none;
}

.page-view.is-active {
  animation: fadeSoft 0.28s ease;
}

@keyframes fadeSoft {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* clean image list (customizable gap, aspect ratio, radius & optional markup) */
.image-list {
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}

.image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.art-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border-radius: max(var(--img-radius), 6px);
  overflow: hidden;
}

/* Per-item customizable aspect ratios */
.art-stage.aspect-16-9 { aspect-ratio: 16 / 9; }
.art-stage.aspect-16-10 { aspect-ratio: 16 / 10; }
.art-stage.aspect-4-3 { aspect-ratio: 4 / 3; }
.art-stage.aspect-1-1 { aspect-ratio: 1 / 1; }
.art-stage.aspect-4-5 { aspect-ratio: 4 / 5; }
.art-stage.aspect-auto { aspect-ratio: auto; min-height: 240px; }
.art-stage.aspect-auto .media-slot > img { height: auto; }

/* Smart Media Slots */
.media-slot {
  position: relative;
}

/* stacked pass layers */
.art-stage > .pass-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.art-stage > .pass-layer.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.art-stage.aspect-auto > .pass-layer:first-child {
  position: relative;
}

/* minimal split-screen compare slider (active when "slider" mode is toggled on) */
.art-stage.is-slider-mode {
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}

.art-stage.is-slider-mode > .pass-layer {
  transition: none;
}

.art-stage.is-slider-mode > .pass-layer.is-compare-right {
  opacity: 1;
  z-index: 2;
  clip-path: none;
}

.art-stage.is-slider-mode > .pass-layer.is-compare-left {
  opacity: 1;
  z-index: 3;
}

.pass-slider-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.pass-slider-rail[hidden] {
  display: none;
}

.pass-slider-line {
  width: 1.5px;
  height: 100%;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(24, 24, 24, 0.45);
}

.pass-slider-knob {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.9);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  backdrop-filter: blur(4px);
}

.pass-single-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pass-single-group[hidden] {
  display: none;
}

.slider-pair-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.slider-pair-picker[hidden] {
  display: none;
}

.pass-mini-select {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  padding: 0 0.15rem 1px 0;
  cursor: pointer;
}

.pass-mini-select:focus {
  outline: none;
}

.media-slot > img,
.media-slot > video,
.media-slot > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-slot > video,
.media-slot > iframe {
  border-radius: 6px;
}

.art-stage:has(> iframe),
.art-stage:has(> video),
.art-stage.loop-stage,
.art-stage.obj-stage,
.art-stage.rig-stage:not(.is-fullscreen) {
  border-radius: 6px;
  overflow: hidden;
}

.media-slot > img {
  object-fit: cover;
}

.media-slot > video {
  background: #141414;
  object-fit: contain;
}

/* Chromeless GIF-style looping video / Vimeo iframe */
.loop-stage > video {
  object-fit: cover;
  background: transparent;
  pointer-events: none;
}

.loop-stage > iframe {
  pointer-events: none;
  background: transparent;
}

.slot-img:not([src]),
.slot-img[src=""],
.slot-video:not([src]),
.slot-video[src=""],
.slot-iframe:not([src]),
.slot-iframe[src=""] {
  display: none;
}

.media-slot:has(> img[src]:not([src=""])) .slot-placeholder,
.media-slot:has(> video[src]:not([src=""])) .slot-placeholder,
.media-slot:has(> iframe[src]:not([src=""])) .slot-placeholder {
  display: none;
}

.slot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
}

.slot-placeholder--final {
  background: color-mix(in srgb, var(--bg) 95%, var(--ink));
}

.slot-placeholder--unlit {
  background: color-mix(in srgb, var(--bg) 91%, var(--ink));
}

.slot-placeholder--wire {
  background-color: color-mix(in srgb, var(--bg) 96%, var(--ink));
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.slot-hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* obj viewer */
.art-stage.obj-stage {
  cursor: grab;
  background: transparent;
  transition: outline-color 0.2s ease;
}

.obj-stage:active {
  cursor: grabbing;
}

.obj-stage.is-dragover {
  outline: 1.5px dashed var(--ink);
  outline-offset: -8px;
}

.obj-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.obj-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.obj-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.5rem;
  text-align: center;
  pointer-events: none;
}

.obj-placeholder[hidden] {
  display: none;
}

.obj-status {
  position: absolute;
  bottom: 0.8rem;
  left: 0.9rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  pointer-events: none;
}

.obj-status[hidden] {
  display: none;
}

/* rig viewer */
.art-stage.rig-stage {
  background: rgba(35, 28, 25, 0.05);
  transition: outline-color 0.2s ease;
}

.art-stage.rig-stage.maya-viewport-stage {
  border-radius: 6px;
  background: linear-gradient(180deg, #d7e3ee 0%, #efe0d4 58%, #e4cab9 100%);
  opacity: 0;
  transition: opacity 0.65s ease;
}

.art-stage.rig-stage.maya-viewport-stage.is-ready {
  opacity: 1;
}

.maya-viewport-stage .rig-canvas-wrap {
  opacity: 0;
  transition: opacity 0.65s ease;
}

.maya-viewport-stage.is-ready .rig-canvas-wrap {
  opacity: 1;
}

.maya-viewport-stage + .art-meta {
  opacity: 0;
  transition: opacity 0.65s ease;
}

.maya-viewport-stage.is-ready + .art-meta {
  opacity: 1;
}

.maya-viewport-stage .rig-selected-label {
  display: none !important;
}

.maya-viewport-stage .rig-status {
  color: #5c463c;
  font-family: var(--font-body);
  font-size: 0.78rem;
}

/* rig attribute menu */
.maya-channel-box {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 210px;
  max-height: calc(100% - 1.5rem);
  overflow-y: auto;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(35, 28, 25, 0.18);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.76rem;
  line-height: 1.35;
  z-index: 6;
  cursor: default;
}

.maya-channel-box[hidden] {
  display: none;
}

.maya-channel-box *,
.maya-channel-box button,
.maya-channel-box select,
.maya-channel-box input {
  font-family: var(--font-body);
}

.maya-cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.42rem 0.6rem;
  border-bottom: 1px solid rgba(35, 28, 25, 0.12);
}

.maya-cb-title {
  color: var(--ink);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maya-cb-zero {
  font-size: 0.72rem;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.maya-cb-zero:hover {
  color: var(--ink);
  text-decoration: underline;
}

.maya-cb-body {
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.maya-cb-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.15rem;
}

.maya-cb-row {
  display: grid;
  grid-template-columns: 1fr 94px;
  align-items: center;
  gap: 0.45rem;
}

.maya-cb-key {
  text-align: left;
  color: var(--ink-muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.maya-cb-select {
  width: 100%;
  font-size: 0.74rem;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid rgba(35, 28, 25, 0.22);
  border-radius: 3px;
  padding: 0.18rem 0.3rem;
  cursor: pointer;
}

.maya-cb-select option {
  background: #fffdf9;
  color: var(--ink);
}

.maya-cb-select:focus {
  outline: none;
  border-color: var(--ink);
}

.maya-cb-divider {
  margin: 0.16rem 0 0.04rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(35, 28, 25, 0.1);
  text-align: left;
  font-size: 0.68rem;
  color: var(--ink-faint);
  text-transform: lowercase;
}

.maya-cb-toggle {
  width: 100%;
  font-size: 0.72rem;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid rgba(35, 28, 25, 0.2);
  border-radius: 3px;
  padding: 0.16rem 0.35rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.maya-cb-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.maya-cb-toggle.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.maya-cb-range {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
  margin: 0;
}

/* Mobile-only fullscreen & touch ergonomics */
.maya-mobile-only {
  display: none;
}

.maya-hint {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.art-stage.rig-stage.maya-viewport-stage.is-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto !important;
  border-radius: 0;
  border: none;
  z-index: 99999;
}

.maya-viewport-stage.is-fullscreen .maya-channel-box {
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
}

.maya-fs-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  padding: 0.65rem 0.9rem max(0.75rem, env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.88);
  border-top: 1px solid rgba(35, 28, 25, 0.14);
  z-index: 7;
}

.maya-fs-bar[hidden] {
  display: none;
}

.maya-fs-bar .pass-btn {
  font-size: 0.92rem;
  padding: 0.35rem 0.3rem;
}

@media (max-width: 820px), (pointer: coarse) {
  .maya-mobile-only {
    display: inline-flex;
  }

  .art-stage.rig-stage.maya-viewport-stage:not(.is-fullscreen) {
    aspect-ratio: 4 / 5;
  }

  .pass-controls .pass-btn {
    font-size: 0.9rem;
    padding: 0.32rem 0.18rem;
  }

  .maya-channel-box {
    width: 244px;
    font-size: 0.84rem;
  }

  .maya-cb-key {
    font-size: 0.82rem;
  }

  .maya-cb-row {
    grid-template-columns: 1fr 110px;
    gap: 0.5rem;
  }

  .maya-cb-select,
  .maya-cb-toggle {
    font-size: 0.82rem;
    min-height: 34px;
    padding: 0.3rem 0.45rem;
  }

  .maya-cb-zero {
    font-size: 0.82rem;
    padding: 0.25rem 0.1rem;
  }

  .maya-cb-range {
    height: 28px;
  }
}

.rig-stage.is-dragover {
  outline: 1.5px dashed var(--ink);
  outline-offset: -8px;
}

.rig-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rig-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.rig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.5rem;
  text-align: center;
  pointer-events: none;
}

.rig-placeholder[hidden],
.rig-status[hidden],
.rig-selected-label[hidden] {
  display: none;
}

.rig-selected-label {
  position: absolute;
  top: 0.75rem;
  left: 0.85rem;
  font-size: 0.74rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  pointer-events: none;
}

.rig-status {
  position: absolute;
  bottom: 0.8rem;
  left: 0.9rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  pointer-events: none;
}

/* Minimal Collapsible Rig Drawer (Bones + Blendshapes + Animations) */
.rig-drawer {
  margin-top: 0.85rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rig-drawer[hidden] {
  display: none;
}

.rig-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rig-drawer-section[hidden] {
  display: none;
}

.rig-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.rig-bones-grid,
.rig-bone-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 140px;
  overflow-y: auto;
}

.rig-bone-btn,
.rig-chip {
  font-size: 0.72rem;
  padding: 0.22rem 0.54rem;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.rig-bone-btn:hover,
.rig-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.rig-bone-btn.is-active,
.rig-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.maya-face-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem 0.85rem;
}

.maya-attr-field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.rig-select {
  font-family: var(--font-body);
  font-size: 0.74rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--line);
  padding: 0.24rem 0.42rem;
  cursor: pointer !important;
}

.rig-select:focus {
  outline: none;
  border-color: var(--ink);
}

.maya-roll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem 1rem;
}

.maya-channel-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.rig-morphs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.55rem 1rem;
}

.rig-morph-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.rig-morph-row input[type="range"] {
  accent-color: var(--ink);
  cursor: pointer;
}

.rig-anim-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.rig-empty-note {
  font-size: 0.76rem;
  color: var(--ink-faint);
}

/* Below-image meta row: empty unless pass controls or optional caption exist */
.art-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.6rem;
}

.art-meta--right {
  justify-content: flex-end;
}

.art-caption-md {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.art-caption-md p { margin: 0; }

.pass-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-left: auto;
}

.pass-link,
.pass-btn,
.pass-scroll-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-muted);
  padding-bottom: 1px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.pass-link:hover,
.pass-btn:hover,
.pass-scroll-btn:hover {
  color: var(--ink);
}

.pass-link.is-active,
.pass-btn.is-active,
.pass-scroll-btn.is-on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.meta-sep,
.pass-sep {
  color: var(--ink-faint);
  user-select: none;
}

/* markdown */
.markdown-block {
  max-width: 66ch;
  padding: 0.4rem 0;
}

.md-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--ink);
}

.md-content h1,
.md-content h2 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 0.25rem;
}

.md-content h1 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
.md-content h2 { font-size: clamp(1.25rem, 2.1vw, 1.55rem); }
.md-content h3 { font-size: 1rem; letter-spacing: 0.02em; }

.md-content strong { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.md-content em { font-style: italic; color: var(--ink-muted); }

.md-content a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: opacity 0.18s ease;
}
.md-content a:hover { opacity: 0.55; }

.md-content code {
  background: var(--surface);
  padding: 0.12rem 0.38rem;
  border-radius: 3px;
  font-size: 0.86em;
}

.md-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 1rem;
}

.md-content ul li {
  position: relative;
}

.md-content ul li::before {
  content: "-";
  position: absolute;
  left: -1rem;
  color: var(--ink-muted);
}

.md-content blockquote {
  border-left: 2px solid var(--ink);
  padding-left: 1rem;
  color: var(--ink-muted);
}

.md-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.4rem 0;
}

/* about */
.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1rem, 3vw, 2.5rem) 0 3rem;
}

.about-layout.no-portrait {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border-radius: max(var(--img-radius), 6px);
  overflow: hidden;
}

.about-portrait[hidden] {
  display: none;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  max-width: 56ch;
  padding-top: 0.2rem;
}

.about-layout.no-portrait .about-text {
  max-width: 100%;
  padding-top: 0.5rem;
}

.about-resume-embed {
  margin-top: clamp(2rem, 4.5vw, 3.25rem);
}

.about-resume-embed[hidden] {
  display: none;
}

.pdf-pages-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pdf-page-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.resume-pdf-frame {
  width: 100%;
  height: min(86vh, 1060px);
  min-height: 580px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: block;
}

/* games */
.art-stage.games-strip-stage {
  aspect-ratio: 21 / 8;
  min-height: 250px;
  display: flex;
  flex-direction: row;
  gap: 0;
  background: var(--surface);
}

.games-strip-panel {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: block;
  border-right: 1px solid rgba(255, 253, 249, 0.35);
  transition:
    flex-grow 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.38s ease;
}

.games-strip-panel:last-child {
  border-right: none;
}

.games-strip-panel > img,
.games-strip-panel > video,
.games-strip-panel > iframe {
  border-radius: 0 !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.games-strip-stage:hover .games-strip-panel {
  flex-grow: 0.88;
  filter: brightness(0.9);
}

.games-strip-stage .games-strip-panel:hover,
.games-strip-stage .games-strip-panel:focus-visible {
  flex-grow: 1.45;
  filter: brightness(1);
}

.games-strip-stage .games-strip-panel:hover > img,
.games-strip-stage .games-strip-panel:hover > video {
  transform: scale(1.03);
}

.games-strip-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(26, 20, 17, 0.42) 100%);
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.games-strip-panel:hover .games-strip-scrim {
  opacity: 0.9;
}

.games-strip-panel:has(> .slot-placeholder) .games-strip-scrim {
  opacity: 0.12;
}

.games-strip-panel:has(> .slot-placeholder) .games-strip-label {
  color: var(--ink);
}

.games-strip-panel:has(> .slot-placeholder) .games-strip-sub {
  color: var(--ink-muted);
}

.games-strip-panel > .slot-placeholder .slot-hint {
  display: none;
}

.games-strip-label {
  position: absolute;
  left: 1.05rem;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  color: #fffdf9;
  pointer-events: none;
}

.games-strip-title {
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.games-strip-sub {
  font-family: var(--font-body);
  font-size: 0.74rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 680px) {
  .art-stage.games-strip-stage {
    aspect-ratio: auto;
    flex-direction: column;
    min-height: 0;
  }

  .games-strip-panel {
    flex: none;
    height: 150px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 253, 249, 0.35);
  }

  .games-strip-panel:last-child {
    border-bottom: none;
  }

  .games-strip-stage:hover .games-strip-panel,
  .games-strip-stage .games-strip-panel:hover {
    flex-grow: 0;
    filter: none;
  }
}

.games-slide-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: transparent;
}

.games-slide-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: transparent;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3.25rem, 7vw, 5.25rem);
}

.game-entry {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
  border-bottom: 1px solid var(--line);
}

.game-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.game-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.game-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.1;
  color: var(--ink);
}

.game-meta-right {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.game-play-link {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: opacity 0.18s ease;
}

.game-play-link:hover {
  opacity: 0.68;
}

.game-desc {
  max-width: none;
  width: 100%;
  padding: 0;
}

.game-gallery {
  margin-top: 0.5rem;
}

.game-gallery .markdown-block {
  max-width: none;
  width: 100%;
}

.about-gallery {
  margin-top: clamp(2rem, 4.5vw, 3.5rem);
}

.about-gallery:empty {
  display: none;
}

.about-heading {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  font-weight: 400;
  line-height: 1.12;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.9rem 1.4rem;
  margin-top: 0.65rem;
}

.about-socials {
  display: contents;
}

.text-action {
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  transition: opacity 0.18s ease;
}

.text-action:hover {
  opacity: 0.55;
}

.copy-status {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* footer */
.site-footer {
  width: 100%;
  max-width: var(--max-w);
  margin: clamp(4rem, 8vw, 6.25rem) auto 0;
  padding: 1.9rem clamp(1.25rem, 3.5vw, 2.5rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-link {
  font-size: 0.88rem;
  color: var(--ink);
  border-bottom: 1.5px solid transparent;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover {
  border-bottom-color: var(--ink);
}

.footer-right {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.footer-note {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.footer-admin-link {
  color: var(--ink-faint);
  font-size: 1rem;
  padding: 0 2px;
}

.footer-admin-link:hover {
  color: var(--ink);
}

/* full-screen lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1.5px solid transparent;
}

.lightbox-close:hover {
  border-bottom-color: var(--ink);
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
}

/* responsive */
@media (max-width: 760px) {
  .image-pair {
    grid-template-columns: 1fr;
  }
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-portrait {
    max-width: 260px;
  }
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
