@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --page: #ffffff;
  --ink: #050505;
  --page-padding: 24px;
  --text-width: 280px;
  --portrait-size: min(280px, calc(100vw - (var(--page-padding) * 2)));
  --mono-font: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  --nav-font-size: 12px;
  --nav-line-height: 16px;
  --nav-letter-spacing: -0.02em;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--page);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: "Geist", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.04em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

main {
  animation: page-in 260ms ease both;
}

body.is-leaving main {
  opacity: 0;
  transition: opacity 220ms ease;
}

body.still-detail-open {
  overflow: hidden;
}

body.elsewhere-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.site-header {
  position: fixed;
  inset: var(--page-padding) var(--page-padding) auto var(--page-padding);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.site-nav .nav-link,
.menu-toggle {
  pointer-events: auto;
}

.menu-toggle {
  display: none;
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono-font);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 12px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  font-family: var(--mono-font);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: inline-flex;
  appearance: none;
  border: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  text-transform: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link--external {
  gap: 2px;
  margin-top: 0;
  color: var(--ink);
  cursor: default;
  opacity: 0.5;
}

.nav-link--external::before,
.nav-link--external:hover::before,
.nav-link--external:focus-visible::before {
  opacity: 0;
  transform: scaleX(0);
}

.external-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.elsewhere-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-padding);
  background: #000000;
  color: #ffffff;
  font-family: var(--mono-font);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.elsewhere-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.elsewhere-overlay.is-closing {
  opacity: 1;
  pointer-events: none;
}

.elsewhere-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(172px, calc(100vw - (var(--page-padding) * 2)));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.elsewhere-overlay.is-open .elsewhere-panel {
  opacity: 1;
  transform: translateY(0);
}

.elsewhere-overlay.is-closing .elsewhere-panel {
  opacity: 1;
  transform: translateY(0);
}

.elsewhere-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.elsewhere-link {
  position: relative;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.elsewhere-list li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--elsewhere-index, 0) * 65ms + 120ms);
}

.elsewhere-overlay.is-open .elsewhere-list li {
  opacity: 1;
  transform: translateY(0);
}

.elsewhere-overlay.is-closing .elsewhere-list li {
  opacity: 0;
  transform: translateY(8px);
  transition-delay: calc(var(--elsewhere-exit-index, 0) * 65ms);
}

.elsewhere-link::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.elsewhere-link:hover::before,
.elsewhere-link:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
  transform-origin: left;
}

.elsewhere-link__arrow {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.home {
  width: 100%;
}

.intro-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: calc(50svh + (var(--portrait-size) / 2) + 112px) var(--page-padding) 0;
}

.portrait {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: block;
  width: var(--portrait-size);
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 520ms ease;
  will-change: opacity;
}

.portrait.is-loaded {
  opacity: 1;
}

.portrait.is-muted {
  opacity: 0.05;
}

.text-sections p {
  width: min(var(--text-width), calc(100vw - 48px));
  margin: 0 auto;
  text-align: center;
}

.text-sections {
  position: relative;
  z-index: 5;
  padding: 80px var(--page-padding) 80px;
}

.text-sections p + p {
  margin-top: 80px;
}

.signature-mark {
  display: block;
  width: auto;
  max-height: 88px;
  height: auto;
  margin: 80px auto;
}

.selected-stills {
  --selected-first-stack: calc(min(400px, calc(100svh - 160px)) + 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: max(80px, calc((100svh - var(--selected-first-stack)) / 2));
}

.selected-still {
  width: min(100%, calc(100vw - (var(--page-padding) * 2)));
  margin: 0 auto;
  text-align: center;
}

.selected-still + .selected-still {
  margin-top: 80px;
}

.selected-still__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.selected-still__image {
  cursor: zoom-in;
}

.selected-still__image:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.selected-still--height-400 .selected-still__image {
  height: min(400px, calc(100svh - 160px));
}

.selected-still--width-400 .selected-still__image {
  width: min(400px, 100%);
}

.selected-still--width-480 .selected-still__image {
  width: min(480px, 100%);
}

.selected-still figcaption {
  width: min(var(--text-width), calc(100vw - 48px));
  margin: 40px auto 0;
  font-family: var(--mono-font);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
}

.selected-intro .selected-still {
  opacity: 1;
  transform: translateY(0);
}

.selected-intro .selected-still__image,
.selected-intro .selected-still figcaption {
  animation: notes-rise-in 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.selected-intro .selected-still__image {
  animation-delay: calc((var(--selected-intro-index, 0) * 90ms) + 80ms);
}

.selected-intro .selected-still figcaption {
  animation-delay: calc((var(--selected-intro-index, 0) * 90ms) + 220ms);
}

.notes-page {
  min-height: 100svh;
}

.notes-essay {
  --notes-track-gap: 24px;
  --notes-copy-offset: 80px;
  min-height: 100svh;
  padding: 0 var(--page-padding) 40px;
}

.notes-panel {
  width: 100%;
  margin: 0 auto;
}

.notes-media-viewport {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-50%);
}

.notes-media-track {
  --drag-offset: 0px;
  --note-translate: 0px;
  display: flex;
  width: max-content;
  gap: var(--notes-track-gap);
  margin-left: calc(50vw - (var(--portrait-size) / 2));
  transform: translateX(calc(var(--note-translate) + var(--drag-offset)));
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.notes-media-track.is-dragging {
  transition: none;
}

.note-still {
  appearance: none;
  display: flex;
  width: var(--portrait-size);
  height: var(--portrait-size);
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  touch-action: pan-y;
  transition: opacity 520ms ease;
  user-select: none;
}

.notes-media-track.is-dragging .note-still {
  cursor: grabbing;
}

.note-still__image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  -webkit-user-drag: none;
  object-fit: cover;
}

.note-still:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 8px;
}

.note-still.is-active {
  opacity: 1;
}

.notes-body.notes-copy-active .note-still.is-active {
  opacity: 0.05;
}

.notes-copy {
  position: relative;
  z-index: 2;
  width: min(var(--text-width), calc(100vw - 48px));
  margin: 0 auto;
  padding-top: calc(50svh + (var(--portrait-size) / 2) + var(--notes-copy-offset));
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.04em;
  text-align: center;
  pointer-events: none;
  touch-action: pan-y;
}

.notes-intro .note-still__image,
.notes-intro .notes-copy {
  animation: notes-rise-in 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.notes-intro .note-still:nth-child(1) .note-still__image {
  animation-delay: 80ms;
}

.notes-intro .note-still:nth-child(2) .note-still__image {
  animation-delay: 180ms;
}

.notes-intro .note-still:nth-child(3) .note-still__image {
  animation-delay: 280ms;
}

.notes-intro .notes-copy {
  animation-delay: 440ms;
}

.notes-copy h1,
.notes-copy p {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

.notes-copy h1,
.notes-kicker {
  font-family: var(--mono-font);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
}

.notes-kicker {
  text-transform: uppercase;
}

.notes-copy h1 + p {
  margin-top: 40px;
}

.notes-copy p + p {
  margin-top: 24px;
}

.still-detail {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  cursor: zoom-out;
  transition:
    background 260ms ease,
    backdrop-filter 360ms ease,
    -webkit-backdrop-filter 360ms ease;
}

.still-detail.is-open {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.still-detail__image {
  position: fixed;
  z-index: 81;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: contain;
  cursor: zoom-out;
  transform-origin: center;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    top 520ms cubic-bezier(0.22, 1, 0.36, 1),
    left 520ms cubic-bezier(0.22, 1, 0.36, 1),
    width 520ms cubic-bezier(0.22, 1, 0.36, 1),
    height 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
  will-change: top, left, width, height, transform;
}

.still-detail__image.is-dragging {
  transition: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nav-rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notes-rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in-centered {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (hover: none), (pointer: coarse) {
  .nav-link::before,
  .elsewhere-link::before {
    display: none;
  }

  .nav-link:hover::before,
  .nav-link:focus-visible::before,
  .elsewhere-link:hover::before,
  .elsewhere-link:focus-visible::before {
    opacity: 0;
    transform: scaleX(0);
  }

  a:focus-visible,
  button:focus-visible {
    outline: none;
  }
}

@media (min-width: 721px) {
  .nav-intro .site-nav .nav-link {
    animation: nav-rise-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .nav-intro .site-nav .nav-link:nth-child(1) {
    animation-delay: 80ms;
  }

  .nav-intro .site-nav .nav-link:nth-child(2) {
    animation-delay: 135ms;
  }

  .nav-intro .site-nav .nav-link:nth-child(3) {
    animation-delay: 190ms;
  }

  .nav-intro .site-nav .nav-link:nth-child(4) {
    animation-delay: 245ms;
  }

  .nav-intro .site-nav .nav-link:nth-child(5) {
    animation-delay: 300ms;
  }
}

@media (max-width: 720px) {
  :root {
    --page-padding: 20px;
    --menu-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  }

  .site-header {
    position: fixed;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle {
    position: fixed;
    top: var(--page-padding);
    left: 50%;
    z-index: 40;
    display: inline-flex;
    min-width: 0;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: var(--menu-shadow);
    color: var(--ink);
    opacity: 1;
    transform: translateX(-50%);
    transition:
      background 220ms ease,
      color 220ms ease;
  }

  body.menu-open .menu-toggle {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--ink);
    box-shadow: none;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--page-padding) - 8px);
    left: 50%;
    z-index: 30;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 56px;
    height: 32px;
    gap: 10px;
    overflow: hidden;
    padding: 56px 10px 10px;
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: var(--menu-shadow);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) scale(0.98);
    transform-origin: top center;
    transition:
      opacity 220ms ease,
      width 520ms cubic-bezier(0.2, 1.1, 0.28, 1),
      height 520ms cubic-bezier(0.2, 1.1, 0.28, 1),
      border-radius 520ms cubic-bezier(0.2, 1.1, 0.28, 1),
      border-color 520ms ease,
      transform 420ms cubic-bezier(0.2, 1.1, 0.28, 1),
      box-shadow 520ms ease;
  }

  body.menu-open .site-nav {
    width: 136px;
    height: 188px;
    border-color: rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    box-shadow: var(--menu-shadow);
  }

  .elsewhere-panel {
    width: min(172px, calc(100vw - (var(--page-padding) * 2)));
  }

  .nav-link {
    animation: none;
    min-height: var(--nav-line-height);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition:
      opacity 220ms ease,
      transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.menu-open .nav-link {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  body.menu-open .nav-link--external {
    opacity: 0.5;
  }

  body.menu-open .nav-link:nth-child(1) {
    transition-delay: 100ms;
  }

  body.menu-open .nav-link:nth-child(2) {
    transition-delay: 135ms;
  }

  body.menu-open .nav-link:nth-child(3) {
    transition-delay: 170ms;
  }

  body.menu-open .nav-link:nth-child(4) {
    transition-delay: 205ms;
  }

  body.menu-open .nav-link:nth-child(5) {
    transition-delay: 240ms;
  }

  .intro-section {
    padding-top: calc(50svh + (var(--portrait-size) / 2) + 96px);
  }

  .portrait {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(280px, calc(100vw - 96px));
    transform: translate(-50%, -50%);
  }

  .portrait.is-muted {
    opacity: 0.05;
  }

  .text-sections {
    padding: 80px var(--page-padding) 80px;
  }

  .selected-stills {
    padding-top: max(80px, calc((100svh - var(--selected-first-stack)) / 2));
  }

  .text-sections p + p {
    margin-top: 80px;
  }

  .signature-mark {
    margin-top: 80px;
    margin-bottom: 80px;
  }

  .selected-still--height-400 .selected-still__image {
    height: min(400px, calc(100svh - 160px));
  }

  .notes-essay {
    min-height: 100svh;
    padding-bottom: 40px;
  }

  .notes-copy {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.04em;
  }
}

@media (max-width: 480px) {
  .site-header {
    flex-direction: row;
    gap: 0;
  }

  .site-nav {
    align-items: center;
  }

  .nav-link {
    justify-content: center;
  }

  .intro-section {
    padding-top: calc(50svh + (var(--portrait-size) / 2) + 96px);
  }

}
