/* Generated by build_publications.py -- edit the script, not this file. */
:root {
  --ink: #1c1f23;
  --muted: #5d6570;
  --rule: #dfe3e6;
  --page: #ffffff;
  --accent: #245f73;
  --soft: #eaf3f5;
}
.pubs-page {
  font-family: "Scope One", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  font-size: 1rem;
}
/* same container and same reading measure as the home page */
.pubs-wrap {
  width: min(76rem, 92vw); margin: 0 auto; padding: 2.5rem 0 5rem;
  --measure: min(46rem, calc(100% - 22rem));
}
.pubs-masthead p, .pubs-page > .pubs-wrap > p { max-width: var(--measure); }
.pubs-masthead { border-bottom: 2px solid var(--rule); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.pubs-masthead h1 { margin: 0 0 .35rem; font-size: 1.9rem; line-height: 1.2; }
.pubs-masthead p { margin: 0; color: var(--muted); }
.pubs-masthead a { color: #245f73; }
.pubs-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }
.pubs-nav a {
  border: 1px solid var(--rule); border-radius: .35rem; padding: .35rem .8rem;
  text-decoration: none; color: var(--ink); font-size: .92rem;
}
.pubs-nav a:hover { border-color: currentColor; }
.pubs-search { margin: 1.5rem 0 2.5rem; }
.pubs-search input {
  width: 100%; max-width: 26rem; padding: .55rem .8rem; font: inherit;
  border: 1px solid var(--rule); border-radius: .35rem; background: #fff; color: var(--ink);
}
.pubs-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pubs-search .hint { display: block; color: var(--muted); font-size: .85rem; margin-top: .4rem; }

.program { margin: 0 0 3.5rem; }
.prog-head { border-left: .22rem solid var(--accent); padding-left: .9rem; margin-bottom: 1.25rem; }
.prog-head h2 { margin: 0; font-size: 1.5rem; color: var(--accent); line-height: 1.25; }
.prog-sub { margin: .2rem 0 0; color: var(--muted); font-size: 1rem; }
.prog-count { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; font-variant: all-small-caps;
  letter-spacing: .04em; }
.prog-overview { max-width: 46rem; margin: 0 0 1.5rem; }
.prog-overview p { margin: 0 0 .9rem; }
.prog-tail {
  font-size: 1rem; color: var(--muted); font-variant: all-small-caps; letter-spacing: .05em;
  border-top: 1px solid var(--rule); padding-top: 1rem; margin: 2rem 0 .5rem;
}

/* The bar that opens a program's list on the home page */
.prog-bar {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  margin: 1.5rem 0 0; padding: 1.05rem 1.25rem; font: inherit; text-align: left; cursor: pointer;
  color: var(--accent); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22); border-left: .3rem solid var(--accent);
  border-radius: .35rem;
}
.prog-bar:hover { background: rgba(255,255,255,.11); }
.prog-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prog-bar-count { font-size: 1.5rem; line-height: 1.1; }
.prog-bar-hint {
  color: rgba(255,255,255,.7); font-size: 1.1rem; font-variant: all-small-caps;
  letter-spacing: .07em;
}
.prog-bar-chev {
  margin-left: auto; width: .72rem; height: .72rem; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-.12rem, -.12rem);
  transition: transform .18s;
}
.prog-bar[aria-expanded="true"] .prog-bar-chev {
  transform: rotate(225deg) translate(-.12rem, -.12rem);
}
.prog-drawer {
  background: var(--page); color: var(--ink); border-radius: .35rem;
  padding: 1.4rem 1.4rem .6rem; margin-top: .7rem;
}
.prog-drawer[hidden] { display: none !important; }
.prog-drawer-foot { margin: 1.2rem 0 .8rem; font-size: .95rem; }
.prog-drawer-foot a { color: var(--accent) !important; }

.pub-list { display: flex; flex-direction: column; gap: .55rem; }
.pub {
  display: grid; grid-template-columns: 3.1rem 1fr; gap: 1rem; align-items: start;
  border: 1px solid transparent; border-radius: .35rem; padding: .85rem .9rem;
  background: #fff; transition: border-color .15s, background .15s;
}
/* flow-root so the body contains the floated figure and the card grows to fit it */
.pub-body { display: flow-root; }
.pub:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--rule)); }
.pub.is-pinned { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.pub[hidden], .program[hidden], .prog-tail[hidden] { display: none !important; }
.pub-year {
  color: var(--muted); font-size: .95rem; padding-top: .1rem; text-align: right;
  font-variant-numeric: tabular-nums; visibility: hidden;
}
.pub.is-year-first .pub-year { visibility: visible; }
.pub-fig { float: left; width: 12rem; margin: .2rem 1.15rem .55rem 0; }
.pub-fig img, .pub-fig svg {
  display: block; width: 100%; height: auto; max-height: 10rem;
  object-fit: contain; border-radius: .2rem; background: var(--soft);
}
.pub-figlink { display: block; }
.pub-head { display: flex; align-items: baseline; gap: .6rem; }
.pub-num {
  color: var(--accent); font-size: 1.3rem; font-weight: 700; line-height: 1;
  min-width: 1.8rem; text-align: right; flex: none; opacity: .75;
  font-variant-numeric: tabular-nums;
}
.pub-num-none { opacity: .35; font-size: 1rem; }
.pub-title { margin: 0; font-size: 1.05rem; line-height: 1.35; font-weight: 600; }
.pub-authors { margin: .3rem 0 0 2.4rem; color: var(--ink); font-size: .95rem; }
.pub-venue { margin: .12rem 0 0 2.4rem; color: var(--muted); font-size: .92rem; }
.pub-note { margin: .3rem 0 0 2.4rem; color: var(--muted); font-size: .88rem; font-style: italic; }
.pub-links { margin: .45rem 0 0 2.4rem; display: flex; flex-wrap: wrap; gap: .8rem;
  align-items: baseline; font-size: .9rem; }
.pub-links a, .pub-toggle {
  color: var(--accent); text-decoration: none; border: 0; background: none;
  padding: 0; font: inherit; cursor: pointer; border-bottom: 1px solid transparent;
}
.pub-links a:hover, .pub-toggle:hover { border-bottom-color: currentColor; }
.pub-toggle.is-open { border-bottom-color: currentColor; }
.pub-cross { margin-left: auto; color: var(--muted) !important; font-style: italic; }
.chip {
  display: inline-block; background: var(--soft); color: var(--accent);
  border-radius: .8rem; padding: .05rem .55rem; font-size: .78rem;
  font-variant: all-small-caps; letter-spacing: .04em; vertical-align: .05em;
}
.pub-panel { margin: .6rem 0 0; }
.pub-panel[hidden] { display: none !important; }
.pub-abstract {
  font-size: .94rem; color: #3b434c; text-align: justify; hyphens: auto;
  animation: pub-fade .16s ease-out;
}
/* A wide inline formula must scroll inside itself rather than push the card out */
.pub-abstract mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
@keyframes pub-fade { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .pub-abstract { animation: none }
  .prog-bar-chev { transition: none }
}
.pubs-empty { color: var(--muted); font-style: italic; padding: 1rem 0; }

/* The home page blocks sit inside .wrapper.style2, whose template CSS paints every
   heading, link and <b> white and puts 4em under any <header>. publications.css is
   linked after main.css, so matching its specificity is enough to win. */
.prog-home header.prog-head { margin-bottom: 1.1rem; }
.prog-home .prog-overview { max-width: 44rem; }
.prog-home button.prog-bar {
  background: rgba(255,255,255,.06); color: var(--accent);
  border: 1px solid rgba(255,255,255,.22); border-left: .3rem solid var(--accent);
}
.prog-home button.prog-bar:hover { background: rgba(255,255,255,.12); }
.prog-drawer h3.pub-title { color: var(--ink); }
.prog-drawer .pub-authors { color: var(--ink); }
.prog-drawer .pub-venue, .prog-drawer .pub-note, .prog-drawer h3.prog-tail,
.prog-drawer .pub-year { color: var(--muted); }
.prog-drawer .pub-venue b, .prog-drawer .pub-venue strong { color: var(--muted); }
.prog-drawer .pub-links a, .prog-drawer .pub-toggle, .prog-drawer .chip { color: var(--accent); }
.prog-drawer .pub-links a:hover, .prog-drawer .pub-toggle:hover { color: var(--accent); }
.prog-drawer .pub-cross { color: var(--muted) !important; }
.prog-home .prog-figs { max-width: var(--measure); }
.prog-home .prog-fig { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.05); }
.prog-home .prog-fig img { background: #fff; }
.prog-home .prog-fig-cap { color: rgba(255,255,255,.72); }
.prog-allpubs { margin-top: 2.5rem; }

@media (max-width: 900px) {
  .pub { grid-template-columns: 2.8rem 1fr; gap: .8rem; }
  .pub-fig { width: 10rem; margin-right: .9rem; }
}

/* Narrow: the figure stops floating and centres, the text runs full width
   underneath it, and the actions become a stacked column of tap targets. */
@media (max-width: 736px) {
  .pubs-wrap { width: 92vw; --measure: 100%; }
  .pub { grid-template-columns: 1fr; gap: .35rem; padding: 1rem .9rem; }
  .pub-year {
    visibility: visible; text-align: left; font-variant: all-small-caps;
    letter-spacing: .06em; font-size: .9rem;
  }
  .pub-fig {
    float: none; width: auto; max-width: 15rem; margin: 0 auto .9rem;
  }
  .pub-fig img, .pub-fig svg { max-height: 12rem; }
  .pub-head { justify-content: flex-start; }
  .pub-authors, .pub-venue, .pub-links, .pub-panel, .pub-note { margin-left: 0; }
  .pub-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    margin-top: .9rem; font-size: .98rem;
  }
  .pub-links a, .pub-links .pub-toggle {
    display: block; width: 100%; padding: .7rem .1rem; text-align: left;
    border: 0; border-top: 1px solid var(--rule); border-radius: 0;
  }
  .pub-links a:last-child, .pub-links .pub-toggle:last-child { border-bottom: 1px solid var(--rule); }
  .pub-links a:hover, .pub-links .pub-toggle:hover { border-bottom-color: var(--rule); }
  .pub-cross {
    margin-left: 0; border-top: 1px solid var(--rule); padding: .7rem .1rem;
    font-size: .9rem;
  }
  .pub-abstract { text-align: left; }
  .pubs-wrap { padding: 1.5rem 0 3rem; }
  .prog-drawer { padding: 1rem .8rem .4rem; }
}
@media (max-width: 480px) {
  .pub-num { font-size: 1.1rem; min-width: 1.5rem; }
  .pub-title { font-size: 1rem; }
}

/* Figure strip under a programme's description */
.prog-figs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem; margin: 1.6rem 0 0; max-width: var(--measure);
}
.prog-fig {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--rule); border-radius: .35rem; padding: .55rem;
  background: #fff;
}
.prog-fig:hover { border-color: color-mix(in srgb, var(--accent-ink, var(--accent)) 45%, var(--rule)); }
.prog-fig img {
  display: block; width: 100%; height: auto; max-height: 9rem;
  object-fit: contain; border-radius: .2rem; background: var(--soft);
}
.prog-figs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prog-fig-wide { grid-column: 1 / -1; }
.prog-fig-wide img { max-height: none; width: 100%; }
.prog-fig-cap {
  display: block; margin-top: .5rem; font-size: .82rem; line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 736px) {
  .prog-figs, .prog-figs-3 { grid-template-columns: 1fr; }
  .prog-fig-wide img { max-height: none; }
}

/* Contact block, in the rail under the portrait */
.contact { list-style: none; margin: 1rem 0 0; padding: 0; font-size: .95rem; line-height: 1.55; }
.contact li { padding: 0; margin: 0 0 .45rem; color: var(--muted); }
.contact .contact-links { margin-top: .8rem; padding-top: .7rem;
  border-top: 1px solid var(--rule); }

/* Research group: current on the left, past on the right */
.group-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem 3rem; margin-top: .5rem;
}
.group-col h4 {
  margin: 0 0 .2rem; font-size: 1.25rem;
  border-bottom: 1px solid var(--rule); padding-bottom: .4rem;
}
.group-col h5 {
  margin: 1.4rem 0 .35rem; font-size: .9rem; font-weight: 400;
  font-variant: all-small-caps; letter-spacing: .07em; color: var(--muted);
}
.group-col ul { margin: 0; padding-left: 1.1em; }
.group-col li { margin: 0 0 .4rem; padding-left: .2em; line-height: 1.5; }

/* a hairline where two same-coloured sections meet */
.section-rule { border-top: 1px solid var(--rule); }


/* ------------------------------------------------------------------ *
 * Page alignment
 *
 * The template gave each section its own geometry: #aboutme and #teaching
 * put a 30% image column first, so their text began ~400px in, while
 * #research began at the container edge. Three different measures and two
 * different left edges down one page.
 *
 * One left edge now, and two widths only: --measure for anything you read
 * as prose, and the full container for listings. The two photographs move
 * to the right of the prose, into space that was empty anyway.
 * ------------------------------------------------------------------ */
.wrapper .inner, #banner .inner {
  width: min(76rem, 92vw);
  margin-inline: auto;
  --measure: min(46rem, calc(100% - 22rem));
}
.wrapper.style1 .flex.flex-2, .wrapper.style2 .flex.flex-2 { align-items: flex-start; }
.flex.flex-2 .col.col2 {
  order: 1; width: auto; flex: 1 1 auto; max-width: var(--measure);
}
.flex.flex-2 .col.col1 {
  order: 2; flex: 0 0 auto; width: 30%; max-width: 22rem;
}
.prog-overview, .prog-home .prog-overview { max-width: var(--measure); }
.wrapper .inner > p, .wrapper .inner > ul { max-width: var(--measure); }
.col.col2 > p, .col.col2 > ul { max-width: none; }

@media (max-width: 980px) {
  .wrapper .inner, #banner .inner { width: 92vw; --measure: min(46rem, 100%); }
}
@media (max-width: 736px) {
  /* stacked: put the picture back above the text, as the markup has it */
  .flex.flex-2 .col.col1, .flex.flex-2 .col.col2 { order: initial; max-width: none; width: 100%; }
}
