/* ==========================================================
   Portfolio — shared stylesheet
   Edit the variables below to change colours and fonts site-wide.
   ========================================================== */

:root {
  --bg: #000;               /* black, so the photo melts into the page */
  --ink: #e9e9e6;
  --muted: #8b8b88;
  --rule: #e9e9e6;
  --faint: #2a2a2a;
  --mark: #fff35c;          /* yellow highlight (active nav, hover, selection) */
  --on-mark: #000;          /* text on the highlight */
  --link: #9a9aff;          /* links in small text */
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;  /* main text font */
  --gutter: clamp(16px, 3vw, 40px);
  --label-col: 160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  padding: 0 var(--gutter) 80px;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { background: var(--mark); color: var(--on-mark); }

::selection { background: var(--mark); color: var(--on-mark); }

/* ---------- header / nav ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
}

.site-header a {
  display: block;
  text-decoration: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 6px 0 8px;
  min-width: 70px;
}

.site-header .name { max-width: 90px; }

.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }

.site-header a[aria-current="page"] { background: var(--mark); color: var(--on-mark); }

/* computers: the menu stays at the top while the page scrolls under it */
@media (min-width: 721px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    padding-bottom: 16px;
  }
}

/* ---------- labelled sections (the "_bio" pattern) ---------- */

.section {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: 24px;
  margin-top: 96px;
}

.label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
}

.lead {
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 30em;
}

.lead p + p { margin-top: 0.8em; }

/* ---------- home: photo beside bio and events ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 56px;
}

.home .hero { position: sticky; top: 100px; }   /* below the fixed menu */

.home-text section { margin-top: 32px; }
.home-text .label { font-weight: 400; padding-top: 0; margin-bottom: 10px; }

/* three short lines, each on its own row */
.bio {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.bio p:first-child { margin-bottom: 0.5em; }

.hero-frame { position: relative; background: #000; }

.hero img { width: 100%; height: auto; }   /* whole photo, never cropped */

/* canvas sits exactly over the photo; it only differs from it while the effect runs */
.hero-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: none;             /* the pointer disappears into the image */
  touch-action: pan-y;
}

.caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- event lists (upcoming / previous) ---------- */

.events { list-style: none; border-top: 1px solid var(--rule); }

.events li {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  gap: 16px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--faint);
  align-items: baseline;
}

.events .date { font-family: var(--mono); font-size: 12px; }
.events .title { font-size: 17px; }
.events .where { color: var(--muted); }
.events .more { font-family: var(--mono); font-size: 12px; }

.events.past .title { font-size: 15px; }

/* compact version used on the home page: date → title, venue */
/* dense: no lines between events, tight rows, so every event fits without a long page */
.events.compact { padding-top: 6px; }
.events.compact li {
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 3px 0 4px;
  border-bottom: 0;
}
.events.compact .title { font-size: 15px; }
.events.compact .where { color: var(--muted); }
.events.compact .what { font-size: 14px; }

/* event text a little softer than pure white (the city stays grey) */
.events.compact li { color: #c6c6c2; }

/* _upcoming slightly roomier, _previous a bit tighter */
#upcoming li { padding: 5px 0 6px; }
#upcoming .what { font-size: 15px; }
.events.compact.past li { padding: 2px 0 2px; }
.events.compact.past .what { font-size: 13.5px; }
.events .tag { font-family: var(--mono); font-size: 11px; color: var(--link); }   /* [Live], [Release] … in purple */
.events .city { color: var(--muted); }

/* linked events: plain text with a small arrow; on hover just a thin underline */
.events .what a { text-decoration: none; }
.events .what a::after { content: " ↗"; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.events .what a:hover { background: none; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.events li.none { display: block; color: var(--muted); font-size: 15px; }



/* ---------- portfolio index ---------- */

.index-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 64px;
  margin-top: 48px;
}

/* side index: the same list of works on the portfolio and every work page */
.index-side {
  position: sticky;
  top: 100px;                 /* below the fixed menu */
  align-self: start;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  /* a thin line separates the index from the page content */
  border-right: 1px solid #333;
  padding-right: 24px;
  min-height: calc(100vh - 140px);
}
.index-side .all { display: inline-block; margin-bottom: 20px; }
.index-side h3 { font-weight: 400; font-size: 12px; color: var(--muted); margin: 20px 0 6px; }
.index-side ul { list-style: none; }
.index-side li { padding: 2px 0; }
.index-side a { color: var(--link); text-decoration: none; }
.index-side a:hover,
.index-side a[aria-current="page"] { background: var(--mark); color: var(--on-mark); }

.intro { font-size: clamp(20px, 2vw, 28px); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 48px; max-width: 26em; }

.group-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin: 56px 0 20px;
}
.group-title:first-of-type { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 24px;
}

.card { text-decoration: none; display: block; }
.card:hover { background: none; }
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--faint); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card h4 { font-size: 16px; font-weight: 500; margin-top: 10px; }
.card:hover h4 { background: var(--mark); color: var(--on-mark); display: inline; }
.card p { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- single work page ---------- */

.work-head { margin-top: 96px; }
.work-head .back { font-family: var(--mono); font-size: 12px; }
.work-head h1 {
  font-size: clamp(34px, 6vw, 80px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 24px;
}

.meta {
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}
.meta span { color: var(--muted); display: inline-block; min-width: 96px; }

.media { margin-top: 56px; display: grid; gap: 24px; }
.media.two { grid-template-columns: 1fr 1fr; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- installation pages ----------
   Computers: a side index of all works on the left, then one reading
   column (title, photo, text, info, video, photos).
   Phones: no side index; photo first, then title and text, video, photos. */
.work-page { margin-top: 32px; }
.work { display: flex; flex-direction: column; gap: 24px; }
.work-main { order: 1; }
.work-title { order: 2; }
.work-body { order: 3; margin-top: -8px; }
.work-video { order: 4; margin-top: 8px; }
.thumbs, .work-gallery { order: 5; }

.work-main img { width: 100%; }
.work-title .back { font-family: var(--mono); font-size: 12px; }
.work-title h1 {
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 18px;
}
.work-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.work-about { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.45; margin-bottom: 22px; }
.work-about p + p { margin-top: 0.7em; }

/* click-to-play video: a still with a yellow play button */
.yt-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.yt-play { overflow: hidden; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity .3s ease; }
/* YouTube's own stills: zoomed a touch to hide the black bars it adds to wider-than-16:9 videos */
.yt-play img[src*="ytimg"] { transform: scale(1.08); }
.yt-play:hover img, .yt-play:focus-visible img { opacity: 1; }
.yt-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 18px 11px;
  background: var(--mark);
  color: var(--on-mark);
}
.yt-play:hover .yt-btn, .yt-play:focus-visible .yt-btn { padding: 12px 22px 13px; }
.video-link { font-family: var(--mono); font-size: 12px; margin-top: 10px; }

/* the other photos: one wide on top, the rest side by side underneath */
.thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.thumbs a { aspect-ratio: 4 / 3; }
.thumbs a:first-child { aspect-ratio: 16 / 9; }
.thumbs a:first-child { grid-column: 1 / -1; }
.thumbs a { position: relative; display: block; min-height: 0; overflow: hidden; background: #111; }
.thumbs a:hover { background: #111; }
.thumbs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .3s ease;
  opacity: 0.85;
}
.thumbs a:hover img { transform: scale(1.04); opacity: 1; cursor: zoom-in; }

.thumbs:has(> a:nth-child(4)) a:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* click a photo: it opens large over the page; click anywhere or Esc to close */
.lightbox {
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: var(--gutter);
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.work-gallery .caption { margin-top: 10px; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; }

/* computers: side index + one reading column */
@media (min-width: 721px) {
  .work-page {
    display: grid;
    grid-template-columns: 200px minmax(0, 680px);
    gap: 64px;
    margin-top: 48px;
  }

  .work { gap: 28px; }
  .work > * { order: 0; }
  .work-title .back { display: none; }      /* the side index has "all works" */
  .work-title h1 { font-size: 40px; margin-top: 0; }
  .work-body { margin-top: 0; }
  .work-video { margin-top: 0; }
  .work-about {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 28px;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
  }

  /* other photos: small, side by side (three in a row, or 2×2 for four) */
  .thumbs { grid-template-columns: repeat(3, 1fr); }
  .thumbs:has(> a:nth-child(4)) { grid-template-columns: 1fr 1fr; }
  .thumbs a, .thumbs a:first-child, .thumbs:has(> a:nth-child(4)) a:last-child { grid-column: auto; aspect-ratio: 16 / 9; }
}

.credits { font-size: 15px; max-width: 36em; }
.credits p + p { margin-top: 0.6em; }

.pager {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
  margin-top: 96px;
}

/* ---------- music page ---------- */
/* compact list: small square cover on the left, title and details beside it */
.music { max-width: 760px; margin-top: 48px; }
.release {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid #222;
}
.music .group-title + .release { border-top: 0; padding-top: 4px; }
.release .cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #0b0b0b; }
.release .cover:hover { background: #0b0b0b; }
.release .cover img { width: 100%; height: 100%; object-fit: cover; }
.release .cover.blank { border: 1px solid #333; display: flex; align-items: flex-end; padding: 10px; }
.release .cover.blank span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.release h3 { font-size: 20px; font-weight: 400; line-height: 1.25; }
.release .rel-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
.release .meta { margin-top: 10px; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 120px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .site-header { flex-direction: column; }
  .site-header .name { max-width: none; }
  .site-header nav { justify-content: flex-start; gap: 14px; }
  .site-header a { min-width: 0; }

  .section, .index-layout { grid-template-columns: 1fr; gap: 12px; margin-top: 64px; }
  .index-side { position: static; display: none; }

  .events li { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .events .date { grid-column: 1 / -1; }
  .events .where { grid-column: 1; }
  .events .more { grid-row: 2; grid-column: 2; }

  .home { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .home .hero { position: static; }
  .events.compact li { grid-template-columns: 84px 1fr; }
  .events.compact .date { grid-column: auto; }

  .media.two { grid-template-columns: 1fr; }
  .release { grid-template-columns: 96px 1fr; gap: 16px; }
  .music { margin-top: 24px; }
}

/* a card with no photo yet: an empty dark tile with a small mono label */
.card .thumb.blank { background: #0b0b0b; border: 1px solid #333; display: flex; align-items: flex-end; padding: 12px; }
.card .thumb.blank span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card:hover .thumb.blank { border-color: var(--link); }

/* ensemble name right under the title (The Vacuumcleaners pages) */
.work-by { font-size: 19px; color: #c6c6c2; margin-top: 4px; }

/* bigger gallery (seven photos): one wide on top, then the rest in squares (phone)
   or a row of landscape crops and a row of tall ones (desktop) */
.thumbs.mixed a, .thumbs.mixed:has(> a:nth-child(4)) a:last-child { grid-column: auto; aspect-ratio: 1 / 1; }
.thumbs.mixed a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.thumbs.mixed a:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 721px) {
  .thumbs.mixed, .thumbs.mixed:has(> a:nth-child(4)) { grid-template-columns: repeat(3, 1fr); }
  .thumbs.mixed a { aspect-ratio: 4 / 3; }
  .thumbs.mixed a:nth-child(n+5) { aspect-ratio: 4 / 5; }
  .thumbs.mixed a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .thumbs.mixed a:last-child:nth-child(even),
  .thumbs.mixed:has(> a:nth-child(4)) a:last-child { grid-column: auto; aspect-ratio: 4 / 5; }
}

/* long meta lines (credits) wrap under the value, not under the label */
.meta li { padding-left: 96px; text-indent: -96px; }
.meta li span { text-indent: 0; }

/* performances row: four cards across, the rest reached by scrolling sideways */
.slider { position: relative; }
.grid.scroll {
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 3 * 24px) / 4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.grid.scroll::-webkit-scrollbar { display: none; }
.grid.scroll .card { scroll-snap-align: start; }
.slide-btn {
  position: absolute; top: calc((100% - 60px) / 2); z-index: 2;
  font-family: var(--mono); font-size: 16px; line-height: 1;
  width: 36px; height: 36px; border: 0; cursor: pointer;
  background: var(--mark); color: var(--on-mark);
}
.slide-btn.next { right: -18px; }
.slide-btn.prev { left: -18px; }
.slide-btn[hidden] { display: none; }
@media (max-width: 720px) {
  .grid.scroll { grid-auto-columns: 78%; gap: 16px; }
  .slide-btn.next { right: 0; }
  .slide-btn.prev { left: 0; }
}
.index-layout > main { min-width: 0; }   /* lets the sideways row scroll instead of widening the page */
.slider { max-width: 100%; }
/* wide screens: always four cards across, so both rows line up */
@media (min-width: 1100px) { .grid:not(.scroll) { grid-template-columns: repeat(4, 1fr); } }

/* side index: one line per work (long titles end in …, full name on hover),
   and the links alternate between two close purples so neighbours read apart */
.index-side li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.index-side li:nth-child(even) a { color: #c2a6ff; }
.index-side li a[aria-current="page"], .index-side li a:hover { color: var(--on-mark); }
