@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #111111;
  --paper: #f7f7f4;
  --field: #d7d7d5;
  --field-active: #c9c9c6;
  --nav-frame: rgba(255, 255, 255, 0.74);
  --wordmark-field: rgba(242, 242, 242, 0.86);
  --wordmark-ink: #000000;
  --nav-field: rgba(242, 242, 242, 0.86);
  --nav-ink: #000000;
  --about-wash: rgba(247, 247, 244, 0.58);
  --edge: clamp(20px, 2.35vw, 48px);
  --radius: clamp(28px, 3.2vw, 58px);
  --squircle-60: superellipse(1.6);
  --serif: "Geist Mono", "Courier New", monospace;
}

html[data-theme="dark"] {
  --ink: #f7f7f4;
  --paper: #111111;
  --field: #28282a;
  --field-active: #363639;
  --nav-frame: rgba(0, 0, 0, 0.74);
  --wordmark-field: rgba(63, 63, 63, 0.86);
  --wordmark-ink: #ffffff;
  --nav-field: rgba(63, 63, 63, 0.86);
  --nav-ink: #ffffff;
  --about-wash: rgba(17, 17, 17, 0.58);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--ink);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  font-kerning: normal;
  font-synthesis: none;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "kern" 1, "liga" 1, "clig" 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

body * {
  letter-spacing: 1px;
  text-transform: uppercase;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
}

.shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--paper);
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.masthead,
.footer {
  position: absolute;
  z-index: 10;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--edge);
  pointer-events: none;
}

.masthead {
  top: 0;
  justify-content: center;
  padding-top: clamp(18px, 2.6vh, 32px);
}

.footer {
  z-index: 10;
  bottom: 0;
  padding-bottom: clamp(24px, 3.1vh, 42px);
}

.wordmark,
.nav,
.nav-frame,
.theme-toggle,
.footer p {
  pointer-events: auto;
}

.nav-frame {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 27px;
  corner-shape: var(--squircle-60);
  background: var(--nav-frame);
  -webkit-backdrop-filter: blur(18px) saturate(0.82);
  backdrop-filter: blur(18px) saturate(0.82);
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wordmark {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 32px;
  border-radius: 16px;
  corner-shape: var(--squircle-60);
  color: var(--wordmark-ink);
  background: var(--wordmark-field);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  color: var(--nav-ink);
  background: transparent;
}

.nav-link {
  display: inline-flex;
  min-width: 96px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border-radius: 16px;
  corner-shape: var(--squircle-60);
  background: var(--nav-field);
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link,
.close {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
}

.nav-link,
.wordmark,
.close,
.index-button {
  position: relative;
}

.nav-link::after,
.wordmark::after,
.close::after,
.index-button::after {
  position: absolute;
  right: 0;
  bottom: -0.14em;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms ease;
}

.nav-link:focus-visible::after,
.wordmark:focus-visible::after,
.close:focus-visible::after,
.index-button:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.gallery {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  touch-action: pan-y;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.gallery.is-orbit {
  cursor: grab;
  perspective: 1200px;
}

.gallery.is-orbit.is-world-dragging {
  cursor: grabbing;
  user-select: none;
}

.track {
  position: relative;
  width: 100%;
  height: 100%;
  gap: 20px;
}

.study {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: var(--gallery-width, clamp(300px, 37vw, 710px));
  height: var(--gallery-height, clamp(460px, 70vh, 880px));
  place-items: stretch;
  filter: blur(var(--gallery-blur, 0px));
  will-change: width, height, transform;
}

.placeholder {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  corner-shape: var(--squircle-60);
  background: var(--field);
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.placeholder > img,
.placeholder > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.study.is-active .placeholder {
  background: var(--field-active);
}

.current-title,
.counter {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
  transition: color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.shell:has(.gallery.is-orbit) .current-title,
.shell:has(.gallery.is-orbit) .counter {
  opacity: 0;
}

.current-title {
  position: absolute;
  left: 50%;
  max-width: min(46vw, 52ch);
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
}

.title-detail {
  opacity: 0.5;
}

.theme-toggle {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
  transition: color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.counter {
  position: absolute;
  right: var(--edge);
}

.panel {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  visibility: hidden;
  padding: var(--edge);
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  transform: translateY(2%);
  transition: opacity 320ms ease, transform 320ms ease, visibility 0s 320ms;
}

.panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

.close {
  position: absolute;
  top: clamp(26px, 3.8vh, 48px);
  right: var(--edge);
}

.panel-copy {
  width: min(1020px, 83vw);
  align-self: end;
  padding-bottom: clamp(20px, 4vh, 54px);
}

.eyebrow {
  margin: 0 0 5vh;
  font-size: 12px;
}

.panel-copy h1 {
  max-width: 18ch;
  margin: 0 0 0.8em;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 0.96;
}

.panel-copy > p:last-child {
  max-width: 43ch;
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1.25;
}

.about-panel {
  display: grid;
  align-items: center;
  background: rgba(247, 247, 244, 0);
  color: var(--ink);
  transform: none;
  -webkit-backdrop-filter: blur(0) saturate(1);
  backdrop-filter: blur(0) saturate(1);
  transition: opacity 680ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 900ms cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-backdrop-filter 950ms cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 950ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 950ms;
}

.about-panel.is-open {
  background: var(--about-wash);
  transform: none;
  -webkit-backdrop-filter: blur(12px) saturate(0.82);
  backdrop-filter: blur(12px) saturate(0.82);
  transition-delay: 0s;
}

.about-layout {
  display: grid;
  width: 100%;
  margin: 0;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.68fr) minmax(320px, 1.7fr);
  gap: clamp(28px, 5vw, 110px);
  align-items: start;
  transform: translateY(2vh);
}

.about-layout p {
  margin: 0;
  line-height: 1.25;
}

.about-statement {
  max-width: 62ch;
}

.about-close,
.index-close {
  top: clamp(20px, 2.8vw, 40px);
  right: clamp(20px, 2.8vw, 40px);
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 0;
  background: transparent;
  font-size: 0;
  font-weight: 300;
  line-height: 1;
  transition: background-color 180ms ease, transform 180ms ease;
}

.about-close::after,
.index-close::after {
  display: none;
}

.about-close span,
.index-close span {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  transform: none;
}

.about-close span::before,
.about-close span::after,
.index-close span::before,
.index-close span::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  background: currentColor;
  transform-origin: center;
}

.about-close span::before,
.index-close span::before {
  transform: translateY(-50%) rotate(45deg);
}

.about-close span::after,
.index-close span::after {
  transform: translateY(-50%) rotate(-45deg);
}

.about-close:focus-visible,
.index-close:focus-visible {
  outline: none;
  opacity: 0.62;
}

.shell:has(.about-panel.is-open) .masthead,
.shell:has(.about-panel.is-open) .gallery,
.shell:has(.about-panel.is-open) .index-panel.is-open,
.shell:has(.about-panel.is-open) .footer {
  filter: blur(22px) saturate(0.72);
}

.masthead,
.gallery,
.index-panel,
.footer {
  transition: filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.index-panel {
  z-index: 8;
  inset: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(116px, 13vh, 140px) 12px 12px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  transform: none;
  transition: opacity 300ms ease,
    filter 900ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    color 650ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 300ms;
}

.index-panel.is-open {
  transform: none;
}

.index-grid {
  display: grid;
  width: 100%;
  padding-bottom: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 12px;
  align-items: start;
}

.index-card {
  display: grid;
  min-width: 0;
  cursor: pointer;
  text-align: left;
  opacity: 1;
  transform: none;
  align-self: start;
  transition: filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .index-grid:has(.index-thumb:hover) .index-card:not(:has(.index-thumb:hover)) {
    filter: blur(10px) saturate(0.82);
  }

  .index-card:has(.index-thumb:hover) {
    position: relative;
    z-index: 1;
    filter: none;
  }
}

.index-thumb {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  corner-shape: var(--squircle-60);
  aspect-ratio: var(--thumb-ratio, 4 / 5);
  background: var(--field);
  transition: background-color 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.index-thumb img,
.index-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.study[data-square="true"] .placeholder > img,
.index-card.is-square .index-thumb img {
  object-fit: cover;
  object-position: center;
}

.index-card-meta {
  display: block;
  padding-top: 10px;
  line-height: 1.15;
}

.shell:has(.index-panel.is-open) .footer {
  opacity: 0;
  pointer-events: none;
}

.index-card:focus-visible {
  outline-offset: 8px;
}

.index-card,
.index-card-meta,
.index-card-meta span {
  width: 100%;
  font-size: 12px;
  letter-spacing: 1px;
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@media (max-width: 760px) {
  :root {
    --edge: 20px;
  }

  .masthead {
    align-items: center;
    padding-inline: 10px;
  }

  .nav-frame {
    gap: 5px;
    padding: 7px;
    border-radius: 24px;
  }

  .wordmark {
    min-height: 42px;
    padding-inline: 18px;
    border-radius: 14px;
  }

  .nav {
    min-height: 42px;
    gap: 5px;
  }

  .nav-link {
    min-width: 74px;
    min-height: 42px;
    padding-inline: 12px;
    border-radius: 14px;
  }

  .nav-link {
    font-size: 12px;
  }

  .track {
    gap: 20px;
  }

  .study,
  .study.is-active {
    width: var(--gallery-width, 78vw);
    height: var(--gallery-height, 58vh);
  }

  .placeholder,
  .index-thumb {
    border-radius: 14px;
  }

  .footer {
    padding-bottom: 24px;
  }

  .current-title,
  .counter {
    font-size: 12px;
  }

  .panel-copy {
    width: 100%;
  }

  .about-panel {
    align-items: start;
    padding-top: 112px;
  }

  .about-layout {
    margin: 0;
    grid-template-columns: 1fr;
    gap: 28px;
    transform: none;
  }

  .about-statement {
    max-width: 40ch;
  }

  .about-close,
  .index-close {
    width: 44px;
    height: 44px;
  }

  .index-panel {
    inset: 0;
    padding: 92px 10px 10px;
  }

  .index-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 8px;
  }

  .index-card-meta {
    display: block;
  }
}

@media (max-width: 480px) {
  .masthead {
    padding-inline: 6px;
  }

  .nav-frame {
    gap: 4px;
    padding: 6px;
    border-radius: 22px;
  }

  .wordmark {
    min-height: 38px;
    padding-inline: 10px;
    border-radius: 13px;
    font-size: 10px;
  }

  .nav {
    min-height: 38px;
    gap: 4px;
  }

  .nav-link {
    min-width: 44px;
    min-height: 38px;
    padding-inline: 7px;
    border-radius: 13px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
