@font-face {
  font-family: "ABC Diatype";
  src: url("fonts/ABCDiatypeVariableEdu-Regular.woff2") format("woff2-variations"),
       url("fonts/ABCDiatypeVariableEdu-Regular.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Haas Grot Text";
  src: url("fonts/neuehaasgrottext-55roman-trial.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --olive-12: #1d211c;
  --olive-11: #60655f;
  --olive-6:  #d7dad7;
  --card-stroke: #e3e5e3;
  --card-bg:  #d4d4d4;

  --font-serif: "Recital", "Recital Var Upright", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --font-sans:  "ABC Diatype", "ABC Diatype Variable Edu", "Haas Grot Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: 24px;
  --pad-y: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

html {
  background: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #fff;
  color: var(--olive-12);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 28px;
  letter-spacing: -0.09px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-feature-settings: "dlig" 1;
}
img { display: block; }
a { color: inherit; text-decoration: none; }

.page {
  width: 100%;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: max(var(--pad-y), env(safe-area-inset-top));
  padding-bottom: max(var(--pad-y), env(safe-area-inset-bottom));
}

.hero {
  width: 100%;
  max-width: 576px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.name {
  margin: 0;
  width: 100%;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 43px;
  letter-spacing: -0.864px;
  color: var(--olive-12);
  overflow-wrap: anywhere;
}

.rule {
  width: 80px;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--olive-6);
  flex: none;
}

.bio {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--olive-11);
}
.bio p { margin: 0; overflow-wrap: anywhere; }
.u {
  text-decoration: underline;
  text-decoration-thickness: 7%;
  text-underline-offset: calc(0.12em + 1px);
  text-decoration-skip-ink: none;
}
.u {
  transition: color 240ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.u:hover,
.u:focus-visible { color: var(--olive-12); }

.u {
  position: relative;
  white-space: nowrap;
}
.u::before {
  content: "";
  position: absolute;
  inset: -8px -12px;
}

.links {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  color: var(--olive-12);
  white-space: nowrap;
}
.link {
  position: relative;
  display: inline-block;
  line-height: 28px;
  outline-offset: 4px;
}
.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.link::before {
  content: "";
  position: absolute;
  inset: -8px -12px;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 0.07em;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}
.link:hover::after,
.link:focus-visible::after { transform: scaleX(1); }

.link-email {
  transition: transform 150ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.link-email:active { transform: scale(0.97); }
.link-email::after {
  right: auto;
  width: var(--uw, 100%);
}
.link-email.ready::after {
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1), width 150ms ease-out;
}
.swap {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.swap .label {
  display: inline-block;
  transition: opacity 150ms ease-out, filter 150ms ease-out;
}
.swap .label + .label {
  position: absolute;
  left: 0;
  top: 0;
  font-size: calc(1em - 1px);
  white-space: nowrap;
}
.swap .label:not(.is-on) {
  opacity: 0;
  filter: blur(2px);
}

.projects {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, clamp(320px, calc(320px + (100vw - 1728px) * 0.12), 420px)));
  gap: clamp(48px, calc(48px + (100vw - 1728px) * 0.0144), 60px);
  justify-content: center;
}

.archive-title {
  margin: 0 0 48px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 43px;
  letter-spacing: -0.864px;
  color: var(--olive-12);
  text-align: center;
}

.card {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 320 / 207;
  border-radius: 16px;
  background: var(--bg, var(--card-bg));
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--card-stroke);
  pointer-events: none;
  z-index: 2;
}

.card { cursor: pointer; }
.card:focus-visible { outline: 2px solid var(--olive-12); outline-offset: 4px; }
.card.is-hidden { visibility: hidden; }

.card { transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1); }
html.project-open .card { opacity: 0; transition: opacity 380ms cubic-bezier(0.4, 0, 0.2, 1); }

.replay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms cubic-bezier(0.25, 1, 0.5, 1), opacity 220ms ease, background-color 160ms ease;
}
.replay::before, .viewer-close::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
.replay svg { width: 22px; height: 22px; display: block; }
.replay:active { transform: scale(0.9); }
.replay:focus-visible { outline: 2px solid var(--olive-12); outline-offset: 2px; }
.replay.spin svg { animation: replay-spin 420ms cubic-bezier(0.25, 1, 0.5, 1); }
@keyframes replay-spin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.card > .replay { display: none; }
.viewer-card .replay { opacity: 0; pointer-events: none; }
.viewer.is-open .viewer-card .replay { opacity: 1; pointer-events: auto; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  cursor: pointer;
}
.viewer.is-closing { pointer-events: none; }
.viewer.is-closing .viewer-card { pointer-events: auto; }
.viewer-backdrop {
  position: absolute;
  inset: 0;
}
.viewer-card {
  position: absolute;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;

  contain: layout paint style;
  transform: translateZ(0);
}
.viewer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--card-stroke);
  pointer-events: none;
  z-index: 2;
}
.viewer-stage {
  position: absolute;
}
.viewer-stage .shot { pointer-events: none; }
.viewer-stage .card-video, .viewer-stage .card-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: transform 160ms cubic-bezier(0.25, 1, 0.5, 1), opacity 220ms ease;
}
.viewer-close:active { transform: scale(0.9); }
.viewer-close:focus-visible { outline: 2px solid var(--olive-12); outline-offset: 2px; }
.viewer.is-open .viewer-close { opacity: 1; pointer-events: auto; }
.viewer-close svg { width: 22px; height: 22px; display: block; }
html.viewer-lock, html.viewer-lock body { overflow: hidden; }

.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #fff;
}

.card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.shot {
  position: absolute;
  left:   calc(var(--x) / 320 * 100%);
  top:    calc(var(--y) / 207 * 100%);
  width:  calc(var(--w) / 320 * 100%);
  height: calc(var(--h) / 207 * 100%);
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 1151px) {
  .projects { gap: 40px; }
}
@media (max-width: 959px) {
  :root { --pad-y: 72px; --gutter: 20px; }
  .projects {
    grid-template-columns: minmax(0, 1fr);
    max-width: 576px;
    gap: 20px;
  }
  .archive-title { font-size: 32px; line-height: 38px; letter-spacing: -0.768px; }

  .card { aspect-ratio: 1 / 1; }
  .card:nth-child(8) .card-video, .card:nth-child(8) .card-poster { object-fit: contain; }

  html.project-open .card { opacity: 1; }
  .card { cursor: default; -webkit-tap-highlight-color: transparent; }
  .card > .replay { display: grid; }

  .card[data-ex] .card-video, .card[data-ex] .card-poster {
    inset: auto;
    left: var(--box-left, 0px);
    top: var(--box-top, 0px);
    width: var(--box-size, 100%);
    height: var(--box-size, 100%);
  }

  .screen-projects { padding-top: 160px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 599px) and (hover: none) and (pointer: coarse) {
  .name { font-size: 32px; line-height: 38px; letter-spacing: -0.768px; }

  .screen-hero {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .hero { gap: calc(24px * var(--k, 1)); }
  .hero .name { font-size: calc(32px * var(--k, 1)); line-height: calc(38px * var(--k, 1)); letter-spacing: calc(-0.768px * var(--k, 1)); }
  .hero .bio { gap: calc(20px * var(--k, 1)); }
  .hero .bio p, .hero .links, .hero .link { font-size: calc(18px * var(--k, 1)); line-height: calc(28px * var(--k, 1)); }
  .hero .link::after { top: calc(18px * var(--k, 1) + 4px); }
  .hero .u { text-underline-offset: 3.16px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --pad-y: 40px; }
}

html.no-diatype body { letter-spacing: -0.55px; }
html.hero-wait .hero { visibility: hidden; }
html.font-late { --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif; }

@media (prefers-reduced-motion: reduce) {
  .link::after, .u, .card, .replay, .link-email, .link-email.ready::after, .swap .label { transition: none; }
  .replay.spin svg { animation: none; }
}
