:root {
  --page-width: 1120px;
  --logo-left: calc(max(15vw, calc((100vw - 980px) / 2)) - 10px);
  --scroll-progress: 0;
  --melt-progress: 0;
  --globe-reveal: 0;
  --intro-exit-opacity: clamp(0, calc(1 - (var(--melt-progress) - 0.36) * 3.2), 1);
  --theme-transition-duration: 1200ms;
  --theme-content-transition-duration: 0ms;
  --theme-transition-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-background: linear-gradient(180deg, #ffffff 0%, #fafcff 46%, #ffffff 100%);
  --page-text: #171717;
  --copy-text: #202020;
  --muted-text: #777777;
  --footer-text: #747474;
  --cue-text: #555555;
  --cue-shimmer: #050505;
  --link-underline: #b8b8b8;
  --melt-line-1: rgba(32, 32, 32, 0.2);
  --melt-line-2: rgba(32, 32, 32, 0.18);
  --melt-line-3: rgba(32, 32, 32, 0.16);
  --melt-line-4: rgba(32, 32, 32, 0.14);
  --header-control-bg: rgba(255, 255, 255, 0.76);
  --header-control-border: rgba(20, 24, 30, 0.08);
  --header-control-text: #2e323a;
  --header-control-shadow: 0 14px 34px rgba(18, 21, 26, 0.08);
  --back-button-border: #d8d8d8;
  --back-button-bg: rgba(255, 255, 255, 0.88);
  --back-button-text: #242424;
  --back-button-hover: #171717;
  --caption-text: #777777;
  --card-border: #dddddd;
  --card-border-strong: #e8e8e8;
  --card-border-soft: #e5e5e5;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --card-text: #171717;
  --card-role-text: #333333;
  --card-copy-text: #444444;
  --star-band-haze-1: rgba(88, 95, 106, 0.17);
  --star-band-haze-2: rgba(72, 78, 88, 0.13);
  --star-band-core: rgba(58, 64, 74, 0.22);
  --star-band-dot: rgba(72, 79, 89, 0.5);
  --star-band-dot-alt: rgba(108, 116, 128, 0.38);
}

html[data-theme="dark"] {
  --page-background: linear-gradient(180deg, #06090f 0%, #0a1119 46%, #06080e 100%);
  --page-text: #edf2fb;
  --copy-text: #e7edf8;
  --muted-text: #a3aec3;
  --footer-text: #94a1ba;
  --cue-text: #b6c1d5;
  --cue-shimmer: #f7fbff;
  --link-underline: #5e6f8e;
  --melt-line-1: rgba(239, 244, 255, 0.18);
  --melt-line-2: rgba(239, 244, 255, 0.15);
  --melt-line-3: rgba(239, 244, 255, 0.12);
  --melt-line-4: rgba(239, 244, 255, 0.1);
  --header-control-bg: rgba(13, 17, 25, 0.76);
  --header-control-border: rgba(219, 230, 252, 0.12);
  --header-control-text: #eef4ff;
  --header-control-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --back-button-border: rgba(216, 225, 244, 0.18);
  --back-button-bg: rgba(11, 16, 24, 0.84);
  --back-button-text: #eef3fe;
  --back-button-hover: #8db9ff;
  --caption-text: #9ca9c2;
  --card-border: rgba(219, 230, 252, 0.12);
  --card-border-strong: rgba(219, 230, 252, 0.12);
  --card-border-soft: rgba(219, 230, 252, 0.1);
  --card-bg: rgba(10, 15, 24, 0.86);
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --card-text: #f3f7ff;
  --card-role-text: #d6ddea;
  --card-copy-text: #b9c3d7;
  --star-band-haze-1: rgba(128, 172, 255, 0.14);
  --star-band-haze-2: rgba(194, 219, 255, 0.09);
  --star-band-core: rgba(230, 240, 255, 0.14);
  --star-band-dot: rgba(232, 240, 255, 0.52);
  --star-band-dot-alt: rgba(154, 196, 255, 0.32);
}

/* Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--page-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  transition:
    background var(--theme-content-transition-duration) var(--theme-transition-ease),
    color var(--theme-content-transition-duration) var(--theme-transition-ease);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.theme-transition-veil {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
}

.theme-transition-veil__disc {
  position: absolute;
  top: 8vh;
  left: 7vw;
  width: 320vmax;
  height: 320vmax;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.001);
  transform-origin: center;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.theme-transition-veil.theme-transition-veil-dark .theme-transition-veil__disc {
  background:
    radial-gradient(circle at 15% 16%, rgba(129, 157, 216, 0.16) 0%, transparent 20%),
    radial-gradient(circle at 28% 22%, rgba(39, 67, 122, 0.26) 0%, transparent 26%),
    linear-gradient(180deg, #05070d 0%, #09111a 48%, #06080f 100%);
}

.theme-transition-veil.theme-transition-veil-light .theme-transition-veil__disc {
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 244, 204, 0.7) 0%, transparent 18%),
    radial-gradient(circle at 28% 22%, rgba(255, 220, 166, 0.48) 0%, transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 46%, #ffffff 100%);
}

.theme-transition-veil.is-active .theme-transition-veil__disc {
  animation: theme-veil-expand var(--theme-transition-duration)
    var(--theme-transition-ease) forwards;
}

.site-header,
.site-header *,
.about-copy,
.about-copy *,
.scroll-cue,
.globe-shell::before,
.portfolio-visual::before,
.map-back-button,
.experience-card,
.experience-card *,
.theme-toggle,
.theme-toggle *,
.logo {
  transition-property: background, background-color, color, border-color, box-shadow, filter, opacity;
  transition-duration: var(--theme-content-transition-duration);
  transition-timing-function: var(--theme-transition-ease);
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  padding: 28px 0 0;
  pointer-events: none;
}

.site-header .header-meta {
  position: absolute;
  top: 28px;
  right: max(20px, var(--logo-left));
  display: grid;
  justify-items: end;
  gap: 14px;
  pointer-events: none;
  z-index: 1;
}

.logo-link {
  display: inline-block;
  margin-left: var(--logo-left);
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.logo {
  width: 160px;
  max-height: 64px;
  object-fit: contain;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--header-control-border);
  border-radius: 8px;
  background: var(--header-control-bg);
  box-shadow: var(--header-control-shadow);
  color: var(--header-control-text);
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
  transition:
    transform 160ms ease,
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: currentColor;
}

.theme-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

@media (hover: none), (pointer: coarse) {
  .theme-toggle:hover,
  .theme-toggle:focus-visible {
    transform: none;
    border-color: var(--header-control-border);
  }

  .theme-toggle:focus-visible {
    outline: none;
  }
}

.theme-toggle-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.94rem;
  line-height: 1;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.theme-toggle-icon-sun {
  opacity: 0;
  transform: scale(0.72) rotate(-18deg);
}

.theme-toggle-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html[data-theme="dark"] .theme-toggle-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html[data-theme="dark"] .theme-toggle-icon-moon {
  opacity: 0;
  transform: scale(0.72) rotate(18deg);
}

/* Intro */
.story-stage {
  position: relative;
  min-height: 285vh;
}

.story-stage::before {
  content: "";
  position: fixed;
  top: -56px;
  left: -64px;
  z-index: 0;
  width: min(52vw, 620px);
  height: 290px;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 31% 34% at calc(var(--logo-left) + 146px) 118px,
      rgba(0, 0, 0, 0.98) 0%,
      rgba(0, 0, 0, 0.96) 22%,
      rgba(1, 2, 4, 0.82) 40%,
      rgba(4, 7, 11, 0.5) 58%,
      rgba(6, 9, 14, 0.16) 76%,
      rgba(6, 9, 14, 0.02) 88%,
      rgba(0, 0, 0, 0) 100%
    ),
    radial-gradient(
      ellipse 56% 52% at calc(var(--logo-left) + 154px) 124px,
      rgba(7, 10, 16, 0.36) 0%,
      rgba(7, 10, 16, 0.18) 44%,
      rgba(7, 10, 16, 0.06) 68%,
      rgba(7, 10, 16, 0) 100%
    );
  transition:
    opacity var(--theme-content-transition-duration) var(--theme-transition-ease),
    background var(--theme-content-transition-duration) var(--theme-transition-ease);
}

html[data-theme="dark"] .story-stage::before {
  opacity: 1;
}

html[data-theme="dark"].is-in-bay-area-view .story-stage::before {
  opacity: 0;
}

.story-sticky {
  position: sticky;
  top: 0;
  display: grid;
  isolation: isolate;
  min-height: 100vh;
  place-items: start center;
  overflow: hidden;
  padding: 18vh 20px 48px;
}

.story-sticky::before {
  content: "";
  position: absolute;
  inset: -16% -18%;
  z-index: 0;
  opacity: calc(var(--intro-exit-opacity) * 0.36);
  background:
    radial-gradient(
      ellipse 34% 11% at 18% 54%,
      var(--star-band-haze-1) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse 24% 8% at 34% 48%,
      var(--star-band-core) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse 28% 10% at 52% 56%,
      var(--star-band-haze-1) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse 20% 7% at 66% 50%,
      var(--star-band-dot-alt) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse 30% 10% at 82% 58%,
      var(--star-band-haze-2) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(
      ellipse 16% 6% at 44% 60%,
      var(--star-band-core) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(circle at 12% 48%, var(--star-band-dot) 0 0.9px, transparent 1.7px),
    radial-gradient(circle at 18% 57%, var(--star-band-dot-alt) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 26% 45%, var(--star-band-dot) 0 1px, transparent 1.8px),
    radial-gradient(circle at 33% 53%, var(--star-band-dot-alt) 0 0.9px, transparent 1.7px),
    radial-gradient(circle at 41% 47%, var(--star-band-dot) 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 49% 58%, var(--star-band-dot-alt) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 57% 50%, var(--star-band-dot) 0 1.2px, transparent 2px),
    radial-gradient(circle at 65% 60%, var(--star-band-dot-alt) 0 0.9px, transparent 1.7px),
    radial-gradient(circle at 74% 52%, var(--star-band-dot) 0 1px, transparent 1.8px),
    radial-gradient(circle at 83% 59%, var(--star-band-dot-alt) 0 0.9px, transparent 1.7px),
    radial-gradient(circle at 89% 50%, var(--star-band-dot) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 30% 50%, var(--star-band-dot) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 54% 54%, var(--star-band-dot) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 56%, var(--star-band-dot) 0 1.3px, transparent 2.3px);
  transform: rotate(-12deg);
  transform-origin: center;
  contain: paint;
  will-change: opacity, transform;
  pointer-events: none;
}

:root .story-sticky::before {
  display: none;
}

html[data-theme="dark"] .story-sticky::before {
  display: block;
}

.story-sticky::after {
  content: "";
  position: absolute;
  inset: -16% -18%;
  z-index: 0;
  display: none;
  opacity: calc(var(--intro-exit-opacity) * 0.12);
  background:
    radial-gradient(circle at 14% 46%, rgba(232, 240, 255, 0.68) 0 1.1px, transparent 2px),
    radial-gradient(circle at 21% 56%, rgba(166, 205, 255, 0.44) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 29% 44%, rgba(232, 240, 255, 0.72) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 36% 53%, rgba(154, 196, 255, 0.42) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 44% 47%, rgba(232, 240, 255, 0.78) 0 1.3px, transparent 2.2px),
    radial-gradient(circle at 52% 58%, rgba(166, 205, 255, 0.46) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 60% 49%, rgba(232, 240, 255, 0.74) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 68% 57%, rgba(154, 196, 255, 0.4) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 76% 51%, rgba(232, 240, 255, 0.7) 0 1.1px, transparent 2px),
    radial-gradient(circle at 84% 59%, rgba(166, 205, 255, 0.42) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 90% 50%, rgba(232, 240, 255, 0.64) 0 1px, transparent 1.9px),
    radial-gradient(circle at 24% 49%, rgba(232, 240, 255, 0.34) 0 2px, transparent 4px),
    radial-gradient(circle at 50% 54%, rgba(232, 240, 255, 0.36) 0 2.2px, transparent 4.2px),
    radial-gradient(circle at 77% 55%, rgba(232, 240, 255, 0.3) 0 1.8px, transparent 3.8px);
  transform: rotate(-12deg);
  transform-origin: center;
  contain: paint;
  will-change: opacity, transform;
  pointer-events: none;
}

html[data-theme="dark"] .story-sticky::after {
  display: block;
  animation: galaxy-star-twinkle 12.8s ease-in-out infinite;
}

html[data-theme="dark"] .story-sticky {
  background-image:
    radial-gradient(circle at 8% 12%, rgba(232, 240, 255, 0.34) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 16% 24%, rgba(166, 205, 255, 0.28) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 24% 10%, rgba(232, 240, 255, 0.3) 0 1px, transparent 1.9px),
    radial-gradient(circle at 31% 18%, rgba(194, 219, 255, 0.26) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 39% 8%, rgba(232, 240, 255, 0.34) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 47% 22%, rgba(166, 205, 255, 0.24) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 56% 14%, rgba(232, 240, 255, 0.3) 0 1px, transparent 1.9px),
    radial-gradient(circle at 64% 26%, rgba(194, 219, 255, 0.24) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 73% 11%, rgba(232, 240, 255, 0.32) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 82% 19%, rgba(166, 205, 255, 0.24) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 91% 9%, rgba(232, 240, 255, 0.28) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 12% 62%, rgba(232, 240, 255, 0.24) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 22% 78%, rgba(166, 205, 255, 0.2) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 34% 68%, rgba(232, 240, 255, 0.22) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 46% 82%, rgba(194, 219, 255, 0.2) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 58% 72%, rgba(232, 240, 255, 0.22) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 69% 86%, rgba(166, 205, 255, 0.18) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 81% 74%, rgba(232, 240, 255, 0.2) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 92% 84%, rgba(194, 219, 255, 0.18) 0 0.7px, transparent 1.6px);
  background-repeat: no-repeat;
}

.shooting-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: calc(var(--intro-exit-opacity) * 0.82);
  pointer-events: none;
}

.ambient-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: var(--intro-exit-opacity);
  pointer-events: none;
  transition: opacity 160ms linear;
}

.planet-pop-counter {
  position: fixed;
  left: max(18px, env(safe-area-inset-left) + 12px);
  bottom: max(18px, env(safe-area-inset-bottom) + 12px);
  z-index: 18;
  padding: 8px 12px;
  border: 1px solid rgba(20, 24, 30, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 32px rgba(18, 21, 26, 0.08);
  color: var(--header-control-text);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
  pointer-events: none;
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
}

.planet-pop-counter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="dark"] .planet-pop-counter {
  border-color: rgba(219, 230, 252, 0.12);
  background: rgba(13, 17, 25, 0.72);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  color: #eef4ff;
}

.shooting-star {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--shooting-star-length);
  height: var(--shooting-star-thickness);
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(170, 178, 190, 0.18) 18%,
    rgba(118, 126, 138, 0.5) 52%,
    rgba(88, 95, 106, 0.9) 100%
  );
  box-shadow:
    0 0 10px rgba(110, 118, 130, 0.18),
    0 0 18px rgba(94, 101, 111, 0.1);
  transform:
    translate3d(var(--shooting-star-start-x), var(--shooting-star-start-y), 0)
    rotate(var(--shooting-star-tilt))
    scaleX(0.18);
  transform-origin: right center;
  filter: saturate(1.08);
  will-change: transform, opacity;
  animation: shooting-star-flight var(--shooting-star-duration) linear forwards;
}

.shooting-star::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: calc(var(--shooting-star-thickness) * 3.4);
  height: calc(var(--shooting-star-thickness) * 3.4);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(112, 120, 132, 0.98) 0%,
    rgba(145, 154, 166, 0.72) 46%,
    rgba(255, 255, 255, 0) 78%
  );
  transform: translate3d(0, -50%, 0);
}

html[data-theme="dark"] .shooting-star {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(132, 178, 255, 0.34) 22%,
    rgba(198, 225, 255, 0.84) 64%,
    rgba(255, 255, 255, 1) 100%
  );
  box-shadow:
    0 0 12px rgba(114, 168, 255, 0.28),
    0 0 24px rgba(198, 225, 255, 0.18);
}

.ambient-bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  --planet-sprite: none;
  --planet-shadow: rgba(18, 24, 34, 0.18);
  --planet-shell-shadow: rgba(0, 0, 0, 0.16);
  --planet-shell-highlight: rgba(255, 255, 255, 0.08);
  --planet-shell-glow: rgba(255, 255, 255, 0.04);
  --planet-sprite-inset: -6%;
  --planet-overlay-opacity: 0.42;
  width: var(--bubble-size);
  height: var(--bubble-size);
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: 0 18px 42px var(--planet-shadow);
  opacity: var(--bubble-opacity);
  transform: translate3d(var(--bubble-x), var(--bubble-y), 0)
    translate(-50%, -50%) scale(var(--bubble-scale));
  transform-origin: center;
  cursor: grab;
  pointer-events: none;
  touch-action: none;
  isolation: isolate;
  overflow: visible;
  will-change: transform, opacity;
}

.ambient-bubble::before {
  content: "";
  position: absolute;
  inset: var(--planet-sprite-inset);
  z-index: 2;
  background-image: var(--planet-sprite);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.ambient-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background:
    radial-gradient(
      circle at 30% 22%,
      var(--planet-shell-highlight) 0%,
      rgba(255, 255, 255, 0.03) 18%,
      transparent 34%
    ),
    radial-gradient(circle at 72% 76%, transparent 0 48%, var(--planet-shell-shadow) 100%),
    radial-gradient(circle at 78% 18%, var(--planet-shell-glow) 0%, transparent 24%);
  opacity: var(--planet-overlay-opacity);
  pointer-events: none;
}

.planet-mercury {
  --planet-sprite: url("assets/planet-vectors/mercury.svg");
  --planet-sprite-inset: -7%;
  --planet-shadow: rgba(52, 56, 62, 0.16);
  --planet-shell-shadow: rgba(12, 16, 20, 0.26);
}

.planet-venus {
  --planet-sprite: url("assets/planet-vectors/venus.svg");
  --planet-sprite-inset: -8%;
  --planet-shadow: rgba(118, 82, 58, 0.16);
  --planet-shell-shadow: rgba(68, 42, 28, 0.22);
}

.planet-mars {
  --planet-sprite: url("assets/planet-vectors/mars.svg");
  --planet-sprite-inset: -7%;
  --planet-shadow: rgba(108, 54, 45, 0.16);
  --planet-shell-shadow: rgba(58, 26, 20, 0.26);
}

.planet-jupiter {
  --planet-sprite: url("assets/planet-vectors/jupiter.svg");
  --planet-sprite-inset: -8%;
  --planet-shadow: rgba(112, 78, 58, 0.16);
  --planet-shell-shadow: rgba(54, 32, 24, 0.24);
  --planet-shell-highlight: rgba(255, 255, 255, 0.03);
  --planet-shell-glow: rgba(255, 255, 255, 0.012);
  --planet-overlay-opacity: 0.28;
}

.planet-saturn {
  --planet-sprite: url("assets/planet-vectors/saturn.svg");
  --planet-sprite-inset: -42% -90% -34% -90%;
  --planet-shadow: rgba(118, 89, 62, 0.12);
  --planet-shell-highlight: rgba(255, 255, 255, 0.02);
  --planet-shell-glow: rgba(255, 255, 255, 0.008);
  --planet-overlay-opacity: 0.08;
}

.planet-uranus {
  --planet-sprite: url("assets/planet-vectors/uranus.svg");
  --planet-sprite-inset: -8%;
  --planet-shadow: rgba(55, 115, 124, 0.15);
  --planet-shell-shadow: rgba(18, 46, 54, 0.18);
  --planet-shell-highlight: rgba(255, 255, 255, 0.025);
  --planet-shell-glow: rgba(255, 255, 255, 0.01);
  --planet-overlay-opacity: 0.24;
}

.planet-neptune {
  --planet-sprite: url("assets/planet-vectors/neptune.svg");
  --planet-sprite-inset: -8%;
  --planet-shadow: rgba(34, 62, 136, 0.16);
  --planet-shell-shadow: rgba(10, 18, 54, 0.24);
  --planet-shell-highlight: rgba(255, 255, 255, 0.025);
  --planet-shell-glow: rgba(255, 255, 255, 0.01);
  --planet-overlay-opacity: 0.24;
}

.ambient-bubbles.is-interactive .ambient-bubble {
  pointer-events: auto;
}

.ambient-bubble.is-dragged {
  cursor: grabbing;
  z-index: 4;
}

.ambient-bubble.is-popped {
  pointer-events: none !important;
}

.about-copy {
  position: relative;
  z-index: 2;
  width: min(70vw, 980px);
  opacity: var(--intro-exit-opacity);
  transform: translate3d(0, calc(var(--melt-progress) * 92px), 0)
    scaleY(calc(1 + var(--melt-progress) * 0.08));
  transform-origin: 50% 85%;
  cursor: default;
  pointer-events: none;
  will-change: opacity, transform;
}

.about-copy.is-melting {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(68% - var(--melt-progress) * 24%),
    rgba(0, 0, 0, 0.64) calc(84% - var(--melt-progress) * 26%),
    transparent calc(108% - var(--melt-progress) * 40%)
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(68% - var(--melt-progress) * 24%),
    rgba(0, 0, 0, 0.64) calc(84% - var(--melt-progress) * 26%),
    transparent calc(108% - var(--melt-progress) * 40%)
  );
}

.about-copy::after {
  content: "";
  position: absolute;
  top: 58%;
  left: 2%;
  right: 4%;
  height: 170px;
  opacity: 0;
  transform: translate3d(0, calc(var(--melt-progress) * 42px), 0);
  background:
    linear-gradient(to bottom, var(--melt-line-1), transparent) 8% 0 / 1px
      64% no-repeat,
    linear-gradient(to bottom, var(--melt-line-2), transparent) 23% 16px /
      1px 46% no-repeat,
    linear-gradient(to bottom, var(--melt-line-3), transparent) 41% 4px /
      1px 72% no-repeat,
    linear-gradient(to bottom, var(--melt-line-4), transparent) 67% 22px /
      1px 42% no-repeat,
    linear-gradient(to bottom, var(--melt-line-2), transparent) 86% 8px /
      1px 58% no-repeat;
  pointer-events: none;
  will-change: opacity, transform;
}

.about-copy.is-melting::after {
  opacity: clamp(0, calc((var(--melt-progress) - 0.12) * 1.8), 0.3);
}

.about-copy p {
  max-width: none;
  margin: 0;
  color: var(--copy-text);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.62;
}

.about-copy > p {
  animation: intro-copy-in 900ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.about-copy p + p {
  margin-top: 18px;
}

.about-copy > p:nth-of-type(2) {
  animation-delay: 80ms;
}

.about-copy > p:nth-of-type(3) {
  animation-delay: 160ms;
}

.about-copy > p:nth-of-type(4) {
  animation-delay: 240ms;
}

.about-copy > p:nth-of-type(5) {
  animation-delay: 320ms;
}

.about-copy a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  pointer-events: none;
}

.about-copy.is-linkable a {
  pointer-events: auto;
}

.about-copy.is-linkable {
  pointer-events: none;
}

.about-copy a:hover,
.about-copy a:focus-visible {
  text-decoration-color: currentColor;
}

.intro-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  opacity: clamp(0, calc(1 - (var(--scroll-progress) - 0.16) * 4), 1);
  transform: translateY(calc(var(--scroll-progress) * 28px));
  animation: intro-copy-in 900ms cubic-bezier(0.16, 1, 0.3, 1) 420ms backwards;
}

.contact-links {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.about-copy .contact-link {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--footer-text);
  text-decoration: none;
  transition:
    color 140ms ease,
    opacity 140ms ease;
}

.contact-link i {
  font-size: 1rem;
  line-height: 1;
}

.about-copy .contact-link:hover,
.about-copy .contact-link:focus-visible {
  color: var(--page-text);
  outline: none;
}

.about-copy .copyright {
  color: var(--footer-text);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.78;
  text-align: right;
  white-space: nowrap;
}

.scroll-cue {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: 22vh;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--cue-text);
  font: inherit;
  opacity: var(--intro-exit-opacity);
  transform: translateX(-50%) translateY(calc(var(--melt-progress) * 28px));
  transition:
    opacity 120ms linear,
    color 140ms ease,
    transform 120ms linear;
  animation: intro-cue-in 900ms cubic-bezier(0.16, 1, 0.3, 1) 780ms backwards;
  pointer-events: none;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  color: var(--page-text);
}

.scroll-cue:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.scroll-arrow {
  width: 14px;
  height: 14px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: inherit;
  animation: arrow-bob 2.4s ease-in-out infinite;
}

.scroll-label {
  background: linear-gradient(
    90deg,
    currentColor 0%,
    currentColor 28%,
    var(--cue-shimmer) 48%,
    currentColor 68%,
    currentColor 100%
  );
  background-size: 320% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  animation: shimmer-text 4.6s ease-in-out infinite;
  text-transform: lowercase;
  -webkit-text-fill-color: transparent;
}

@keyframes shimmer-text {
  0%,
  38% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@keyframes intro-copy-in {
  from {
    opacity: 0;
    filter: blur(9px);
    transform: translate3d(0, 18px, 0) scale(0.985);
  }

  60% {
    opacity: 1;
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes intro-cue-in {
  from {
    opacity: 0;
    filter: blur(7px);
    transform: translateX(-50%) translateY(14px);
  }

  to {
    opacity: var(--intro-exit-opacity);
    filter: blur(0);
    transform: translateX(-50%) translateY(calc(var(--melt-progress) * 28px));
  }
}

@keyframes arrow-bob {
  0%,
  100% {
    transform: translateY(-1px) rotate(45deg);
  }

  50% {
    transform: translateY(2px) rotate(45deg);
  }
}

@keyframes galaxy-star-twinkle {
  0%,
  8%,
  19%,
  33%,
  52%,
  71%,
  100% {
    opacity: calc(var(--intro-exit-opacity) * 0.09);
  }

  14%,
  27%,
  46%,
  63%,
  86% {
    opacity: calc(var(--intro-exit-opacity) * 0.16);
  }

  22%,
  58% {
    opacity: calc(var(--intro-exit-opacity) * 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] .story-sticky::after {
    animation: none;
  }
}

@keyframes shooting-star-flight {
  0% {
    opacity: 0;
    transform:
      translate3d(var(--shooting-star-start-x), var(--shooting-star-start-y), 0)
      rotate(var(--shooting-star-tilt))
      scaleX(0.18);
  }

  12% {
    opacity: 1;
  }

  80% {
    opacity: 0.95;
    transform:
      translate3d(
        calc(var(--shooting-star-start-x) + var(--shooting-star-travel)),
        calc(var(--shooting-star-start-y) + var(--shooting-star-travel) * 0.42),
        0
      )
      rotate(var(--shooting-star-tilt))
      scaleX(1);
  }

  100% {
    opacity: 0;
    transform:
      translate3d(
        calc(var(--shooting-star-start-x) + var(--shooting-star-travel) + 8vw),
        calc(
          var(--shooting-star-start-y) +
            var(--shooting-star-travel) * 0.42 +
            3.4vw
        ),
        0
      )
      rotate(var(--shooting-star-tilt))
      scaleX(0.86);
  }
}

@keyframes theme-veil-expand {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.001);
  }

  8% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(0.08);
  }

  60% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

/* Globe */
.globe-shell {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(calc(var(--page-width) + 96px), calc(100% - 24px));
  margin: auto;
  opacity: var(--globe-reveal);
  transform: translate3d(0, calc((1 - var(--globe-reveal)) * 96px), 0)
    scale(calc(0.72 + var(--globe-reveal) * 0.28));
  transform-origin: 50% 56%;
  pointer-events: none;
  will-change: opacity, transform;
}

.globe-shell::before {
  content: "";
  position: absolute;
  width: min(780px, 92vw);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: clamp(0, calc(var(--globe-reveal) * 0.42), 0.42);
  transform: scale(calc(0.64 + var(--globe-reveal) * 0.36));
  background:
    radial-gradient(
      circle,
      rgba(110, 203, 255, 0.16) 0%,
      rgba(110, 203, 255, 0.08) 34%,
      transparent 68%
    ),
    radial-gradient(circle, transparent 54%, rgba(0, 0, 0, 0.08) 69%, transparent 70%);
  pointer-events: none;
  will-change: opacity, transform;
}

html[data-theme="dark"] .ambient-bubble {
  opacity: min(calc(var(--bubble-opacity) * 1.42), 1);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.48),
    inset -10px -14px 24px var(--planet-rim),
    inset 8px 8px 20px rgba(255, 255, 255, 0.1),
    0 20px 44px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(126, 168, 255, 0.14);
  filter: saturate(1.42) contrast(1.1) brightness(1.52);
}

html[data-theme="dark"] .globe-shell::before {
  background:
    radial-gradient(
      circle,
      rgba(110, 203, 255, 0.22) 0%,
      rgba(110, 203, 255, 0.12) 34%,
      transparent 68%
    ),
    radial-gradient(circle, transparent 54%, rgba(255, 255, 255, 0.08) 69%, transparent 70%);
}

.portfolio-visual {
  position: relative;
  width: min(780px, 100%);
  min-height: 830px;
  pointer-events: none;
  touch-action: pan-y;
}

.portfolio-visual::before {
  content: "";
  position: absolute;
  inset: 4%;
  z-index: 2;
  border-radius: 50%;
  opacity: clamp(0, calc((1 - var(--globe-reveal)) * 0.34), 0.34);
  background: radial-gradient(
    circle,
    transparent 48%,
    rgba(255, 255, 255, 0.75) 58%,
    transparent 70%
  );
  transform: scale(calc(0.5 + var(--globe-reveal) * 0.58));
  pointer-events: none;
  will-change: opacity, transform;
}

html[data-theme="dark"] .portfolio-visual::before {
  background: radial-gradient(
    circle,
    transparent 48%,
    rgba(173, 204, 245, 0.22) 58%,
    transparent 70%
  );
}

.globe-shell.is-active .portfolio-visual {
  cursor: grab;
  pointer-events: auto;
}

.globe-shell.is-active .portfolio-visual:active {
  cursor: grabbing;
}

#portfolio-scene {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: min(830px, calc(100vw + 48px));
  min-height: 830px;
  clip-path: ellipse(
    calc(19% + var(--globe-reveal) * 66%)
    calc(18% + var(--globe-reveal) * 67%)
    at 50% 50%
  );
  transform: rotate(calc((1 - var(--globe-reveal)) * -9deg));
  transform-origin: 50% 50%;
  filter: saturate(calc(0.72 + var(--globe-reveal) * 0.28));
  will-change: clip-path, transform;
}

.map-back-button {
  position: absolute;
  left: 8px;
  top: 34px;
  z-index: 5;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--back-button-border);
  border-radius: 8px;
  background: var(--back-button-bg);
  color: var(--back-button-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
  pointer-events: none;
}

.map-back-button.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.map-back-button:hover,
.map-back-button:focus-visible {
  border-color: var(--back-button-hover);
}

.globe-caption {
  display: block;
  width: min(240px, calc(100% - 32px));
  margin: 0;
  z-index: 3;
  color: var(--caption-text);
  font-size: 0.68rem;
  line-height: 1.35;
  opacity: clamp(0, calc((var(--globe-reveal) - 0.72) * 5), 1);
  text-align: right;
  transform: translateY(calc((1 - var(--globe-reveal)) * 6px));
  pointer-events: none;
}

.globe-caption i {
  margin-right: 3px;
  font-size: 0.72rem;
  line-height: 1;
}

/* Experience card */
.experience-card {
  position: absolute;
  z-index: 4;
  right: 8px;
  bottom: 34px;
  width: min(360px, calc(100% - 16px));
  padding: 30px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.experience-card.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}

.experience-card p {
  margin: 0;
}

.card-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--card-border-strong);
}

.card-body {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.experience-kicker,
.experience-location,
.experience-date,
.card-count {
  color: var(--muted-text);
  font-size: 0.76rem;
  line-height: 1.3;
}

.experience-kicker {
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.experience-location {
  text-align: right;
}

.experience-company {
  margin-top: 0;
  color: var(--card-text);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
}

.experience-role {
  margin-top: 0;
  color: var(--card-role-text);
  font-size: 0.94rem;
  line-height: 1.5;
}

.experience-date {
  margin-top: 0;
}

.experience-copy {
  margin-top: 4px;
  color: var(--card-copy-text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.card-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border-soft);
}

.card-arrow {
  display: inline-grid;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--back-button-bg);
  color: var(--card-text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  pointer-events: auto;
}

.card-arrow:hover,
.card-arrow:focus-visible {
  border-color: var(--back-button-hover);
}

/* No JavaScript fallback */
.no-script {
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 64px;
}

/* Custom cursor */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor-enabled,
  .custom-cursor-enabled * {
    cursor: none !important;
  }

  .custom-cursor {
    --cursor-x: 50vw;
    --cursor-y: 50vh;
    --cursor-size: 25px;
    --cursor-scale: 1;
    --cursor-magnify: 1.14;
    --cursor-opacity: 0;
    --lens-world-x: 0px;
    --lens-world-y: 0px;
    --mirror-scroll-y: 0px;
    --mirror-document-y: 0px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    width: var(--cursor-size);
    height: var(--cursor-size);
    opacity: var(--cursor-opacity);
    transform: translate3d(var(--cursor-x), var(--cursor-y), 0)
      translate(-50%, -50%);
    transition: opacity 160ms ease;
    pointer-events: none;
    contain: layout style;
    will-change: transform, opacity;
  }

  .custom-cursor,
  .custom-cursor * {
    pointer-events: none !important;
  }

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

  .custom-cursor::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    mix-blend-mode: difference;
    opacity: 0.24;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(
      circle,
      #000 0,
      #000 calc(100% - 2.8px),
      rgba(0, 0, 0, 0.66) calc(100% - 1.2px),
      transparent 100%
    );
    mask-image: radial-gradient(
      circle,
      #000 0,
      #000 calc(100% - 2.8px),
      rgba(0, 0, 0, 0.66) calc(100% - 1.2px),
      transparent 100%
    );
    transform: translateZ(0) scale(var(--cursor-scale));
    transition:
      opacity 160ms ease,
      transform 140ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .custom-cursor-core {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(224, 227, 232, 0.96);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.48),
      inset 0 -8px 12px rgba(82, 88, 98, 0.22),
      inset 7px 0 12px rgba(255, 255, 255, 0.08),
      inset -7px 0 12px rgba(68, 74, 84, 0.14),
      0 12px 28px rgba(17, 19, 23, 0.1);
    -webkit-backdrop-filter: blur(5px) saturate(1.18) contrast(1.04);
    backdrop-filter: blur(5px) saturate(1.18) contrast(1.04);
    -webkit-mask-image: radial-gradient(
      circle,
      #000 0,
      #000 calc(100% - 2.8px),
      rgba(0, 0, 0, 0.66) calc(100% - 1.2px),
      transparent 100%
    );
    mask-image: radial-gradient(
      circle,
      #000 0,
      #000 calc(100% - 2.8px),
      rgba(0, 0, 0, 0.66) calc(100% - 1.2px),
      transparent 100%
    );
    backface-visibility: hidden;
    transform: translateZ(0) scale(var(--cursor-scale));
    transition:
      background 160ms ease,
      box-shadow 160ms ease,
      transform 140ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .custom-cursor-magnifier {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
    background: rgb(224, 227, 232);
    opacity: 1;
    filter: saturate(1.16) contrast(1.2);
    contain: paint;
  }

  .custom-cursor-world {
    position: absolute;
    width: 100vw;
    height: 100vh;
    color: var(--page-text);
    font: inherit;
    transform-origin: 0 0;
    pointer-events: none;
    user-select: none;
    contain: layout style;
  }

  .custom-cursor-world {
    left: var(--lens-world-x);
    top: var(--lens-world-y);
    opacity: 1;
    transform: scale(var(--cursor-magnify));
  }

  .custom-cursor-fixed-copy,
  .custom-cursor-document-copy {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    pointer-events: none;
    user-select: none;
  }

  .custom-cursor-fixed-copy {
    height: 100vh;
  }

  .custom-cursor-document-copy {
    min-height: 300vh;
    transform: translateY(var(--mirror-document-y));
  }

  .custom-cursor-fixed-copy .site-header {
    position: absolute;
  }

  .custom-cursor-document-copy .story-stage {
    position: relative;
  }

  .custom-cursor-document-copy .story-sticky {
    position: absolute;
    top: var(--mirror-scroll-y);
    left: 0;
    width: 100%;
  }

  .custom-cursor-world .site-header {
    position: absolute;
  }

  .custom-cursor-world span[id="portfolio-scene"] {
    display: block;
    width: 100%;
    height: min(830px, calc(100vw + 48px));
    min-height: 830px;
  }

  .custom-cursor-core::before,
  .custom-cursor-core::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
  }

  .custom-cursor-core::after {
    z-index: 1;
    background: rgba(112, 176, 244, 0.42);
    opacity: 0;
    transition: opacity 160ms ease;
  }

  .custom-cursor-core::before {
    z-index: 2;
    background:
      radial-gradient(
        circle,
        transparent 0 46%,
        rgba(94, 101, 113, 0.08) 70%,
        rgba(55, 62, 74, 0.2) 100%
      ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.28) 0%,
        transparent 34%,
        rgba(68, 74, 84, 0.14) 100%
      );
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.16),
      inset 0 -1px 2px rgba(58, 64, 74, 0.18);
  }

  .custom-cursor.is-clickable {
    --cursor-scale: 1.02;
  }

  .custom-cursor.is-clickable .custom-cursor-core {
    background: rgba(132, 185, 241, 0.7);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.52),
      inset 0 -8px 12px rgba(46, 105, 168, 0.2),
      inset 7px 0 12px rgba(255, 255, 255, 0.12),
      inset -7px 0 12px rgba(42, 96, 156, 0.13),
      0 13px 30px rgba(38, 104, 174, 0.1);
  }

  .custom-cursor.is-clickable .custom-cursor-magnifier {
    background: rgb(188, 216, 245);
    filter: saturate(0.8) contrast(0.76) brightness(1.08);
  }

  .custom-cursor.is-clickable .custom-cursor-core::after {
    opacity: 0.42;
  }

  .custom-cursor.is-clickable .custom-cursor-core::before {
    background:
      radial-gradient(
        circle,
        transparent 0 46%,
        rgba(54, 123, 196, 0.08) 70%,
        rgba(38, 94, 158, 0.16) 100%
      ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.28) 0%,
        transparent 34%,
        rgba(38, 94, 158, 0.12) 100%
      );
  }

  .custom-cursor.is-clickable::after {
    background: rgba(80, 150, 225, 0.18);
    mix-blend-mode: normal;
    opacity: 0.3;
  }

  .custom-cursor.is-visual-surface .custom-cursor-core {
    background: rgba(224, 227, 232, 0.18);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.22),
      inset 0 -8px 12px rgba(28, 34, 44, 0.2),
      inset 7px 0 12px rgba(255, 255, 255, 0.06),
      inset -7px 0 12px rgba(20, 26, 36, 0.14),
      0 12px 28px rgba(17, 19, 23, 0.16);
    -webkit-backdrop-filter: blur(8px) saturate(1.5) contrast(1.08);
    backdrop-filter: blur(8px) saturate(1.5) contrast(1.08);
  }

  .custom-cursor.is-visual-surface .custom-cursor-magnifier {
    opacity: 0;
  }

  .custom-cursor.is-visual-surface .custom-cursor-core::before {
    background:
      radial-gradient(
        circle,
        transparent 0 46%,
        rgba(255, 255, 255, 0.08) 70%,
        rgba(18, 24, 34, 0.18) 100%
      ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0%,
        transparent 36%,
        rgba(18, 24, 34, 0.14) 100%
      );
  }

  .custom-cursor.is-visual-surface::after {
    opacity: 0.46;
  }

  .custom-cursor.is-pressing {
    --cursor-scale: 0.92;
  }

  .custom-cursor.is-grab {
    --cursor-scale: 1.01;
  }

  .custom-cursor.is-dragging {
    --cursor-scale: 0.9;
  }

  .custom-cursor.is-dragging .custom-cursor-core {
    background: rgba(224, 227, 232, 0.98);
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.42),
      inset 0 -6px 10px rgba(82, 88, 98, 0.22),
      inset 6px 0 10px rgba(255, 255, 255, 0.07),
      inset -6px 0 10px rgba(68, 74, 84, 0.14),
      0 10px 24px rgba(17, 19, 23, 0.1);
  }

  .custom-cursor.is-visual-surface.is-dragging .custom-cursor-core {
    background: rgba(224, 227, 232, 0.22);
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.2),
      inset 0 -6px 10px rgba(28, 34, 44, 0.2),
      inset 6px 0 10px rgba(255, 255, 255, 0.06),
      inset -6px 0 10px rgba(20, 26, 36, 0.14),
      0 10px 24px rgba(17, 19, 23, 0.16);
  }

  .custom-cursor.is-dragging::after {
    opacity: 0.32;
  }

  html[data-theme="dark"] .custom-cursor::after {
    background: rgba(188, 202, 226, 0.2);
    mix-blend-mode: screen;
    opacity: 0.12;
  }

  html[data-theme="dark"] .custom-cursor-core {
    background: rgba(130, 142, 162, 0.62);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.12),
      inset 0 -8px 12px rgba(28, 34, 46, 0.34),
      inset 7px 0 12px rgba(255, 255, 255, 0.025),
      inset -7px 0 12px rgba(18, 24, 36, 0.22),
      0 14px 28px rgba(0, 0, 0, 0.22);
  }

  html[data-theme="dark"] .custom-cursor-magnifier {
    background: rgb(124, 136, 156);
    filter: saturate(0.86) contrast(1.06) brightness(0.82);
  }

  html[data-theme="dark"] .custom-cursor.is-visual-surface .custom-cursor-core {
    background: rgba(136, 149, 171, 0.14);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.08),
      inset 0 -8px 12px rgba(16, 22, 32, 0.34),
      inset 7px 0 12px rgba(255, 255, 255, 0.02),
      inset -7px 0 12px rgba(10, 15, 24, 0.2),
      0 12px 28px rgba(0, 0, 0, 0.24);
  }

  html[data-theme="dark"] .custom-cursor.is-dragging .custom-cursor-core {
    background: rgba(144, 156, 176, 0.72);
  }

  html[data-theme="dark"] .custom-cursor.is-visual-surface.is-dragging .custom-cursor-core {
    background: rgba(140, 152, 174, 0.16);
  }

}

/* Responsive */
@media (max-width: 860px) {
  :root {
    --logo-left: max(0px, calc(max(14px, calc((100vw - 560px) / 2)) - 1px));
  }

  .story-stage {
    min-height: 160svh;
  }

  .site-header {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .story-stage::before {
    top: calc(env(safe-area-inset-top) - 36px);
    left: -40px;
    width: min(54vw, 290px);
    height: 182px;
    background:
      radial-gradient(
        ellipse 34% 38% at calc(var(--logo-left) + 90px) 78px,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.95) 22%,
        rgba(1, 2, 4, 0.76) 38%,
        rgba(4, 7, 11, 0.36) 54%,
        rgba(6, 9, 14, 0.1) 72%,
        rgba(6, 9, 14, 0.01) 86%,
        rgba(0, 0, 0, 0) 100%
      ),
      radial-gradient(
        ellipse 60% 54% at calc(var(--logo-left) + 96px) 82px,
        rgba(7, 10, 16, 0.3) 0%,
        rgba(7, 10, 16, 0.14) 44%,
        rgba(7, 10, 16, 0.04) 68%,
        rgba(0, 0, 0, 0) 100%
      );
  }

  .site-header .header-meta {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    gap: 8px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .globe-caption {
    display: none;
  }

  .logo {
    width: 128px;
    max-height: 50px;
  }

  .story-sticky {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-height: 100svh;
    padding:
      calc(max(74px, env(safe-area-inset-top) + 56px))
      20px
      calc(max(18px, env(safe-area-inset-bottom) + 12px));
  }

  .shooting-stars,
  .ambient-bubbles {
    display: none;
  }

  .about-copy {
    grid-area: 1 / 1;
    align-self: start;
    width: min(100%, 34rem);
  }

  .about-copy p {
    font-size: clamp(0.98rem, 3.7vw, 1.05rem);
    line-height: 1.64;
  }

  .about-copy p + p {
    margin-top: 20px;
  }

  .about-copy::after {
    display: none;
  }

  .intro-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 24px;
  }

  .contact-links {
    gap: 12px;
  }

  .about-copy .contact-link {
    width: 34px;
    height: 34px;
  }

  .about-copy .copyright {
    font-size: 0.92rem;
    text-align: left;
    white-space: normal;
  }

  .scroll-cue {
    bottom: max(18px, env(safe-area-inset-bottom) + 8px);
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.66rem;
  }

  .globe-shell {
    grid-area: 1 / 1;
    align-self: center;
    justify-self: center;
    position: relative;
    inset: auto;
    place-items: center;
    width: 100%;
    margin: 0;
    margin-top: 0;
    overflow: visible;
    transform: translate3d(0, calc((1 - var(--globe-reveal)) * 44px), 0)
      scale(calc(0.92 + var(--globe-reveal) * 0.08));
    transform-origin: 50% 50%;
  }

  .globe-shell::before {
    display: none;
  }

  .portfolio-visual::before {
    display: none;
  }

  .portfolio-visual,
  #portfolio-scene {
    min-height: 0;
  }

  .portfolio-visual {
    width: min(100%, 520px);
    max-width: 100%;
    aspect-ratio: 1;
    min-height: 0;
  }

  #portfolio-scene {
    height: 100%;
    min-height: 0;
  }

  .globe-shell.is-active .portfolio-visual {
    touch-action: none;
  }

  .map-back-button {
    top: 14px;
    left: 14px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.78rem;
  }

  .experience-card {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 22px 18px;
  }

  .card-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 14px;
  }

  .experience-location {
    text-align: left;
  }

  .experience-company {
    font-size: 1.08rem;
  }

  .experience-role {
    font-size: 0.9rem;
  }

  .experience-copy {
    font-size: 0.84rem;
    line-height: 1.58;
  }

  .card-nav {
    margin-top: 20px;
    padding-top: 16px;
  }

  .card-arrow {
    min-width: 56px;
    height: 36px;
    border-radius: 8px;
  }
}

@media (max-width: 560px) {
  .site-header .header-meta {
    right: 12px;
  }

  .logo {
    width: 118px;
    max-height: 46px;
  }

  .story-stage {
    min-height: 154svh;
  }

  .story-sticky {
    padding:
      calc(max(68px, env(safe-area-inset-top) + 50px))
      18px
      calc(max(16px, env(safe-area-inset-bottom) + 10px));
  }

  .about-copy p {
    font-size: clamp(0.96rem, 4.2vw, 1.02rem);
    line-height: 1.62;
  }

  .scroll-cue {
    display: none;
  }

  .globe-shell {
    width: 100%;
    margin: 0;
    margin-top: 0;
  }

  .portfolio-visual,
  #portfolio-scene {
    min-height: 0;
  }

  .portfolio-visual {
    width: min(100%, 420px);
    max-width: 100%;
  }

  #portfolio-scene {
    height: 100%;
  }

  .experience-card {
    right: 6px;
    left: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    padding: 18px 16px;
  }

  .experience-company {
    font-size: 1rem;
  }

  .experience-copy {
    font-size: 0.82rem;
  }
}
