@font-face {
  font-family: "JetBrains Mono";
  src: url("/rsrc/font/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --white: #ffffff;
  --black: #000000;
  --muted: #b8b8b8;
  --shade: #00000040;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }

.project {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  height: 100dvh;
  overflow: clip;
}

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

.project__slide {
  position: absolute;
  inset: 0;
  isolation: isolate;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: 80px max(24px, env(safe-area-inset-right)) 80px max(24px, env(safe-area-inset-left));
  background: var(--black);
  clip-path: inset(0 100% 0 0);
  z-index: 0;
}

.project__slide.is-active { z-index: 1; clip-path: inset(0 0 0 0); }
.project__slide.is-preview { z-index: 2; will-change: clip-path; }

.project[data-state="loading"] .project__slides,
.project[data-state="error"] .project__slides {
  visibility: hidden;
}

.project__photos,
.project__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.project__photos {
  z-index: -2;
}

.project__image {
  display: block;
  object-fit: cover;
  object-position: center;
}

.project__identity {
  width: 100%;
  max-width: 1440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  opacity: 0;
  transition: opacity 400ms ease;
}

.project__skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project__skills:empty { display: none; }

.project__skill {
  max-width: 100%;
  padding: 5px 9px;
  color: var(--black);
  background: var(--white);
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.project__title {
  max-width: 100%;
  margin: 0;
  font-family: "Special Gothic", sans-serif;
  text-transform: uppercase;
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 100;
  font-size: min(10vw, 117.6px);
  font-style: normal;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.project__slide.is-active .project__identity { opacity: 1; }
.project__slide.is-leaving .project__identity { opacity: 0; }
.project__slide.is-entering .project__identity { opacity: 1; transition-delay: 180ms; }

.project__nav {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  width: clamp(64px, 18vw, 280px);
  padding: 0 max(14px, env(safe-area-inset-right), env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  color: var(--white);
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.project__nav--previous { left: 0; justify-content: flex-start; }
.project__nav--next { right: 0; justify-content: flex-end; }
.project__nav[aria-disabled="true"] { cursor: default; }

.project__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  opacity: 0.8;
  transition: opacity 180ms ease, transform 250ms ease;
}

.project__nav:hover .project__arrow { opacity: 1; }
.project__nav--previous:hover .project__arrow { transform: translateX(-3px); }
.project__nav--next:hover .project__arrow { transform: translateX(3px); }
.project__nav:focus-visible { outline: none; }
.project__nav:focus-visible .project__arrow { outline: 2px solid var(--white); outline-offset: 2px; }
.project__nav[data-loading="true"] .project__arrow { animation: breathe 600ms ease-in-out infinite alternate; }

.project__cursor {
  position: fixed;
  z-index: 7;
  top: 0;
  left: 0;
  width: max-content;
  padding: 8px 12px;
  color: var(--white);
  background: rgb(0 0 0 / 20%);
  backdrop-filter: blur(24px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 140ms ease, visibility 0s linear 140ms;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.project[data-state="ready"] .project__cursor[data-ready="true"][data-visible="true"] {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

@media (hover: none), (pointer: coarse) {
  .project__cursor { display: none; }
}

.project__status {
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 40ch;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.project[data-state="ready"] .project__status {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(60%, 40ch);
  gap: 4px;
  text-shadow: 0 1px 8px var(--black);
}

.project__loader {
  width: 32px;
  height: 2px;
  background: var(--white);
  animation: breathe 1.2s ease-in-out infinite alternate;
}

.project__message { margin: 0; }

.project__retry {
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}


.project__playback {
  position: absolute;
  z-index: 5;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #00000026;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.project__playback:hover,
.project__playback:focus-visible {
  color: var(--white);
  background: var(--shade);
}

.project__playback[data-paused="true"] .icon-pause,
.project__playback[data-paused="false"] .icon-play { display: none; }

button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.no-script {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  background: var(--black);
  text-align: center;
  font-size: 12px;
}

@keyframes breathe { to { opacity: 0.25; } }

@media (max-width: 600px) {
  .project__skill { font-size: 11px; padding: 5px 7px; }
  .project__playback { right: max(16px, env(safe-area-inset-right)); }
  .project__nav { width: 56px; padding: 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.project__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.project__link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -8px;
}

.project__identity { pointer-events: none; }
