/* Disco Nap. One stylesheet for every page.
   The look: black ground, white ink, five light colours, Geist Mono for names, Figtree for reading. */
:root {
  --bg: #0a0a0a; --card: #141414; --line: #292929; --ink: #f5f5f5; --muted: #9e9e9e;
  --light-1: #67e8f9; --light-2: #3ba9ff; --light-3: #c4b5fd; --light-4: #f9a8d4; --light-5: #e8b76b;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --text: 'Figtree', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: 48px;
  --ball: 74;          /* the front page ball, percent of the screen height */
  --hb: 60px;          /* the small ball in the header of a project page */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wm { font: 500 18px/1 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.pn { font: 400 clamp(17px, 1.4vw, 20px)/1.9 var(--mono); letter-spacing: -.025em; }
.tx { font: 400 14px/1.5 var(--text); }

/* ---------- header ---------- */
.top { flex: none; display: flex; justify-content: space-between; align-items: center; height: 52px; padding: 28px var(--pad) 0; position: relative; z-index: 3; }
.lock { display: inline-flex; align-items: center; gap: 8.8px; height: 24px; }
.dn-mark { display: block; flex: none; overflow: visible; }
.dn-mark [data-k] { transition: fill .6s; }
.contact { color: var(--muted); margin-left: auto; transition: color .15s var(--ease); }
.contact:hover, .contact:focus-visible, .contact[aria-current] { color: var(--ink); }

/* ---------- front page: five names and the ball ---------- */
html.screen, html.screen body { height: 100%; overflow: hidden; }
html.screen body { height: 100svh; display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; min-height: 0; }
.ballwrap { position: absolute; top: 50%; left: 67%; width: var(--d); aspect-ratio: 1; transform: translate(-50%, -50%);
  --d: min(calc(var(--ball) * 1svh), calc(var(--ball) * .76vw)); }
.ballwrap canvas, .ballwrap img { width: 100%; height: 100%; }
.ballwrap canvas { touch-action: pan-y; }
html:not(.js) .ballwrap canvas { display: none; }

.names { position: absolute; z-index: 2; left: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; }
.names a { position: relative; display: block; padding: .09em 0; white-space: nowrap; color: var(--ink); transition: color .15s var(--ease); }
.names .n, .pname .n, .next .n { display: inline-block; }
.names.has-on a { color: var(--muted); }
.names.has-on a.on { color: var(--ink); }
/* one lit pixel beside the pointed name: quick on, slow off */
.names a::before { content: ''; position: absolute; left: -.46em; top: 50%; width: .17em; height: .17em; margin-top: -.085em; border-radius: .03em;
  background: var(--c, var(--ink)); opacity: 0; transform: scale(.4); transition: opacity .5s, transform .5s; }
.names a.on::before { opacity: 1; transform: none; transition: opacity .06s, transform .06s; }
.names a:focus-visible { outline-offset: 2px; }

/* ---------- a project page: the words stay, the pictures scroll ---------- */
.hb { display: none; }
html.js .lock .hb { display: block; width: var(--hb); height: var(--hb); margin: calc((24px - var(--hb)) / 2) 0; }
html.js .lock .hb + .dn-mark { display: none; }
.lock .hb canvas { width: 100%; height: 100%; }

.proj { display: grid; grid-template-columns: minmax(300px, 30%) minmax(0, 1fr); column-gap: 56px; padding: 0 var(--pad) 24svh; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 96px 0 64px; }
.pname { margin: 0 0 20px; font: 400 clamp(30px, 3vw, 44px)/1.08 var(--mono); letter-spacing: -.03em; }
.pline { margin: 0 0 34px; max-width: 30ch; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.rows { align-self: stretch; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows .q { color: var(--muted); }
.open { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .16s var(--ease); }
.open:hover, .open:focus-visible { border-color: #5c5c5c; }
.open .arr { color: var(--muted); transition: transform .16s var(--ease), color .16s var(--ease); }
.open:hover .arr, .open:focus-visible .arr { transform: translate(2px, -2px); color: var(--ink); }

.shots { justify-self: end; width: 100%; max-width: 1120px; padding-top: 104px; display: flex; flex-direction: column; gap: clamp(72px, 17svh, 170px); }
.shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.shot img, .shot video { width: 100%; height: auto; }

.end { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-top: 26px; border-top: 1px solid var(--line); }
.next { display: inline-flex; align-items: baseline; gap: .5em; font: 400 clamp(24px, 2.5vw, 36px)/1.1 var(--mono); letter-spacing: -.03em; }
.next .arr { color: var(--muted); transition: transform .16s var(--ease), color .16s var(--ease); }
.next:hover .arr, .next:focus-visible .arr { transform: translateX(5px); color: var(--ink); }
.all { color: var(--muted); transition: color .15s var(--ease); }
.all:hover, .all:focus-visible { color: var(--ink); }

@media (min-width: 761px) {
  html.project .top { position: absolute; top: 0; left: 0; right: 0; }
  html.project .lock { position: fixed; top: 28px; left: var(--pad); z-index: 5; }
}

/* ---------- contact, and the page for an address that is not there ---------- */
.plain { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; }
.big { font: 400 clamp(21px, 6.6vw, 64px)/1.1 var(--mono); letter-spacing: -.035em; white-space: nowrap; }
a.big { background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat; padding-bottom: .08em; transition: background-size .3s var(--ease); }
a.big:hover, a.big:focus-visible { background-size: 100% 1px; }
.plain .rows { align-self: auto; width: min(100%, 400px); margin-top: clamp(40px, 8svh, 72px); }
.person { display: flex; align-items: center; gap: 14px; }
.person img { width: 44px; height: 44px; border-radius: 50%; }
.plain .all { margin-top: 30px; }

/* ---------- phone: one column ---------- */
@media (max-width: 760px) {
  :root { --pad: 22px; --hb: 48px; }
  .top { height: 44px; padding-top: 20px; }
  .stage { display: flex; flex-direction: column; align-items: center; padding-top: 2svh; }
  .ballwrap { position: static; transform: none; flex: none; --d: min(calc(var(--ball) * 1.14vw), calc(var(--ball) * .6svh)); }
  .names { position: static; transform: none; align-self: stretch; padding: 3.5svh var(--pad) 0 calc(var(--pad) + .5em); }

  .proj { display: block; padding-bottom: 72px; }
  .side { position: static; height: auto; padding: 52px 0 44px; }
  .pname { font-size: 32px; margin-bottom: 16px; }
  .pline { margin-bottom: 28px; }
  .shots { padding-top: 0; gap: 36px; }
  .shot { border-radius: 10px; }
  .end { margin-top: 20px; }
}
/* a very short screen (a phone on its side): let the front page scroll instead of cutting the names off */
@media (max-height: 520px) {
  html.screen, html.screen body { height: auto; overflow: visible; }
  html.screen body { min-height: 100svh; }
  .side { position: static; height: auto; }
  .plain { position: static; transform: none; padding: 48px var(--pad); }
}

/* ---------- moving between pages: the name you clicked becomes the page's name ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*) { animation-duration: .36s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: .36s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
.ballwrap, .lock .hb { view-transition-name: ball; }
.lock .wm { view-transition-name: wordmark; }
html:not(.js) .lock .hb { view-transition-name: none; }

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