/* Site styles. Tokens (colours, ARC palette, fonts) live in tokens.css, loaded first. */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* keeps the footer at the bottom of short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.top,
.foot { width: 100%; }

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 6px 10px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
}
.skip:focus { top: 12px; }

p { margin: 0 0 1em; max-width: 65ch; text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

code {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 0.1em 0.35em;
  background: var(--cell);
  border-radius: 2px;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* hairline across the content width only, not the side gutters */
.block,
.foot {
  background-image: linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size: calc(100% - 80px) 1px;
  background-position: 40px 0;
}

/* ARC colour classes, for both HTML cells and SVG shapes */
.c0 { background: var(--a0); fill: var(--a0); }
.c1 { background: var(--a1); fill: var(--a1); }
.c2 { background: var(--a2); fill: var(--a2); }
.c3 { background: var(--a3); fill: var(--a3); }
.c4 { background: var(--a4); fill: var(--a4); }
.c5 { background: var(--a5); fill: var(--a5); }
.c6 { background: var(--a6); fill: var(--a6); }
.c7 { background: var(--a7); fill: var(--a7); }
.c8 { background: var(--a8); fill: var(--a8); }
.c9 { background: var(--a9); fill: var(--a9); }
.c10 { background: var(--a10); fill: var(--a10); }
.c11 { background: var(--a11); fill: var(--a11); }
.c12 { background: var(--a12); fill: var(--a12); }
.c13 { background: var(--a13); fill: var(--a13); }
.c14 { background: var(--a14); fill: var(--a14); }
.c15 { background: var(--a15); fill: var(--a15); }

.glyph { display: block; width: 17px; height: 17px; flex: none; }

/* small arrows drawn as masks, so they follow the text colour in any font */
.ext::after,
.go::after {
  content: "";
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-left: 0.4em;
  background: currentColor;
  -webkit-mask: var(--arrow) no-repeat center / contain;
  mask: var(--arrow) no-repeat center / contain;
}
.ext { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3.5 2H8v4.5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); }
.go { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5h7.5M5.5 2 8.5 5 5.5 8' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); }

/* ---------- top bar ---------- */

.top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
}
.top nav a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
}
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--a9);
}

/* ---------- home: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 468px;
  gap: 72px;
  align-items: start;
  padding-top: 84px;
  padding-bottom: 96px;
}

.photo {
  display: block;
  width: 116px;
  height: 116px;
  margin-bottom: 30px;
  border: 1px solid var(--line-strong);
}

.name {
  margin: 0;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 500;
  font-stretch: 87.5%;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.role {
  margin: 12px 0 34px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 0 22px;
  font-size: 31px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}

.bio { color: var(--text-soft); }

.contact {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* icon links: Google Scholar, GitHub, LinkedIn, CV */
.icon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.icon-links a {
  display: block;
  padding: 2px;
  color: var(--muted);
  transition: color 160ms ease;
}
.icon-links a:hover,
.icon-links a:focus-visible { color: var(--text); }
.icon-links svg { display: block; width: 34px; height: 34px; fill: currentColor; }
.icon-links .cv-box { fill: none; stroke: currentColor; stroke-width: 2; }
.icon-links .cv-text { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: -0.04em; }
.icon-links.small { gap: 12px; margin: 0; }
.icon-links.small svg { width: 18px; height: 18px; }

/* ---------- the World Modelling panel ---------- */

.learner {
  margin: 0;
  margin-top: 146px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.learner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.learner-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.phases {
  display: flex;
  gap: 18px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase { display: inline-flex; align-items: center; gap: 8px; }
.phase::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--line-strong);
}
.phase.is-on { color: var(--text); }
.phase[data-phase="modelling"].is-on::before { background: var(--a9); }
.phase[data-phase="acting"].is-on::before { background: var(--a11); }

.toggle {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.toggle:hover { color: var(--text); border-color: var(--muted); }
.toggle[hidden] { display: none; }

.boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  aspect-ratio: 7 / 6;
  outline: 1px solid transparent;
  outline-offset: 3px;
}
.board > .e { background: var(--cell); }
.board > span.x { box-shadow: inset 0 0 0 2px var(--a0); }
.board.ok { outline-color: var(--a14); }
.board.bad { outline-color: var(--a8); }
.board-label {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.log {
  list-style: none;
  margin: 18px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  min-height: calc(4 * 1.9em + 12px);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
  font-variant-numeric: tabular-nums;
}
.log li {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--muted);
}
.log .v { text-align: right; white-space: nowrap; }
.log li.cur { color: var(--text); }
.log li.ok .v { color: var(--a14); }
.log li.bad .v { color: var(--a8); }

.learner figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- content blocks ---------- */

.block {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 72px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.block-head { align-self: start; position: sticky; top: 28px; }
.block-head .glyph { margin-bottom: 20px; }
h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.kicker {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.block-body { max-width: 700px; min-width: 0; }
.block-body > :last-child { margin-bottom: 0; }

h3 {
  margin: 34px 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.block-body > h3:first-child { margin-top: 0; }

.block-body ul,
.block-body ol { margin: 0 0 1em; padding-left: 1.2em; max-width: 65ch; }
.block-body li { margin-bottom: 0.45em; }
.block-body li::marker { color: var(--muted); }

.soft { color: var(--text-soft); }
.note { font-size: 15px; color: var(--muted); }

/* ---------- home: project sections ---------- */

.block-body .more {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
}

.two-phase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 26px 0 0;
}
.ph h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.ph-cell { width: 10px; height: 10px; flex: none; }
.ph p { margin: 0; color: var(--text-soft); }

.other {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 32px;
  margin: 0;
}
.other dt {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.other dd { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--text-soft); }

/* home: a small ModAct loop under the section title (hidden once the head stacks above the text) */
.mini-diagram { display: block; width: 240px; margin-top: 40px; }
.mini-mascot { display: block; width: 128px; margin-top: 40px; }
.mini-mascot img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.mini-diagram svg { display: block; width: 100%; height: auto; }
.mini-diagram:hover .dg-box.blue,
.mini-diagram:hover .dg-box.yellow { fill: var(--panel); }

/* home: text on the left, picture on the right */
.block-body.with-media {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
}
.with-media .media { margin: 4px 0 0; }

/* ---------- inner pages ---------- */

.page-head {
  padding-top: 76px;
  padding-bottom: 64px;
}
.page-head .glyph { margin-bottom: 22px; }
.page-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 500;
  font-stretch: 87.5%;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.page-head .kicker { margin-top: 14px; font-size: 12.5px; }
.page-head .lede { margin-top: 30px; max-width: 34ch; font-size: 27px; }
.actions .note { font-size: 12px; }
.defs .note { margin-left: 6px; font-family: var(--mono); font-size: 11px; }
.page-head .intro { max-width: 62ch; color: var(--text-soft); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 16px;
  border: 1px solid var(--a11);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 160ms ease;
}
.cta:hover { color: var(--text); background: var(--cell); }
.cta-cells { display: grid; grid-template-columns: repeat(2, 7px); gap: 2px; flex: none; }
.cta-cells span { width: 7px; height: 7px; }

/* diagrams: a wide SVG on desktop, a tall one on phones */
.diagram {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 8px;
  padding-bottom: 72px;
}
.diagram-frame {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .tall { display: none; max-width: 420px; margin: 0 auto; }
.diagram figcaption {
  margin-top: 14px;
  max-width: 80ch;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* SVG vocabulary */
.dg-box { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; }
.dg-box.blue { stroke: var(--a9); }
.dg-box.yellow { stroke: var(--a11); }
.dg-cell { fill: var(--cell); }
.dg-zone { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 5 4; }
.dg-blue { fill: none; stroke: var(--a9); stroke-width: 1.5; }
.dg-yellow { fill: none; stroke: var(--a11); stroke-width: 1.5; }
.dg-green { fill: none; stroke: var(--a14); stroke-width: 1.5; }
.dg-red { fill: none; stroke: var(--a8); stroke-width: 1.5; }
.dg-line { fill: none; stroke: var(--muted); stroke-width: 1.25; }
.dg-line.dash { stroke-dasharray: 4 4; }
.dg-line.red { stroke: var(--a8); }
.dg-line.green { stroke: var(--a14); }
.dg-head { fill: var(--muted); }
.dg-head.red { fill: var(--a8); }
.dg-head.green { fill: var(--a14); }
.dg-cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: var(--muted);
}
.dg-cap.on { fill: var(--text); }
.dg-title { font-family: var(--mono); font-size: 14px; font-weight: 500; fill: var(--text); }
.dg-text { font-family: var(--sans); font-size: 14px; fill: var(--text-soft); }
.dg-small { font-family: var(--sans); font-size: 12.5px; fill: var(--muted); }
.dg-code { font-family: var(--mono); font-size: 11.5px; fill: var(--text); }
.dg-mono { font-family: var(--mono); font-size: 13px; font-weight: 600; fill: var(--text); }
.dg-red-text { fill: var(--a8); }
.dg-green-text { fill: var(--a14); }

/* table of contents */
.toc {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.toc li { border-top: 1px solid var(--line); counter-increment: toc; }
.block-body .toc { margin: 0; padding: 0; max-width: none; }
.block-body .toc li { margin: 0; }
.toc a {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  color: var(--text);
  text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--link); }

/* key/value lists (tools, options) */
.defs {
  margin: 0 0 1.2em;
  border-top: 1px solid var(--line);
}
.defs > div {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 4px 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.defs.long-terms > div { grid-template-columns: 15.5rem minmax(0, 1fr); }
.defs dt { font-family: var(--mono); font-size: 12.5px; font-weight: 500; padding-top: 3px; overflow-wrap: anywhere; }
.defs dd { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--text-soft); }

/* a three-column permission grid */
.grid-table {
  width: 100%;
  margin: 6px 0 1.2em;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.grid-table th,
.grid-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}
.grid-table thead th { color: var(--muted); border-bottom-color: var(--line-strong); }
.grid-table tbody th { font-weight: 600; }
.grid-table .auto,
.grid-table .ask { display: inline-flex; align-items: center; gap: 8px; }
.grid-table .auto::before,
.grid-table .ask::before { content: ""; width: 8px; height: 8px; flex: none; }
.grid-table .auto::before { background: var(--a14); }
.grid-table .ask::before { background: var(--a11); }

.block-body .layers { margin: 0 0 1.2em; padding: 0; list-style: none; }
.block-body .layers li {
  margin: 0;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.layers b { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--a10); padding-top: 2px; }
.layers p { margin: 0; color: var(--text-soft); }

pre {
  margin: 0 0 1.2em;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-soft);
}
pre code { padding: 0; background: none; font-size: inherit; }

/* screenshots (Alan Code), shown at most at their natural width so the terminal text stays sharp */
.shot { max-width: 791px; margin: 0 0 72px; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
}
.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.shot-tall { max-width: 1200px; margin: 0 auto 72px; padding-bottom: 8px; }
.shot-tall img,
.shot-tall figcaption { max-width: 800px; margin-left: auto; margin-right: auto; }

/* a page head with a picture beside the title block */
.page-head.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 48px;
}
.head-main { min-width: 0; }
/* 512 px pixel art drawn at 1/4 scale: whole source pixels stay square and sharp */
.mascot {
  width: 128px;
  height: 128px;
  margin-top: 40px;
  image-rendering: pixelated;
}



/* listings: teaching, publications, other work */
.listing { padding-bottom: 96px; }
.entries {
  max-width: 780px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.entry { padding: 30px 0 28px; border-top: 1px solid var(--line); }
.entry h2 { font-size: 21px; letter-spacing: -0.02em; }
.entry .meta {
  margin: 8px 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.entry p { color: var(--text-soft); }
.entry .link { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
/* Regact problem clips (home: small row; /regact/: large grid with descriptions) */
.clips {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.block-body .clips { padding: 0; max-width: none; }
.block-body .clips li { margin: 0; }
.clips-small { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.clips-large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; margin-top: 0; }
.clip { margin: 0; }
.clip-frame {
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
video[data-playing] { cursor: pointer; }
.clip-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.clip-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--panel);
}
.clip-placeholder span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}
.clip-placeholder i { width: 7px; height: 7px; flex: none; }
.clips-small .clip-placeholder span { padding: 6px; }
.clips-small .clip-placeholder i { width: 9px; height: 9px; }
.clip figcaption { margin-top: 8px; }
.clip-name {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
}
.clips-large .clip-placeholder span { font-size: 12.5px; padding: 6px 10px; }
.clips-large .clip-name { font-size: 13px; font-weight: 600; }
.clip-desc { display: block; margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text-soft); }
.clip-link { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 12px; }

/* /other/: text on the left, picture on the right */
.entries-media { max-width: none; }
.entries-media .entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}
.entries-media .media { margin: 6px 0 0; }
.entries-media .media-plot,
.entries-media .media-video { justify-self: start; }
.entry-text > :last-child { margin-bottom: 0; }

.media { margin: 22px 0 18px; }
.media-frame {
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
/* figures drawn on white keep a light mat, so they do not glare on the dark page */
.media-frame.light { padding: 14px; background: var(--paper); border-color: var(--paper); }
.media img,
.media video { display: block; width: 100%; height: auto; }
.media-plot { max-width: 560px; }
.media-video { max-width: 420px; }
.media figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.pub .pub-authors { margin-bottom: 8px; font-size: 15.5px; color: var(--muted); }
.pub .pub-authors strong { color: var(--text); font-weight: 600; }
.pub h2.pub-title {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.pub-title a { color: var(--text); text-decoration-color: var(--line-strong); }
.pub-title a:hover { color: var(--link); text-decoration-color: currentColor; }
.pub .meta { margin-bottom: 0; }

.award {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
}
.award-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.award-label::before { content: ""; width: 8px; height: 8px; background: var(--a11); }
.award strong { color: var(--text); font-weight: 600; }

/* footer */

.foot {
  padding-top: 40px;
  padding-bottom: 48px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.foot p { margin: 0; max-width: none; }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot .palette { display: flex; gap: 2px; margin-bottom: 18px; }
.palette span { width: 12px; height: 12px; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .board > span { transition: background-color 220ms ease, box-shadow 220ms ease; }
  .board { transition: outline-color 220ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .icon-links a { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .learner { margin-top: 0; max-width: 520px; }
  .block { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .block-head { position: static; }
  .mini-diagram { display: none; }
  .mini-mascot { display: none; }
}

@media (max-width: 900px) {
  .entries-media .entry { grid-template-columns: minmax(0, 1fr); }
  .block-body.with-media { grid-template-columns: minmax(0, 1fr); }
  .with-media .media { margin-top: 26px; }
  .entries-media .media { margin: 22px 0 0; }
}

@media (max-width: 760px) {
  .diagram .wide { display: none; }
  .diagram .tall { display: block; }
  .diagram-frame { padding: 16px 10px; }
  .two-phase,
  .other { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .clips-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap,
  .top { padding-left: 18px; padding-right: 18px; }
  .block,
  .foot { background-size: calc(100% - 36px) 1px; background-position: 18px 0; }
  .top { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 20px; }
  .top ul { gap: 2px 20px; }
  .hero { padding-top: 44px; padding-bottom: 64px; gap: 44px; }
  .photo { width: 96px; height: 96px; margin-bottom: 24px; }
  .name { font-size: 25px; }
  .lede { font-size: 25px; }
  .learner { padding: 14px 12px 12px; }
  .boards { gap: 10px; }
  .log li { grid-template-columns: 2.6em minmax(0, 1fr) auto; gap: 8px; }
  .block { padding-top: 48px; padding-bottom: 56px; }
  h2 { font-size: 23px; }
  .page-head { padding-top: 44px; padding-bottom: 44px; }
  .page-title { font-size: 31px; }
  .page-head.with-aside { column-gap: 16px; }
  .mascot { width: 64px; height: 64px; margin-top: 0; }
  .page-head .lede { font-size: 22px; }
  .cta { font-size: 13px; padding: 13px 16px 13px 14px; }
  .toc { grid-template-columns: minmax(0, 1fr); }
  .clips-large { grid-template-columns: minmax(0, 1fr); }
  .defs > div,
  .defs.long-terms > div { grid-template-columns: minmax(0, 1fr); }
  .diagram { padding-bottom: 52px; }
  .listing { padding-bottom: 64px; }
  .entry h2, .pub h2.pub-title { font-size: 19px; }
}

.nowrap { white-space: nowrap; }

/* Home section titles link to their project page; they keep the heading's look. */
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* a picture that opens at full size */
.zoom { display: block; cursor: zoom-in; }
.zoom img { display: block; }
