/* Layout: full-window generative canvas fixed behind; one column of white boxes scrolls over it,
   with gaps so the pattern shows between boxes. Deliberately single-theme: boxes stay white. */
:root {
  --paper: #ffffff;
  --ink: #1d1f22;
  --ink-soft: #5b5f66;
  --rule: #e3e4e6;
  --plain: #e4e5e7;          /* background when the animation is switched off */
  --link: #1f4fa3;
  --ground: #e57615;          /* the sketch's starting orange, shown before the canvas paints */
  --font-text: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
}
#bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block; z-index: 0;
}
.page {
  position: relative; z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding-block: 40px 120px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 28px;
}
.box {
  background: var(--paper);
  padding: 28px 32px;
}
@media (max-width: 520px) { .box { padding: 20px 18px; } body { font-size: 16px; } }

/* header */
.site-head { display: flex; flex-direction: column; gap: 14px; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.bg-toggle { font-family: var(--font-mono); font-size: 0.75rem; cursor: pointer; padding: 5px 9px;
  background: var(--paper); color: var(--ink-soft); border: 1px solid var(--rule); }
.bg-toggle:hover { color: var(--ink); border-color: var(--ink); }
body.plain { background: var(--plain); }
.site-name { margin: 0; font-size: 1.9rem; font-weight: 600; line-height: 1.15; text-wrap: balance; }
.site-name span { font-weight: 400; font-style: italic; color: var(--ink-soft); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--ink); }

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 14px; text-wrap: balance; }
h3 { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin: 26px 0 10px; }
h3:first-of-type { margin-top: 0; }
p { margin: 0 0 1em; max-width: 65ch; }
p:last-child { margin-bottom: 0; }

/* photo */
.photo { padding: 0; width: 80%; }
@media (max-width: 520px) { .photo { width: 100%; } }
.photo img { display: block; width: 100%; height: auto; }
.photo figcaption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); padding: 10px 16px; }
figure { margin: 0; }

.bio-links { font-size: 0.92rem; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding-bottom: 14px; margin-bottom: 18px; }

/* events */
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.events li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.events li:last-child { border-bottom: 1px solid var(--rule); }
.events time { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); padding-top: 3px; font-variant-numeric: tabular-nums; }
.events .what { min-width: 0; }
@media (max-width: 520px) { .events li { grid-template-columns: 1fr; gap: 2px; } }
.empty { color: var(--ink-soft); font-style: italic; margin: 0; }
.archive-link { display: inline-block; margin-top: 18px; font-family: var(--font-mono); font-size: 0.85rem; }

.site-foot { font-family: var(--font-mono); font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--ink-soft); }


/* ---------- page titles, used on Projects and Writings ---------- */
h1 { font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
.page-note { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- lists of projects and writings ----------
   Each entry is one <li>: a title line, then optional notes and links. */
.entry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.entry-list > li { padding: 16px 0; border-top: 1px solid var(--rule); min-width: 0; }
.entry-list > li:last-child { border-bottom: 1px solid var(--rule); }
.entry-list p { margin: 0; }
.entry-list p + p { margin-top: 6px; }
.entry-title { font-weight: 600; }
.entry-note { color: var(--ink-soft); font-size: 0.94rem; }
.entry-links { font-family: var(--font-mono); font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------- Works page ---------- */
.year-group { margin-top: 28px; }
.year-group h2 { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; letter-spacing: 0.04em;
  margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.works-list { padding-left: 1.5rem; }
.year-group > .page-note { padding-left: 1.5rem; }
@media (max-width: 520px) { .works-list, .year-group > .page-note { padding-left: 0.9rem; } }
.works-list ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 0.94rem; color: var(--ink-soft); }

/* filter panel */
.filter { border: 1px solid var(--ink); padding: 18px 20px; margin: 20px 0 10px;
  display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 520px) { .filter { padding: 14px; } }
.filter-title { font-size: 1.05rem; margin: 0; }
.filter-more { border: 1px solid var(--rule); }
.filter-more[open] { border-color: var(--ink); }
.filter-more summary { cursor: pointer; padding: 9px 12px; font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.02em; list-style: none; display: flex; align-items: center; gap: 10px; }
.filter-more summary::-webkit-details-marker { display: none; }
.filter-more summary::before { content: "+"; display: inline-block; width: 1ch; font-weight: 500; }
.filter-more[open] summary::before { content: "−"; }
.filter-more summary:hover { background: var(--rule); }
.filter-more summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.filter-active { color: var(--ink-soft); }
.filter-more-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.filter fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-row { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-label { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0; }
#f-search { font: inherit; font-size: 0.95rem; padding: 7px 10px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); width: 100%; max-width: 26rem; }
#f-search:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.inst-groups { display: flex; flex-direction: column; gap: 10px; }
.inst-group { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 12px; align-items: start; }
.inst-group-name { font-size: 0.85rem; color: var(--ink-soft); padding-top: 5px; }
@media (max-width: 620px) { .inst-group { grid-template-columns: 1fr; } .inst-group-name { padding-top: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; font-size: 0.85rem; line-height: 1.3; padding: 4px 9px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.chip-count { font-family: var(--font-mono); font-weight: 400; font-size: 0.72rem; color: var(--ink-soft); }
.chip.is-empty span { color: var(--ink-soft); border-style: dashed; }
.filter-options { flex-direction: row; flex-wrap: wrap; gap: 14px 32px; align-items: flex-end; }
.match { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.match label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.filter-clear { font-family: var(--font-mono); font-size: 0.78rem; cursor: pointer; padding: 6px 10px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink); margin-left: auto; }
.filter-count { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
.filter-empty { font-style: italic; color: var(--ink-soft); }

/* ---------- a single work's page ---------- */
.crumb { font-family: var(--font-mono); font-size: 0.82rem; margin: 0 0 14px; }
.work-year { font-weight: 400; color: var(--ink-soft); font-size: 0.8em; }
.work-forces { font-size: 1.02rem; }
.work-about { margin-top: 10px; }
.work-about ul { padding-left: 1.2em; }
.work-page h2 { margin-top: 28px; }
.todo { color: var(--ink-soft); font-style: italic; }

/* ---------- project pages ---------- */
.project-page h1 { font-size: 1.45rem; }
.project-page h2 { margin-top: 30px; }
.project-page ol, .project-page ul:not(.entry-list) { padding-left: 1.3em; max-width: 65ch; }
.project-page li + li { margin-top: 6px; }
.project-note { border-left: 3px solid var(--ink); padding: 4px 0 4px 14px; }
blockquote { margin: 18px 0; padding: 0 0 0 18px; border-left: 1px solid var(--rule); font-style: italic; max-width: 62ch; }
blockquote .cite { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); }
blockquote .cite::before { content: "– "; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 18px; margin: 20px 0; }
.gallery-wide { grid-template-columns: 1fr; }
.gallery figure, .figure-wide { margin: 0; min-width: 0; }
.gallery img, .figure-wide img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.gallery figcaption, .figure-wide figcaption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); margin-top: 6px; }
.figure-wide { margin: 16px 0; }
.references { font-size: 0.92rem; }

/* ---------- event archive ---------- */
.archive-list { padding-left: 1.5rem; }
@media (max-width: 520px) { .archive-list { padding-left: 0.9rem; } }
.archive-list .what ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 0.94rem; }
.kind, .status { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--rule); padding: 0 5px; margin-right: 8px;
  vertical-align: 2px; }
.status { color: var(--ink); border-color: var(--ink); }
.archive-list .entry-links { display: inline-flex; margin-left: 6px; }

/* performances and media on a single work's page */
.perf-list { margin-top: 4px; }
.media-list { padding-left: 1.2em; max-width: 65ch; }
.media-list li + li { margin-top: 6px; }
.work-page .kind { margin-right: 8px; }

/* ---------- thumbnail images beside works and events ---------- */
.thumb { float: right; width: 96px; height: 96px; object-fit: cover; margin: 2px 0 8px 16px; border: 1px solid var(--rule); }
@media (max-width: 520px) { .thumb { width: 72px; height: 72px; margin-left: 12px; } }
.works-list > li, .events .what { display: flow-root; }
.work-image { float: right; width: 200px; max-width: 40%; height: auto; margin: 0 0 12px 20px; border: 1px solid var(--rule); }
.work-about { display: flow-root; }

/* Information section on a work's page */
.facts { display: grid; grid-template-columns: 9rem 1fr; gap: 8px 16px; margin: 0; max-width: 70ch; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: 4px; }
.facts dd { margin: 0; min-width: 0; }
.facts dd p { margin: 0 0 6px; }
.facts dd ul { margin: 4px 0 0; padding-left: 1.2em; }
.facts dd a + a { margin-left: 14px; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }

/* Recordings section on the Works page */
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.jump a { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 6px 14px; border: 1px solid var(--ink); }
.jump a:hover { background: var(--ink); color: var(--paper); }
.recordings { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--ink); }
.recordings h2 { font-size: 1.25rem; margin: 0 0 4px; }
.recording-list { list-style: none; margin: 14px 0 0; padding: 0 0 0 1.5rem; display: flex; flex-direction: column; }
@media (max-width: 520px) { .recording-list { padding-left: 0.9rem; } }
.recording { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); min-width: 0; }
.recording:last-child { border-bottom: 1px solid var(--rule); }
.recording > * { grid-column: 2; margin: 0; min-width: 0; }
.recording > p + p { margin-top: 4px; }
.recording .cover { grid-column: 1; grid-row: 1 / span 5; width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--rule); }
.cover-none { display: block; background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 6px, var(--rule) 6px, var(--rule) 7px); }
@media (max-width: 520px) { .recording { grid-template-columns: 64px 1fr; column-gap: 12px; } .recording .cover { width: 64px; height: 64px; } }

/* ---------- click-to-enlarge images (lightbox.js) ---------- */
a.zoom { display: block; cursor: zoom-in; }
a.zoom:hover img { border-color: var(--ink); }
a.zoom:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; margin: 0; }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lightbox::backdrop { background: rgba(20, 20, 22, 0.88); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  max-width: calc(100vw - 32px); pointer-events: none; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); width: auto; height: auto;
  background: var(--paper); border: 0; pointer-events: auto; }
.lightbox figcaption { font-family: var(--font-mono); font-size: 0.8rem; color: #e6e6e6; text-align: center; pointer-events: auto; }
.lightbox figcaption a { color: #fff; }
.lightbox-bar { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.8rem; color: #e6e6e6; }
.lightbox-bar button { font: inherit; cursor: pointer; padding: 6px 12px; background: var(--paper); color: var(--ink); border: 0; }
.lightbox-bar button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* expandable group inside the Recordings list (e.g. Improvisations) */
.recording-group { padding: 14px 0; border-top: 1px solid var(--rule); }
.recording-group details { border: 1px solid var(--rule); }
.recording-group details[open] { border-color: var(--ink); }
.recording-group summary { cursor: pointer; padding: 10px 12px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.recording-group summary::-webkit-details-marker { display: none; }
.recording-group summary::before { content: "+"; font-family: var(--font-mono); font-weight: 500; width: 1ch; }
.recording-group details[open] summary::before { content: "−"; }
.recording-group summary:hover { background: var(--rule); }
.recording-group summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.group-count { font-family: var(--font-mono); font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.recording-group .recording-list { margin: 0; padding: 0 12px 4px; }
.recording-group .recording:last-child { border-bottom: 0; }

/* footer links (Instagram, LinkTree) */
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }

.icon-link { display: inline-flex; align-items: center; gap: 7px; }
.icon-link img { height: 20px; width: auto; display: block; }

/* logo beside a project's text (e.g. Enact on Practice Research) */
.project-logo { float: right; width: 140px; max-width: 35%; margin: 4px 0 12px 22px; }
.project-logo img { display: block; width: 100%; height: auto; }
.project-page { display: flow-root; }

/* ---------- contact page ---------- */
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 34rem; margin-top: 18px; }
.contact-form .field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.contact-form label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.contact-form input, .contact-form textarea { font: inherit; font-size: 1rem; padding: 9px 11px; border: 1px solid var(--ink-soft);
  background: var(--paper); color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.send-button { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer;
  padding: 10px 18px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.send-button:hover { background: var(--paper); color: var(--ink); }
.form-message { padding: 10px 14px; border-left: 3px solid var(--ink); background: var(--rule); }
.form-error { border-left-color: #a3281b; }

/* A section whose only content is "To be added." stays hidden until it is filled in */
.todo, h2:has(+ .todo) { display: none; }

/* Strata player */
.player { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 12px; }
.player video { width: 100%; max-width: 640px; background: #000; }
.player-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.button { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; cursor: pointer; padding: 8px 14px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.button:hover { background: var(--paper); color: var(--ink); }
.button-quiet { background: var(--paper); color: var(--ink); }
.button-quiet:hover { background: var(--ink); color: var(--paper); }

/* small logo next to a link, e.g. the ORCID iD on the home page */
.inline-icon { display: inline-block; width: 16px; height: 16px; vertical-align: -2px; }
