/* Victor Burton — site.css */

/* Two distinct families, named by their look — no weight juggling */
@font-face {
  font-family: "IBMRegular";
  src: url("/assets/courier_ibm/ttf_centered/CourierIBMCentered-Regular.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBMRegular";
  src: url("/assets/courier_ibm/ttf_centered/CourierIBMCentered-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBMBold";
  src: url("/assets/courier_ibm/ttf_centered/CourierIBMCentered-Bold.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBMBoldItalic";
  src: url("/assets/courier_ibm/ttf_centered/CourierIBMCentered-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  --color-bg: #FFFFFF;
  --color-fg: #1a1a1a;
  --color-muted: #6b6b66;
  --color-rule: #b7b3a8;
  --color-hover: #e8e2d0;

  --font-regular: "IBMRegular";
  --font-bold:    "IBMBold";
  --font-sans:    var(--font-regular);   /* legacy alias */
  --font-mono:    var(--font-regular);   /* legacy alias */
  --font-body:    var(--font-regular);

  --font-size: 12px;
  --font-size-sub: 12px;   /* dropdown sub-menu */
  --line-height: 1.0;
  --measure: 60ch;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;
}

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

html { font-size: var(--font-size); }

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--color-fg);
  background: var(--color-bg);
  padding: var(--space-3);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-rule);
  text-underline-offset: 0.2em;
}
a:hover, a:focus-visible { background: var(--color-hover); outline: none; }

ul { list-style: none; }

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

/* header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
}

.wordmark {
  font-family: var(--font-bold);
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.85;
  display: inline-block;
}
.wordmark:hover { background: transparent; }

.lang-toggle { display: inline-flex; font-family: var(--font-bold); font-size: 14px; color: var(--color-muted); }
.lang-toggle__link { text-decoration: none; }
.lang-toggle__link.is-active { color: var(--color-fg); text-decoration: underline; }
.lang-toggle__sep { padding: 0; color: var(--color-rule); }

/* dash rule — hidden */
.rule { display: none; }

/* main */
.site-main {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: var(--space-3) 0;
}
.site-main > * + * { margin-top: var(--space-2); }

.stance { color: var(--color-muted); font-style: italic; }

/* home menu */
.menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-family: var(--font-bold);
  font-size: 14px;
  text-transform: uppercase;
}
.menu a {
  text-decoration: none;
  display: inline-block;
  padding: 0.1em 0.3em;
  margin: -0.1em -0.3em;
  width: max-content;
}

/* headings */
h1, h2, h3 { font-weight: 400; font-family: inherit; }
.page-title { font-family: var(--font-bold); font-size: 14px; margin-bottom: var(--space-2); text-transform: uppercase; }
/* ¤ marker — only on hover (not focus, so it doesn't stick after click) */
.menu a:hover::after {
  content: "¤";
}

/* menu items: dots only, no background tint */
.menu a:hover, .menu a:focus-visible { background: transparent; }

/* menu branch — click-to-expand sub-menu rendered as an ASCII tree */
.menu-branch {
  display: block;
}
.menu-branch summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  padding: 0.1em 0.3em;
  margin: -0.1em -0.3em;
  width: max-content;
}
.menu-branch summary::-webkit-details-marker { display: none; }
.menu-branch summary::marker { content: ""; }
.menu-branch summary:hover::after,
.menu-branch[open] summary::after { content: "¤"; }

.menu-branch__sub {
  margin: var(--space-1) 0 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-bold);
  font-size: var(--font-size-sub);
  text-transform: none;
}
.menu-branch__sub li {
  padding: 0.05em 0;
  white-space: pre;
}
.menu-branch__sub li::before {
  content: "├─ ";
  color: var(--color-fg);
  font-family: var(--font-bold);
}
.menu-branch__sub li:last-child::before {
  content: "└─ ";
}
.menu-branch__sub a {
  text-decoration: none;
}
.menu-branch__sub a:hover { background: transparent; }
.section-title {
  font-size: 12px;
  color: var(--color-fg);
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}

/* catalog rows (installations, more) */
.catalog { display: flex; flex-direction: column; }
.catalog__row {
  display: grid;
  grid-template-columns: 6ch 1fr;
  gap: var(--space-2);
  padding: 0.25em 0;
  align-items: baseline;
}
.catalog__meta {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.catalog__title { text-decoration: none; }
.catalog__title:hover { background: var(--color-hover); }

/* discography rows */
.disco__row { grid-template-columns: 8ch 1fr; }
.disco__catnum {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.disco__link { text-decoration: none; }
.disco__link:hover { background: var(--color-hover); }
.disco__artist { font-style: italic; }
.disco__year { color: var(--color-muted); }

/* dates */
.dates__group { margin-top: var(--space-3); }
.dates__group:first-child { margin-top: 0; }
.dates__label {
  font-size: 12px;
  color: var(--color-fg);
  margin-bottom: var(--space-1);
}
.dates__list { display: flex; flex-direction: column; }
.dates__row {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: var(--space-2);
  padding: 0.25em 0;
  align-items: baseline;
}
.dates__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}

/* detail pages */
.work-meta { color: var(--color-muted); font-size: 12px; margin-bottom: var(--space-3); }

.work-hero { margin: var(--space-3) 0; }
.work-hero img, .work-hero video { width: 100%; height: auto; }
.work-hero iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

.rich-text { max-width: var(--measure); font-family: var(--font-body); font-size: 12px; }
.rich-text p + p { margin-top: var(--space-2); }
.rich-text li { padding: 0.15em 0; }
.rich-text em { font-style: italic; }
.rich-text strong { font-weight: 500; }

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.gallery figure { margin: 0; }
.gallery figcaption {
  color: var(--color-muted);
  font-size: 12px;
  margin-top: 0.5em;
}

.credits, .history { margin-top: var(--space-3); font-size: 12px; }
.credits dt, .history dt {
  font-weight: 700;
  color: var(--color-muted);
  margin-top: var(--space-1);
}
.credits dd, .history dd { margin-left: 0; }

.work-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-4);
  color: var(--color-muted);
}

/* footer */
.site-footer {
  margin-top: var(--space-3);
  color: var(--color-muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.site-footer a { text-decoration: none; }
.site-footer small { margin-left: auto; }   /* copyright stays bottom-right even with no home link */

/* 404 */
.blank-view {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--color-muted);
}

/* generic page centerpiece image — fixed at viewport center, sized between 4cm and 10cm */
.page-img {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(6cm, 40vmin, 18cm);
  height: auto;
  pointer-events: none;
}

/* home image — wrap pinned to viewport center; top half gets a wheel-driven red shift */
.home-img-wrap {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(6cm, 40vmin, 18cm);
  pointer-events: none;
}
.home-img {
  display: block;
  width: 100%;
  height: auto;
}
.home-img--base { position: relative; }
.home-img--top {
  position: absolute;
  inset: 0 0 auto 0;
  clip-path: inset(0 0 50% 0);
  filter: url(#home-red-shift);
}
/* project preview — square, laid over the home picture while a project link is hovered */
.home-img--preview {
  position: absolute;
  inset: 0;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  visibility: hidden;
}
.home-img--preview.is-visible { visibility: visible; }

/* responsive */
@media (max-width: 600px) {
  body { padding: var(--space-2); }
  .site-main { margin: var(--space-2) 0; }
  .catalog__row, .disco__row { grid-template-columns: 1fr; gap: 0.2em; }
  /* dates stay on one line: the entry runs on after the date and wraps
     full-width beneath it, instead of breaking onto its own row */
  .dates__row { display: block; padding: 0.3em 0; }
  .dates__row .dates__when { margin-right: 0.5em; }
}

.dates__footnote { margin-top: var(--space-2); color: var(--color-muted); font-size: 12px; }

/* project names in the dates list — bold via the IBMBold family, not font-weight */
.dates__what strong { font-family: var(--font-bold); font-weight: 400; }

/* dates: separate the three source blocks as distinct paragraphs */
.dates__list + .dates__list { margin-top: var(--space-3); }
.dates__sublabel { margin-top: var(--space-3); margin-bottom: var(--space-1); color: var(--color-fg); font-family: var(--font-bold); font-size: 12px; }
.dates__sublabel + .dates__list { margin-top: 0; }

/* contact form */
.contact-form { display: flex; flex-direction: column; gap: var(--space-2); max-width: 28ch; margin-top: var(--space-1); }
.contact-form__field { display: flex; flex-direction: column; gap: 0.3em; }
.contact-form__label { font-size: 12px; color: var(--color-muted); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-fg);
  background: transparent;
  border: 1px solid var(--color-rule);
  border-radius: 0;
  padding: 0.4em 0.5em;
  width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-fg); }
.contact-form textarea { resize: vertical; }
.contact-form__submit {
  font-family: var(--font-bold);
  font-size: 12px;
  color: var(--color-fg);
  background: transparent;
  border: 1px solid var(--color-rule);
  border-radius: 0;
  padding: 0.4em 0.9em;
  cursor: pointer;
  align-self: flex-start;
  text-transform: uppercase;
}
.contact-form__submit:hover { background: var(--color-hover); border-color: var(--color-fg); }

/* touch devices: hover sticks after a tap, so the ¤ lingered on a closed
   branch — show it only for branches that are actually open */
@media (hover: none) {
  .menu a:hover::after,
  .menu-branch summary:hover::after { content: none; }
  .menu-branch[open] summary::after { content: "¤"; }
}
