:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(18, 20, 27, 0.12);
  --text: #101116;
  --muted: #62646d;
  --hot: #ff4d8d;
  --cyan: #0789ff;
  --gold: #f8b84b;
  --green: #21a760;
  --radius: 8px;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

img,
button,
a {
  -webkit-user-drag: none;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  max-width: 100%;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-x: clip;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: #f8f9fa;
  border-bottom: 4px solid var(--cyan);
  box-shadow: 0 0 70px rgba(16, 17, 22, 0.12);
  transform: translateX(-102%);
  perspective: 900px;
  overflow: hidden;
}

.transition-flight {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  width: max-content;
  opacity: 0;
  transform-style: preserve-3d;
  transform: translate3d(-32rem, -50%, 0);
}

.page-transition.is-running {
  animation: pageWipe 2200ms cubic-bezier(0.72, 0, 0.18, 1);
}

.page-transition.is-running .transition-flight {
  animation: minecraftChase 2200ms linear both;
}

.transition-bee {
  display: block;
  width: clamp(5rem, 9vw, 7rem);
  filter: drop-shadow(0 12px 9px rgba(16, 17, 22, 0.15));
  animation: transitionBeeBob 420ms ease-in-out infinite alternate;
}

.transition-bee img {
  display: block;
  width: 100%;
  transform: scaleX(-1);
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-drag: none;
}

.transition-cube {
  position: relative;
  display: block;
  --transition-cube-face: clamp(2.5rem, 4.6vw, 3.7rem);
  --transition-cube-depth: clamp(0.65rem, 1.15vw, 0.95rem);
  width: calc(var(--transition-cube-face) + var(--transition-cube-depth));
  height: calc(var(--transition-cube-face) + var(--transition-cube-depth));
  flex: 0 0 auto;
  filter: drop-shadow(7px 10px 6px rgba(16, 17, 22, 0.16));
  image-rendering: pixelated;
}

.transition-cube > i {
  position: absolute;
  display: block;
  border: 1px solid rgba(16, 17, 22, 0.16);
  background-image: var(--cube-front);
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}

.transition-cube > .front {
  left: 0;
  top: var(--transition-cube-depth);
  width: var(--transition-cube-face);
  height: var(--transition-cube-face);
  z-index: 2;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.1);
}

.transition-cube > .back,
.transition-cube > .left,
.transition-cube > .bottom {
  display: none;
}

.transition-cube > .right {
  left: var(--transition-cube-face);
  top: 0;
  width: var(--transition-cube-depth);
  height: calc(var(--transition-cube-face) + var(--transition-cube-depth));
  z-index: 1;
  clip-path: polygon(0 var(--transition-cube-depth), 100% 0, 100% var(--transition-cube-face), 0 100%);
  background-image: var(--cube-side, var(--cube-front));
  filter: brightness(0.72);
}

.transition-cube > .top {
  left: 0;
  top: 0;
  width: calc(var(--transition-cube-face) + var(--transition-cube-depth));
  height: var(--transition-cube-depth);
  z-index: 3;
  clip-path: polygon(var(--transition-cube-depth) 0, 100% 0, var(--transition-cube-face) 100%, 0 100%);
  background-image: var(--cube-top, var(--cube-front));
  filter: brightness(1.12);
}

.page-transition.is-running .transition-cube {
  animation: transitionBlockTumble 920ms linear infinite;
}

.page-transition.is-running .transition-cube:nth-child(2) {
  animation-duration: 1080ms;
  animation-direction: reverse;
}

.page-transition.is-running .transition-cube:nth-child(3) {
  animation-duration: 840ms;
}

.cube-grass {
  --cube-front: url("assets/minecraft/grass_block_side.png");
  --cube-top: url("assets/minecraft/grass_block_top.png");
  --cube-side: url("assets/minecraft/grass_block_side.png");
}

.cube-grass > .top {
  background-color: #78ad43;
  background-blend-mode: multiply;
}

.cube-redstone {
  --cube-front: url("assets/minecraft/redstone_block.png");
}

.cube-diamond {
  --cube-front: url("assets/minecraft/diamond_block.png");
}
}

main {
  width: 100%;
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

.brand,
.nav a,
.primary-action,
.ghost-action {
  color: var(--text);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--cyan);
  border-left-color: var(--hot);
  border-bottom-color: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 24px rgba(57, 215, 255, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: #555862;
  font-size: 0.92rem;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.nav a:hover,
.nav a.is-active {
  border-color: var(--line);
  background: rgba(16, 17, 22, 0.06);
  color: var(--text);
}

.view {
  display: none;
  min-height: calc(100vh - 72px);
  padding: clamp(1.25rem, 3vw, 3rem);
  overflow-x: clip;
}

.view.is-active {
  display: block;
  animation: viewArrive 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coming-soon {
  position: relative;
  min-height: calc(100vh - 9rem);
  display: grid;
  place-items: center;
  overflow: visible;
}

.coming-center {
  position: relative;
  z-index: 3;
  width: min(100%, 38rem);
  text-align: center;
}

.coming-center .eyebrow {
  margin-bottom: 1rem;
}

.coming-center h2 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.coming-center > p:last-child {
  margin: 0 auto;
  max-width: 30rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.55;
}

.coming-bee {
  width: clamp(6.5rem, 12vw, 10rem);
  margin: 0 auto;
  animation: comingBeeHover 2.8s ease-in-out infinite;
  filter: drop-shadow(0 18px 13px rgba(24, 31, 35, 0.16));
}

.coming-bee img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  transform: scaleX(-1);
  user-select: none;
  -webkit-user-drag: none;
}

.coming-block-field {
  position: absolute;
  inset-block: 0;
  width: min(31vw, 28rem);
  perspective: 900px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.coming-left { left: 0; }
.coming-right { right: 0; }

.coming-soon .coming-block {
  width: clamp(3.7rem, 7vw, 6.4rem);
  --half: clamp(1.85rem, 3.5vw, 3.2rem);
  opacity: 1;
  transform-origin: center;
  transform-style: preserve-3d;
  animation: blockDrift 8s ease-in-out infinite;
}

.coming-block:nth-child(1) { left: 8%; top: 14%; --enter-delay: 80ms; }
.coming-block:nth-child(2) { left: 52%; top: 44%; --enter-delay: 220ms; }
.coming-block:nth-child(3) { left: 16%; top: 72%; --enter-delay: 360ms; }
.coming-right .coming-block:nth-child(1) { left: 46%; top: 13%; }
.coming-right .coming-block:nth-child(2) { left: 4%; top: 47%; }
.coming-right .coming-block:nth-child(3) { left: 52%; top: 73%; }

.coming-block > span {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid rgba(16, 17, 22, 0.16);
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  backface-visibility: hidden;
}

.coming-block > .front { transform: translateZ(var(--half)); }
.coming-block > .back { transform: rotateY(180deg) translateZ(var(--half)); }
.coming-block > .right { transform: rotateY(90deg) translateZ(var(--half)); filter: brightness(0.84); }
.coming-block > .left { transform: rotateY(-90deg) translateZ(var(--half)); filter: brightness(0.7); }
.coming-block > .top { transform: rotateX(90deg) translateZ(var(--half)); filter: brightness(1.08); }
.coming-block > .bottom { transform: rotateX(-90deg) translateZ(var(--half)); filter: brightness(0.58); }

@keyframes comingBlockEnter {
  from { opacity: 0; translate: var(--entry-x) 0; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes comingBlockFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(24deg) rotateY(var(--view-y)) rotateZ(2deg); }
  50% { transform: translate3d(12px, -24px, 90px) rotateX(34deg) rotateY(var(--view-y-alt)) rotateZ(8deg); }
}

@keyframes comingBeeHover {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.hero {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  font-size: clamp(3.2rem, 9vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.work-intro p {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  padding: 0.78rem 1.05rem;
  font-weight: 800;
}

.primary-action {
  background: linear-gradient(135deg, var(--hot), var(--gold));
  color: #101116;
}

.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.hero-orbit {
  position: relative;
  height: min(62vw, 42rem);
  min-height: 26rem;
  perspective: 900px;
}

.orbital-card {
  position: absolute;
  inset: 14%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform-style: preserve-3d;
  will-change: transform;
  display: block;
}

.orbital-card {
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(29, 34, 46, 0.18);
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

.orbital-card span {
  max-width: 11ch;
  font-size: clamp(1.15rem, 2.4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
  letter-spacing: 0;
  transform: translateZ(2rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.62);
}

.card-a {
  inset: 5% 2% 42% 34%;
  background: #d7f2f8;
  animation: floatA 8s ease-in-out infinite;
}

.card-b {
  inset: 42% 2% 3% 34%;
  background: #e5f0d5;
  animation: floatB 9s ease-in-out infinite;
}

.card-c {
  inset: 23% 38% 20% 0;
  background: #f6e0e9;
  animation: floatC 7s ease-in-out infinite;
}

.discipline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.discipline-card {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  isolation: isolate;
}

.discipline-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 500ms ease;
}

.discipline-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(16, 17, 22, 0.72));
  z-index: 1;
}

.discipline-card span {
  position: absolute;
  z-index: 2;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 900;
}

.discipline-card:hover img {
  transform: scale(1.08) rotate(1deg);
}

.work-view {
  padding-bottom: 7rem;
}

.work-intro {
  min-height: 66vh;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(20rem, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.work-intro h2 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 34rem;
}

.stat {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.stat strong {
  display: block;
  font-size: 1.45rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.scroll-object {
  position: relative;
  height: clamp(24rem, 50vw, 42rem);
  perspective: 1000px;
  overflow: visible;
  z-index: 2;
}

.scroll-slab {
  position: absolute;
  inset: 9% 4%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: 0 36px 90px rgba(29, 34, 46, 0.22);
  transform: rotateX(59deg) rotateZ(-23deg) translate3d(0, 0, 0);
  transition: transform 120ms linear;
  overflow: hidden;
}

.scroll-slab::before,
.scroll-slab::after {
  content: "";
  position: absolute;
  inset: 0;
}

.scroll-slab::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%, rgba(0, 0, 0, 0.36));
  mix-blend-mode: screen;
}

.block-field {
  position: absolute;
  inset: 0;
  perspective: 900px;
  overflow: visible;
  touch-action: none;
}

.service-block-field .mc-block {
  width: clamp(4rem, 8vw, 6.5rem);
  --half: clamp(2rem, 4vw, 3.25rem);
}

.block-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  max-width: 84%;
  min-width: 2.4rem;
  padding: 0.42rem 0.58rem;
  border: 2px solid rgba(20, 22, 25, 0.68);
  border-radius: 0;
  background-color: #74777b;
  background-image: linear-gradient(rgba(8, 10, 12, 0.22), rgba(8, 10, 12, 0.34)), var(--badge-texture);
  background-size: cover, 1.4rem 1.4rem;
  image-rendering: pixelated;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(0.5rem, 0.9vw, 0.72rem);
  line-height: 1;
  text-align: center;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset -3px -3px 0 rgba(0, 0, 0, 0.18),
    4px 4px 0 rgba(12, 14, 17, 0.52);
  transform: translate(-50%, -50%) translateZ(calc(var(--half) + 2px));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  pointer-events: none;
}

.block-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 5px 5px, #eef1f3 0 1px, #60656a 1.5px 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 5px) 5px, #eef1f3 0 1px, #60656a 1.5px 2.5px, transparent 3px),
    radial-gradient(circle at 5px calc(100% - 5px), #eef1f3 0 1px, #60656a 1.5px 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #eef1f3 0 1px, #60656a 1.5px 2.5px, transparent 3px);
  pointer-events: none;
}

.service-node.deepslate-bricks { --badge-texture: url("assets/minecraft/deepslate_bricks.png"); }
.service-node.stone-bricks { --badge-texture: url("assets/minecraft/stone_bricks.png"); }
.service-node.copper { --badge-texture: url("assets/minecraft/copper_block.png"); }
.service-node.lapis { --badge-texture: url("assets/minecraft/lapis_block.png"); }
.service-node.nether-bricks { --badge-texture: url("assets/minecraft/nether_bricks.png"); }
.service-node.smooth-stone { --badge-texture: url("assets/minecraft/smooth_stone.png"); }
.service-node.amethyst { --badge-texture: url("assets/minecraft/amethyst_block.png"); }
.service-node.purpur { --badge-texture: url("assets/minecraft/purpur_block.png"); }
.service-node.sculk { --badge-texture: url("assets/minecraft/sculk.png"); }
.service-node.honeycomb { --badge-texture: url("assets/minecraft/honeycomb_block.png"); }
.service-node.slime { --badge-texture: url("assets/minecraft/slime_block.png"); }
.service-node.crying-obsidian { --badge-texture: url("assets/minecraft/crying_obsidian.png"); }

.music-scene,
.edit-scene {
  position: absolute;
  inset: -14% -8% -10%;
  perspective: 900px;
  transform-style: preserve-3d;
  overflow: visible;
}

.edit-scene.is-spawning .physics-object {
  animation: none;
  transition: none;
}

.edit-layer,
.edit-wave {
  position: absolute;
  transform-style: preserve-3d;
  border-radius: var(--radius);
  animation: editObjectFloat 7.5s ease-in-out infinite;
  transition: transform 4200ms cubic-bezier(0.12, 0.72, 0.18, 1);
}

.edit-box {
  border-radius: 0;
}

.edit-scene .physics-object.is-dragging {
  animation: none;
  transform: rotateX(22deg) rotateY(-18deg) rotateZ(0deg) translateZ(170px) scale(1.04) !important;
}

.edit-layer {
  width: clamp(9rem, 22vw, 18rem);
  height: clamp(3rem, 6vw, 5rem);
  --d: 1.35rem;
  --hd: 0.675rem;
  --nhd: -0.675rem;
  --face-bg:
    linear-gradient(90deg, rgba(255,255,255,0.28), transparent 24%),
    var(--tone);
  background: transparent;
  box-shadow: 0 24px 60px rgba(29, 34, 46, 0.16);
  transform: rotateX(22deg) rotateY(-24deg) translateZ(80px);
}

.edit-box > b {
  position: absolute;
  display: block;
  background: var(--face-bg);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backface-visibility: hidden;
}

.edit-box > .front,
.edit-box > .back {
  inset: -1px;
  border-radius: 0;
}

.edit-box > .front {
  transform: translateZ(var(--hd));
  transform-style: preserve-3d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 22px 42px rgba(29, 34, 46, 0.16);
}

.edit-box > .back {
  transform: rotateY(180deg) translateZ(var(--hd));
  filter: brightness(0.48);
}

.edit-box > .top,
.edit-box > .bottom {
  left: -1px;
  width: calc(100% + 2px);
  height: var(--d);
}

.edit-box > .top {
  top: var(--nhd);
  transform: rotateX(90deg);
  filter: brightness(0.86);
}

.edit-box > .bottom {
  bottom: var(--nhd);
  transform: rotateX(-90deg);
  filter: brightness(0.52);
}

.edit-box > .left,
.edit-box > .right {
  top: -1px;
  width: var(--d);
  height: calc(100% + 2px);
}

.edit-box > .left {
  left: var(--nhd);
  transform: rotateY(-90deg);
  filter: brightness(0.58);
}

.edit-box > .right {
  right: var(--nhd);
  transform: rotateY(90deg);
  filter: brightness(0.72);
}

.edit-layer span,
.wave-label {
  position: absolute;
  left: 0.75rem;
  top: 0.55rem;
  z-index: 2;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  backface-visibility: hidden;
  pointer-events: none;
}

.edit-layer span {
  transform: translateZ(1px);
}

.wave-label {
  transform: translateZ(1px);
}

.edit-layer i {
  position: absolute;
  bottom: 0.7rem;
  width: 20%;
  height: 28%;
  border-radius: 4px;
  background: rgba(255,255,255,0.38);
  transform: translateZ(1px);
}

.edit-layer i:nth-of-type(1) { left: 10%; }
.edit-layer i:nth-of-type(2) { left: 38%; width: 28%; }
.edit-layer i:nth-of-type(3) { right: 10%; width: 16%; }

.layer-1 { left: 7%; top: 29%; animation-delay: -0.6s; }
.layer-2 { left: 47%; top: 28%; animation-delay: -1.7s; }
.layer-3 { left: 23%; top: 50%; animation-delay: -2.8s; }
.layer-4 { left: 62%; top: 55%; animation-delay: -4s; }
.layer-5 { left: 8%; top: 70%; animation-delay: -5.1s; }

.edit-wave {
  width: clamp(10rem, 22vw, 18rem);
  height: clamp(3.2rem, 6.5vw, 5.5rem);
  --d: 2.4rem;
  --hd: 1.2rem;
  --nhd: -1.2rem;
  --face-bg:
    linear-gradient(90deg, rgba(255,255,255,0.12), transparent 24%),
    #101116;
  padding: 0;
  background: transparent;
  box-shadow: 0 24px 60px rgba(29, 34, 46, 0.18);
  transform: rotateX(var(--rx, 30deg)) rotateY(var(--ry, -18deg)) rotateZ(var(--rz, -6deg)) translateZ(84px);
  overflow: visible;
}

.edit-wave > .back {
  background: #080a0f;
}

.edit-wave > .top {
  background: linear-gradient(90deg, #353c49, #202631);
  filter: none;
}

.edit-wave > .bottom {
  background: linear-gradient(90deg, #1f2530, #121720);
  filter: none;
}

.edit-wave > .left {
  background: #252c38;
  filter: none;
}

.edit-wave > .right {
  background: linear-gradient(180deg, #2b3340, #171b24);
  filter: none;
}

.waveform-clip {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  top: 1.55rem;
  bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.12rem;
  overflow: hidden;
  transform: translateZ(1px);
  transform-style: preserve-3d;
  z-index: 3;
  backface-visibility: hidden;
  pointer-events: none;
}

.waveform-clip b {
  position: relative;
  flex: 1;
  height: var(--h);
  border-radius: 2px;
  background:
    linear-gradient(180deg, transparent 0 46%, rgba(255,255,255,0.08) 46% 54%, transparent 54%),
    linear-gradient(180deg, #7ee4ff, #3aa8ff 50%, #7ee4ff);
  min-width: 2px;
  transform: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.wave-progress {
  position: absolute;
  left: 0.65rem;
  top: 1.55rem;
  bottom: 0.55rem;
  width: 34%;
  border-right: 2px solid #fff;
  background: linear-gradient(90deg, rgba(255, 77, 141, 0.3), rgba(255, 77, 141, 0.08));
  transform: translateZ(2px);
  animation: wavePlay 4.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 4;
  backface-visibility: hidden;
}

.wave-1 { left: 42%; top: 70%; --rx: 24deg; --ry: -22deg; --rz: -4deg; animation-delay: -1.1s; }
.wave-2 { left: 25%; top: 62%; --rx: 26deg; --ry: 20deg; --rz: 3deg; animation-delay: -2.4s; }
.wave-3 { left: 58%; top: 41%; --rx: 22deg; --ry: -24deg; --rz: 5deg; animation-delay: -3.8s; }


.music-note {
  position: absolute;
  width: clamp(3.4rem, 8vw, 7rem);
  aspect-ratio: 1;
  color: #111;
  font-size: clamp(4.4rem, 9vw, 8.4rem);
  font-weight: 900;
  line-height: 1;
  transform-style: preserve-3d;
  animation: noteFloat 7s ease-in-out infinite;
}

.music-note i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  transform-style: preserve-3d;
  text-shadow: 0 14px 24px rgba(29, 34, 46, 0.16);
}

.music-note i:nth-child(1) { transform: translateZ(42px); }
.music-note i:nth-child(2) { transform: translateZ(24px); filter: brightness(0.82); opacity: 0.92; }
.music-note i:nth-child(3) { transform: translateZ(8px); filter: brightness(0.68); opacity: 0.86; }
.music-note i:nth-child(4) { transform: translateZ(-8px); filter: brightness(0.5); opacity: 0.72; }
.music-note i:nth-child(5) { transform: translateZ(-24px); filter: brightness(0.35); opacity: 0.58; }

.music-note::before {
  content: "";
  position: absolute;
  inset: 12% 18%;
  background: currentColor;
  opacity: 0.16;
  filter: blur(12px);
  transform: translateZ(-34px) translate(18px, 28px);
}

.music-note:nth-child(1) { left: 7%; top: 24%; color: var(--hot); animation-delay: -0.8s; }
.music-note:nth-child(2) { left: 52%; top: 18%; color: var(--cyan); animation-delay: -2.2s; }
.music-note:nth-child(3) { left: 28%; top: 52%; color: var(--gold); animation-delay: -3.6s; }
.music-note:nth-child(4) { left: 67%; top: 58%; color: #222; animation-delay: -4.8s; }
.music-note:nth-child(5) { left: 42%; top: 38%; color: var(--green); animation-delay: -6s; }

.timeline-rig {
  position: absolute;
  inset: 3% 0 0;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-18deg) translateZ(50px);
  animation: timelineRigFloat 8s ease-in-out infinite;
}

.clip-cube,
.wave-cube {
  position: absolute;
  transform-style: preserve-3d;
  animation: clipLift 5.5s ease-in-out infinite;
}

.clip-cube {
  width: clamp(8rem, 18vw, 15rem);
  height: clamp(2.4rem, 5vw, 4rem);
  --d: 2rem;
}

.clip-cube:nth-child(1) { left: 4%; top: 16%; animation-delay: -0.8s; }
.clip-cube:nth-child(2) { left: 34%; top: 27%; width: clamp(10rem, 23vw, 19rem); animation-delay: -1.9s; }
.clip-cube:nth-child(3) { left: 18%; top: 43%; animation-delay: -3s; }
.clip-cube:nth-child(4) { left: 55%; top: 55%; width: clamp(9rem, 20vw, 17rem); animation-delay: -4.1s; }
.clip-cube:nth-child(5) { left: 63%; top: 19%; width: clamp(6rem, 14vw, 11rem); animation-delay: -5s; }

.clip-cube b,
.wave-cube b {
  position: absolute;
  display: block;
  background: var(--face, #101116);
  border: 1px solid rgba(16, 17, 22, 0.16);
}

.clip-cube.hot { --face: var(--hot); }
.clip-cube.gold { --face: var(--gold); }
.clip-cube.cyan { --face: var(--cyan); }
.clip-cube.green { --face: var(--green); }
.clip-cube.dark { --face: #101116; }

.clip-cube .front,
.clip-cube .back {
  inset: 0;
}

.clip-cube .front { transform: translateZ(var(--d)); }
.clip-cube .back { transform: translateZ(calc(var(--d) * -1)); filter: brightness(0.58); }
.clip-cube .top,
.clip-cube .bottom {
  left: 0;
  width: 100%;
  height: calc(var(--d) * 2);
}
.clip-cube .top { top: calc(var(--d) * -1); transform: rotateX(90deg); filter: brightness(1.1); }
.clip-cube .bottom { bottom: calc(var(--d) * -1); transform: rotateX(-90deg); filter: brightness(0.7); }
.clip-cube .left,
.clip-cube .right {
  top: 0;
  width: calc(var(--d) * 2);
  height: 100%;
}
.clip-cube .left { left: calc(var(--d) * -1); transform: rotateY(-90deg); filter: brightness(0.65); }
.clip-cube .right { right: calc(var(--d) * -1); transform: rotateY(90deg); filter: brightness(0.85); }

.wave-cubes {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 72%;
  height: 26%;
  display: flex;
  align-items: end;
  gap: 0.45rem;
  transform: translateZ(78px) rotateX(-18deg);
  transform-style: preserve-3d;
}

.wave-cube {
  position: relative;
  flex: 1;
  height: var(--h);
  --d: 0.42rem;
  --face: #101116;
  animation: waveCubePulse 1.35s ease-in-out infinite;
}

.wave-cube:nth-child(3n) { --face: var(--cyan); animation-delay: -0.3s; }
.wave-cube:nth-child(4n) { --face: var(--hot); animation-delay: -0.55s; }
.wave-cube:nth-child(5n) { --face: var(--gold); animation-delay: -0.8s; }

.wave-cube .front,
.wave-cube .back {
  inset: 0;
}

.wave-cube .front { transform: translateZ(var(--d)); }
.wave-cube .back { transform: translateZ(calc(var(--d) * -1)); filter: brightness(0.55); }
.wave-cube .top,
.wave-cube .bottom {
  left: 0;
  width: 100%;
  height: calc(var(--d) * 2);
}
.wave-cube .top { top: calc(var(--d) * -1); transform: rotateX(90deg); filter: brightness(1.2); }
.wave-cube .bottom { bottom: calc(var(--d) * -1); transform: rotateX(-90deg); filter: brightness(0.6); }
.wave-cube .left,
.wave-cube .right {
  top: 0;
  width: calc(var(--d) * 2);
  height: 100%;
}
.wave-cube .left { left: calc(var(--d) * -1); transform: rotateY(-90deg); filter: brightness(0.65); }
.wave-cube .right { right: calc(var(--d) * -1); transform: rotateY(90deg); filter: brightness(0.85); }
}

.timeline-track {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 10%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--hot), var(--gold), var(--cyan));
  animation: timelineSlide 4s ease-in-out infinite;
  box-shadow: 0 16px 34px rgba(29, 34, 46, 0.16);
}

.timeline-track:nth-child(1) { top: 18%; width: 68%; }
.timeline-track:nth-child(2) { top: 34%; width: 82%; animation-delay: -1.2s; }
.timeline-track:nth-child(3) { top: 50%; width: 56%; animation-delay: -2.1s; }
.timeline-track:nth-child(4) { top: 66%; width: 74%; animation-delay: -3s; }

.waveform-3d {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: -12%;
  height: 34%;
  display: flex;
  align-items: end;
  gap: 0.35rem;
  transform: translateZ(95px) rotateX(-18deg);
}

.waveform-3d span {
  flex: 1;
  min-width: 0.35rem;
  border-radius: 999px 999px 0 0;
  background: #101116;
  animation: wavePulse 1.2s ease-in-out infinite;
}

.waveform-3d span:nth-child(odd) { height: 32%; animation-delay: -0.15s; }
.waveform-3d span:nth-child(2n) { height: 66%; animation-delay: -0.35s; }
.waveform-3d span:nth-child(3n) { height: 46%; animation-delay: -0.55s; }
.waveform-3d span:nth-child(5n) { height: 82%; animation-delay: -0.75s; }

.mc-block {
  position: absolute;
  width: clamp(3.5rem, 8vw, 6.8rem);
  aspect-ratio: 1;
  --half: clamp(1.75rem, 4vw, 3.4rem);
  transform-style: preserve-3d;
  animation: blockDrift 8s ease-in-out infinite;
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform, left, top;
}

.mc-block.is-dragging {
  animation-play-state: paused;
  cursor: grabbing;
  z-index: 20;
}

.block-field .mc-block.crafting {
  animation-name: craftingBlockDrift;
}

.physics-object {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.physics-object.is-dragging {
  cursor: grabbing;
  z-index: 30;
}

.editor-timeline {
  position: absolute;
  inset: 8% 1% 2%;
  border: 1px solid rgba(16, 17, 22, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(16, 17, 22, 0.055) 1px, transparent 1px) 0 0 / 10% 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 244, 247, 0.88));
  box-shadow: 0 34px 90px rgba(29, 34, 46, 0.18);
  transform: rotateX(58deg) rotateZ(-16deg) translateZ(64px);
  transform-style: preserve-3d;
  animation: editorTimelineFloat 8s ease-in-out infinite;
}

.time-ruler {
  position: absolute;
  left: 9%;
  right: 4%;
  top: 5%;
  height: 8%;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  transform: translateZ(18px);
}

.time-ruler span {
  border-left: 1px solid rgba(16, 17, 22, 0.22);
}

.layer-row {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 12%;
  border-top: 1px solid rgba(16, 17, 22, 0.08);
  transform-style: preserve-3d;
}

.layer-row:nth-of-type(2) { top: 18%; }
.layer-row:nth-of-type(3) { top: 32%; }
.layer-row:nth-of-type(4) { top: 46%; }
.layer-row:nth-of-type(5) { top: 62%; }
.layer-row:nth-of-type(6) { top: 76%; }

.layer-tag {
  position: absolute;
  left: 0;
  top: 18%;
  color: #70747f;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateZ(22px);
}

.video-layer i {
  position: absolute;
  left: var(--x);
  top: 18%;
  width: var(--w);
  height: 68%;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 25%),
    var(--c);
  box-shadow: 0 14px 28px rgba(29, 34, 46, 0.18);
  transform: translateZ(54px);
  transform-style: preserve-3d;
}

.video-layer i::before,
.video-layer i::after,
.wave-strip::before,
.wave-strip::after {
  content: "";
  position: absolute;
  background: inherit;
  filter: brightness(0.72);
}

.video-layer i::before {
  left: 0;
  right: 0;
  bottom: -0.7rem;
  height: 0.7rem;
  transform: rotateX(-90deg);
  transform-origin: top;
}

.video-layer i::after {
  top: 0;
  right: -0.7rem;
  width: 0.7rem;
  height: 100%;
  transform: rotateY(90deg);
  transform-origin: left;
}

.wave-strip {
  position: absolute;
  left: 9%;
  right: auto;
  width: 84%;
  top: 10%;
  height: 80%;
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  background: rgba(16, 17, 22, 0.92);
  box-shadow: 0 14px 28px rgba(29, 34, 46, 0.16);
  transform: translateZ(46px);
  transform-style: preserve-3d;
}

.music-note.is-dragging,
.video-layer i.is-dragging,
.wave-strip.is-dragging {
  animation-play-state: paused;
}

.wave-strip b {
  flex: 1;
  height: var(--h);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--hot));
}

.wave-strip::before {
  left: 0;
  right: 0;
  bottom: -0.62rem;
  height: 0.62rem;
  transform: rotateX(-90deg);
  transform-origin: top;
}

.wave-strip::after {
  top: 0;
  right: -0.62rem;
  width: 0.62rem;
  height: 100%;
  transform: rotateY(90deg);
  transform-origin: left;
}

.mc-block:nth-child(1) { left: 8%; top: 14%; animation-delay: -1s; }
.mc-block:nth-child(2) { left: 55%; top: 10%; animation-delay: -2.4s; }
.mc-block:nth-child(3) { left: 25%; top: 50%; animation-delay: -3.7s; }
.mc-block:nth-child(4) { left: 66%; top: 52%; animation-delay: -5.1s; }
.mc-block:nth-child(5) { left: 42%; top: 30%; animation-delay: -6.2s; }
.mc-block:nth-child(6) { left: 72%; top: 23%; animation-delay: -2.9s; }
.mc-block:nth-child(7) { left: 14%; top: 65%; animation-delay: -4.5s; }
.mc-block:nth-child(8) { left: 50%; top: 64%; animation-delay: -6.8s; }
.mc-block:nth-child(9) { left: 4%; top: 37%; animation-delay: -7.6s; }

.mc-block span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(16, 17, 22, 0.18);
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}

.mc-block .front { transform: translateZ(var(--half)); }
.mc-block .back { transform: rotateY(180deg) translateZ(var(--half)); }
.mc-block .right { transform: rotateY(90deg) translateZ(var(--half)); filter: brightness(0.86); }
.mc-block .left { transform: rotateY(-90deg) translateZ(var(--half)); filter: brightness(0.7); }
.mc-block .top { transform: rotateX(90deg) translateZ(var(--half)); filter: brightness(1.08); }
.mc-block .bottom { transform: rotateX(-90deg) translateZ(var(--half)); filter: brightness(0.62); }

.grass .top {
  background-color: #78ad43;
  background-image: url("assets/minecraft/grass_block_top.png");
  background-blend-mode: multiply;
}
.grass .front,
.grass .back,
.grass .right,
.grass .left { background-image: url("assets/minecraft/grass_block_side.png"); }
.grass .bottom { background-image: url("assets/minecraft/dirt.png"); }

.stone span { background-image: url("assets/minecraft/stone.png"); }

.diamond span { background-image: url("assets/minecraft/diamond_block.png"); }

.planks span { background-image: url("assets/minecraft/oak_planks.png"); }

.emerald span { background-image: url("assets/minecraft/emerald_block.png"); }

.gold span { background-image: url("assets/minecraft/gold_block.png"); }
.iron span { background-image: url("assets/minecraft/iron_block.png"); }
.redstone span { background-image: url("assets/minecraft/redstone_block.png"); }
.obsidian span { background-image: url("assets/minecraft/obsidian.png"); }
.deepslate-bricks span { background-image: url("assets/minecraft/deepslate_bricks.png"); }
.stone-bricks span { background-image: url("assets/minecraft/stone_bricks.png"); }
.copper span { background-image: url("assets/minecraft/copper_block.png"); }
.lapis span { background-image: url("assets/minecraft/lapis_block.png"); }
.nether-bricks span { background-image: url("assets/minecraft/nether_bricks.png"); }
.smooth-stone span { background-image: url("assets/minecraft/smooth_stone.png"); }
.amethyst span { background-image: url("assets/minecraft/amethyst_block.png"); }
.purpur span { background-image: url("assets/minecraft/purpur_block.png"); }
.sculk span { background-image: url("assets/minecraft/sculk.png"); }
.honeycomb span { background-image: url("assets/minecraft/honeycomb_block.png"); }
.slime span { background-image: url("assets/minecraft/slime_block.png"); }
.crying-obsidian span { background-image: url("assets/minecraft/crying_obsidian.png"); }
.crafting .top { background-image: url("assets/minecraft/crafting_table_top.png"); }
.crafting .front,
.crafting .back { background-image: url("assets/minecraft/crafting_table_front.png"); }
.crafting .right,
.crafting .left,
.crafting .bottom { background-image: url("assets/minecraft/crafting_table_side.png"); }

.scroll-slab::after {
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translate3d(22px, 22px, -80px);
}

.gallery-section {
  min-height: 92vh;
  padding-top: 2rem;
  overflow-x: clip;
  contain: paint;
  position: relative;
  z-index: 8;
  background: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h3 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.5vw, 4.4rem);
}

.section-head p {
  max-width: 24rem;
  color: var(--muted);
  line-height: 1.55;
}

.carousel-wrap {
  position: relative;
  overflow: hidden;
  padding-block: 1rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: railScroll 20s linear infinite;
}

.carousel-wrap:hover .carousel-track {
  animation-play-state: paused;
}

.carousel {
  display: contents;
}

.carousel-card {
  position: relative;
  flex: 0 0 clamp(18rem, 31vw, 30rem);
  aspect-ratio: 16 / 10;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 22px 60px rgba(29, 34, 46, 0.14);
  cursor: pointer;
}

.carousel-card:hover {
  transform: translateY(-4px);
}

.carousel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.68));
}

.gallery-section .carousel-controls {
  display: none;
}

.modal-stage {
  width: min(94vw, 86rem);
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.8rem;
  perspective: 1100px;
}

.modal-3d {
  min-height: min(70vh, 43rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 1rem;
  transform-style: preserve-3d;
}

.modal-panel {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  color: #101116;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--z, 0px)) scale(var(--scale, 1));
  transition: transform 180ms ease, opacity 180ms ease;
  transform-style: preserve-3d;
  cursor: grab;
}

.modal-3d.is-switching .modal-panel {
  animation: modalCardSwitch 1150ms cubic-bezier(0.16, 0.82, 0.22, 1);
}

.modal-panel:active {
  cursor: grabbing;
}

.modal-panel img {
  display: block;
  width: 100%;
  height: min(48vh, 30rem);
  object-fit: cover;
}

.modal-panel div {
  padding: 1rem;
  color: #555862;
}

.modal-slider {
  grid-column: 1 / -1;
  width: min(76vw, 54rem);
  justify-self: center;
  accent-color: var(--cyan);
  margin-top: 1rem;
}

/* Legacy scroll modal styles are kept harmless for older markup. */
.modal-scroll {
  display: none;
}

.card-caption {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.card-caption strong {
  display: block;
  color: #fff;
  font-size: clamp(1.1rem, 1.65vw, 1.65rem);
}

.card-caption span {
  color: rgba(255, 255, 255, 0.78);
}

.modal-close,
.modal-nav {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.service-tile {
  min-height: 14rem;
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 0;
}

.service-tile h4 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.service-tile p {
  color: var(--muted);
  line-height: 1.55;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.gallery-modal.is-open {
  display: grid;
  place-items: center;
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
  z-index: 2;
}

.modal-nav {
  width: 3rem;
  height: 4rem;
  border-radius: var(--radius);
  font-size: 2.4rem;
}

@keyframes railScroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 0.5rem)); }
}

@keyframes blockDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(18deg) rotateY(-28deg) rotateZ(2deg); }
  50% { transform: translate3d(28px, -32px, 130px) rotateX(48deg) rotateY(32deg) rotateZ(12deg); }
}

@keyframes craftingBlockDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(42deg) rotateY(-24deg) rotateZ(2deg); }
  50% { transform: translate3d(28px, -32px, 130px) rotateX(58deg) rotateY(24deg) rotateZ(10deg); }
}

/*
  Old ring carousel rules are intentionally superseded by the rail carousel.
  They remain below only where reused by captions and modal controls.
*/
/*
.carousel-wrap {
  position: relative;
  height: clamp(27rem, 58vw, 45rem);
  perspective: 1200px;
  display: grid;
  place-items: center;
  overflow: clip;
  contain: paint;
}

.carousel {
  position: relative;
  width: min(78vw, 56rem);
  height: min(52vw, 31rem);
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.carousel-card {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform-style: preserve-3d;
}

.carousel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.76));
}

.card-caption {
  position: relative;
  z-index: 1;
  padding: 1.15rem;
}

.card-caption strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.card-caption span {
  color: var(--muted);
}

.carousel-controls {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.control-btn,
.modal-close,
.modal-nav {
  border: 1px solid var(--line);
  background: rgba(8, 9, 13, 0.72);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.control-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 1.45rem;
  pointer-events: auto;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.service-tile {
  min-height: 14rem;
  border-top: 1px solid var(--line);
  padding: 1.1rem 0 0;
}

.service-tile h4 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.service-tile p {
  color: var(--muted);
  line-height: 1.55;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.gallery-modal.is-open {
  display: grid;
  place-items: center;
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
  z-index: 2;
}

.modal-stage {
  width: min(94vw, 86rem);
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.8rem;
}

.modal-nav {
  width: 3rem;
  height: 4rem;
  border-radius: var(--radius);
  font-size: 2.4rem;
}

.modal-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 1rem;
}

.modal-item {
  flex: 0 0 min(82vw, 68rem);
  scroll-snap-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #09090d;
}

.modal-item img {
  display: block;
  width: 100%;
  height: min(70vh, 43rem);
  object-fit: cover;
}

.modal-item div {
  padding: 1rem;
  color: var(--muted);
}
*/

@keyframes floatA {
  0%, 100% { transform: rotateY(-22deg) rotateX(14deg) translate3d(0, 0, 0); }
  50% { transform: rotateY(-8deg) rotateX(20deg) translate3d(0, -18px, 40px); }
}

@keyframes floatB {
  0%, 100% { transform: rotateY(26deg) rotateX(10deg) translate3d(0, 12px, 80px); }
  50% { transform: rotateY(12deg) rotateX(18deg) translate3d(-18px, -8px, 120px); }
}

@keyframes floatC {
  0%, 100% { transform: rotateY(18deg) rotateX(-8deg) translate3d(0, -4px, 30px); }
  50% { transform: rotateY(34deg) rotateX(0deg) translate3d(20px, 14px, 82px); }
}

@keyframes noteFloat {
  0%, 100% { transform: rotateX(18deg) rotateY(-28deg) translate3d(0, 0, 0); }
  50% { transform: rotateX(44deg) rotateY(30deg) translate3d(24px, -30px, 120px); }
}

@keyframes timelineSlide {
  0%, 100% { transform: translateX(0) translateZ(20px); }
  50% { transform: translateX(11%) translateZ(72px); }
}

@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.45) translateZ(20px); opacity: 0.55; }
  50% { transform: scaleY(1.1) translateZ(70px); opacity: 1; }
}

@keyframes modalCardSwitch {
  0% { opacity: 0; filter: blur(8px); transform: rotateX(28deg) rotateY(calc(var(--ry) - 70deg)) translateX(var(--enter-x, 0px)) translateZ(-360px) scale(0.68); }
  48% { opacity: 1; filter: blur(0); transform: rotateX(-6deg) rotateY(calc(var(--ry) + 18deg)) translateX(var(--settle-x, 0px)) translateZ(calc(var(--z, 0px) + 160px)) scale(calc(var(--scale, 1) + 0.08)); }
  100% { opacity: 1; filter: blur(0); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateX(0) translateZ(var(--z, 0px)) scale(var(--scale, 1)); }
}

@keyframes timelineRigFloat {
  0%, 100% { transform: rotateX(58deg) rotateZ(-18deg) translate3d(0, 0, 50px); }
  50% { transform: rotateX(52deg) rotateZ(-13deg) translate3d(18px, -24px, 120px); }
}

@keyframes clipLift {
  0%, 100% { translate: 0 0 0; }
  50% { translate: 14px -20px 38px; }
}

@keyframes editObjectFloat {
  0%, 100% { translate: 0 0 0; }
  50% { translate: 8px -8px 24px; }
}

@keyframes wavePlay {
  0%, 100% { width: 12%; }
  50% { width: calc(100% - 1.3rem); }
}

@keyframes waveCubePulse {
  0%, 100% { scale: 1 0.62 1; opacity: 0.72; }
  50% { scale: 1 1.15 1; opacity: 1; }
}

@keyframes editorTimelineFloat {
  0%, 100% { transform: rotateX(58deg) rotateZ(-16deg) translate3d(0, 0, 64px); }
  50% { transform: rotateX(53deg) rotateZ(-12deg) translate3d(16px, -22px, 118px); }
}

@keyframes pageWipe {
  0% { transform: translateX(-102%); }
  28%, 72% { transform: translateX(0); }
  100% { transform: translateX(102%); }
}

@keyframes minecraftChase {
  0%, 18% { opacity: 0; transform: translate3d(-32rem, -50%, 0); }
  28% { opacity: 1; }
  72% { opacity: 1; }
  82%, 100% { opacity: 0; transform: translate3d(calc(100vw + 3rem), -50%, 0); }
}

@keyframes transitionBeeBob {
  from { translate: 0 -5px; rotate: -2deg; }
  to { translate: 0 5px; rotate: 2deg; }
}

@keyframes transitionBlockTumble {
  from { transform: translateY(-5px) rotateZ(-8deg); }
  50% { transform: translateY(7px) rotateZ(172deg); }
  to { transform: translateY(-5px) rotateZ(352deg); }
}

@keyframes viewArrive {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.carousel-wrap {
  cursor: grab;
  touch-action: pan-y;
}

.carousel-wrap .carousel-card {
  cursor: grab;
}

.carousel-track {
  translate: var(--drag-x, 0px) 0;
}

.carousel-track.is-dragging {
  animation-play-state: paused !important;
  cursor: grabbing;
}

.carousel-track.is-dragging .carousel-card {
  cursor: grabbing;
}

.carousel-card img,
.modal-panel img {
  -webkit-user-drag: none;
  user-select: none;
}

.modal-panel {
  position: relative;
  user-select: none;
}

.modal-panel.is-rotating {
  cursor: grabbing;
  transition-duration: 80ms;
}

.panel-fullscreen,
.full-image-close {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(8, 9, 13, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.panel-fullscreen {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 6;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 6px;
  font-size: 1.25rem;
}

.full-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  grid-template-rows: 4rem minmax(0, 1fr);
  background: #f1f4f5;
  overflow: hidden;
  isolation: isolate;
}

.full-image-viewer.is-minecraft {
  background-color: #78c8e6;
  background-image:
    linear-gradient(rgba(239, 250, 252, 0.32), rgba(239, 250, 252, 0.5)),
    url("assets/minecraft-pixel-mountains.png");
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
}

.full-image-viewer.is-minecraft.is-red-desert {
  background-color: #e99a3f;
  background-image:
    linear-gradient(rgba(255, 247, 226, 0.12), rgba(255, 239, 205, 0.24)),
    url("assets/minecraft-pixel-red-desert.png");
}

.full-image-viewer.is-minecraft.is-beach-hub {
  background-color: #16a9dc;
  background-image:
    linear-gradient(rgba(224, 249, 255, 0.1), rgba(220, 247, 255, 0.2)),
    url("assets/minecraft-pixel-beach-hub.png");
}

.full-image-viewer.is-open {
  display: grid;
}

.full-image-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem 0 1.5rem;
  border-bottom: 2px solid rgba(31, 62, 70, 0.18);
  background: rgba(249, 253, 253, 0.88);
  box-shadow: 0 4px 0 rgba(30, 53, 59, 0.08);
  backdrop-filter: blur(10px);
}

.full-image-title {
  min-width: 0;
  overflow: hidden;
  color: #16252a;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-image-canvas {
  position: relative;
  z-index: 3;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.full-image-canvas img {
  display: block;
  width: min(82vw, 90rem);
  height: min(70vh, 50rem);
  max-width: none;
  max-height: none;
  object-fit: contain;
  border: 6px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(25, 50, 55, 0.32);
}

.full-image-bees {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

.full-image-viewer.is-minecraft .full-image-bees {
  display: block;
}

.full-image-bee {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(3rem, 4.2vw, 3.75rem);
  aspect-ratio: 13 / 14;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  will-change: transform;
}

.full-image-bee.is-dragging {
  cursor: grabbing;
}

.full-image-bee-facing {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

.full-image-viewer.is-red-desert .full-image-bee-facing::after {
  content: "";
  position: absolute;
  left: -6%;
  top: -12%;
  z-index: 3;
  width: 112%;
  aspect-ratio: 490 / 234;
  background: url("assets/minecraft-bee-sombrero.png") center / contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 rgba(72, 38, 18, 0.2));
  transform: rotate(-7deg) skewX(-8deg) scaleY(0.88);
  transform-origin: 50% 82%;
  pointer-events: none;
}

.full-image-bee img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(6px 8px 0 rgba(35, 55, 45, 0.2));
}

.full-image-close {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 2px solid #0b0c0f;
  border-radius: 0;
  background: #3b3d43;
  box-shadow:
    inset 2px 2px 0 #777a82,
    inset -2px -2px 0 #202126;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 0 #141518;
  image-rendering: pixelated;
}

.full-image-close:hover {
  background: #50535b;
}

.full-image-close:active {
  box-shadow:
    inset 2px 2px 0 #202126,
    inset -2px -2px 0 #777a82;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  -ms-overflow-style: none;
}

@media (max-width: 840px) {
  .topbar,
  .hero-actions,
  .section-head {
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero,
  .work-intro,
  .discipline-grid,
  .service-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .coming-soon {
    min-height: calc(100vh - 11rem);
  }

  .coming-center {
    width: min(100%, 22rem);
    padding-inline: 0.5rem;
  }

  .coming-center h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
    text-wrap: balance;
  }

  .coming-center > p:last-child {
    max-width: 18rem;
    font-size: 0.95rem;
  }

  .coming-bee {
    width: clamp(5.75rem, 25vw, 7rem);
  }

  .coming-block-field {
    width: 29%;
  }

  .coming-left { left: 2%; }
  .coming-right { right: 10%; }

  .coming-soon .coming-block {
    width: clamp(2.4rem, 11vw, 3rem);
    --half: clamp(1.2rem, 5.5vw, 1.5rem);
  }

  .coming-block:nth-child(1) { left: 0; }
  .coming-block:nth-child(2) { left: 28%; }
  .coming-block:nth-child(3) { left: 0; }
  .coming-right .coming-block:nth-child(1) { left: 12%; }
  .coming-right .coming-block:nth-child(2) { left: 0; }
  .coming-right .coming-block:nth-child(3) { left: 12%; }

  .hero-orbit {
    min-height: 22rem;
  }

  .work-intro {
    min-height: auto;
  }

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

  .section-head {
    flex-direction: column;
  }

  .carousel {
    display: contents;
  }

  .carousel-card {
    flex-basis: 78vw;
  }

  .modal-stage {
    grid-template-columns: 1fr;
  }

  .modal-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
