:root {
  --bg: #0E0E0E;
  --ink: #F3F1EC;
  --muted: #9B978F;
  --line: #3A3936;
  --ph: #6F6B64;
  --accent: #FF6A3D;
  --mono: 'Space Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --step: 0.612em; /* width of one Space Mono letter */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 20; }
.skip:focus { left: 8px; }

.page { min-height: 100vh; padding: 40px clamp(20px, 5vw, 72px) 48px; display: flex; flex-direction: column; gap: 96px; }
main { display: flex; flex-direction: column; gap: 96px; }
.wrap { max-width: 1180px; width: 100%; margin: 0 auto; }
.mono { font-family: var(--mono); font-size: 13px; }
.upper { text-transform: uppercase; letter-spacing: 0.04em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.label { margin: 0; font-weight: 400; }
.big { margin: 0; font-size: clamp(28px, 3.6vw, 44px); font-weight: 500; letter-spacing: -0.02em; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.top a { text-decoration: none; }
.nav { display: flex; gap: 28px; flex-wrap: wrap; }

/* Hero: the ten letters */
.hero { display: flex; flex-direction: column; gap: 28px; }
.hero > p { margin: 0; }
.name {
  all: unset; cursor: pointer; display: block; position: relative;
  font-family: var(--mono); font-weight: 700; line-height: 1;
  font-size: clamp(40px, 11.2vw, 150px);
  width: calc(var(--step) * 11); height: 1.05em; max-width: 100%;
}
.name:focus-visible { outline: 3px solid var(--accent); outline-offset: 10px; }
.tiles { position: absolute; inset: 0; }
.t {
  position: absolute; top: 0; left: calc(var(--p, 0) * var(--step));
  transition: left .75s cubic-bezier(.75, 0, .2, 1), transform .2s ease;
  transition-delay: calc(var(--i, 0) * 35ms), 0s;
}
.name.still .t { transition: none; }
.name:hover .t { transform: translateY(-0.02em); }
.t.mark { color: var(--accent); opacity: 0; transition: opacity .3s ease .6s; }
.t.mark.on { opacity: 1; }
.caption-row { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.caption { margin: 0; font-size: clamp(18px, 2vw, 24px); transition: opacity .25s ease; }

/* Work */
.work { display: flex; flex-direction: column; gap: 28px; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  all: unset; cursor: pointer; padding: 12px 16px; font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .6; }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.tile {
  all: unset; cursor: pointer; position: relative; overflow: hidden; display: block;
  background: #161616; grid-column: span 3; aspect-ratio: 16 / 9;
}
.tile[data-size="wide"] { grid-column: span 4; aspect-ratio: 16 / 10; }
.tile[data-size="tall"] { grid-column: span 2; aspect-ratio: 4 / 5; }
.tile[data-size="full"] { grid-column: span 6; aspect-ratio: 21 / 9; }
.grid.filtered .tile { grid-column: span 3; aspect-ratio: 4 / 3; }
.tile[hidden] { display: none; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.tile img, .tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img, .tile:hover .ph { transform: scale(1.02); }
.ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ph);
  background: repeating-linear-gradient(135deg, #161616 0 14px, #191919 14px 28px);
}
.play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center;
  background: rgba(14,14,14,.35);
}
.cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; display: flex; justify-content: space-between; gap: 12px;
  background: rgba(14,14,14,.88); font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
}
.cap .k { font-family: var(--mono); font-size: 12px; color: var(--accent); text-transform: capitalize; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }
@media (hover: none) { .cap { opacity: 1; transform: none; } }
.elsewhere { margin: 0; display: flex; gap: 24px; flex-wrap: wrap; }

/* Projects */
.projects .label { margin-bottom: 16px; }
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: baseline; gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; transition: padding-left .25s ease;
}
.row:hover { padding-left: 14px; color: var(--ink); }
.row-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
.row-name { font-size: clamp(24px, 3.2vw, 40px); font-weight: 500; letter-spacing: -0.02em; }
.row-text .muted { font-size: 16px; }
.arrow { font-size: 28px; transition: transform .25s ease, color .25s ease; }
.row:hover .arrow { transform: translateX(6px); color: var(--accent); }

/* Footer */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot .links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Viewer */
.viewer { padding: 0; border: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(8,8,8,.97); color: var(--ink); }
.viewer::backdrop { background: rgba(8,8,8,.9); }
.v-inner { height: 100%; display: flex; flex-direction: column; gap: 24px; padding: 28px clamp(20px, 5vw, 72px); }
.v-top { display: flex; justify-content: space-between; align-items: center; }
.v-close { all: unset; cursor: pointer; padding: 12px; color: var(--ink); }
.v-close:focus-visible { outline: 3px solid var(--accent); }
.v-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #141414; }
.v-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-media iframe { width: 100%; height: 100%; border: 0; }
.v-media .ph { position: static; width: 100%; height: 100%; }
.v-bottom { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.v-title { margin: 0; font-size: 28px; font-weight: 500; }
.v-desc { margin: 0; font-size: 16px; }
.v-nav { display: flex; gap: 8px; }
.v-nav button { all: unset; cursor: pointer; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); font-size: 20px; }
.v-nav button:hover { border-color: var(--ink); }
.v-nav button:focus-visible { outline: 3px solid var(--accent); }

@media (max-width: 760px) {
  .page, main { gap: 72px; }
  .grid .tile, .grid.filtered .tile { grid-column: span 6; }
  .tile[data-size="tall"] { aspect-ratio: 4 / 5; }
}

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