:root {
  --wall: #e6e8e7;
  --wall-shade: #d3d7d5;
  --ink: #1a2224;
  --ink-soft: #5d6a6c;
  --accent: #2f545f;
  --measure: 34rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: clamp(1.5rem, 6vw, 5rem);
  background: var(--wall);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 7vw, 5rem);
  min-height: 100vh;
}

a {
  color: inherit;
}

/* Mastheads ------------------------------------------------------------- */

.masthead h1 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 12ch;
}

.person-page .masthead h1 {
  font-size: clamp(2.25rem, 7vw, 4rem);
  max-width: 16ch;
}

.standfirst {
  margin: 1.25rem 0 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid var(--wall-shade);
  padding-bottom: 0.15rem;
}

.back:hover {
  color: var(--ink);
  border-bottom-color: currentColor;
}

main {
  flex: 1;
}

/* People index ---------------------------------------------------------- */

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 20rem;
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
}

.card {
  margin: 0 0 clamp(1.75rem, 3.5vw, 3rem);
  break-inside: avoid;
}

.card a {
  display: block;
  text-decoration: none;
}

.card-frame {
  display: block;
  background: var(--wall-shade);
}

.card-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Only people with no photo yet get a placeholder box. */
.card-blank {
  display: block;
  aspect-ratio: 4 / 5;
}

.card-name {
  display: block;
  margin-top: 0.75rem;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.card a:hover .card-name {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.card-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* About text ------------------------------------------------------------ */

.about {
  max-width: var(--measure);
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
  font-size: 1.0625rem;
}

.about p {
  margin: 0 0 1em;
}

.about p:last-child {
  margin-bottom: 0;
}

.about-missing {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Photo grid ------------------------------------------------------------ */

.grid {
  columns: 3 18rem;
  column-gap: 1.5rem;
}

.shot {
  margin: 0 0 1.5rem;
  break-inside: avoid;
}

.shot-link {
  display: block;
  background: var(--wall-shade);
  cursor: zoom-in;
}

.shot-link img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Empty states and notices ---------------------------------------------- */

.empty {
  border: 1px solid var(--wall-shade);
  background: rgba(255, 255, 255, 0.55);
  padding: clamp(1.75rem, 5vw, 3rem);
  max-width: var(--measure);
}

.empty h2 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.empty p {
  margin: 0;
  color: var(--ink-soft);
}

.notice {
  max-width: var(--measure);
  margin: 0 0 2rem;
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(47, 84, 95, 0.07);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  color: var(--accent);
  background: rgba(47, 84, 95, 0.08);
  padding: 0.1em 0.35em;
}

/* Lightbox -------------------------------------------------------------- */

#lightbox {
  border: 0;
  padding: 0;
  width: fit-content;
  max-width: min(92vw, 1400px);
  max-height: 92vh;
  background: transparent;
  color: var(--wall);
  overflow: visible;
}

#lightbox::backdrop {
  background: rgba(12, 18, 19, 0.92);
}

#lightbox img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.lightbox-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.875rem;
}

.lightbox-close {
  position: absolute;
  top: -2.25rem;
  right: 0;
  background: none;
  border: 0;
  color: var(--wall);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

/* ----------------------------------------------------------------------- */

footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#lightbox :focus-visible {
  outline-color: var(--wall);
}
