@font-face {
  font-family: "Young Serif";
  src: url("fonts/young-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Bone version (bone.html). Each colour is named by its job.
   Type is deliberately limited: serif at --xl and --l for headings, and mono at
   the body size for everything else. */
:root {
  --xl: clamp(3rem, 7vw, 7.25rem);
  --l: clamp(1.6rem, 2.9vw, 2.75rem);
  --paper: #f4eee0;     /* page background */
  --ink: #00274c;       /* big serif words */
  --small: #00274c;     /* small mono words */
  --maize: #ffcb05;     /* sticker, @ badge, bones */
  --on-maize: #00274c;  /* words and outlines on maize */
  --shadow: #00274c;    /* sticker shadow */
  --ring: #00274c;      /* contour rings */
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

/* Blue version (index.html). Maize type, with blueprint-white details. */
body.blue {
  --paper: #00274c;
  --ink: #ffcb05;
  --small: #f4eee0;
  --shadow: #f4eee0;
  --ring: #f4eee0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--small);
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.5;
}

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 4px; }
:focus-visible { outline: 3px solid var(--small); outline-offset: 3px; }
.recruit :focus-visible { outline-color: var(--on-maize); }

.page {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(2rem, 4vw, 5rem);
  row-gap: 1.5rem;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.words { align-self: center; }

h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
h1 span { display: block; white-space: nowrap; }

.lab { font-size: var(--xl); }
.uni { font-size: var(--l); }

h1 .at {
  display: grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  margin: 0.25em 0;
  padding-bottom: 0.08em;
  border-radius: 50%;
  background: var(--maize);
  color: var(--on-maize);
  font-size: var(--l);
}

.mission {
  margin: clamp(1.5rem, 2.5vw, 2.5rem) 0 0;
  max-width: 54ch;
}

/* The recruiting note is a sticker slapped onto the page. */
.recruit {
  display: inline-block;
  max-width: 37rem;
  margin-top: clamp(2.25rem, 3.5vw, 3.25rem);
  padding: 1.15rem 1.4rem 1.25rem;
  background: var(--maize);
  color: var(--on-maize);
  transform: rotate(-3deg);
  box-shadow: 5px 5px 0 var(--shadow);
}
.recruit h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--l);
  font-weight: 400;
  line-height: 1.1;
}
.when { margin: 0.2rem 0 0.8rem; }
.recruit ul { margin: 0; padding: 0; list-style: none; }
.recruit li + li { margin-top: 0.45rem; }

.fig {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: calc((100svh - 11rem) * 0.68);
  margin: 0;
}
#morph { display: block; width: 100%; height: auto; overflow: visible; }

/* Stacked strokes on one path. A thick stroke with round joins is an exact
   distance offset, so these rings are level sets of the distance to the bones. */
#morph use { fill: none; stroke-linejoin: round; }
#morph .bones { fill: var(--maize); stroke: var(--on-maize); stroke-width: 4; }

figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  margin-top: 0.75rem;
  text-align: center;
  text-wrap: balance;
}
#pause {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#pause[hidden] { display: none; }

footer {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  :root {
    --xl: clamp(2.5rem, 13vw, 6rem);
    --l: clamp(1.35rem, 6.2vw, 2.75rem);
  }
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .fig { max-width: 20rem; }
  .recruit { display: block; }
}
