:root {
  color-scheme: light;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body-zh: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-heading-zh: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --paper: #f7fafd;
  --ink: #2b465f;
  --muted: #60788f;
  --label: #5c748d;
  --blue: #376c9e;
  --line: #dae5ef;
  --depth: rgba(114, 146, 173, 0.09);
  --ease: cubic-bezier(0.42, 0, 0.58, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

.page-shell {
  --canvas-scale: 1;
  --canvas-height: 890px;
  position: relative;
  width: 100%;
  height: var(--canvas-height);
  overflow: hidden;
  background: var(--paper);
}

.portfolio-canvas {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 890px;
  transform: translateX(-50%) scale(var(--canvas-scale));
  transform-origin: top center;
  background: var(--paper);
}

.navigation {
  position: relative;
  width: 100%;
  height: 100px;
  overflow: hidden;
}

.brand {
  position: absolute;
  top: 33px;
  left: 64px;
  color: var(--ink);
  font-size: 23px;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
}

.descriptor {
  position: absolute;
  top: 31px;
  left: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: normal;
  white-space: nowrap;
}

.descriptor span,
.introduction span,
h1 span {
  display: block;
}

.nav-links {
  position: absolute;
  inset: 0;
}

.nav-links button {
  position: absolute;
  top: 39px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: normal;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.nav-links button:nth-child(1) { left: 1000px; }
.nav-links button:nth-child(2) { left: 1090px; }
.nav-links button:nth-child(3) { left: 1210px; }

.nav-links button::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 250ms ease;
}

.nav-links button:hover::after,
.nav-links button:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.navigation__line {
  position: absolute;
  top: 99px;
  left: 64px;
  width: 1312px;
  height: 1px;
}

.object-garden {
  position: relative;
  width: 100%;
  height: 790px;
  overflow: hidden;
}

.eyebrow {
  position: absolute;
  top: 56px;
  left: 96px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: normal;
  letter-spacing: 0.7px;
  white-space: nowrap;
}

h1 {
  position: absolute;
  top: 103px;
  left: 96px;
  width: 650px;
  margin: 0;
  color: var(--blue);
  font-size: 40px;
  font-weight: 400;
  line-height: 51px;
  letter-spacing: -0.7px;
}

.introduction {
  position: absolute;
  top: 229px;
  left: 100px;
  width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
}

.object-path {
  position: absolute;
  top: 210px;
  left: 140px;
  width: 1135.358px;
  height: 426.738px;
  pointer-events: none;
}

.portal {
  position: absolute;
  display: block;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.portal:focus-visible {
  outline: 1px solid rgba(55, 108, 158, 0.45);
  outline-offset: 7px;
  border-radius: 12px;
}

.object-visual {
  position: absolute;
  display: block;
  transform-origin: center center;
  transition: transform 450ms var(--ease), filter 450ms var(--ease);
  will-change: transform, filter;
}

.object-label {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.1px;
  text-align: center;
  opacity: 0.76;
  pointer-events: none;
}

.object-label__title,
.object-label__note {
  display: block;
}

.object-label__note {
  color: rgba(92, 116, 141, 0);
  font-size: 11px;
  transition: color 420ms var(--ease);
}

.portal:hover .object-label,
.portal:focus-visible .object-label {
  opacity: 1;
}

.portal:hover .object-label__note,
.portal:focus-visible .object-label__note {
  color: rgba(92, 116, 141, 0.8);
}

.portal--computer {
  top: 360px;
  left: 130px;
  width: 200px;
  height: 240px;
}

.computer-visual {
  top: 27px;
  left: 6px;
  width: 188px;
  height: 160px;
}

.computer-visual::before {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 49px;
  width: 86px;
  height: 76px;
  content: "";
  pointer-events: none;
  border-radius: 48%;
  background: radial-gradient(
    ellipse at 50% 46%,
    rgba(221, 246, 255, 0.72) 0%,
    rgba(167, 218, 242, 0.34) 42%,
    rgba(152, 205, 231, 0) 76%
  );
  filter: blur(11px);
  opacity: 0;
  transform: scale(0.76);
  transition: opacity 520ms var(--ease), transform 650ms var(--ease);
}

.computer-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.computer-spill,
.computer-screen {
  position: absolute;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.16;
  transition: opacity 500ms var(--ease), filter 500ms var(--ease);
}

.computer-spill {
  top: 0;
  left: 39px;
  width: 106px;
  height: 90px;
}

.computer-screen {
  top: 18px;
  left: 61px;
  width: 61px;
  height: 53px;
}

.portal--computer::before {
  position: absolute;
  top: 50px;
  left: 75px;
  width: 56px;
  height: 42px;
  content: "";
  border-radius: 50%;
  background: rgba(129, 195, 228, 0.38);
  filter: blur(24px);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 500ms var(--ease), transform 650ms var(--ease);
}

.portal--computer::after {
  position: absolute;
  top: 27px;
  left: 49px;
  width: 104px;
  height: 82px;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  background: rgba(145, 203, 232, 0.2);
  filter: blur(35px);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 560ms var(--ease), transform 720ms var(--ease);
}

.portal--computer:hover .computer-visual,
.portal--computer:focus-visible .computer-visual {
  transform: translateY(-10px) scale(1.3);
  filter: drop-shadow(0 13px 14px rgba(80, 119, 150, 0.18));
}

.portal--computer:hover .computer-spill,
.portal--computer:hover .computer-screen,
.portal--computer:focus-visible .computer-spill,
.portal--computer:focus-visible .computer-screen {
  opacity: 1;
  filter: saturate(1.04) brightness(1.38) drop-shadow(0 0 8px rgba(188, 229, 248, 0.66));
}

.portal--computer:hover .computer-visual::before,
.portal--computer:focus-visible .computer-visual::before {
  opacity: 0.96;
  transform: scale(1.18);
}

.portal--computer:hover::before,
.portal--computer:focus-visible::before {
  opacity: 0.72;
  transform: scale(1.65);
  animation: screen-breathe 1.3s var(--ease) infinite alternate;
}

.portal--computer:hover::after,
.portal--computer:focus-visible::after {
  opacity: 0.7;
  transform: scale(1.72);
}

.portal--computer .object-label { top: 205px; }

.portal--turntable {
  top: 454px;
  left: 500px;
  width: 230px;
  height: 215px;
}

.turntable-visual {
  top: 4px;
  left: 27.5px;
  width: 175px;
  height: 167px;
  filter: drop-shadow(0 5px 9px rgba(114, 146, 173, 0.09));
  transition:
    top 420ms ease-in-out,
    left 420ms ease-in-out,
    width 420ms ease-in-out,
    height 420ms ease-in-out,
    filter 420ms ease-in-out;
}

.turntable-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 420ms ease-in-out;
}

.turntable-image--hover {
  opacity: 0;
}

.vinyl-window {
  position: absolute;
  z-index: 2;
  top: 122.8px;
  left: -0.3px;
  display: block;
  width: 174px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 180ms ease-in-out;
}

.vinyl-window::after {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 85px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: rgba(229, 232, 225, 0.82);
  box-shadow: 0 0 1px rgba(30, 33, 32, 0.75);
}

.vinyl-plane {
  position: absolute;
  top: 50%;
  left: 0;
  width: 174px;
  height: 174px;
  transform: translateY(-50%) scaleY(0.252874);
  transform-origin: center;
}

.vinyl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 8deg, rgba(240, 245, 241, 0.09), rgba(9, 12, 13, 0.02) 8%, rgba(255, 255, 255, 0.025) 19%, rgba(6, 8, 9, 0.08) 31%, rgba(232, 238, 235, 0.065) 49%, rgba(8, 10, 11, 0.025) 67%, rgba(248, 250, 247, 0.07) 83%, rgba(7, 9, 10, 0.08)),
    repeating-radial-gradient(circle, #202222 0 1px, #171919 1.45px 2.35px, #1c1e1e 2.8px 3.5px);
  box-shadow: inset 0 0 0 1px rgba(5, 7, 8, 0.62), inset 0 0 18px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  animation: vinyl-full-spin 7.36s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.vinyl-label {
  position: absolute;
  top: 47.485px;
  left: 58.366px;
  width: 57.267px;
  height: 79.03px;
  object-fit: fill;
}

.turntable-tonearm {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-in-out;
}

.turntable-tonearm--arm {
  clip-path: polygon(52.5% 72.5%, 56% 68.5%, 74% 56.5%, 78.5% 58.5%, 62% 72.5%, 59.5% 78%, 53% 78%);
}

.turntable-tonearm--base {
  clip-path: polygon(70% 52%, 83.5% 52%, 88% 82%, 68% 82%);
}

.portal--turntable.is-figma-hover .turntable-visual {
  top: -52.7px;
  left: 1.25px;
  width: 227.5px;
  height: 217.1px;
  filter: drop-shadow(0 9px 16px rgba(114, 146, 173, 0.17));
  transition-duration: 450ms;
}

.portal--turntable.is-figma-hover .turntable-image {
  transition-duration: 450ms;
}

.portal--turntable.is-figma-hover .turntable-image--rest {
  opacity: 0;
}

.portal--turntable.is-figma-hover .turntable-image--hover {
  opacity: 1;
}

.portal--turntable.is-figma-hover .vinyl-window,
.portal--turntable.is-figma-hover .turntable-tonearm {
  opacity: 1;
}

.portal--turntable.is-figma-hover .vinyl-disc {
  animation-play-state: running;
}

.portal--turntable.is-figma-hover .object-label__title {
  color: #377bc5;
}

.portal--turntable .object-label { top: 180px; }

.portal--bear {
  top: 278px;
  left: 850px;
  width: 230px;
  height: 210px;
  perspective: 800px;
}

.bear-visual {
  top: 3px;
  left: 43px;
  width: 144px;
  height: 164px;
  transform-style: preserve-3d;
}

.bear-flip {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease);
}

.bear-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: visible;
  backface-visibility: hidden;
}

.bear-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px var(--depth));
}

.bear-face--back {
  transform: rotateY(180deg);
}

.bear-face--back img {
  object-fit: contain;
}

.bear-signature {
  position: absolute;
  top: 98px;
  left: 0;
  width: 100%;
  color: var(--paper);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  transform: translateZ(1px);
}

.portal--bear:hover .bear-visual,
.portal--bear:focus-visible .bear-visual {
  transform: translateY(-8px) scale(1.35) rotateZ(-0.6deg);
  filter: drop-shadow(0 13px 13px rgba(80, 119, 150, 0.12));
}

.portal--bear:hover .bear-flip,
.portal--bear:focus-visible .bear-flip {
  transform: rotateY(180deg) rotateZ(0.8deg);
}

.portal--bear .object-label { top: 176px; }

.portal--bag {
  top: 114px;
  left: 1135px;
  width: 210px;
  height: 195px;
}

.bag-visual {
  top: 0;
  left: 0;
  width: 210px;
  height: 158px;
  transform-origin: 50% 76%;
}

.bag-material {
  position: absolute;
  top: 0;
  left: 56.5px;
  display: block;
  width: 97px;
  height: 154px;
}

.bag-whole {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.84;
  filter: drop-shadow(0 5px 9px var(--depth));
}

.bag-shadow {
  position: absolute;
  top: 151px;
  left: 72px;
  width: 66px;
  height: 5px;
  opacity: 0;
  transition: opacity 350ms ease, transform 450ms var(--ease);
}

.bag-pieces {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  width: 100%;
  height: 100%;
  opacity: 0;
  transform-origin: 50% 58%;
  will-change: transform, opacity, filter;
}

.bag-piece {
  width: calc(100% + 1.2px);
  height: calc(100% + 1.2px);
  margin: -0.6px;
  object-fit: fill;
  opacity: 0;
  transform-origin: center;
  will-change: transform, opacity, filter;
}

.portal--bag:hover .bag-visual,
.portal--bag:focus-visible .bag-visual {
  transform: translateY(-8px) scale(1.25);
  filter: drop-shadow(0 13px 13px rgba(80, 119, 150, 0.12));
}

.portal--bag:hover .bag-shadow,
.portal--bag:focus-visible .bag-shadow {
  opacity: 1;
  transform: scaleX(1.24);
}

.portal--bag.is-crumpling .bag-whole {
  animation: bag-whole-crumple 1.02s both;
}

.portal--bag.is-crumpling .bag-pieces {
  animation: bag-surface-crumple 1.02s both;
}

.portal--bag.is-crumpling .bag-piece {
  --x-direction: calc((1.5 - var(--column)) * 4.4px);
  --y-direction: calc((2 - var(--row)) * 3px);
  animation: bag-piece-crumple 1.02s both;
}

.portal--bag .object-label { top: 160px; }

.invitation,
.scroll-cue {
  position: absolute;
  top: 716px;
  margin: 0;
  color: var(--muted);
  line-height: normal;
  white-space: nowrap;
}

.invitation {
  left: 96px;
  font-size: 12px;
}

.scroll-cue {
  left: 1210px;
  font-size: 10px;
  letter-spacing: 0.7px;
}

@keyframes screen-breathe {
  from { opacity: 0.52; transform: scale(1.35); }
  to { opacity: 0.78; transform: scale(1.72); }
}

@keyframes vinyl-full-spin {
  to { transform: rotate(360deg); }
}

@keyframes bag-whole-crumple {
  0% {
    opacity: 0.84;
    transform: scale(1);
    filter: blur(0);
    animation-timing-function: cubic-bezier(0.54, 0.02, 0.76, 0.22);
  }
  35%, 45% { opacity: 0.22; transform: scale(0.81, 0.77) translateY(8px); filter: blur(0.22px); }
  45% { animation-timing-function: cubic-bezier(0.17, 0.72, 0.21, 1); }
  100% { opacity: 0.84; transform: scale(1); filter: blur(0); }
}

@keyframes bag-surface-crumple {
  0% {
    opacity: 0;
    transform: scale(1);
    filter: blur(0);
    animation-timing-function: cubic-bezier(0.54, 0.02, 0.76, 0.22);
  }
  8% { opacity: 0.7; }
  35%, 45% { opacity: 0.84; transform: scale(0.82, 0.78) translateY(8px); filter: contrast(1.04) brightness(0.98) blur(0.12px); }
  45% { animation-timing-function: cubic-bezier(0.17, 0.72, 0.21, 1); }
  88% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(1); filter: none; }
}

@keyframes bag-piece-crumple {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: blur(0);
    animation-timing-function: cubic-bezier(0.54, 0.02, 0.76, 0.22);
  }
  8% { opacity: 0.78; }
  35%, 45% {
    opacity: 0.86;
    transform:
      translate(var(--x-direction), var(--y-direction))
      scale(0.96, 0.97)
      rotate(calc((var(--column) - 1.5) * 0.9deg));
    filter: contrast(1.04) brightness(0.99) blur(0.08px);
  }
  45% { animation-timing-function: cubic-bezier(0.17, 0.72, 0.21, 1); }
  78% {
    opacity: 0.75;
    transform:
      translate(calc(var(--x-direction) * -0.08), calc(var(--y-direction) * -0.06))
      scale(1.008, 0.996)
      rotate(calc((var(--column) - 1.5) * -0.18deg));
    filter: contrast(1.01);
  }
  94% { opacity: 0.32; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(0, 0) scale(1); filter: none; }
}

/* Computer → AI Hub transition. Homepage geometry remains unchanged. */
.portfolio-canvas::after {
  position: absolute;
  z-index: 20;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(239, 246, 255, 0.98), rgba(247, 250, 253, 0.96) 58%);
  opacity: 0;
  transition: opacity 320ms ease 390ms;
}

.portfolio-canvas .navigation,
.portfolio-canvas .eyebrow,
.portfolio-canvas h1,
.portfolio-canvas .introduction,
.portfolio-canvas .object-path,
.portfolio-canvas .invitation,
.portfolio-canvas .scroll-cue,
.portfolio-canvas .portal {
  transition: opacity 420ms ease, filter 420ms ease, transform 620ms cubic-bezier(0.22, 0.72, 0.26, 1);
}

.portfolio-canvas.is-entering-ai .navigation,
.portfolio-canvas.is-entering-ai .eyebrow,
.portfolio-canvas.is-entering-ai h1,
.portfolio-canvas.is-entering-ai .introduction,
.portfolio-canvas.is-entering-ai .object-path,
.portfolio-canvas.is-entering-ai .invitation,
.portfolio-canvas.is-entering-ai .scroll-cue,
.portfolio-canvas.is-entering-ai .portal:not(.portal--computer) {
  opacity: 0.06;
  filter: blur(2px);
}

.portfolio-canvas.is-entering-ai .portal--computer {
  z-index: 21;
  transform: translate(470px, -42px) scale(1.28);
}

.portfolio-canvas.is-entering-ai .computer-visual {
  transform: translateY(-10px) scale(1.3);
  filter: drop-shadow(0 18px 25px rgba(95, 139, 177, 0.2));
}

.portfolio-canvas.is-entering-ai .computer-spill,
.portfolio-canvas.is-entering-ai .computer-screen {
  opacity: 1;
  filter: brightness(1.46) drop-shadow(0 0 13px rgba(190, 228, 248, 0.72));
}

.portfolio-canvas.is-entering-ai .computer-visual::before,
.portfolio-canvas.is-entering-ai .portal--computer::before,
.portfolio-canvas.is-entering-ai .portal--computer::after {
  opacity: 1;
  transform: scale(2.2);
}

.portfolio-canvas.is-entering-ai::after {
  opacity: 1;
}

/* AI Hub */
.page-shell--ai {
  background: #f1f7fb;
}

.ai-hub-canvas {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 890px;
  overflow: hidden;
  background:
    radial-gradient(circle at 57% 43%, rgba(255, 255, 255, 0.98) 0 24%, rgba(242, 248, 252, 0.9) 59%, rgba(222, 235, 245, 0.72) 100%),
    #f1f7fb;
  opacity: 0;
  transform: translateX(-50%) scale(var(--canvas-scale));
  transform-origin: top center;
  transition: opacity 360ms ease;
}

.ai-hub-canvas::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(48, 89, 124, 0.06), transparent 15%, transparent 84%, rgba(42, 80, 114, 0.065));
}

.ai-hub-canvas.is-visible {
  opacity: 1;
}

.ai-hub-canvas.is-leaving {
  opacity: 0;
}

.ai-hub-nav {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  height: 82px;
}

.ai-hub-back,
.ai-hub-locale button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(51, 79, 116, 0.72);
  cursor: pointer;
}

.ai-hub-back {
  position: absolute;
  top: 30px;
  left: 44px;
  font-size: 13px;
  letter-spacing: 0.05px;
}

.ai-hub-back:hover,
.ai-hub-back:focus-visible,
.ai-hub-locale button:hover,
.ai-hub-locale button:focus-visible,
.ai-hub-locale button[aria-pressed="true"] {
  color: #2e537f;
}

.ai-hub-locale {
  position: absolute;
  top: 29px;
  right: 45px;
  display: flex;
  gap: 11px;
  align-items: center;
  color: rgba(75, 99, 132, 0.38);
  font-size: 13px;
}

.ai-hub-map {
  position: absolute;
  inset: 0;
}

.carousel-space {
  position: absolute;
  z-index: 3;
  inset: 0;
  perspective: 1100px;
  pointer-events: none;
}

.carousel-depth-haze {
  position: absolute;
  top: 206px;
  left: 50%;
  width: 760px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(174, 202, 224, 0.13), rgba(224, 237, 246, 0.045) 48%, transparent 72%);
  filter: blur(22px);
  opacity: 0.58;
  transform: translateX(-50%);
}

.carousel-fragment {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 220px;
  height: 190px;
  pointer-events: none;
  transform-origin: center;
  will-change: left, top, transform, opacity, filter;
}

.carousel-fragment img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thought-lines {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.thought-line {
  stroke: rgba(91, 126, 164, 0.16);
  stroke-width: 0.75;
  transition: stroke 280ms ease, stroke-width 280ms ease, opacity 280ms ease;
}

.thought-dot {
  fill: rgba(88, 125, 171, 0.28);
  transition: fill 280ms ease, opacity 280ms ease, transform 280ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.ai-hub-map[data-active] .thought-line,
.ai-hub-map[data-active] .thought-dot[data-dot] {
  opacity: 0.18;
}

.ai-hub-map[data-active="aiVisual"] [data-line="aiVisual"],
.ai-hub-map[data-active="aiSkills"] [data-line="aiSkills"],
.ai-hub-map[data-active="aiProjects"] [data-line="aiProjects"],
.ai-hub-map[data-active="aiGame"] [data-line="aiGame"] {
  stroke: rgba(66, 111, 166, 0.6);
  stroke-width: 1.3;
  opacity: 1;
}

.ai-hub-map[data-active="aiVisual"] [data-dot="aiVisual"],
.ai-hub-map[data-active="aiSkills"] [data-dot="aiSkills"],
.ai-hub-map[data-active="aiProjects"] [data-dot="aiProjects"],
.ai-hub-map[data-active="aiGame"] [data-dot="aiGame"] {
  fill: #4679b6;
  opacity: 1;
  transform: scale(1.28);
}

.ai-bear {
  position: absolute;
  z-index: 110;
  top: auto;
  right: auto;
  bottom: 18px;
  left: 560px;
  width: 320px;
  height: 340px;
  pointer-events: none;
}

.ai-bear img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 14px 18px rgba(71, 100, 126, 0.12));
}

.bear-interface {
  position: absolute;
  z-index: 3;
  top: 74px;
  left: 166px;
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(117, 151, 181, 0.62);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.92), rgba(190, 218, 237, 0.66) 46%, rgba(100, 139, 174, 0.2) 72%, transparent 74%);
  box-shadow: 0 0 7px rgba(105, 157, 197, 0.16), inset 0 0 0 2px rgba(246, 250, 253, 0.64);
}

.bear-interface__core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(87, 129, 166, 0.78);
  box-shadow: 0 0 4px rgba(86, 143, 188, 0.45);
}

.bear-interface__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(99, 140, 177, 0.7);
}

.bear-interface__dot--one { top: -7px; left: 12px; }
.bear-interface__dot--two { top: 2px; right: -7px; }
.bear-interface__dot--three { right: -3px; bottom: -5px; opacity: 0.54; }

.ai-thought {
  position: absolute;
  z-index: 3;
  top: 674px;
  left: 450px;
  margin: 0;
  color: rgba(75, 101, 139, 0.54);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.48;
  transform: rotate(-4deg);
}

.ai-thought span {
  display: block;
}

.ai-node {
  position: absolute;
  z-index: 3;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.2, 0.72, 0.22, 1), filter 420ms ease;
}

.ai-node:focus-visible {
  outline: 1px solid rgba(72, 113, 164, 0.52);
  outline-offset: 8px;
  border-radius: 14px;
}

.ai-node:hover,
.ai-node:focus-visible {
  z-index: 5;
  filter: drop-shadow(0 17px 22px rgba(66, 94, 132, 0.12));
  transform: translateY(-7px) scale(1.045);
}

.ai-node__visual {
  position: absolute;
  display: block;
  animation: object-float 8s ease-in-out infinite alternate;
}

.ai-node__asset {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 480ms cubic-bezier(0.2, 0.72, 0.22, 1), filter 360ms ease;
}

.ai-node__copy {
  position: absolute;
  display: block;
  color: #294d75;
  text-align: left;
  transition: color 280ms ease, transform 350ms ease;
}

.ai-node__number,
.ai-node__title,
.ai-node__subtitle,
.ai-node__description {
  display: block;
}

.ai-node__number {
  width: max-content;
  min-width: 39px;
  margin-bottom: 8px;
  padding: 3px 12px 4px;
  border-radius: 20px;
  background: rgba(116, 145, 184, 0.48);
  color: white;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.ai-node__title {
  max-width: 250px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.6px;
}

.ai-node__subtitle {
  margin-top: 9px;
  color: rgba(44, 73, 110, 0.84);
  font-size: 13px;
  line-height: 1.2;
}

.ai-node__description {
  max-width: 220px;
  margin-top: 10px;
  color: rgba(54, 79, 111, 0.75);
  font-size: 11px;
  line-height: 1.45;
}

.ai-node:hover .ai-node__copy,
.ai-node:focus-visible .ai-node__copy {
  color: #1f578f;
  transform: translateY(-2px);
}

.ai-node--visual {
  top: 138px;
  left: 252px;
  width: 306px;
  height: 318px;
}

.ai-node--visual .ai-node__visual {
  top: 58px;
  left: 112px;
  width: 120px;
  height: 166px;
  overflow: hidden;
  animation-duration: 9s;
  transition: height 620ms cubic-bezier(0.2, 0.72, 0.22, 1), filter 360ms ease;
}

.ai-node--visual .ai-node__copy {
  top: 0;
  left: 0;
  width: 172px;
}

.ai-node--visual .ai-node__asset {
  width: 120px;
  height: auto;
  object-fit: unset;
  transform: none;
}

.ai-node--visual:hover .ai-node__visual,
.ai-node--visual:focus-visible .ai-node__visual {
  height: 240px;
  filter: brightness(1.025) drop-shadow(0 12px 16px rgba(66, 94, 132, 0.08));
}

.ai-node--skills {
  top: 270px;
  left: 475px;
  width: 360px;
  height: 246px;
}

.ai-node--skills .ai-node__visual {
  top: 65px;
  left: 142px;
  width: 188px;
  height: 158px;
  animation-duration: 10s;
}

.ai-node--skills .ai-node__copy {
  top: 0;
  left: 0;
  width: 186px;
}

.ai-node--skills .ai-node__asset {
  filter: hue-rotate(-18deg) saturate(0.76) brightness(1.035);
}

.ai-node--skills:hover .ai-node__asset,
.ai-node--skills:focus-visible .ai-node__asset {
  filter: hue-rotate(-18deg) saturate(0.8) brightness(1.09);
  transform: translate(-3px, -4px) scale(1.025);
}

.ai-node--skills .ai-node__pulse {
  position: absolute;
  top: 107px;
  left: 68px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 29px -2px 0 rgba(228, 241, 255, 0.8), 57px -3px 0 rgba(228, 241, 255, 0.8), 86px -4px 0 rgba(228, 241, 255, 0.8);
}

.ai-node--skills:hover .ai-node__pulse,
.ai-node--skills:focus-visible .ai-node__pulse {
  animation: workflow-pulse 1.1s ease-in-out infinite;
}

.ai-node--projects {
  top: 136px;
  left: 932px;
  width: 410px;
  height: 292px;
}

.ai-node--projects .ai-node__visual {
  top: 100px;
  left: 0;
  width: 202px;
  height: 184px;
  animation-duration: 8.5s;
}

.ai-node--projects .ai-node__copy {
  top: 42px;
  left: 198px;
  width: 204px;
}

.ai-node--projects .ai-node__title {
  font-size: 23px;
}

.ai-node--projects .ai-node__asset {
  filter: hue-rotate(-20deg) saturate(0.72) brightness(1.035);
}

.ai-node--projects:hover .ai-node__asset,
.ai-node--projects:focus-visible .ai-node__asset {
  filter: hue-rotate(-20deg) saturate(0.78) brightness(1.085);
  transform: translate(6px, -4px) scale(1.03);
}

.ai-node--game {
  top: 324px;
  left: 742px;
  width: 356px;
  height: 242px;
}

.ai-node--game .ai-node__visual {
  top: 18px;
  left: 0;
  width: 170px;
  height: 182px;
  animation-duration: 9.5s;
}

.ai-node--game .ai-node__copy {
  top: 28px;
  left: 164px;
  width: 190px;
}

.ai-node--game .ai-node__pulse {
  position: absolute;
  z-index: 2;
  top: 144px;
  left: 39px;
  width: 26px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 188, 96, 0.36), rgba(238, 125, 32, 0.08) 68%, transparent 72%);
  opacity: 0;
  pointer-events: none;
}

.ai-node--game .ai-node__visual::after {
  position: absolute;
  z-index: 2;
  top: 86px;
  left: 72px;
  width: 8px;
  height: 8px;
  content: "";
  border: 2px solid rgba(122, 183, 134, 0.68);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.ai-node--game:hover .ai-node__asset,
.ai-node--game:focus-visible .ai-node__asset {
  animation: game-soft-bounce 720ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.ai-node--game:hover .ai-node__pulse,
.ai-node--game:focus-visible .ai-node__pulse {
  animation: toy-button-press 720ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.ai-node--game:hover .ai-node__visual::after,
.ai-node--game:focus-visible .ai-node__visual::after {
  animation: toy-ring-float 760ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

/* Invisible-path 3D carousel */
.carousel-space .ai-node {
  top: 0;
  left: 0;
  display: block;
  width: 224px;
  height: 216px;
  pointer-events: auto;
  transform-origin: center;
  will-change: left, top, transform, opacity, filter;
  transition: opacity 260ms ease;
}

.carousel-space .ai-node:hover,
.carousel-space .ai-node:focus-visible {
  filter: none;
}

.carousel-space .ai-node__visual {
  top: 50%;
  left: 50%;
  display: block;
  overflow: visible;
  animation: none;
  transform: translate(-50%, -50%);
  transition: transform 420ms cubic-bezier(0.2, 0.72, 0.22, 1), filter 360ms ease, height 580ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

.carousel-space .ai-node:hover .ai-node__visual,
.carousel-space .ai-node:focus-visible .ai-node__visual {
  filter: drop-shadow(0 16px 20px rgba(67, 97, 130, 0.15)) brightness(1.05);
  transform: translate(-50%, -54%) scale(1.055);
}

.carousel-space .ai-node__badge {
  position: absolute;
  top: 5px;
  left: 50%;
  min-width: 30px;
  padding: 3px 9px 4px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 16px;
  background: rgba(130, 158, 191, 0.5);
  color: rgba(255, 255, 255, 0.96);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
  transition: background 280ms ease, transform 280ms ease;
}

.carousel-space .ai-node:hover .ai-node__badge,
.carousel-space .ai-node:focus-visible .ai-node__badge {
  background: rgba(77, 123, 169, 0.68);
  transform: translateX(-50%) translateY(-2px);
}

.carousel-space .ai-node--visual {
  width: 190px;
  height: 244px;
}

.carousel-space .ai-node--visual .ai-node__visual {
  top: 30px;
  left: 50%;
  width: 120px;
  height: 166px;
  overflow: hidden;
  transform: translateX(-50%);
}

.carousel-space .ai-node--visual:hover .ai-node__visual,
.carousel-space .ai-node--visual:focus-visible .ai-node__visual {
  height: 240px;
  transform: translateX(-50%) translateY(-4px) scale(1.035);
}

.carousel-space .ai-node--visual .ai-node__asset {
  width: 120px;
  height: auto;
  object-fit: unset;
}

.carousel-space .ai-node--skills {
  width: 222px;
  height: 205px;
}

.carousel-space .ai-node--skills .ai-node__visual {
  width: 188px;
  height: 158px;
}

.carousel-space .ai-node--skills .ai-node__pulse {
  top: 107px;
  left: 68px;
}

.carousel-space .ai-node--projects {
  width: 230px;
  height: 215px;
}

.carousel-space .ai-node--projects .ai-node__visual {
  width: 202px;
  height: 184px;
}

.carousel-space .ai-node--game {
  width: 205px;
  height: 214px;
}

.carousel-space .ai-node--game .ai-node__visual {
  width: 170px;
  height: 182px;
}

.carousel-labels {
  position: absolute;
  z-index: 130;
  inset: 0;
  pointer-events: none;
}

.carousel-label {
  position: absolute;
  width: 195px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(38, 71, 107, 0.78);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  transition: color 280ms ease, opacity 280ms ease, transform 320ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

.carousel-label--visual { top: 150px; left: 88px; }
.carousel-label--skills { top: 343px; left: 88px; }
.carousel-label--projects { top: 150px; right: 82px; }
.carousel-label--game { top: 343px; right: 82px; }

.carousel-label .ai-node__number {
  min-width: 34px;
  margin-bottom: 6px;
  padding: 3px 10px 4px;
  background: rgba(116, 145, 184, 0.4);
  font-size: 10px;
}

.carousel-label .ai-node__title {
  max-width: 190px;
  font-size: 19px;
  line-height: 1.02;
}

.carousel-label .ai-node__subtitle {
  margin-top: 7px;
  font-size: 12px;
}

.carousel-label .ai-node__description {
  max-width: 184px;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.4;
}

.carousel-label:hover,
.carousel-label:focus-visible,
.ai-hub-map[data-active="aiVisual"] .carousel-label--visual,
.ai-hub-map[data-active="aiSkills"] .carousel-label--skills,
.ai-hub-map[data-active="aiProjects"] .carousel-label--projects,
.ai-hub-map[data-active="aiGame"] .carousel-label--game {
  color: #1e568d;
  transform: translateY(-3px);
}

.carousel-label:focus-visible {
  outline: 1px solid rgba(72, 113, 164, 0.45);
  outline-offset: 7px;
  border-radius: 8px;
}

@keyframes orbit-drift {
  to { stroke-dashoffset: -980; }
}

@keyframes object-float {
  from { transform: translate3d(0, -2px, 0); }
  to { transform: translate3d(0, 5px, 0); }
}

@keyframes workflow-pulse {
  0%, 16% { opacity: 0.08; transform: translateX(-5px); }
  48%, 70% { opacity: 0.9; }
  100% { opacity: 0.12; transform: translateX(5px); }
}

@keyframes game-soft-bounce {
  0% { transform: translateY(0) scale(1); }
  42% { transform: translateY(-6px) scale(1.025); }
  68% { transform: translateY(2px) scale(0.995); }
  100% { transform: translateY(-1px) scale(1.01); }
}

@keyframes toy-button-press {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  38% { opacity: 0.72; transform: translateY(3px) scale(0.9, 0.72); }
  100% { opacity: 0.18; transform: translateY(1px) scale(0.98, 0.9); }
}

@keyframes toy-ring-float {
  0% { opacity: 0; transform: translateY(2px) rotate(0deg); }
  42% { opacity: 0.74; transform: translateY(-8px) rotate(8deg); }
  72% { opacity: 0.48; transform: translateY(-3px) rotate(-4deg); }
  100% { opacity: 0.16; transform: translateY(-5px) rotate(0deg); }
}

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

@media (max-width: 700px) {
  .page-shell {
    min-height: var(--canvas-height);
  }
}
