:root {
  --paper: #fff;
  --ink: #111;
  --muted: rgba(17, 17, 17, 0.45);
  --pad: 20px;
  --header-height: 42px;
  --page-pad: 20px;
  --project-header-left-offset: 0px;
  --site-name-font-size: 21px;
  --utility-font-size: 13px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
}

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

a {
  text-decoration: none;
}

button {
  border: 0;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  height: var(--header-height);
  padding: 0 var(--page-pad) 0 calc(var(--page-pad) + var(--project-header-left-offset));
  background: var(--paper);
  color: var(--ink);
  line-height: 1;
}

.site-name {
  font-size: var(--site-name-font-size);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 22px;
  transform: translateY(calc((var(--site-name-font-size) - var(--utility-font-size)) / 2));
}

.nav-filter,
.social-toggle {
  padding: 0;
  background: transparent;
  font-size: var(--utility-font-size);
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
  cursor: pointer;
  transition: font-weight 140ms ease, opacity 140ms ease;
}

.nav-filter:hover,
.nav-filter:focus-visible,
.social-toggle:hover,
.social-toggle:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.social-drawer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translateY(calc((var(--site-name-font-size) - var(--utility-font-size)) / 2));
}

.social-toggle {
  appearance: none;
}

.social-list {
  position: absolute;
  z-index: 110;
  top: 50%;
  right: calc(100% + 14px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0 12px;
  width: max-content;
  max-width: min(760px, calc(100vw - var(--page-pad) * 2 - 72px));
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: inherit;
  text-align: right;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 140ms ease, transform 140ms ease;
}

.social-drawer.is-open .social-list {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.social-list a {
  display: block;
  padding: 0;
  font-size: var(--utility-font-size);
  line-height: 1;
  white-space: nowrap;
}

.social-list a:hover,
.social-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-page {
  padding-top: var(--header-height);
  padding-bottom: 80px;
}

.project-intro {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  padding: 28px var(--pad) 40px;
  transform: translate(-2px, -5px);
}

.project-intro h1 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(22px, 4.5vw, 67px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  transform: translateY(8px);
}

.project-page[data-project-slug="pink-berets"] .project-intro h1 {
  font-size: clamp(19px, calc(4.5vw - 4px), 64px);
}

.project-details {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 4px 18px;
  margin: 4px 0 0;
  color: rgba(17, 17, 17, 0.6);
  font-size: 13px;
  line-height: 1.12;
}

.project-details dt {
  color: rgba(17, 17, 17, 0.36);
  text-transform: lowercase;
}

.project-details dd {
  margin: 0;
}

.project-details a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-details .project-filter-link {
  color: inherit;
  text-decoration: none;
  transition: color 140ms ease;
}

.project-details .project-filter-link:hover,
.project-details .project-filter-link:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.project-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  background: #eee;
  overflow: hidden;
}

.project-hero:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.project-hero:has(.project-media-caption) {
  align-items: start;
  background: var(--paper);
}

.project-hero[data-layout="psb-grid"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-media-entry {
  min-width: 0;
}

.project-media-entry .project-media-item {
  width: 100%;
}

.project-media-caption {
  margin: 6px 0 0;
  color: rgba(17, 17, 17, 0.6);
  font-size: 13px;
  line-height: 1.12;
}

.project-hero[data-layout="artist-compact"] {
  display: flex;
  align-items: stretch;
  height: clamp(300px, 38vw, 520px);
  background: #050505;
}

.project-hero[data-layout="artist-compact"] .project-media-item {
  flex: 1 1 auto;
  height: 100%;
  aspect-ratio: auto;
}

.project-hero[data-layout="artist-compact"] .project-media-item[data-aspect="vertical"] {
  flex: 0 0 auto;
  aspect-ratio: 9 / 16;
}

.project-hero[data-layout="bghvyn-row"] {
  display: flex;
  align-items: stretch;
  height: clamp(300px, 38vw, 520px);
  gap: 2px;
  overflow-x: auto;
  background: var(--paper);
}

.project-hero[data-layout="bghvyn-row"] .project-media-item {
  flex: 1 1 0;
  aspect-ratio: 9 / 16;
  height: 100%;
}

.project-hero[data-layout="vertical-row"] {
  display: flex;
  align-items: stretch;
  height: clamp(300px, 38vw, 520px);
  overflow-x: auto;
  background: var(--paper);
}

.project-hero[data-layout="vertical-row"] .project-media-item {
  flex: 1 1 0;
  aspect-ratio: 9 / 16;
  height: 100%;
}

.project-hero[data-layout="icon-row"] .project-media-item {
  aspect-ratio: 1300 / 940;
  background: #050505;
}

.project-hero[data-layout="icon-row"] .project-media-item:first-child video {
  object-fit: contain;
}

.project-hero[data-layout="pink-berets"] {
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: var(--paper);
}

.project-hero[data-layout="pink-berets"] .project-media-item:first-child {
  flex: 1.066 1 0;
  aspect-ratio: 1500 / 1407;
}

.project-hero[data-layout="pink-berets"] .project-media-item:nth-child(n + 2) {
  flex: 0.5625 1 0;
  aspect-ratio: 9 / 16;
  background: #050505;
}

.project-hero[data-layout="ai-fragments"] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--paper);
}

.project-page[data-project-slug="ai-fragments"] .project-copy {
  padding-top: 31px;
  padding-bottom: 42px;
}

.project-media-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-hero[data-layout="ai-fragments"] .project-media-item {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  height: calc(clamp(150px, 17vw, 250px) * var(--media-scale, 1));
  width: auto;
  aspect-ratio: var(--media-aspect-ratio) !important;
  overflow: visible;
  background: transparent;
}

.project-hero[data-layout="ai-fragments"] video {
  object-fit: fill;
  filter: grayscale(1) saturate(0) contrast(0.82) brightness(0.76);
  transition: filter 180ms ease;
}

.project-hero[data-layout="ai-fragments"] .project-media-item::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(20, 20, 20, 0.14);
  content: "";
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-hero[data-layout="ai-fragments"] .project-media-item.is-video-active video {
  filter: none;
}

.project-hero[data-layout="ai-fragments"] .project-media-item.is-video-active::after {
  opacity: 0;
}

.project-hero[data-layout="ai-fragments"] .project-media-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  max-width: 100%;
}

.project-hero[data-layout="ai-fragments"] .project-media-row:nth-child(1) .project-media-item {
  height: calc(17.45vw * var(--media-scale, 1));
}

.project-hero[data-layout="ai-fragments"] .project-media-row:nth-child(2) .project-media-item {
  height: calc(35.55vw * var(--media-scale, 1));
}

.project-hero[data-layout="ai-fragments"] .project-media-row:nth-child(3) .project-media-item {
  height: calc(14.06vw * var(--media-scale, 1));
}

.project-hero[data-layout="petix"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--paper);
}

.project-hero[data-layout="petix"] .project-media-column:first-child .project-media-item {
  aspect-ratio: 16 / 9;
}

.project-hero[data-layout="petix"] .project-media-column:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.project-hero[data-layout="petix"] .project-media-column:last-child .project-media-item {
  aspect-ratio: 16 / 9;
}

.project-hero[data-layout="tarot-marquee"] {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  background: var(--paper);
}

.tarot-media-row {
  width: 100%;
  overflow: hidden;
}

.tarot-media-track,
.tarot-media-set {
  display: flex;
  width: max-content;
  gap: 2px;
}

.tarot-media-track {
  animation: tarot-scroll-left 90s linear infinite;
}

.tarot-media-row--lower .tarot-media-track {
  animation-name: tarot-scroll-right;
}

.project-hero[data-layout="tarot-marquee"] .project-media-item {
  flex: 0 0 calc((100vw - (2 * var(--page-pad)) - 10px) / 6);
  aspect-ratio: 1;
  background: #eee;
}

.project-hero[data-layout="tarot-marquee"] img {
  object-fit: cover;
}

@keyframes tarot-scroll-left {
  to { transform: translateX(-50%); }
}

@keyframes tarot-scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.project-hero[data-layout="free-gallery"] {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  height: 100%;
  overflow: visible;
  background: transparent;
  touch-action: pan-y;
}

.project-page[data-project-slug="outlines-of-events"] {
  position: relative;
  min-height: clamp(1500px, 135vw, 1900px);
  overflow: hidden;
}

.project-page[data-project-slug="outlines-of-events"] .project-intro,
.project-page[data-project-slug="outlines-of-events"] .project-copy {
  position: relative;
  z-index: 2;
}

.project-page[data-project-slug="outlines-of-events"] .project-copy {
  transform: translateY(120%);
}

.project-hero[data-layout="free-gallery"] .project-media-item {
  position: absolute;
  min-width: 120px;
  max-width: 520px;
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.project-hero[data-layout="free-gallery"] .project-media-item.is-dragging {
  cursor: grabbing;
}

.project-hero[data-layout="free-gallery"] img {
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.project-hero[data-layout="white-cube"] {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 2px;
  background: var(--paper);
}

.project-hero[data-layout="white-cube"] .project-media-item {
  min-width: 0;
}

.project-hero[data-layout="white-cube"] .project-media-item:nth-child(1) {
  flex: 0 0 calc(35.410% - 1.416px);
  aspect-ratio: 1;
}

.project-hero[data-layout="white-cube"] .project-media-item:nth-child(2) {
  flex: 0 0 calc(22.860% - 0.914px);
  aspect-ratio: 1000 / 1549;
}

.project-hero[data-layout="white-cube"] .project-media-item:nth-child(3) {
  flex: 0 0 calc(41.731% - 1.669px);
  aspect-ratio: 3149 / 2672;
}

.project-media-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.project-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(60px, 7vw, 96px);
  height: clamp(60px, 7vw, 96px);
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.project-video-play::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-44%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: clamp(29px, 3.4vw, 46px);
  line-height: 1;
}

.project-media-item.is-playing .project-video-play {
  opacity: 0;
  pointer-events: none;
}

.project-video-controls {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.project-media-item.has-started:hover .project-video-controls,
.project-media-item.has-started:has(:focus-visible) .project-video-controls {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) {
  .project-media-item.has-started .project-video-controls {
    opacity: 1;
    pointer-events: auto;
  }
}

.project-video-toggle,
.project-video-volume {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  font: 18px/1 Arial, sans-serif;
  cursor: pointer;
}

.project-video-volume {
  position: relative;
  width: 30px;
  font-size: 0;
}

.project-video-volume::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 4px;
  width: 12px;
  height: 14px;
  background: #fff;
  clip-path: polygon(0 35%, 35% 35%, 100% 0, 100% 100%, 35% 65%, 0 65%);
}

.project-video-volume::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 13px;
  width: 10px;
  height: 14px;
  border-right: 1px solid #fff;
  border-radius: 0 50% 50% 0;
}

.project-video-volume.is-muted::after {
  content: "×";
  top: 5px;
  left: 14px;
  width: auto;
  height: auto;
  border: 0;
  color: #fff;
  font: 18px/1 Arial, sans-serif;
}

.project-video-timeline {
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.project-video-timeline::-webkit-slider-runnable-track {
  height: 2px;
  background: #fff;
}

.project-video-timeline::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.project-video-timeline::-moz-range-track {
  height: 2px;
  background: #fff;
}

.project-video-timeline::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.project-media-item[data-aspect="vertical"] {
  aspect-ratio: 9 / 16;
  background: #050505;
}

.project-media-item.has-click-toggle-video video {
  cursor: pointer;
}

.project-hero img,
.project-hero video,
.project-hero iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.project-youtube-button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: #111 var(--youtube-thumbnail) center / cover no-repeat;
  cursor: pointer;
}

.project-youtube-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(68px, 7vw, 104px);
  aspect-ratio: 1.42 / 1;
  background: #f00;
  border-radius: 18% / 28%;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.project-youtube-button span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: clamp(12px, 1.35vw, 19px) solid transparent;
  border-bottom: clamp(12px, 1.35vw, 19px) solid transparent;
  border-left: clamp(18px, 2vw, 29px) solid #fff;
  transform: translate(-37%, -50%);
}


.project-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  padding: 54px var(--pad) 0;
  transform: translateY(-5px);
}

.project-language {
  max-width: 760px;
}

.project-language h2 {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.project-language p {
  margin: 0 0 1em;
  font-size: clamp(13px, 1.4vw, 20px);
  line-height: 1.22;
}

.project-missing {
  margin: 0;
  padding: 40px var(--pad);
}

@media (max-width: 720px) {
  .project-hero[data-layout="psb-grid"] {
    grid-template-columns: minmax(0, 1fr);
  }

  :root {
    --pad: 12px;
    --header-height: 48px;
    --page-pad: 12px;
    --project-header-left-offset: 0px;
    --site-name-font-size: 20px;
    --utility-font-size: 14px;
  }

  .site-header {
    grid-template-columns: 50vw 1fr auto;
  }

  .site-name {
    width: 50vw;
  }

  .site-nav {
    position: fixed;
    z-index: 105;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 18px var(--page-pad) 16px;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 140ms ease, transform 140ms ease;
  }

  .site-header.menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-filter {
    font-size: 16px;
  }

  .social-list a {
    font-size: 13px;
  }

  .social-drawer {
    transform: none;
  }

  .social-toggle {
    position: relative;
    width: 26px;
    height: 18px;
    overflow: hidden;
    font-size: 0;
    transform: none;
  }

  .social-toggle::before,
  .social-toggle::after {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: currentColor;
    content: "";
    transition: transform 140ms ease, top 140ms ease;
  }

  .social-toggle::before {
    top: 3px;
    box-shadow: 0 5.5px 0 currentColor;
  }

  .social-toggle::after {
    top: 14px;
  }

  .site-header.menu-open .social-toggle::before {
    top: 8px;
    box-shadow: none;
    transform: rotate(45deg);
  }

  .site-header.menu-open .social-toggle::after {
    top: 8px;
    transform: rotate(-45deg);
  }

  .social-list {
    position: fixed;
    top: 238px;
    right: 0;
    left: 0;
    justify-content: flex-start;
    gap: 10px 14px;
    width: 100%;
    max-width: none;
    padding: 16px var(--page-pad) 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.14);
    background: var(--paper);
    color: var(--ink);
    text-align: left;
    transform: translateY(-8px);
  }

  .social-drawer.is-open .social-list {
    transform: translateY(0);
  }

  .project-intro,
  .project-copy {
    grid-template-columns: 1fr;
  }

  .project-intro {
    gap: 28px;
    padding-top: 20px;
  }

  .project-copy {
    gap: 36px;
    padding-top: 36px;
  }

  .project-hero[data-layout="artist-compact"] {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
  }

  .project-hero[data-layout="artist-compact"] .project-media-item {
    width: 100%;
    height: auto;
  }

  .project-hero[data-layout="bghvyn-row"] .project-media-item {
    flex: 0 0 calc((100vw - 2 * var(--pad)) / 2);
  }

  .project-hero[data-layout="white-cube"] {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .project-hero[data-layout="white-cube"] .project-media-item:nth-child(n) {
    flex: none;
    width: 100%;
  }

  .project-hero[data-layout="white-cube"] .project-media-item:nth-child(2) {
    aspect-ratio: 1000 / 1549;
  }

  .project-hero[data-layout="white-cube"] .project-media-item:nth-child(3) {
    aspect-ratio: 3149 / 2672;
  }

  .project-hero[data-layout="pink-berets"] {
    display: flex;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
  }

  .project-hero[data-layout="pink-berets"] .project-media-item:first-child {
    flex: 0 0 100%;
  }

  .project-hero[data-layout="pink-berets"] .project-media-item:nth-child(n + 2) {
    flex: 0 0 72vw;
  }

  .project-hero[data-layout="ai-fragments"] {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    aspect-ratio: auto;
    overflow-x: auto;
  }

  .project-hero[data-layout="ai-fragments"] .project-media-row {
    display: contents;
  }

  .project-hero[data-layout="ai-fragments"] .project-media-item:nth-child(n) {
    position: static;
    width: auto;
    height: auto;
    flex: 0 0 88vw;
    aspect-ratio: var(--media-aspect-ratio, 16 / 9) !important;
  }

  .project-hero[data-layout="ai-fragments"] .project-media-column:nth-child(2) .project-media-item {
    flex-basis: 50vw;
  }

  .project-hero[data-layout="free-gallery"] {
    height: 100%;
  }

  .project-page[data-project-slug="outlines-of-events"] {
    min-height: 2600px;
  }
}

@media (max-width: 360px) {
  :root {
    --pad: 8px;
    --page-pad: 8px;
    --site-name-font-size: 18px;
    --utility-font-size: 13px;
  }

  .site-nav {
    gap: 11px;
  }

  .social-list a {
    font-size: 12px;
  }
}
