* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #171717;
  --line: rgb(23 23 23 / 70%);

  font-family: "IBM Plex Mono", monospace;
  background: #FFFFFF;
  color: var(--ink);
}

.project-title {
  margin-top: 48px;
  color: #000000;
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: normal;
  letter-spacing: -0.02em;
}

.project-meta {
  padding: 0;
  color: #000000;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 0.7;
  letter-spacing: 0.01em;
  margin-bottom: 50px;
}

.index-instructions {
    margin-left: 24px;
  padding: 0;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  line-height: 0.7;
  letter-spacing: 0.01em;
  margin-bottom: 50px;

}

.back-link {
  display: inline-block;
  padding: 24px;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.project-header {
    position: fixed;
    top: 18px;
}

.expandable-menu {
  padding: 0;
  margin-bottom: 10px;
  position: fixed;
  top: 60px;
  right: 24px;
  margin: 0;
  z-index: 2147483647;

}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-btn {
  background: transparent;
  border: none;
  padding: 0;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 0.7;
  letter-spacing: 0.01em;
  text-align: right;
  cursor: pointer;
}

.toggle-content {
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.4; 
  letter-spacing: 0.01em;
  padding-top: 12px;
  display: none;
  right: 24px;

}

.toggle-content.active {
  display: block;
}


html,
body {
  margin: 24px;
  min-height: 100%;
  background: #FFFFFF;
}

body {
  overflow-x: hidden;
}

.sound-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;

  padding: 5px 7px;
  border: 1px solid var(--ink);

  background: var(--paper);
  color: var(--ink);

  font: 10px/1 Times New Roman ,serif;
  font-style: italic;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
}

.pages {
  position: absolute;
  inset: 0;
}

.page {
  --scale: 1;
  --opacity: 1;

  position: absolute;
  top: 50%;
  left: 50%;

  width: min(62vw, 920px);
  aspect-ratio: 16 / 9;

  margin: 0;

  transform:
    translate(-50%, -50%)
    scale(var(--scale));

  transform-origin: center center;
  opacity: var(--opacity);

  background: var(--paper);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.page-inner {
  position: relative;
  width: 100%;
  height: 100%;

  overflow: hidden;
  background: var(--paper);
}

.meta {
  position: absolute;
  top: 8px;

  font-size: clamp(5px, 0.48vw, 8px);
  line-height: 1;
}

.meta-left {
  left: 8px;
}

.meta-right {
  right: 8px;

  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.text-page {
  display: grid;
  place-items: center;
}

.text-center {
  text-align: center;
}

.text-center h1 {
  margin: 0;

  font-family: "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(18px, 3vw, 48px);
  font-weight: 100;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.text-center p {
  margin: 8px 0 0;

  font-size: clamp(5px, 0.55vw, 9px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-page {
  position: relative;
  display: block;
  background: #ecece8;
}

.page-image {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  
  object-fit: cover;
}

.image-meta,
.image-label {
  z-index: 2;
}

.image-meta {
  padding: 3px 4px;
  background: rgb(247 247 244 / 82%);
}

.image-label {
  position: absolute;
  left: 50%;
  bottom: 7px;

  transform: translateX(-50%);

  padding: 4px 6px;
  border: 1px solid var(--ink);

  background: #fff000;
  color: var(--ink);

  font-size: clamp(5px, 0.5vw, 8px);
  line-height: 1;
}

.scroll-track {
  position: relative;
  pointer-events: none;
}

@media (max-width: 760px) {
  .page {
    width: 82vw;
  }

}

@media (prefers-reduced-motion: reduce) {
  .page {
    will-change: auto;
  }
}


.project-header {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 2147483647;
  display: block;
  width: min(360px, calc(100vw - 100px));
  color: #000;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms linear, visibility 0s linear 180ms;
}

.project-header a,
.project-header button,
.project-header .expandable-menu,
.project-header .toggle-content {
    pointer-events: auto;
}

.project-header.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.project-header .back-link {
  pointer-events: auto;
}

.project-title {
  margin-left: 48px;
  margin-top: 24px;
  color: #000;
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: normal;
  letter-spacing: -0.02em;
}

.project-meta, .project-meta {
  margin-left: 48px;
}

.index-instructions {
  margin-left: 60px;
}


.viewport {
  z-index: 1;
}

.sound-toggle {
  z-index: 2147483647;
}


@media (max-width: 760px) {
    .project-header {
        top: max(80px, env(safe-area-inset-top));
        left: 12px;
    }

    .project-meta {
        margin-bottom: 28px;
        font-size: 12px;
    }

    .index-instructions {
        margin-bottom: 60px;
    }

    .page {
    top: calc(50% + 60px);
  }

  .toggle-content {
     padding: 20px;
  }

  .expandable-menu {
    padding: 20px;
  }
}
}