:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, .7);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font); }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }

/* ---------- Big name (like a title card), shrinks after first scroll ---------- */
.name {
  position: fixed; z-index: 20; top: 12px; left: 16px;
  font-weight: 800; text-decoration: none;
  font-size: clamp(56px, 19vw, 150px); line-height: .92; letter-spacing: -.02em;
  transform-origin: top left; transform: scale(.2);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
  pointer-events: auto;
}
.name.big { transform: scale(1); }

/* ---------- Vertical feed ---------- */
.feed {
  height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.work {
  position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden; background: #000;
}

/* ---------- Horizontal carousel ---------- */
.track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center;
  display: grid; place-items: center; overflow: hidden;
}
/* blurred copy of the artwork fills the screen behind it */
.slide .blur {
  position: absolute; inset: -40px; background: center / cover no-repeat;
  filter: blur(36px) brightness(.55); transform: scale(1.1);
}
/* the artwork always fits inside the screen, centered, never cropped */
.slide img.art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}

/* video slide: 16:9 box as large as fits the screen; iframe loads when in view */
.video { position: relative; width: min(100%, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.play span {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: grid; place-items: center; box-shadow: 0 6px 30px rgba(0, 0, 0, .35);
  transition: transform .2s;
}
.play span::before {
  content: ""; margin-left: 6px; border-style: solid; border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #000;
}
.play:hover span { transform: scale(1.06); }

/* ---------- Caption ---------- */
.caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 80px 16px calc(28px + var(--safe-b));
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.caption > * { pointer-events: auto; }
.title { font-size: 22px; font-weight: 500; line-height: 1.15; max-width: 32ch; }
.meta { margin-top: 4px; font-size: 13px; color: var(--muted); text-transform: lowercase; display: flex; gap: 10px; align-items: center; }
.more { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); font-size: 13px; }
.text {
  margin-top: 10px; font-size: 14px; line-height: 1.45; white-space: pre-line;
  max-width: 46ch; max-height: 38dvh; overflow-y: auto; color: rgba(255, 255, 255, .92);
}
.text[hidden] { display: none; }

.dots { position: absolute; z-index: 3; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; display: flex; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: background .2s; }
.dots i.on { background: #fff; }

.arrow {
  position: absolute; z-index: 3; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .35);
  font-size: 22px; display: none; place-items: center;
}
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }
@media (hover: hover) and (pointer: fine) {
  .work.multi .arrow { display: grid; }
}

/* ---------- Works index (sheet) ---------- */
.index {
  position: fixed; inset: 0; z-index: 40; background: #000; overflow-y: auto;
  padding: 0 16px calc(24px + var(--safe-b));
  animation: up .28s cubic-bezier(.2, .7, .2, 1);
}
.index[hidden] { display: none; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.index-head {
  position: sticky; top: 0; z-index: 1; background: #000;
  display: flex; align-items: center; gap: 8px; padding: 16px 0 12px;
}
.close { width: 40px; height: 40px; font-size: 30px; line-height: 1; flex: none; }

/* ---------- Bio ---------- */
.bio-name { flex: 1; font-size: 22px; font-weight: 800; }
.bio-body { display: grid; gap: 20px; max-width: 980px; padding-bottom: 90px; }
.bio-photo { width: 100%; height: auto; border-radius: 4px; }
.bio-body p { font-size: 17px; line-height: 1.55; margin-bottom: 14px; max-width: 58ch; }
.links { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.links a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4); text-decoration: none; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.links a:hover, .links a:focus-visible { background: #fff; color: #000; outline: none; }
@media (min-width: 760px) {
  .bio-body { grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .name, .index { transition: none; animation: none; }
  .feed, .track { scroll-behavior: auto; }
}

/* ---------- Menu ---------- */
.name { cursor: pointer; }
.back { flex: 1; text-align: start; font-size: 15px; height: 40px; }
.menu-list { list-style: none; padding-bottom: 40px; max-width: 680px; }
.top-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0 28px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.big-link { font-size: 34px; font-weight: 800; line-height: 1.15; text-align: start; }
.big-link:hover, .big-link:focus-visible { opacity: .6; outline: none; }
.group { padding-top: 24px; }
.group-title { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.group ul { list-style: none; }
.work-link {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; text-align: start; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.work-link .t { font-size: 20px; line-height: 1.25; flex: 1; }
.work-link .y { font-size: 13px; color: var(--muted); flex: none; }
.work-link:hover .t, .work-link:focus-visible .t { text-decoration: underline; text-underline-offset: 4px; }
.work-link:focus-visible { outline: none; }
.close:focus-visible, .back:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* hover preview of each work in the menu (only on screens with a mouse) */
.menu-preview { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .menu-preview {
    display: block; position: fixed; z-index: 2; pointer-events: none;
    right: 4vw; top: 50%; translate: 0 -50%;
    width: auto; height: auto; max-width: calc(96vw - 760px); max-height: 74vh; object-fit: contain;
    opacity: 0; transition: opacity .2s;
  }
  .menu-preview.on { opacity: 1; }
}

.links a.primary { background: #fff; color: #000; border-color: #fff; }
.links a.primary:hover, .links a.primary:focus-visible { background: transparent; color: #fff; }
.bio-body p.copy { margin-top: 28px; font-size: 12px; color: var(--muted); }

/* video files stored in the site */
.video.file { position: absolute; inset: 0; width: 100%; aspect-ratio: auto; }
.video.file video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sound {
  position: absolute; z-index: 3; right: 16px; bottom: calc(30px + var(--safe-b));
  height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.sound:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.video.file video.cropped { height: auto; max-height: 100%; margin: auto; object-fit: cover; }

/* ---------- Work title in the feed links to the work's page ---------- */
.title-link { text-decoration: none; }
.title-link .arrow-r { opacity: .7; }
.title-link:hover, .title-link:focus-visible { text-decoration: underline; text-underline-offset: 4px; outline: none; }

/* ---------- Work page ---------- */
.page {
  position: fixed; inset: 0; z-index: 35; background: #000; overflow-y: auto; overscroll-behavior: contain;
  animation: up .28s cubic-bezier(.2, .7, .2, 1);
}
.page[hidden] { display: none; }
.page-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center;
  padding: 10px 16px; background: linear-gradient(#000 60%, rgba(0, 0, 0, 0));
}
.page-bar .back { flex: none; height: 40px; font-size: 15px; }
.page-body { max-width: 1100px; margin: 0 auto; padding: 8px 16px calc(40px + var(--safe-b)); }
.p-head { max-width: 680px; margin-bottom: 28px; }
.p-title { font-size: clamp(34px, 9vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; }
.p-en { margin-top: 6px; font-size: 18px; color: var(--muted); }
.p-meta { margin-top: 10px; font-size: 13px; color: var(--muted); text-transform: lowercase; letter-spacing: .02em; }
.p-text { margin-top: 18px; font-size: 16px; line-height: 1.55; white-space: pre-line; }

.p-media { display: flex; flex-direction: column; gap: 14px; }
.p-img img { display: block; width: 100%; height: auto; max-height: 88dvh; object-fit: contain; margin: 0 auto; background: #0b0b0b; min-height: 120px; }
.p-img img[src] { min-height: 0; background: none; }
.p-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b0b0b; }
.p-video img, .p-video iframe, .p-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.p-video.file video { object-fit: contain; }
.p-video.tall { width: auto; height: min(88dvh, calc((100vw - 32px) / var(--a, .6))); max-width: 100%; margin: 0 auto; }
.p-video.tall video.cropped { object-fit: cover; }

.p-next { margin-top: 48px; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 20px; }
.p-next a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.p-next-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-next a span:last-child { font-size: 28px; font-weight: 800; }
.p-next a:hover span:last-child, .p-next a:focus-visible span:last-child { text-decoration: underline; text-underline-offset: 5px; }
.p-next a:focus-visible { outline: none; }
.page:focus { outline: none; }

/* On computers (wide screens) the artwork fills the whole screen in the feed and may be cropped;
   on phones it stays whole. The work page always shows the full image. */
@media (min-width: 768px) {
  .slide img.art { object-fit: cover; }
  .slide .blur { display: none; }
}
