/* =========================================================
   Aaron Lysaght Walsh — portfolio styles
   1. Fonts        2. Design tokens   3. Base
   4. Layout       5. Header & nav    6. Hero & evidence notes
   7. Sections     8. Features        9. Plates & figures
   10. Small parts 11. Closing        12. Footer
   13. Lightbox    14. Placeholder pages
   15. Motion      16. Responsive
   To change a colour or size everywhere, edit section 2.
   ========================================================= */

/* 1. Fonts (self-hosted, Latin subset, SIL Open Font Licence) */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/plex-sans-500.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 2. Design tokens */
:root {
  --paper: #F6F4EF;
  --ink: #16181D;
  --graphite: #5B5F66;
  --rule: #DAD6CC;
  --plate: #ECE8DF;
  --green: #0F5F4E;
  --green-tint: #E3EEE9;
  --amber: #8F5B0A;
  --on-green: #F6F4EF;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.875rem);
  --step-hero: clamp(2.75rem, 1.4rem + 5.6vw, 5.75rem);

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1200px;
  --measure: 36rem;
  --space-section: clamp(64px, 7.5vw, 112px);
  --radius-plate: 6px;
  --radius-control: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121418;
    --ink: #ECE9E2;
    --graphite: #A3A7AE;
    --rule: #2A2E35;
    --plate: #1B1E23;
    --green: #5CC3A4;
    --green-tint: #17322B;
    --amber: #E3A64A;
    --on-green: #0E1A16;
  }
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 500; }
::selection { background: var(--green-tint); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-control);
}
.skip-link:focus { top: 12px; }

/* 4. Layout */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* 5. Header & nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); /* solid on purpose: a backdrop-filter here would trap the fixed mobile menu */
  border-bottom: 1px solid var(--rule);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 24px; }
.wordmark {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 2.4vw, 32px); }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  padding-block: 6px; background: linear-gradient(var(--green), var(--green)) left bottom / 0 1px no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background-size: 100% 1px; }
.nav-toggle {
  display: none; font: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--ink);
  background: none; border: 1px solid var(--rule); border-radius: var(--radius-control);
  padding: 8px 14px; min-height: 44px; cursor: pointer;
}

/* 6. Hero & evidence notes */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  column-gap: clamp(40px, 6vw, 88px);
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(64px, 7vw, 104px);
}
.hero__head { grid-column: 1 / -1; }
.hero__place { font-size: var(--step--1); color: var(--graphite); margin-bottom: 24px; }
.hero__title {
  font-size: var(--step-hero);
  font-weight: 380;
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: wrap;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.br-narrow { display: none; }
@media (max-width: 560px) { .br-narrow { display: inline; } }
.hero__intro { max-width: var(--measure); font-size: var(--step-1); line-height: 1.55; }
.hero__intro p { margin-bottom: 0.9em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__open { margin-top: 28px; font-size: var(--step--1); color: var(--graphite); max-width: var(--measure); }

.notes { align-self: start; border-left: 1px solid var(--rule); padding-left: clamp(20px, 2.4vw, 32px); }
.notes__title { font-family: var(--font-text); font-size: var(--step--1); font-weight: 500; color: var(--graphite); letter-spacing: 0; margin-bottom: 20px; }
.notes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.note {
  position: relative; display: grid; grid-template-columns: 2.1em 1fr; column-gap: 8px;
  font-size: 0.9375rem; line-height: 1.5; color: var(--graphite);
  padding: 4px 0; transition: color 0.15s ease;
}
.note strong { color: var(--ink); }
.note__mark { font-family: var(--font-mono); font-size: 0.75rem; color: var(--green); padding-top: 0.2em; }
.note p { grid-column: 2; margin: 0; }
.note__link { grid-column: 2; font-size: var(--step--1); margin-top: 4px; width: fit-content; }
.note::before {
  content: ""; position: absolute; left: calc(-1 * clamp(20px, 2.4vw, 32px) - 1px); top: 4px; bottom: 4px;
  width: 2px; background: var(--green); transform: scaleY(0); transition: transform 0.2s ease;
}
.note:target { color: var(--ink); }
.note:target::before { transform: scaleY(1); }

/* 7. Sections */
.section-head { max-width: 44rem; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--graphite); font-size: var(--step-1); line-height: 1.5; }

.work { padding-block: var(--space-section); border-top: 1px solid var(--rule); }

/* 8. Features */
.feature {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(48px, 5vw, 72px);
  border-top: 1px solid var(--rule);
}
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature:last-of-type { padding-bottom: 0; }
.feature__text { max-width: var(--measure); }
.feature--lead .feature__text { grid-column: 1 / span 5; }
.feature--lead .feature__media { grid-column: 6 / -1; }
.feature--harris .feature__text { grid-column: 1 / span 6; }
.feature--harris .feature__panel { grid-column: 8 / -1; }
.feature--ucd .feature__media { grid-column: 1 / span 5; }
.feature--ucd .feature__text { grid-column: 7 / -1; }

.feature__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--step--1); color: var(--graphite); margin-bottom: 18px; }
.feature__title { margin-bottom: 22px; }
/* Project name first, then its one-line description, so the three projects scan as a set */
.feature__name { display: block; font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.08; letter-spacing: -0.015em; }
.feature__tagline { display: block; margin-top: 10px; font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.375rem); line-height: 1.3; color: var(--graphite); max-width: 28ch; }
.feature__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }

.facts { margin: 24px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 18px; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; font-size: 0.9375rem; }
.facts dt { color: var(--graphite); }
.facts dd { margin: 0; }

/* 9. Plates & figures */
.plate { background: var(--plate); border-radius: var(--radius-plate); padding: clamp(14px, 1.8vw, 22px); margin: 0; }
.plate img { border-radius: 3px; border: 1px solid var(--rule); transition: border-color 0.15s ease; }
.plate__open {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 3px; color: inherit; font: inherit;
}
/* Quiet "Enlarge" control in the corner instead of a heavy dark badge over the content */
.plate__hint {
  position: absolute; right: 10px; top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 500; line-height: 1; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent); border: 1px solid var(--rule);
  padding: 6px 9px; border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.plate__hint svg { width: 12px; height: 12px; flex: none; }
.plate__open:hover img, .plate__open:focus-visible img { border-color: color-mix(in srgb, var(--ink) 35%, var(--rule)); }
.plate__open:hover .plate__hint, .plate__open:focus-visible .plate__hint { border-color: var(--green); color: var(--green); }
/* Mouse and keyboard: reveal the control on hover/focus so it never sits over the interface at rest.
   Touch screens: show it below the image instead of on top of it. */
@media (hover: hover) and (pointer: fine) {
  .plate__hint { opacity: 0; transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
  .plate__open:hover .plate__hint, .plate__open:focus-visible .plate__hint { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {
  .plate__hint { position: static; margin: 10px 0 0 auto; width: fit-content; display: flex; }
}
/* Homepage detail crop: fade the cut edge so the crop reads as deliberate */
.plate--detail img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px); mask-image: linear-gradient(to right, transparent 0, #000 56px); border-left-color: transparent; }
.plate figcaption { margin-top: 14px; font-size: 0.875rem; line-height: 1.5; color: var(--graphite); max-width: 40rem; }
.plate figcaption strong { color: var(--ink); }
.fig { font-family: var(--font-mono); font-size: 0.75rem; color: var(--green); margin-right: 4px; }
.disclosure { display: block; margin-top: 8px; color: var(--ink); }
.disclosure::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: 0.1em; }

.plate--figure { display: grid; justify-items: center; padding-block: clamp(24px, 3vw, 40px); }
.plate--figure img { width: 312px; max-width: 100%; }
.plate--figure figcaption { justify-self: stretch; }

.plate--text { padding: clamp(24px, 3vw, 36px); }
.panel__title { font-size: var(--step-1); font-weight: 450; margin-bottom: 18px; }
.questions { list-style: none; margin: 0; padding: 0; }
.questions li { padding-block: 14px; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.5; color: var(--graphite); }
.questions li:first-child { border-top: 0; padding-top: 0; }
.questions strong { color: var(--ink); }
.panel__note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--graphite); }

/* 10. Small parts: chips, buttons, links, stats */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 500; line-height: 1; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 10px;
}
.chip--progress { color: var(--amber); border-color: currentColor; }
.chip--progress::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 10px 20px; border-radius: var(--radius-control);
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button--primary { background: var(--green); color: var(--on-green); }
.button--primary:hover { background: color-mix(in srgb, var(--green) 86%, var(--ink)); }
.button--quiet { border-color: var(--ink); color: var(--ink); }
.button--quiet:hover { background: var(--plate); }
.text-link { font-weight: 500; font-size: 0.9375rem; }

/* Key findings list (UCD research) */
.findings { list-style: none; margin: 0 0 1.25em; padding: 0; border-left: 2px solid var(--green); }
.findings li { padding: 6px 0 6px 16px; }

/* What I bring */
.bring { padding-block: var(--space-section); border-top: 1px solid var(--rule); }
.bring__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(40px, 6vw, 88px); }
.section-head--side { margin-bottom: 32px; }
.bring__list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.bring__list div { padding-block: 22px; border-top: 1px solid var(--rule); }
.bring__list dt { font-family: var(--font-display); font-size: var(--step-1); font-weight: 450; margin-bottom: 6px; }
.bring__list dd { margin: 0; color: var(--graphite); font-size: 0.9375rem; line-height: 1.55; }

/* 11. Closing: about + contact */
.closing { padding-block: var(--space-section); border-top: 1px solid var(--rule); }
.closing__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 8vw, 120px); }
.closing h2 { margin-bottom: 20px; }
.about-short p { max-width: var(--measure); }
.about-short .text-link { display: inline-block; margin-top: 12px; }
.contact-short > p { color: var(--graphite); max-width: 30rem; }
.contact-links { list-style: none; margin: 28px 0 0; padding: 0; }
.contact-link {
  display: grid; grid-template-columns: 6rem 1fr; align-items: baseline; gap: 12px;
  padding-block: 16px; min-height: 44px; border-top: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; font-size: var(--step-1); font-family: var(--font-display);
  overflow-wrap: anywhere;
}
.contact-links li:last-child .contact-link { border-bottom: 1px solid var(--rule); }
.contact-link__label { font-family: var(--font-text); font-size: var(--step--1); color: var(--graphite); }
.contact-link:hover { color: var(--green); }

/* 12. Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 36px 44px; font-size: var(--step--1); color: var(--graphite); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 32px; }
.site-footer p { margin: 0; }
.site-footer__name { color: var(--ink); font-weight: 500; }
.site-footer__name span { color: var(--graphite); font-weight: 400; margin-left: 10px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.site-footer__links a { color: var(--ink); }

/* 13. Lightbox */
.lightbox {
  width: min(1100px, 100vw - 32px); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--rule); border-radius: var(--radius-plate);
  background: var(--paper); color: var(--ink);
}
.lightbox::backdrop { background: rgba(10, 12, 14, 0.72); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--rule); }
.lightbox__caption { margin: 0; font-size: 0.875rem; color: var(--graphite); }
.lightbox__close { font: inherit; font-size: 0.875rem; font-weight: 500; min-height: 40px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); cursor: pointer; }
.lightbox__scroll { overflow: auto; padding: 16px; background: var(--plate); }
.lightbox__img { margin-inline: auto; border: 1px solid var(--rule); }

/* 14. Simple pages (404) */
.placeholder { padding-block: clamp(72px, 12vw, 160px); min-height: 60vh; }
.placeholder h1 { font-size: var(--step-3); margin: 18px 0 20px; max-width: 18ch; }
.placeholder p { max-width: var(--measure); color: var(--graphite); }
.placeholder .button { margin-top: 20px; }

/* 14b. Inner pages: case studies, About, Contact */
/* Page header sits on the same two-column grid as the content below:
   status and project type in the margin, title and introduction in the main column */
.page-hero {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: clamp(32px, 5vw, 72px); align-items: start;
  padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px);
}
.page-hero__aside { padding-top: 14px; }
.page-hero__aside .feature__meta { flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.page-hero__main { min-width: 0; }
.page-hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); font-weight: 380; line-height: 1.05;
  letter-spacing: -0.02em; max-width: 22ch; margin-bottom: 24px;
}
.page-hero__lede { font-size: var(--step-1); line-height: 1.55; max-width: 42rem; }
.page-hero__lede p { margin-bottom: 0.8em; }
.page-hero__sub { font-size: var(--step--1); color: var(--graphite); max-width: 42rem; margin-top: 16px; }

.case {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: clamp(32px, 5vw, 72px); align-items: start;
  border-top: 1px solid var(--rule); padding-bottom: var(--space-section);
}
.case__rail { position: sticky; top: 88px; padding-top: 40px; font-size: 0.875rem; }
.rail-facts { margin: 0; display: grid; gap: 14px; }
.rail-facts dt { color: var(--graphite); font-size: 0.8125rem; }
.rail-facts dd { margin: 2px 0 0; line-height: 1.45; }
.rail-nav { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
.rail-nav p { color: var(--graphite); font-size: 0.8125rem; margin-bottom: 8px; }
.rail-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rail-nav a { color: var(--ink); text-decoration: none; }
.rail-nav a:hover { color: var(--green); text-decoration: underline; }

.case__main { min-width: 0; }
.case-section { padding-top: 40px; padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.case-section:last-child { border-bottom: 0; padding-bottom: 0; }
.case-section h2 { font-size: clamp(1.625rem, 1.25rem + 1.4vw, 2.25rem); margin-bottom: 20px; max-width: 26ch; }
.case-section h3 { font-size: var(--step-1); font-weight: 450; margin: 32px 0 10px; }
.case-section > p, .case-section > ul, .case-section > ol.plain { max-width: 40rem; }
.case-section ul.bullets { padding-left: 1.2em; margin: 0 0 1em; }
.case-section ul.bullets li { margin-bottom: 8px; }
.case-section ul.bullets li::marker { color: var(--green); }
.case-section .plate, .case-section .figure-pair, .case-section .gallery { margin-block: 32px; }

/* Who-did-what table and other tables */
.table-wrap { margin-block: 28px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.data-table caption { text-align: left; font-size: 0.875rem; color: var(--graphite); padding-bottom: 12px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); }
.data-table thead th { font-weight: 500; font-size: 0.8125rem; color: var(--graphite); border-top: 0; padding-top: 0; }
.data-table tbody th { font-weight: 500; width: 22%; }
.data-table td.empty { color: var(--graphite); }
.table-note { font-size: 0.875rem; color: var(--graphite); max-width: 40rem; }

/* Numbered process (a real sequence) */
.flow { list-style: none; margin: 32px 0; padding: 0; counter-reset: step; max-width: 44rem; }
.flow > li {
  counter-increment: step; position: relative; padding: 0 0 26px 52px;
}
.flow > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--green);
  border: 1px solid var(--green); background: var(--paper);
}
.flow > li::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: 2px; width: 1px; background: var(--rule); }
.flow > li:last-child::after { display: none; }
.flow strong { display: block; font-weight: 500; }
.flow span { display: block; color: var(--graphite); font-size: 0.9375rem; line-height: 1.5; margin-top: 2px; }
.flow .branch { display: inline-block; margin-top: 8px; font-size: 0.8125rem; color: var(--amber); border: 1px solid currentColor; border-radius: 999px; padding: 3px 10px; }
.flow-caption { font-size: 0.875rem; color: var(--graphite); max-width: 40rem; }

/* Grids of short items */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 40px); margin-block: 24px; }
.grid-2 > div { padding-block: 18px; border-top: 1px solid var(--rule); }
.grid-2 h3 { margin: 0 0 6px; font-size: var(--step-1); }
.grid-2 p { margin: 0; color: var(--graphite); font-size: 0.9375rem; line-height: 1.55; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 28px; }
.grid-3 > div { background: var(--plate); border-radius: var(--radius-plate); padding: 22px; }
.grid-3 h3 { margin: 0 0 8px; font-size: 1.0625rem; }
.grid-3 .label { font-size: 0.8125rem; color: var(--graphite); margin-bottom: 6px; }
.grid-3 p { margin: 0; font-size: 0.9375rem; line-height: 1.55; }

/* Galleries */
.gallery-note { display: flex; gap: 10px; align-items: baseline; font-size: 0.875rem; color: var(--ink); margin-top: 24px; }
.gallery-note::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); transform: translateY(-1px); }
/* One screenshot per row, cropped to the point each caption makes, so the interface text stays readable */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.gallery .plate { margin: 0; }
.gallery--single { grid-template-columns: 1fr; }
.plate--narrow { max-width: 620px; }
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.figure-pair .plate--figure img { width: auto; max-height: 420px; }
.plate--chart { display: grid; justify-items: center; }
.plate--chart img { background: #fff; }

/* Research results */
.results { list-style: none; margin: 28px 0; padding: 0; border-top: 1px solid var(--rule); }
.results li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding-block: 18px; border-bottom: 1px solid var(--rule); }
.results p { margin: 0; }
.results .stat { grid-column: 1; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--graphite); }
.results .verdict { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.chip--yes { color: var(--green); border-color: currentColor; }


/* Experience timeline (About) */
.timeline { list-style: none; margin: 24px 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 6px 28px; padding-block: 22px; border-top: 1px solid var(--rule); }
.timeline .when { color: var(--graphite); font-size: 0.875rem; padding-top: 4px; }
.timeline h3 { margin: 0 0 4px; font-size: var(--step-1); }
.timeline .org { color: var(--graphite); font-size: 0.9375rem; margin-bottom: 8px; }
.timeline p { margin: 0; font-size: 0.9375rem; max-width: 38rem; }

/* Next project link */
.next-link { display: block; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--ink); text-decoration: none; color: var(--ink); }
.next-link span { display: block; font-size: var(--step--1); color: var(--graphite); }
.next-link strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); margin-top: 4px; }
.next-link:hover strong { color: var(--green); }

/* Contact page */
.contact-page { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 72px); padding-bottom: var(--space-section); border-top: 1px solid var(--rule); padding-top: 40px; }
.contact-page h2 { font-size: var(--step-2); margin-bottom: 16px; }

@media (max-width: 1000px) {
  .case { grid-template-columns: 1fr; }
  .page-hero { grid-template-columns: 1fr; }
  .page-hero__aside { padding-top: 0; margin-bottom: 20px; }
  .page-hero__aside .feature__meta { flex-direction: row; align-items: center; }
  .page-hero__aside:empty { display: none; }
  .case__rail { position: static; padding-top: 28px; padding-bottom: 8px; }
  .rail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .rail-nav { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .contact-page { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .gallery, .figure-pair, .grid-2 { grid-template-columns: 1fr; }
  .rail-facts { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { border-top: 1px solid var(--rule); padding-block: 14px; }
  .data-table th, .data-table td { border: 0; padding: 4px 0; }
  .data-table td::before { content: attr(data-label); display: block; font-size: 0.8125rem; color: var(--graphite); }
  .results li { grid-template-columns: 1fr; }
  .results .verdict { grid-column: 1; grid-row: auto; }
  .flow > li { padding-left: 46px; }
}

/* 15. Motion: one load sequence for the hero, off for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title, .js .hero__intro, .js .hero__actions, .js .hero__open, .js .note { opacity: 0; transform: translateY(10px); }
  .js .is-loaded .hero__title, .js .is-loaded .hero__intro, .js .is-loaded .hero__actions,
  .js .is-loaded .hero__open, .js .is-loaded .note {
    opacity: 1; transform: none;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1);
  }
  .js .is-loaded .hero__intro { transition-delay: 0.12s; }
  .js .is-loaded .hero__actions, .js .is-loaded .hero__open { transition-delay: 0.2s; }
  .js .is-loaded .note:nth-child(1) { transition-delay: 0.45s; }
  .js .is-loaded .note:nth-child(2) { transition-delay: 0.53s; }
  .js .is-loaded .note:nth-child(3) { transition-delay: 0.61s; }
  .js .is-loaded .note:nth-child(4) { transition-delay: 0.69s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 16. Responsive */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .notes { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 28px; margin-top: 56px; }
  .notes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .note::before { display: none; }

  .feature--lead .feature__text, .feature--lead .feature__media,
  .feature--harris .feature__text, .feature--harris .feature__panel,
  .feature--ucd .feature__text, .feature--ucd .feature__media { grid-column: 1 / -1; }
  .feature__text { max-width: 40rem; }
  .feature__media, .feature__panel { margin-top: 40px; }
  .feature--ucd .feature__media { order: 2; }

  .bring__inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    position: fixed; inset: 64px 0 0 0; background: var(--paper);
    padding: 24px var(--gutter); display: none; overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.75rem;
    padding-block: 14px; border-bottom: 1px solid var(--rule); background: none;
  }
  body.nav-open { overflow: hidden; }

  .hero__intro { font-size: 1.125rem; }
  .notes__list { grid-template-columns: 1fr; }
  .bring__list { grid-template-columns: 1fr; }
  .closing__inner { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 5.5rem 1fr; }
  .contact-link { grid-template-columns: 4.5rem 1fr; font-size: 1.125rem; }
  .button { width: 100%; }
  .feature__links .text-link { width: 100%; }
  .plate__hint { font-size: 0.75rem; }
}
.nowrap { white-space: nowrap; }
.grid-2 h4 { font-family: var(--font-display); font-weight: 450; font-size: var(--step-1); margin: 0 0 6px; }
.results .verdict { justify-self: start; }
@media (max-width: 760px) {
  .data-table caption { display: block; width: 100%; }
  .data-table tbody th { width: 100%; font-size: 1rem; }
}
