@font-face {
  font-family: "Exo 2";
  src: url("fonts/exo-2/Exo2-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  background: #101820;
  color: #eee9df;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
body { margin: 0; overflow-x: clip; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 48% 43%, #192630 0%, #121d25 45%, #101820 78%);
}
.stage {
  --rule: 1px solid rgb(187 201 209 / 22%);
  --world-width: min(95vw, 108svh, 1080px);
  width: min(86vw, 1120px);
  position: relative;
  margin-inline: auto;
}
.identity, .descriptor {
  margin: 0;
  text-align: center;
  text-wrap: balance;
  padding: clamp(.7rem, 1.8svh, 1.25rem) .5rem;
  border-block: var(--rule);
}
h1 {
  margin: 0;
  font: 500 clamp(1.45rem, 2.2vw, 1.95rem)/1.2 "Exo 2", sans-serif;
  letter-spacing: -.02em;
}
.descriptor {
  color: #dddcd6;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.5;
}
.field { position: relative; }
.world {
  position: relative;
  width: var(--world-width);
  aspect-ratio: 1.68;
  margin: 0 auto;
  pointer-events: none;
}
.world canvas, .world img { display: block; width: 100%; height: 100%; }
.world img { position: absolute; inset: 0; object-fit: contain; }
.research {
  border-block: var(--rule);
  padding-block: clamp(.85rem, 2.3svh, 1.6rem);
  margin-block: 1rem;
}
.manuscript {
  font-size: clamp(1rem, 1.28vw, 1.2rem);
  line-height: 1.6;
}
.manuscript p { margin: 0; text-wrap: pretty; }
.manuscript p + p { margin-top: 1em; }

.composed main { height: calc(100svh + var(--travel, 100svh)); }
.composed .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr min(64svh, calc(var(--world-width) * .62 + 2.5rem)) 1fr;
}
.identity { align-self: end; }
.descriptor { align-self: start; }
.composed .world {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translate(var(--world-x, 0px), var(--world-y, 0px)) scale(var(--world-scale, 1));
}
.composed .research {
  position: absolute;
  inset: 4% 0 4% 50%;
  height: fit-content;
  max-height: 92%;
  margin-block: auto;
  display: flex;
  flex-direction: column;
  border-inline-start: var(--rule);
  padding-inline: clamp(1.25rem, 2.8vw, 2.75rem) .75rem;
  opacity: var(--copy-opacity, 0);
  pointer-events: var(--copy-events, none);
}
.reading-window { overflow: clip; min-height: 0; }
.composed .manuscript { transform: translateY(var(--reading-y, 0px)); }

@media (max-width: 860px) {
  .stage { width: 90vw; --world-width: min(98vw, 105svh); --world-share: .32; }
  .composed .stage { grid-template-rows: 1fr min(76svh, calc(100svh - 8.5rem)) 1fr; }
  .composed .research {
    inset: calc(100% * var(--world-share)) 0 3%;
    max-height: calc(97% - 100% * var(--world-share));
    border-inline-start: 0;
    padding-inline: clamp(.25rem, 2vw, 1.25rem);
  }
  .manuscript { max-width: 54ch; margin-inline: auto; }
}
@media (max-width: 600px) {
  .stage { --world-share: .26; }
  .composed .research { padding-block: .8rem; }
  .manuscript { line-height: 1.5; }
  .manuscript p + p { margin-top: .85em; }
}
html:not(.composed) .world { max-width: 100%; }
