:root {
  color-scheme: dark;
  font-family: Courier, "Courier New", monospace, Verdana, sans-serif;
  font-size: 11px;
  line-height: 1.3;
  font-synthesis: none;
  --page-pad: 15px;
  --ink: #f2f2f2;
  --tile: rgba(150, 150, 150, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #090909;
}

body {
  min-height: 100svh;
  color: var(--ink);
  overflow: hidden;
}

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

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
.project-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.86);
  outline-offset: 2px;
}

.reel {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #090909;
}

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

.reel__video {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: saturate(0.78) contrast(0.98);
  transform: scale(1.02);
}

.reel__video.is-active {
  display: block;
}

.reel__veil {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 8, 0.15);
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 61px;
  padding: 16px 20px 0;
  opacity: 0.2;
  transition: opacity 0.6s ease-in-out;
}

.site-header h1,
.site-header p,
.site-footer p {
  margin: 0;
  font: inherit;
}

.site-header h1 {
  font-weight: 400;
}

.identity p {
  margin-top: 1px;
}

.contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.contact div:first-child {
  grid-column: 1;
}

.contact div:last-child {
  grid-column: 2;
}

.contact a {
  display: block;
  width: max-content;
}

.projects {
  align-items: flex-start;
  align-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  padding: 15px var(--page-pad) 80px;
}

.project-card {
  position: relative;
  flex: 0 0 var(--basis);
  min-height: 74px;
  margin-bottom: 29px;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: var(--tile);
  cursor: grab;
  opacity: 0.2;
  transition: opacity 0.6s ease-in-out;
}

.project-card::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.project-card:focus-visible {
  opacity: 1;
}

.project-card.is-active {
  opacity: 1;
}

.project-card.is-dragging {
  cursor: grabbing;
  opacity: 1;
}

.project-card.is-drop-target {
  opacity: 1;
}

body.is-interacting .site-header,
body.is-interacting .site-footer,
body.is-interacting .project-card,
.site-header:focus-within,
.site-footer:focus-within,
.project-card:focus-within {
  opacity: 1;
}

.project-card__clock {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.project-card__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  transition: width 100ms linear;
}

.project-card__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 13px;
  min-height: 74px;
  padding: 9px 13px;
}

.project-card__number {
  min-width: 20px;
}

.project-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.project-card__top,
.project-card__controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card__title {
  max-width: calc(100% - 48px);
  overflow-wrap: anywhere;
}

.project-card__client {
  display: block;
  opacity: 0.95;
}

.project-card__time {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.project-card__controls {
  margin-top: auto;
  padding-top: 9px;
}

.project-card__credits-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.project-card__watch {
  margin-left: auto;
  white-space: nowrap;
}

.project-card__credits {
  display: none;
}

.project-card__credits > div {
  overflow: hidden;
}

.project-card__credits p {
  margin: 0;
}

.project-card.is-expanded {
  min-height: 116px;
  margin-bottom: 0;
}

.project-card.is-expanded .project-card__credits {
  display: block;
  padding-top: 9px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  min-height: 46px;
  padding: 0 20px 16px;
  opacity: 0.2;
  transition: opacity 0.6s ease-in-out;
}

.site-footer .credit {
  justify-self: start;
}

.loading {
  position: fixed;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  opacity: 0.76;
  transition: opacity 300ms ease;
}

.loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) and (min-width: 681px) {
  .site-header {
    grid-template-columns: 1fr 1.25fr;
  }

  .contact {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    --basis: 33.333% !important;
  }
}

@media (max-width: 680px) {
  body {
    min-height: 100svh;
  }

  .site-header {
    display: block;
    min-height: 125px;
    padding: 18px 20px 0;
    opacity: 1;
  }

  .contact {
    display: block;
    margin-top: 18px;
  }

  .contact div:last-child {
    margin-top: 0;
  }

  .projects {
    display: none;
  }

  .site-footer {
    display: block;
    min-height: 79px;
    align-self: end;
    padding: 0 20px 17px;
    opacity: 1;
  }

  .site-footer .credit {
    margin-top: 2px;
  }

  .loading {
    display: none;
  }

  .reel__veil {
    background: rgba(4, 6, 7, 0.06);
  }
}

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