/* Layout: a black light-table. Framed 4-column contact grid with hairline
   brackets; two panels (films / photo albums) side by side, slid into view.
   Each block is labelled vertically in the left margin. */
:root {
  --bg: #060606;
  --fg: #f1efea;
  --muted: #8d8b86;
  --line: #5f5d59;
  --scrim: rgba(6, 6, 6, 0.96);

  --font-mark: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gap: 20px;
  --gutter: 72px;
  --ease: cubic-bezier(.77, 0, .18, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

.site {
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 40px 28px;
}

/* ---------- header ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
}
.brand { display: flex; flex-direction: column; gap: 14px; }
.name {
  font-family: var(--font-mark);
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.switch { display: flex; gap: 22px; }
.switch-link,
.meta-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.switch-link:hover, .meta-link:hover { color: var(--fg); }
.switch-link.is-active { color: var(--fg); border-bottom-color: var(--fg); }
.meta { display: flex; align-items: center; gap: 30px; padding-top: 6px; }
.meta-link { color: var(--fg); font-size: 15px; }
.ig { display: inline-flex; margin-bottom: 4px; color: var(--fg); transition: color .25s; }
.ig:hover { color: var(--muted); }
.ig svg { display: block; width: 21px; height: 21px; }

/* ---------- work area ---------- */
/* The viewport clips the sliding track. It reaches into the left margin so
   each panel carries its own block labels and hairlines when it slides. */
.viewport {
  overflow: hidden;
  margin-left: calc(var(--gutter) * -1);
  transition: height .7s var(--ease);
}
.track {
  display: flex;
  width: 200%;
  transition: transform .95s var(--ease);
  will-change: transform;
}
.track.show-photography { transform: translateX(-50%); }
.panel { flex: 0 0 50%; min-width: 0; align-self: flex-start; padding-left: var(--gutter); }

.blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.block { position: relative; }
.block-label {
  position: absolute;
  left: calc(var(--gutter) * -0.62);
  top: 16px;
  margin: 0;
  writing-mode: vertical-rl;
  font-size: 12.4px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 12px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.tile::before {                       /* vertical hairline, left of each tile */
  content: "";
  position: absolute;
  left: calc(var(--gap) / -2);
  top: 10px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.tile.big { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.grid.big-right .tile.big { grid-column: 3 / span 2; }

.label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 1.4em;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg);
}
.label .ttl { overflow: hidden; text-overflow: ellipsis; }
.label .count { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

.media {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}
/* A tile whose video or photo can't be found stays as plain black space. */
.tile.is-empty .label { visibility: hidden; }
.tile.is-empty .media { cursor: default; pointer-events: none; }
.tile.big .media { flex: 1 1 0; aspect-ratio: auto; min-height: 22vw; }
.media video,
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
/* With a mouse: the tile under the cursor pushes in a little. */
@media (hover: hover) and (pointer: fine) {
  .media:hover video, .media:hover img { transform: scale(1.035); }
}
#panel-photography .media { cursor: pointer; }

.foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 36px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- contact sheet ---------- */
.sheet, .viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--scrim);
  animation: fade .35s ease both;
}
.sheet-inner {
  max-width: 1480px;
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: calc(40px + env(safe-area-inset-top, 0px)) 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.close {
  align-self: flex-end;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.sheet-body { margin-top: 12vh; max-width: 100%; }
.sheet-kicker {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list { margin: 0; display: grid; gap: 22px; }
.contact-list div { display: grid; gap: 4px; }
.contact-list dt {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.contact-list dd {
  margin: 0;
  font-family: var(--font-mark);
  font-size: clamp(18px, 2.6vw, 32px);
  overflow-wrap: anywhere;
}
.contact-list a,
.copy-email { border-bottom: 1px solid var(--line); }
.contact-list a:hover,
.copy-email:hover { border-bottom-color: var(--fg); }
.copy-email {
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: copy;
}
.copied-note {
  display: inline-block;
  margin-left: 16px;
  font-family: var(--font-text);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--fg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s, transform .25s;
}
.is-copied .copied-note { opacity: 1; transform: none; }

/* ---------- photo album ---------- */
.album {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: rise .5s var(--ease) both;
}
.album-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: calc(40px + env(safe-area-inset-top, 0px)) 72px;
}
.album-top { display: flex; justify-content: space-between; align-items: center; }
.back {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .25s;
}
.back:hover { color: var(--fg); }
.album-title {
  margin: 56px 0 10px;
  font-family: var(--font-mark);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 56px);
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}
.album-count {
  margin: 0 0 40px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.album-photos { columns: 3; column-gap: var(--gap); }
.album-photo {
  display: block;
  width: 100%;
  margin-bottom: var(--gap);
  break-inside: avoid;
  cursor: zoom-in;
}
.album-photo img { display: block; width: 100%; height: auto; }

/* ---------- large viewer ---------- */
.viewer {
  z-index: 30;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  padding-block: calc(56px + env(safe-area-inset-top, 0px)) calc(28px + env(safe-area-inset-bottom, 0px));
}
.viewer .close { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); right: 28px; }
.viewer-stage { margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.viewer-media { display: flex; justify-content: center; }
.viewer-media video,
.viewer-media img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
}
.viewer figcaption {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
}
.step {
  height: 100%;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.step:hover { color: var(--fg); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  :root { --gutter: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.big, .grid.big-right .tile.big { grid-column: 1 / -1; grid-row: auto; }
  .tile.big .media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .block-label { position: static; writing-mode: horizontal-tb; margin: 6px 0 12px; color: var(--muted); }
  .album-photos { columns: 2; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; --gap: 14px; }
  .site { padding-block: 24px 20px; }
  .top { flex-direction: column; margin-bottom: 27px; gap: 18px; }
  .meta { padding-top: 0; gap: 22px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .album-photos { columns: 1; }
  .album-title { margin-top: 36px; }
  .viewer { grid-template-columns: minmax(0, 1fr); }
  .viewer .step { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); height: auto; }
  .viewer .prev { left: 16px; }
  .viewer .next { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .track, .viewport, .media video, .media img, .copied-note { transition: none; }
  .sheet, .viewer, .album { animation: none; }
}
