/* ==========================================================================
   Animal Science Consulting
   White ground, grotesque type, one saturated accent.
   Two accents available via data-theme on <html>: ultramarine | vermilion
   ========================================================================== */

:root {
  --accent:       #1B37C4;
  --accent-soft:  #E7EAFA;
  --accent-ink:   #FFFFFF;

  --surface:      #FFFFFF;
  --surface-sunk: #F5F6F8;
  --surface-tint: #F1F4FC;
  --ink:          #0D0F12;
  --ink-muted:    #545A62;
  --ink-faint:    #8B9199;
  --rule:         #E3E5E9;
  --rule-strong:  #C4C9D0;

  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t--1: 0.8125rem;
  --t-0:  1.0625rem;
  --t-1:  1.1875rem;
  --t-2:  1.5rem;
  --t-3:  1.75rem;
  --t-4:  clamp(1.9rem, 4vw, 3.1rem);

  --gutter: 1.5rem;
  --measure: 66ch;
  --shell: 1240px;
  --rail: 132px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.7rem 1.1rem; font-size: var(--t--1); z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.shell {
  width: 100%; max-width: var(--shell);
  margin-inline: auto; padding-inline: var(--gutter);
}

/* Section marker: a short heavy accent bar. One idea, used everywhere. */
.rule-scale {
  border: 0; height: 4px; width: 56px; margin: 0;
  background: var(--accent);
}

/* --- Masthead ----------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  position: sticky; top: 0; z-index: 40;
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 68px;
}

.wordmark {
  font-family: var(--font-display);
  text-decoration: none;
  display: flex; align-items: baseline; gap: 0.55rem; line-height: 1;
}
.wordmark b {
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em;
  color: var(--accent);
}
.wordmark span {
  font-family: var(--font-text);
  font-size: 0.8125rem; letter-spacing: -0.005em; color: var(--ink-muted);
}

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: 0.875rem; text-decoration: none; color: var(--ink-muted);
  padding-block: 0.35rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; font: inherit; font-size: 0.875rem;
  background: none; border: 1px solid var(--rule-strong); color: var(--ink);
  padding: 0.45rem 0.8rem; border-radius: 4px; cursor: pointer;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding-block: 0.75rem; font-size: 1rem; }
}

/* --- Bands -------------------------------------------------------------- */

.band { padding-block: clamp(2.5rem, 5vw, 4rem); }
.band--tight { padding-block: clamp(2.25rem, 4.5vw, 3.5rem); }
.band--sunk { background: var(--surface-sunk); }
.band--tint { background: var(--surface-tint); }

/* The enquiry block is the one moment of solid colour on each page. */
.band--accent { background: var(--accent); color: #fff; }
.band--accent .rail { color: rgb(255 255 255 / 0.72); }
.band--accent .muted { color: rgb(255 255 255 / 0.82); }
.band--accent a { color: #fff; }
.band--accent .btn--solid {
  background: #fff; color: var(--accent); border-color: #fff;
}
.band--accent .btn--solid:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.split {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  align-items: start;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 1rem; } }

.rail {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--accent); padding-top: 0.5rem;
}

/* --- Opening: the two names are the page --------------------------------- */

.opening { padding-block: clamp(2.25rem, 4.5vw, 3.5rem) clamp(1.75rem, 3vw, 2.5rem); }

.nameplate { margin-bottom: 2rem; }
.nameplate h1 {
  font-size: var(--t-4);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 20ch;
}
.nameplate h1 .amp {
  color: var(--ink-faint);
  font-weight: 400;
}
.nameplate .sub {
  font-size: var(--t-1);
  color: var(--ink-muted);
  max-width: 52ch;
  margin-top: 1.5rem;
}

.opening--lead {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .opening--lead { grid-template-columns: 1fr; gap: 2rem; } }

.opening h1 {
  font-size: var(--t-4); max-width: 20ch; margin-bottom: 1.25rem; font-weight: 600;
}
.opening h1 em { font-style: normal; }

.lede {
  font-size: var(--t-1); line-height: 1.5; color: var(--ink-muted);
  max-width: 48ch; margin-bottom: 2rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn {
  font-family: var(--font-text); font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; display: inline-block;
  padding: 0.8rem 1.4rem; border-radius: 4px; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 130ms ease, color 130ms ease, border-color 130ms ease;
}
.btn--solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--line { border-color: var(--rule-strong); color: var(--ink); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }

/* --- Lists -------------------------------------------------------------- */

.institutions {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0 2.5rem;
}
.institutions li {
  font-size: 0.9375rem; color: var(--ink-muted);
  padding-block: 0.65rem; border-bottom: 1px solid var(--rule);
}

.areas { margin: 0; padding: 0; list-style: none; }
.areas > li { padding-block: 1.75rem; border-bottom: 1px solid var(--rule); }
.areas > li:first-child { border-top: 1px solid var(--rule); }
.areas h3 { font-size: var(--t-2); margin-bottom: 0.5rem; letter-spacing: -0.025em; }
.areas p { color: var(--ink-muted); margin-bottom: 0; }

.area-row {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.5rem; align-items: baseline;
}
.area-row > span {
  font-size: 0.75rem; font-weight: 500; color: var(--accent);
}
@media (max-width: 560px) { .area-row { grid-template-columns: 1fr; gap: 0.35rem; } }

/* --- Figures ------------------------------------------------------------ */

.plate { margin: 0; }
.plate img { width: 100%; border-radius: 4px; }

/* Photo rows: every frame the same shape, so the row reads as a set. */
.plates .plate img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
/* A single figure inside a text column, held to a readable width. */
.plate--inset { max-width: 720px; }
.plate--inset img { aspect-ratio: 16 / 10; object-fit: cover; }
.plate figcaption {
  font-size: 0.8125rem; line-height: 1.5; color: var(--ink-faint);
  margin-top: 0.7rem; max-width: none;
}

.plates {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: start;
}
@media (max-width: 820px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plates { grid-template-columns: 1fr; } }

/* --- Chronology --------------------------------------------------------- */

.chron { list-style: none; margin: 0; padding: 0; }
.chron li {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.5rem; padding-block: 1rem;
  border-bottom: 1px solid var(--rule); align-items: baseline;
}
.chron li:first-child { border-top: 1px solid var(--rule); }
.chron time { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.chron p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }
@media (max-width: 560px) { .chron li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* --- Profiles ----------------------------------------------------------- */

.profile {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
@media (max-width: 800px) { .profile { grid-template-columns: 1fr; } }

.profile__name { font-size: var(--t-3); margin-bottom: 0.3rem; font-weight: 600; }
.profile__role { font-size: 0.875rem; color: var(--ink-faint); margin-bottom: 1.5rem; }

.pending {
  border: 1px solid var(--rule-strong); border-radius: 4px;
  padding: 1.25rem; color: var(--ink-muted);
  font-size: 0.9375rem; line-height: 1.6; background: var(--surface-sunk);
}
.pending strong { color: var(--ink); font-weight: 600; }

/* --- Record ------------------------------------------------------------- */

.record { list-style: none; margin: 0; padding: 0; column-gap: 3rem; }
@media (min-width: 900px) { .record { columns: 2; } }
.record li {
  break-inside: avoid; padding-block: 0.8rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem; line-height: 1.5;
}
.record .yr {
  font-size: 0.8125rem; color: var(--accent); font-weight: 500;
  display: block; margin-top: 0.15rem;
}

.books {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0;
}
.books img { border: 1px solid var(--rule); border-radius: 3px; }

/* --- Tally -------------------------------------------------------------- */

.tally {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem 2.5rem;
}
.tally li { border-top: 3px solid var(--accent); padding-top: 0.7rem; }
.tally b {
  display: block; font-family: var(--font-display);
  font-size: var(--t-3); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
}
.tally span {
  display: block; font-size: 0.8125rem; color: var(--ink-muted);
  margin-top: 0.35rem; line-height: 1.4;
}

/* --- Citations ---------------------------------------------------------- */

.cites { list-style: none; margin: 0; padding: 0; }
.cites li {
  padding-block: 1rem; border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem; line-height: 1.55; max-width: 80ch;
}
.cites li:first-child { border-top: 1px solid var(--rule); }
.cites .jrnl { font-style: italic; }
.cites .yr {
  font-size: 0.8125rem; color: var(--accent); font-weight: 500;
  display: block; margin-top: 0.2rem;
}

.profile-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-links a {
  display: inline-block; font-size: 0.875rem; font-weight: 500; text-decoration: none;
  border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0.5rem 0.9rem;
  transition: border-color 130ms ease, color 130ms ease, background-color 130ms ease;
}
.profile-links a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* --- Contact ------------------------------------------------------------ */

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
.contact-list li:first-child { border-top: 1px solid var(--rule); }
.contact-list .k {
  font-size: 0.75rem; font-weight: 500; color: var(--ink-faint);
  display: block; margin-bottom: 0.25rem;
}
.contact-list a { font-size: var(--t-1); font-weight: 500; }

.field { display: block; margin-bottom: 1.25rem; max-width: 30rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 4px; padding: 0.7rem 0.8rem;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--accent); }
.field .hint { display: block; font-size: 0.8125rem; color: var(--ink-faint); margin-top: 0.3rem; }
.form-status {
  margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 4px;
  background: var(--accent-soft); color: var(--ink);
  font-size: 0.9375rem; max-width: 30rem;
}

/* --- Footer ------------------------------------------------------------- */

.footer { border-top: 1px solid var(--rule); padding-block: 3rem 2rem; }
.footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem; margin-bottom: 2.5rem;
}
.footer h2 {
  font-family: var(--font-text); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--ink-faint); margin-bottom: 0.8rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.45rem; font-size: 0.9375rem; }
.footer a { text-decoration: none; color: var(--ink-muted); }
.footer a:hover { color: var(--accent); }
.colophon {
  font-size: 0.8125rem; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  padding-top: 1.25rem; border-top: 1px solid var(--rule);
}

/* --- Utility ------------------------------------------------------------ */

.stack > * + * { margin-top: 1.5rem; }
.stack-lg > * + * { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.muted { color: var(--ink-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Mobile ------------------------------------------------------------- */

@media (max-width: 640px) {
  :root {
    --gutter: 1.15rem;
    --t-4: clamp(1.75rem, 8vw, 2.25rem);
    --t-3: 1.5rem;
    --t-2: 1.3rem;
  }
  body { font-size: 1rem; }
  .masthead__inner { min-height: 60px; }
  .nameplate h1, .opening h1 { max-width: none; }
  .nameplate .sub, .lede { font-size: 1.0625rem; max-width: none; }
  .actions { gap: 0.6rem; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .institutions { grid-template-columns: 1fr; }
  .tally { grid-template-columns: 1fr 1fr; gap: 1.1rem 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .colophon { flex-direction: column; gap: 0.35rem; }
  .plate--inset img { aspect-ratio: 4 / 3; }
  .books { grid-template-columns: 1fr 1fr; }
  .cites li, .record li { font-size: 0.9375rem; }
}

@media (max-width: 380px) {
  .tally { grid-template-columns: 1fr; }
  .books { grid-template-columns: 1fr; }
}
