:root {
  color-scheme: light;
  --david: #38cbb5;
  --projects: #fa36b2;
  --writing: #ffbe67;
  --text: #ffffff;
}

@font-face {
  font-family: "Mozilla Text";
  src: url("Mozilla_Text/MozillaText-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--david);
  font-family: "Mozilla Text", Helvetica, Arial, sans-serif;
}

.horizontal-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: flex;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  touch-action: pan-x;
}

.horizontal-stage::-webkit-scrollbar {
  display: none;
}

.panel {
  width: 100vw;
  height: 100dvh;
  flex: 0 0 100vw;
  display: grid;
  place-items: center;
}

.panel-david {
  background: var(--david);
}

.panel-projects {
  background: var(--projects);
}

.panel-writing {
  background: var(--writing);
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font: inherit;
  font-size: clamp(2.8rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-align: center;
  text-transform: lowercase;
  user-select: none;
}

.panel-media {
  display: block;
  width: 40vw;
  height: auto;
  image-orientation: from-image;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  h1,
  h2 {
    font-size: clamp(2.55rem, 14vw, 4.8rem);
  }

  .panel-media {
    width: 40vw;
  }
}
