@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-serif-300-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
}

@property --project-fill {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(0, 0, 0, .93);
}

@property --project-top {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 11%;
}

@property --project-bottom {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 87%;
}

:root {
  --ink: #000;
  --paper: #fff;
  --cream: #faf7ef;
  --line: rgba(0, 0, 0, .18);
  --font-serif: 'IBM Plex Serif';
  --font-mono: 'IBM Plex Mono';
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.is-translating {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono), monospace;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 80px 0;
}

.menu-group {
  display: flex;
  gap: 30px;
}

.pill {
  display: inline-block;
  width: auto;
  padding: 15px 30px;
  border: 1px solid var(--ink);
  border-radius: 360px;
  background: var(--paper);
  color: var(--ink);
  font: 400 10px/15px var(--font-mono), monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.available {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: gap 140ms ease;
}

.pill-arrow {
  display: inline-grid;
  width: 0;
  height: 1em;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: width 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.available:hover .pill-arrow,
.available:focus-visible .pill-arrow {
  opacity: 1;
  transform: translate(0, -2px);
}

.available:hover,
.available:focus-visible {
  gap: 10px;
}

.available:hover .pill-arrow,
.available:focus-visible .pill-arrow {
  width: 1em;
}

.translate-track {
  position: absolute;
  z-index: 40;
  inset: 0 0 50px;
  pointer-events: none;
}

.translate {
  position: sticky;
  top: calc(100vh - 108px);
  display: block;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  pointer-events: auto;
  white-space: nowrap;
  padding: 18.75px 37.5px;
  font-size: 12.5px;
  line-height: 18.75px;
}

.translate:hover,
.translate:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.intro {
  min-height: 304px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 150px;
}

.intro p {
  width: 600px;
  margin: 0;
  font: 400 12px/21px var(--font-mono), monospace;
  text-align: center;
}

.intro-emphasis {
  font-style: italic;
}

.paper {
  position: relative;
  width: calc(100% - 40px);
  margin: 20px 20px 75px;
  padding: 50px 60px 60px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 0 8px rgba(0, 0, 0, .1);
}

.chapter {
  position: relative;
  margin: 0 0 190px;
  padding: 0;
  border: 0;
  font-family: var(--font-serif), serif;
  text-align: justify;
}

.chapter-index {
  display: none;
}

.chapter h2 {
  position: relative;
  top: 6px;
  display: inline-block;
  width: 230px;
  max-width: none;
  margin: 0 50px 0 0;
  padding: 0;
  vertical-align: top;
  font: 400 12px/20px var(--font-mono), monospace;
  letter-spacing: normal;
  text-align: left;
}

.prose {
  display: inline;
  margin: 0;
  padding: 0;
  font: 300 60px/81px var(--font-serif), serif;
  letter-spacing: normal;
  text-align: justify;
}

.prose + .prose::before {
  content: ' ';
}

.prose.lead::first-letter {
  float: none;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.project {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  text-align: inherit;
}

.project-title {
  --project-fill: rgba(0, 0, 0, .93);
  --project-top: 11%;
  --project-bottom: 87%;
  padding: 0 .04em;
  background: linear-gradient(
    to bottom,
    transparent var(--project-top),
    var(--project-fill) var(--project-top),
    var(--project-fill) var(--project-bottom),
    transparent var(--project-bottom)
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition:
    --project-fill 120ms ease,
    --project-top 120ms ease,
    --project-bottom 120ms ease;
}

html.is-translating .project-title {
  transition-duration: 650ms;
}

html:not([data-mode='plain']) .project:hover .project-title,
html:not([data-mode='plain']) .project:focus-visible .project-title {
  --project-fill: transparent;
  color: var(--ink);
  mix-blend-mode: normal;
  outline: 0;
}

html[data-mode='plain'] .project-title {
  --project-fill: var(--cream);
  color: var(--ink);
  mix-blend-mode: multiply;
  outline: 0;
}

.project:focus-visible {
  outline: 0;
}

.project-number {
  position: relative;
  top: -37px;
  margin-left: 2px;
  font: 400 10px/0 var(--font-mono), monospace;
  vertical-align: baseline;
  letter-spacing: 0;
}

.margin-note {
  display: block;
  width: 50%;
  margin: 67px auto 0;
  padding: 0 0 52px;
  border-bottom: 1px solid var(--ink);
  font: 400 12px/18px var(--font-mono), monospace;
  text-align: center;
}

.contact {
  --footer-inline: 80px;
  position: relative;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr) 70px;
  gap: 6vw;
  padding: 58px var(--footer-inline) 38px;
  background: var(--paper);
  color: var(--ink);
}

.footer-pitch {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact h2 {
  max-width: 900px;
  margin: 0;
  font: 300 60px/1.3 var(--font-serif), serif;
  letter-spacing: normal;
}

.contact h2 a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.footer-note {
  max-width: 560px;
  margin: 0;
  font: 400 12px/18px var(--font-mono), monospace;
}

.footer-index {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-left: 0;
  font: 400 12px/18px var(--font-mono), monospace;
  overflow-wrap: anywhere;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link-pending {
  opacity: .55;
}

.footer-links a span {
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.footer-links a:hover span,
.footer-links a:focus-visible span {
  opacity: 1;
  transform: translate(0, 0);
}

.footer-socials {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 30px;
}

.footer-socials a {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 400 19px/1 var(--font-mono), monospace;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  background: var(--cream);
  color: var(--ink);
  outline: none;
}

.preview {
  position: fixed;
  z-index: 30;
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.preview.visible {
  opacity: 1;
  pointer-events: auto;
}

.preview img,
.preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.preview img,
.preview video {
  display: none;
}

.preview-sound {
  position: fixed;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.preview-sound[hidden] {
  display: none;
}

.preview-sound:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: -5px;
}

.sound-glyph {
  width: 19px;
  height: 19px;
  background: var(--paper);
  -webkit-mask: url('/icons/volume-off.svg') center / contain no-repeat;
  mask: url('/icons/volume-off.svg') center / contain no-repeat;
}

.preview-sound.is-audible .sound-glyph {
  -webkit-mask-image: url('/icons/volume-up.svg');
  mask-image: url('/icons/volume-up.svg');
}

.preview-dialog {
  width: auto;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .13);
}

.preview-dialog::backdrop {
  background: rgba(255, 255, 255, .82);
}

.preview-close {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  text-align: right;
  cursor: pointer;
  font: 400 10px/15px var(--font-mono), monospace;
  letter-spacing: 1px;
}

.dialog-media {
  width: auto;
  height: auto;
}

.dialog-media img,
.dialog-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.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: 760px) {
  .site-header {
    padding: 11px 20px 0;
  }

  .menu-group {
    width: 100%;
    gap: 10px;
  }

  .pill {
    padding: 12px 16px;
    font-size: 8px;
    line-height: 15px;
  }

  .brand {
    flex: none;
  }

  .translate {
    top: calc(100vh - 95px);
    padding: 15px 20px;
    font-size: 10px;
    line-height: 18.75px;
  }

  .translate-track {
    bottom: 44px;
  }

  .available {
    display: none;
  }

  .intro {
    display: none;
  }

  .paper {
    width: 100%;
    margin: 100px 0 75px;
    padding: 0 20px 40px;
    border-radius: 0;
    box-shadow: none;
  }

  .chapter {
    margin-bottom: 80px;
    text-align: justify;
  }

  .chapter h2 {
    position: static;
    display: block;
    width: auto;
    margin: 0 0 10px;
    font-size: 8px;
    line-height: 15px;
    text-align: left;
  }

  .prose {
    font-size: 20px;
    line-height: 29px;
  }

  .project-number {
    top: -12px;
    font-size: 7px;
  }

  .margin-note {
    display: none;
  }

  .contact {
    --footer-inline: 20px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 55px var(--footer-inline) 24px;
  }

  .contact h2 {
    width: 100%;
    max-width: none;
    font-size: 34px;
  }

  .footer-pitch {
    min-height: auto;
    gap: 64px;
  }

  .footer-note {
    max-width: 340px;
    font-size: 9px;
    line-height: 14px;
  }

  .footer-index {
    gap: 20px;
  }

  .footer-links {
    gap: 12px;
    font-size: 10px;
    line-height: 12px;
  }

  .footer-socials {
    flex-direction: row;
    align-items: flex-start;
  }

  .footer-socials a {
    width: 46px;
    height: 46px;
    font-size: 15px;
  }

}

@media (hover: none) and (pointer: coarse) {
  .preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
