/* Shared by every page under /work. The tokens mirror index.html, which keeps
   its styles inline because it is the page that has to paint in one request.
   If a colour changes, change it in both. */
:root {
  --paper: #fbfbfa;
  --ink: #060606;
  --title: #313030;
  --text: #434445;
  --mute: #6f6d6b;
  --faint: #6f6d6b;
  --rule: #e3e2e0;
  --sunken: #f1f0ee;
  --accent: #8e2436;

  --sans: system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #191817; --ink: #f1eee9; --title: #ddd9d3; --text: #b4afa8;
    --mute: #969087; --faint: #8b857d; --rule: #2f2d2b; --sunken: #211f1e;
    --accent: #d4687c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.7;
  letter-spacing: -0.12px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; }

.wrap {
  max-width: 40rem; margin: 0 auto;
  padding: 3rem max(20px, env(safe-area-inset-left, 0px)) 6rem;
}
@media (min-width: 60rem) { .wrap { padding-top: 5rem; } }

.back {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.05px;
  text-transform: uppercase; color: var(--mute); display: inline-block; margin-bottom: 3rem;
}
.back:hover { color: var(--accent); }

.kicker {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.84px;
  text-transform: uppercase; color: var(--faint); margin: 0 0 0.9rem;
}
h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 300; letter-spacing: -0.03em;
  line-height: 1.25; color: var(--ink); margin: 0 0 1.2rem;
}
.hero .sub { margin: 0 0 1.6rem; max-width: 32em; color: var(--text); }

/* role and dates as a short definition list rather than a run-on line */
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.15rem 1.1rem; max-width: 30em; }
.facts dt {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.05px;
  text-transform: uppercase; color: var(--faint); line-height: 1.9;
}
.facts dd { margin: 0; font-size: 13.5px; line-height: 1.9; color: var(--mute); }

.xp-links { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.cta {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.05px;
  text-transform: uppercase; color: var(--accent); line-height: 1.9;
}
.cta::after { content: " \2192"; }
.cta.out::after { content: " \2197"; }
.cta:hover { text-decoration: underline; }

/* one section per question, in the order a reader would ask them */
.cs { margin-top: 3rem; }
.cs h2 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.84px; text-transform: uppercase;
  font-weight: 500; color: var(--ink); margin: 0 0 1.1rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule);
}
.cs p { margin: 0 0 1.15rem; max-width: 34em; }
.cs p:last-child { margin-bottom: 0; }

.shot { display: block; position: relative; overflow: hidden; background: var(--sunken); border-radius: 2px; }
.shot-x { aspect-ratio: 16 / 10; }
.shot-in {
  position: absolute; inset: 0; display: grid; align-content: center; gap: 0.25rem;
  padding: 0.6rem; text-align: center; overflow: hidden;
}
.shot-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.noimg img { display: none; }
.shot em {
  font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.3px;
  line-height: 1.3; color: var(--mute); overflow-wrap: anywhere;
}
.shot .cap { font-size: 11.5px; line-height: 1.4; color: var(--faint); }
.plates { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }

.wip {
  margin-top: 3rem; padding: 1rem 0 0; border-top: 1px solid var(--rule);
  font-size: 13px; line-height: 1.7; color: var(--mute); max-width: 34em;
}

/* the work index: four case studies as one set */
.worklist { list-style: none; margin: 3rem 0 0; padding: 0; }
.worklist li { border-top: 1px solid var(--rule); }
.worklist li:last-child { border-bottom: 1px solid var(--rule); }
.worklist a { display: block; padding: 1.6rem 0; }
.worklist h2 {
  font-size: 16px; font-weight: 500; color: var(--ink); margin: 0 0 0.5rem;
  transition: color 0.18s ease;
}
.worklist h2::after { content: " \2192"; color: var(--accent); font-family: var(--mono); font-size: 11px; }
.worklist .sub { margin: 0 0 0.6rem; max-width: 34em; color: var(--text); }
.worklist .meta {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.05px; text-transform: uppercase;
  color: var(--faint); margin: 0;
}
.tag {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1.05px; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.15rem 0.4rem; vertical-align: 2px; margin-left: 0.4rem;
}
.worklist h2 .tag::after { content: none; }
@media (hover: hover) { .worklist a:hover h2 { color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .worklist h2 { transition: none; } }

.related { margin-top: 3rem; }
.related h2 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.84px; text-transform: uppercase;
  font-weight: 500; color: var(--ink); margin: 0 0 1rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule);
}
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.related a { font-size: 14px; color: var(--title); font-weight: 500; }
.related a:hover { color: var(--accent); }
.related span { display: block; color: var(--mute); font-size: 13px; line-height: 1.6; }

footer.end {
  margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; align-items: baseline;
}
footer.end a {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.05px;
  text-transform: uppercase; color: var(--mute); line-height: 1.9;
}
footer.end a:hover { color: var(--accent); }
