:root {
  --text: #f4efe5;
  --text-soft: rgba(244, 239, 229, 0.74);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.16), transparent 26%),
    radial-gradient(circle at 18% 12%, rgba(255, 109, 69, 0.12), transparent 20%),
    linear-gradient(180deg, #1c1d1a 0%, #75716b 38%, #c8c1b4 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.experience {
  position: relative;
  min-height: 100vh;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 42px;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-family: "Advent Pro", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.logo:hover,
.logo:focus-visible {
  color: #FF5C00;
  outline: none;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-family: "Space Grotesk", sans-serif;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  transition: color 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #FF5C00;
  outline: none;
}

.site-nav .is-disabled {
  cursor: default;
}

.site-nav .is-disabled:hover,
.site-nav .is-disabled:focus-visible {
  color: rgba(255, 255, 255, 0.58);
  outline: none;
}

.hud {
  position: absolute;
  z-index: 5;
  top: clamp(96px, 12vw, 132px);
  left: clamp(18px, 3vw, 34px);
  width: min(446px, calc(100vw - 36px));
  padding: 22px 22px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(23, 24, 21, 0.82), rgba(23, 24, 21, 0.62)),
    rgba(0, 0, 0, 0.1);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hud,
.caption {
  display: none;
}

.eyebrow,
.description,
.hint,
.caption-copy {
  margin: 0;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hud h1 {
  margin: 12px 0 14px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.92;
  font-weight: 600;
}

.description {
  font-size: 1rem;
  line-height: 1.66;
  color: var(--text-soft);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.controls button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 16px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.controls button:hover,
.controls button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.controls .is-active {
  background: rgba(217, 20, 20, 0.2);
  border-color: rgba(255, 130, 130, 0.44);
  box-shadow: 0 0 0 1px rgba(255, 86, 86, 0.2) inset;
}

.hint {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.viewport {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.54) 12%,
      rgba(0, 0, 0, 0.22) 26%,
      rgba(0, 0, 0, 0.06) 42%,
      transparent 58%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent 14% 86%, rgba(0, 0, 0, 0.08));
}

.viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 50% 72%, rgba(255, 244, 212, 0.15), transparent 24%);
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.edge-hotspot {
  appearance: none;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

.edge-hotspot--left {
  left: 0;
  width: 33.333%;
  cursor: w-resize;
}

.edge-hotspot--right {
  right: 0;
  width: 33.333%;
  cursor: e-resize;
}

.edge-hotspot:focus-visible {
  outline: none;
}

.edge-arrow {
  position: fixed;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: clamp(64px, 6vw, 88px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.82), rgba(18, 18, 18, 0.46)),
    rgba(0, 0, 0, 0.16);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.edge-arrow::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 1px solid rgba(255, 92, 0, 0.2);
}

.edge-arrow span {
  position: relative;
  z-index: 1;
  color: #FF5C00;
  font-family: "Advent Pro", sans-serif;
  font-size: clamp(2.4rem, 3.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 92, 0, 0.34);
}

.edge-arrow--right {
  right: clamp(20px, 2.8vw, 40px);
  transform: translate3d(22px, -50%, 0) scale(0.92);
}

.edge-arrow--left {
  left: clamp(20px, 2.8vw, 40px);
  transform: translate3d(-22px, -50%, 0) scale(0.92);
}

.edge-hotspot--left:hover ~ .edge-arrow--left,
.edge-hotspot--left:focus-visible ~ .edge-arrow--left,
body.is-hover-left-edge .edge-arrow--left,
.edge-hotspot--right:hover ~ .edge-arrow--right,
.edge-hotspot--right:focus-visible ~ .edge-arrow--right,
body.is-hover-right-edge .edge-arrow--right {
  opacity: 1;
  transform: translate3d(0, -50%, 0) scale(1);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(255, 92, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.viewport.is-show-right .edge-hotspot,
.viewport.is-show-left .edge-hotspot {
  pointer-events: none;
}

.viewport.is-show-right .edge-arrow,
.viewport.is-show-left .edge-arrow {
  opacity: 0 !important;
}

.side-essay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  padding: clamp(120px, 12vw, 168px) clamp(34px, 4vw, 72px) clamp(34px, 4vw, 56px);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.side-essay--right {
  right: 0;
  width: 50%;
  justify-content: center;
  align-items: center;
  padding-left: clamp(18px, 2.4vw, 34px);
  padding-right: clamp(18px, 2.4vw, 34px);
  transform: translateX(24px);
}

.side-essay--left {
  left: 0;
  justify-content: flex-start;
  transform: translateX(-24px);
}

.side-essay::before {
  content: "";
  position: absolute;
  inset: 0;
}

.side-essay--right::before {
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.22) 12%,
      rgba(0, 0, 0, 0.6) 34%,
      rgba(0, 0, 0, 0.86) 68%,
      rgba(0, 0, 0, 0.94) 100%);
}

.side-essay-body {
  position: relative;
  z-index: 1;
  max-width: min(460px, 100%);
}

.side-essay--right .side-essay-body {
  display: grid;
  gap: 22px;
  align-content: center;
  justify-items: start;
  width: min(520px, 100%);
  max-width: min(520px, 100%);
}

.side-essay--left .side-essay-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(22px, 2.4vw, 34px);
  width: min(720px, 100%);
  max-width: min(720px, 100%);
  max-height: calc(100vh - clamp(152px, 15vw, 208px));
}

.side-essay--left::before {
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.76) 42%,
      rgba(0, 0, 0, 0.34) 76%,
      rgba(0, 0, 0, 0) 100%);
  backdrop-filter: blur(2px);
}

.side-essay-columns {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  padding-right: 14px;
  columns: 2;
  column-gap: clamp(30px, 3vw, 48px);
  column-fill: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.side-essay-columns::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.side-essay h2,
.side-essay p {
  margin: 0;
  color: rgba(244, 239, 229, 0.9);
  font-family: "Advent Pro", "Inter", sans-serif;
}

.side-essay h2 {
  margin-bottom: 16px;
  font-size: clamp(1.16rem, 1.4vw, 1.42rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.side-essay p {
  font-size: clamp(0.94rem, 1.08vw, 1.04rem);
  line-height: 1.72;
  text-wrap: balance;
  break-inside: avoid;
}

.side-essay--right p {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.side-essay--right h2 {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.side-essay--left h2,
.side-essay--left p {
  color: rgba(244, 239, 229, 0.94);
}

.side-essay--right h2,
.side-essay--left h2 {
  margin-bottom: 0;
  font-size: clamp(3.2rem, 5vw, 5.1rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.side-essay--left h2 {
  text-transform: uppercase;
  text-indent: 0;
}

.side-essay--left p {
  font-size: clamp(1rem, 1.1vw, 1.14rem);
  line-height: 1.86;
}

.side-essay p+p {
  margin-top: 16px;
}

.viewport.is-show-right .side-essay {
  opacity: 0;
}

.viewport.is-show-right .side-essay--right,
.viewport.is-show-left .side-essay--left {
  opacity: 1;
  transform: translateX(0);
}

.caption {
  position: absolute;
  z-index: 5;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  max-width: min(430px, calc(100vw - 36px));
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 24, 21, 0.6);
  backdrop-filter: blur(16px);
}

.caption-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
}

.caption-copy {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .site-header {
    padding: 18px;
    gap: 12px;
  }

  .logo {
    font-size: 22px;
  }

  .site-nav {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav a {
    font-size: 11px;
  }

  .hud {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    margin: 84px 16px 16px;
  }

  .viewport {
    min-height: 72vh;
  }

  .side-essay {
    width: 100%;
    left: 0;
    right: 0;
    justify-content: flex-start;
    padding: 108px 18px 28px;
    transform: translateY(18px);
  }

  .side-essay::before {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.54) 28%,
        rgba(0, 0, 0, 0.88) 100%);
  }

  .side-essay-body {
    max-width: 100%;
  }

  .side-essay h2 {
    font-size: 1.06rem;
  }

  .side-essay--left .side-essay-body {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 152px);
  }

  .side-essay--right .side-essay-body {
    width: 100%;
    max-width: 100%;
  }

  .side-essay-columns {
    columns: 1;
    padding-right: 8px;
  }

  .side-essay--left::before {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.68) 42%,
        rgba(0, 0, 0, 0.92) 100%);
  }

  .side-essay--left h2,
  .side-essay--left p {
    color: rgba(244, 239, 229, 0.94);
  }

  .side-essay--right h2,
  .side-essay--left h2 {
    font-size: clamp(2rem, 7vw, 2.8rem);
    line-height: 0.95;
  }

  .side-essay p {
    max-width: 100%;
    font-size: 0.92rem;
    line-height: 1.64;
  }

  .caption {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .edge-arrow {
    display: none;
  }

  .edge-hotspot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edge-arrow {
    transition: none;
  }

  .controls button {
    transition: none;
  }
}
