/* ==========================================================================
   Andrea Kleinsmith — site styles
   Edit the tokens in :root to re-skin the whole site.
   ========================================================================== */

:root {
  /* --- Color tokens (light) ------------------------------------------- */
  --paper:        #FFFFFF;   /* page background */
  --paper-2:      #F3F4F9;   /* subtle panels / alternating sections — indigo-tinted */
  --card:         #FFFFFF;
  --ink:          #15202C;   /* primary text — near-black, slight blue cast */
  --ink-2:        #47525F;   /* secondary text */
  --ink-3:        #7A8694;   /* meta text */
  --rule:         #E2E4EF;   /* hairlines, borders — indigo-tinted */
  --accent:       #48558E;   /* muted indigo — links, accents */
  --accent-soft:  #EAECF6;   /* accent tint for chips/badges */
  --accent-ink:   #36406C;   /* accent text on light tint */
  --accent-line:  #C3C7DC;   /* accent-tinted hairline (panel frames) */
  --gold:         #B8912F;   /* muted gold — award and candidacy markers */
  --hover:        #793D6E;   /* plum — menu hover */

  /* --- Type ------------------------------------------------------------ */
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.2rem, 1.13rem + 0.35vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.32rem + 0.65vw, 1.75rem);
  --step-3:  clamp(1.8rem, 1.55rem + 1.1vw, 2.4rem);
  --step-4:  clamp(2.2rem, 1.7rem + 2.2vw, 3.4rem);

  /* --- Layout ---------------------------------------------------------- */
  --measure: 68ch;
  --wrap: 1340px;
  --wrap-narrow: 820px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 10px;
  --radius-sm: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #10151B;
    --paper-2:     #171B28;
    --card:        #171B28;
    --ink:         #E8EDF2;
    --ink-2:       #B3BDC8;
    --ink-3:       #8694A2;
    --rule:        #2A3040;
    --accent:      #A8AFD6;
    --accent-soft: #1E2233;
    --accent-ink:  #C2C7E4;
    --accent-line: #3A4059;
  --gold:        #D9B860;
  --hover:       #C89BBE;
    --gold:        #D9B860;
    --hover:       #C89BBE;
  }
}

:root[data-theme="dark"] {
  --paper:       #10151B;
  --paper-2:     #171B28;
  --card:        #171B28;
  --ink:         #E8EDF2;
  --ink-2:       #B3BDC8;
  --ink-3:       #8694A2;
  --rule:        #2A3040;
  --accent:      #A8AFD6;
  --accent-soft: #1E2233;
  --accent-ink:  #C2C7E4;
  --accent-line: #3A4059;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 2px;
}
a:hover { color: var(--hover); text-decoration-color: currentColor; }

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

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); font-weight: 700; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

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

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

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

.section { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); }
/* Alternating bands removed — sections sit on the page background.
   The class is kept so a band can be switched back on in one place. */
.section--tint { background: none; border-block: 0; }
/* Tighter top padding — pulls content up close to the page heading */
.section--snug { padding-top: clamp(1.25rem, 2.5vw, 1.75rem); }

.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.85rem;
}

.lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); }

/* Biography block — set a little smaller and tighter than body copy.
   Raise --bio-leading if you'd like the lines to breathe more. */
.bio {
  --bio-leading: 1.4;
  font-size: 1rem;
  line-height: var(--bio-leading);
  max-width: 80ch;
}
.bio p { margin: 0 0 0.95em; max-width: none; }
.bio p:last-child { margin-bottom: 0; }

.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
/* The compact ABI Lab mark sits ahead of the name. It is a logo, so it is an
   <img> and keeps its own colours. */
.brand__mark { width: auto; height: 2.5em; flex: none; }
@media (max-width: 560px) { .brand__mark { height: 2em; } }

.brand span { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink); font: inherit;
  padding: 0.4rem 0.7rem; cursor: pointer;
}

.nav {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.25rem 1.1rem;
  list-style: none; margin: 0; padding: 0; max-width: none;
}

.nav a {
  display: block;
  padding: 0.35rem 0;
  font-size: var(--step--1);
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
/* Hover: the underline opens from the centre, in plum */
.nav a { position: relative; transition: color .15s ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  width: 0; height: 2px;
  background: var(--hover);
  transition: width .18s ease, left .18s ease;
}
.nav a:hover { color: var(--hover); }
.nav a:hover::after { width: 100%; left: 0; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

.hero { padding-block: clamp(2rem, 4.5vw, 3.25rem) clamp(1.5rem, 3vw, 2.25rem); }

/* Contact column on the left, bio on the right */
.hero__grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  /* On a phone the name reads first, the contact column follows */
  .hero__grid > .profile { order: 2; }
  .hero__grid > div { order: 1; }
}

.hero__name {
  font-size: var(--step-4);
  margin-bottom: 0.25em;
}
.hero__role {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 1.4rem;
  max-width: 34ch;
}

/* Profile card ------------------------------------------------------------ */

.profile { position: sticky; top: 92px; }

/* Uncropped photo — no fixed aspect ratio, no object-fit cropping */
.profile__photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.profile__caption {
  font-size: var(--step--1);
  color: var(--ink-3);
  margin: 0.6rem 0 1.2rem;
}

.profile__links { list-style: none; margin: 0; padding: 0; max-width: none; }
.profile__links li {
  border-top: 1px solid var(--rule);
  padding: 0.5rem 0;
  font-size: var(--step--1);
}
.profile__links li:last-child { border-bottom: 1px solid var(--rule); }
.profile__links a { text-decoration: none; font-weight: 550; }
.profile__links a:hover { text-decoration: underline; }
.profile__links .label { color: var(--ink-3); display: inline-block; min-width: 7.5em; }

@media (max-width: 860px) {
  .profile { position: static; max-width: 340px; }
}

/* ==========================================================================
   Cards & grids
   ========================================================================== */

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.card h3 { margin-bottom: 0.35em; color: var(--accent); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p:last-child { margin-bottom: 0; }
.card p { max-width: none; font-size: 0.875rem; line-height: 1.3; }

.card--link { text-decoration: none; color: var(--ink); display: block; transition: border-color .15s, transform .15s; }
.card--link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card--link .more { color: var(--accent); font-weight: 600; font-size: var(--step--1); }

/* Project card: image, description, publications from the work */
.card--work { display: flex; flex-direction: column; }
.card__media {
  aspect-ratio: 15 / 4;
  min-height: 0;
  margin: -1.4rem -1.5rem 1.1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  border-width: 0 0 1px 0;
  border-style: solid;
}
.card--work img.card__media {
  width: calc(100% + 3rem);
  object-fit: cover;
  border-color: var(--rule);
}
.card__pubs-title {
  /* "Selected publications from this work" */
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 1.1rem 0 0.4rem;
}
.card__pubs {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-width: none;
}
.card__pubs li {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-2);
  padding: 0.3rem 0;
  border-top: 1px solid var(--rule);
}
.card__pubs li:first-child { border-top: 0; }
.card__pubs a { text-decoration: none; }
.card__pubs a:hover { text-decoration: underline; }
.card--work > p.small:last-child { margin-top: auto; }

/* Course card: code, title, terms taught */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1rem; list-style: none; margin: 1.4rem 0 0; padding: 0; max-width: none; }
.ccard { border: 1px solid var(--rule); border-radius: 9px; padding: 1rem 1.1rem; background: var(--card); }
.ccard .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.5rem;
}
.ccard .t { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  line-height: 1.25; display: block; color: var(--accent); }
.ccard .alt { display: block; font-size: 0.73rem; color: var(--ink-3); margin-top: 0.3rem; line-height: 1.3; }
.ccard .terms {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  color: var(--ink-3);
  line-height: 1.6;
  margin-top: 0.6rem;
}
/* Link to the course syllabus, with the term it is from.
   A card that has one is clickable anywhere: the link below stretches to
   cover the card, so there is still just one link for a screen reader. */
.ccard { display: flex; flex-direction: column; position: relative; }
.ccard:has(.syllabus) { transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ccard:has(.syllabus):hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 2px 10px rgba(21, 32, 44, 0.06);
}
.ccard:has(.syllabus:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.syllabus:focus-visible { outline: none; }
.syllabus::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ccard:has(.syllabus):hover .syllabus { text-decoration: underline; }
.syllabus {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}
.syllabus svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; opacity: 0.85; }
.syllabus:hover { text-decoration: underline; }
.syllabus .sem {
  font-weight: 400;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.syllabus .sem::before { content: "\00b7\00a0"; }

.key { font-size: var(--step--1); color: var(--ink-3); margin: 1.2rem 0 0; }

/* Research area card with number */
.area { position: relative; }
.area__num {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--ink-3);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   News list
   ========================================================================== */

.news { list-style: none; margin: 0; padding: 0; max-width: 78ch; }
/* Timeline: a spine with a node per item, thumbnail on the left */
.news {
  padding-left: 1.6rem;
  border-left: 2px solid var(--rule);
}
.news li {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1rem;
  padding: 0 0 1.3rem 0;
  align-items: start;
}
.news li:last-child { padding-bottom: 0; }
.news li::before {
  content: "";
  position: absolute;
  left: -2.07rem; top: 0.45rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper-2);
}
.news .news__thumb { grid-column: 1; grid-row: 1 / 3; }
.news time {
  grid-column: 2; grid-row: 1;
  color: var(--ink-3);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.news p { grid-column: 2; grid-row: 2; margin: 0; max-width: 84ch; }
.news .award { margin: 0 0.35em 0 0; }
.news .award svg { width: 1.012em; height: 1.012em; vertical-align: -0.15em; }

.news__thumb {
  width: 74px;
  height: 74px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--paper-2);
  min-height: 0;
  font-size: var(--step--1);
}

@media (max-width: 560px) {
  .news { padding-left: 1.1rem; }
  .news li { grid-template-columns: 56px minmax(0, 1fr); column-gap: 0.75rem; }
  .news li::before { left: -1.57rem; }
  .news__thumb { width: 56px; height: 56px; }
}

/* ==========================================================================
   Horizontal strip — news and media coverage on the About page
   Scrolls sideways, so a long list costs no vertical space.
   ========================================================================== */

.strip {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0 0 0.9rem;
  max-width: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.strip > li { flex: 0 0 236px; scroll-snap-align: start; }
.strip--work > li { flex: 0 0 235px; }
.strip__meta { display: block; font-size: 0.72rem; color: var(--ink-3); padding: 0 0.85rem; }
.strip__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--accent);
  padding: 0.7rem 0.85rem 0.1rem;
}
.strip__pubs {
  margin: 0.5rem 0 0.9rem;
  padding: 0 0.85rem;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--ink-2);
  list-style: none;
}
.strip__pubs li { padding: 0.2rem 0; border-top: 1px solid var(--rule); }
.strip__pubs li:first-child { border-top: 0; }

.strip__card {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 9px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .15s ease, transform .15s ease;
}
.strip__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.strip__card:hover p { text-decoration: underline; }

.strip__shot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;   /* keeps heads in frame on portraits */
  border-bottom: 1px solid var(--rule);
}
.strip__shot--none {
  background: repeating-linear-gradient(45deg,
    var(--paper-2), var(--paper-2) 9px, var(--card) 9px, var(--card) 18px);
}
.strip time {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-3);
  padding: 0.7rem 0.85rem 0;
}
.strip p {
  margin: 0.15rem 0 0.85rem;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Publications
   ========================================================================== */

.pub-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0 0 2rem; padding: 0; list-style: none; max-width: none;
}
.chip {
  font: inherit; font-size: var(--step--1); font-weight: 550;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-ink);
}

.pub-group { margin-bottom: 3rem; }
.pub-group > h2 {
  font-size: var(--step-2);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--accent);
  display: inline-block;
}

.pubs { list-style: none; margin: 1.25rem 0 0; padding: 0; max-width: 88ch; }

.pub {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0 1.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}
.pub:last-child { border-bottom: 1px solid var(--rule); }

.pub__id {
  font-size: var(--step--1);
  font-weight: 650;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 0.2em;
}
.pub__title { font-weight: 600; color: var(--ink); display: block; margin-bottom: 0.2rem; }
.pub__authors { font-size: var(--step--1); color: var(--ink-2); display: block; margin-bottom: 0.2rem; }
.pub__venue { font-size: var(--step--1); color: var(--ink-3); display: block; }
.pub__venue em { color: var(--ink-2); font-style: italic; }

.pub__links { margin-top: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pub__links a {
  font-size: var(--step--1); font-weight: 600; text-decoration: none;
}
.pub__links a::before { content: "↗ "; opacity: 0.6; }

.badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: var(--radius-sm);
  padding: 0.12rem 0.45rem;
  vertical-align: 0.1em;
  margin-left: 0.4rem;
}

@media (max-width: 560px) {
  .pub { grid-template-columns: 1fr; }
  .pub__id { padding-top: 0; margin-bottom: 0.15rem; }
}

.legend {
  font-size: var(--step--1);
  color: var(--ink-3);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  max-width: 78ch;
}
.legend p { max-width: none; margin: 0; }

/* ==========================================================================
   People
   ========================================================================== */

.people {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  list-style: none; margin: 1.25rem 0 0; padding: 0; max-width: none;
}

/* Alumni grids run 25% smaller than the current-student grids */
.people--sm {
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1.15rem;
}
.people--sm .person__name { font-size: 0.92em; }
.people--sm .person__meta,
.people--sm .person__now,
.people--sm .person__deg { font-size: 0.8rem; }

.person__photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper-2);
  margin-bottom: 0.7rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
/* Photo repeats the name's link. Hidden from screen readers so the person is
   announced once; the visible cue is a lift and an indigo outline. */
.person__photolink { display: block; border-radius: var(--radius); }
.person__photolink:hover .person__photo,
.person__photolink:focus-visible .person__photo {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 5px 16px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .person__photolink:hover .person__photo { transform: none; }
}

/* Logos and tall collages: show the whole image rather than cropping it */
.strip__shot--fit,
.news__thumb--fit {
  object-fit: contain;
  background: #fff;
  padding: 6px;
}

/* Photo credit inside a strip card */
/* Photo credit, directly under the image it belongs to */
.strip__credit {
  display: block;
  padding: 0.35rem 0.85rem 0;
  font-size: 0.6rem;
  line-height: 1.3;
  text-align: left;
  color: var(--ink-3);
}

/* Photo or design credit inside a news item */
.news .credit {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78em;
  color: var(--ink-3);
}

/* News thumbnail repeats its item's link — hidden from screen readers, since
   the item's own link is already in the text. */
.news__thumblink { display: block; grid-column: 1; grid-row: 1 / 3; }
.news__thumblink .news__thumb {
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  border: 1px solid var(--rule);
}
.news__thumblink:hover .news__thumb,
.news__thumblink:focus-visible .news__thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 5px 16px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .news__thumblink:hover .news__thumb { transform: none; }
}

/* ==========================================================================
   Strip controls — chevrons instead of a scrollbar
   The buttons are added by main.js, so without scripting the strip keeps its
   scrollbar and still works. Only .strip--nav (the scripted state) hides it.
   ========================================================================== */

.strip-wrap { position: relative; }
.strip-wrap .strip--nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.strip-wrap .strip--nav::-webkit-scrollbar { display: none; }

.strip-btn {
  position: absolute;
  top: 110px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(21, 32, 44, 0.12);
  transition: border-color .15s ease, color .15s ease, opacity .15s ease, visibility .15s;
}
.strip-btn:hover { border-color: var(--hover); color: var(--hover); }
.strip-btn svg { width: 18px; height: 18px; fill: currentColor; filter: none; }
.strip-btn--prev { left: 6px; }
.strip-btn--next { right: 6px; }
.strip-btn[disabled] { opacity: 0; visibility: hidden; }

@media (max-width: 700px) {
  .strip-btn { display: none; }
  .strip-wrap .strip--nav { scrollbar-width: thin; }
  .strip-wrap .strip--nav::-webkit-scrollbar { display: initial; }
}

/* Figure beside a research thread — placeholders share the cap so the
   column edge stays straight until every thread has a real image. */
.grid--2 > div > .placeholder { max-width: 340px; }
.figure {
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
}

/* Two buttons side by side */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Keeps the external-link arrow attached to the last word of a name */
.nb { white-space: nowrap; }

/* Hidden container for the icon-outline SVG filters */
.icon-filters { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Monogram used in place of a photograph */
.person__mono {
  width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.7rem;
}

.person__name { font-weight: 650; display: block; }
svg.ext {
  width: 0.72em; height: 0.72em;
  fill: var(--ink-3);
  display: inline-block;
  margin-left: 0.3em;
  vertical-align: 0.02em;
}
a:hover svg.ext { fill: var(--hover); }
/* Name links share one treatment: ink, no underline; plum underlined on hover */
.person__name a,
.nc-name a,
.roster__name a,
.person__award a {
  color: var(--ink);
  font-weight: inherit;
  text-decoration: none;
}
.person__name a:hover,
.nc-name a:hover,
.roster__name a:hover,
.person__award a:hover { color: var(--hover); text-decoration: underline; }
.person__meta { font-size: var(--step--1); color: var(--ink-3); display: block; }

/* Alumni: current position leads, degree drops below in small grey */
.person__now {
  display: block;
  font-size: var(--step--1);
  line-height: 1.35;
  color: var(--ink);
  margin-top: 0.15rem;
}
.person__deg {
  display: block;
  font-size: var(--step--1);
  color: var(--ink-3);
  margin-top: 0.2rem;
}

/* Inline marker beside a name (candidacy, award) */
.award,
.cand {
  display: inline-block;
  margin-left: 0.35em;
  vertical-align: 0.05em;
}
.award svg,
.cand svg { display: inline-block; }
.award svg { width: 2.156em; height: 2.156em; }   /* 25% smaller */
.cand  svg { width: 0.914em; height: 0.914em; }   /* a further 25% smaller */

/* ==========================================================================
   Icon treatment — one rule for every icon on the site
   Indigo fill with a plum line traced around the OUTER silhouette only, so
   counters and holes (the LinkedIn letterforms, the envelope fold) stay clean.
   The line is drawn by the SVG filters defined at the top of every page.
   Radius is in viewBox units, so it scales with the icon; the smallest icons
   use the finer filter so the line does not swallow the shape.
   ========================================================================== */
.ilink svg,
.syllabus svg,
svg.ext,
.award svg,
.cand svg {
  fill: var(--accent);
  stroke: none;
  filter: url(#edge);
}
/* Mid-sized icons — a finer line */
.ilink svg,
.syllabus svg { filter: url(#edge-fine); }

/* Smallest icons — finer still, so the line does not crowd the shape */
svg.ext,
.cand svg,
.strip .award svg,
.news .award svg { filter: url(#edge-xfine); }

/* Award marker inside a strip card sits at the scale of the card's text */
.strip .award svg { width: 0.95em; height: 0.95em; vertical-align: -0.12em; }
.strip .award { margin: 0 0.3em 0 0; }

/* The flood colour follows the theme token */
#edge feFlood,
#edge-fine feFlood,
#edge-xfine feFlood { flood-color: var(--hover); }

a:hover .ilink svg,
a:hover svg.ext { fill: var(--hover); }

/* Candidate marker sits before the name */
.person__name .cand { margin: 0 0.3em 0 0; line-height: 0; }
.person__meta .cand { margin: 0 0.3em 0 0; vertical-align: -0.08em; }
/* Award named directly under the person it belongs to */
.person__award {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--step--1);
  line-height: 1.25;
  color: var(--ink-2);
  margin-top: 0.25rem;
}
.person__award .award { margin-left: 0; line-height: 0; }

.legend-line {
  display: flex; align-items: center; gap: 0.4em;
  font-size: var(--step--1);
  color: var(--ink-3);
  margin: 1.4rem 0 0;
  max-width: none;
}
.legend-line .cand,
.legend-line .award { margin-left: 0; line-height: 0; }

/* Visually hidden, still read by screen readers */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Icon + label link (Google Scholar, LinkedIn) */
.ilink { display: inline-flex; align-items: center; gap: 0.45em; }
.ilink svg {
  width: 1em; height: 1em;
  flex: none;
  fill: currentColor;
  opacity: 0.85;
}

/* The ABI Lab mark used in place of an icon — it is a multi-colour logo,
   so it is an <img>, not an inline SVG, and takes none of the icon tinting. */
.ilink__mark {
  width: 1.35em;
  height: 1.35em;
  flex: none;
  margin-inline-start: -0.12em;   /* the mark carries its own breathing room */
  opacity: 1;
}
/* Marks that are taller than they are wide (the HCC icon) */
.ilink__mark--tall { width: auto; height: 1.5em; margin-inline-start: 0; }
.site-footer .ilink { text-decoration: none; }
.site-footer .ilink:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Optional personal site / LinkedIn link under a name */
.person__link,
.roster__link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: var(--step--1);
  font-weight: 550;
  text-decoration: none;
}
.person__link:hover,
.roster__link:hover { text-decoration: underline; }
.roster__link { margin-top: 0.15rem; }

/* Columned name list — fits as many ~15rem columns as the width allows, up to 3 */
.namecols {
  columns: 15rem 3;
  column-gap: 2.1rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  max-width: none;
}
.namecols li {
  break-inside: avoid;
  padding: 0.35rem 0;
  font-size: var(--step--1);
  line-height: 1.3;
}
.namecols .nc-name { font-weight: 650; display: block; color: var(--ink); }
.namecols .nc-dept { display: block; color: var(--ink-3); }
.namecols .nc-prog { display: block; color: var(--ink-3); }

/* Year columns — name, department, programme; four across */
.years {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.8rem 1.4rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  max-width: none;
}
.years > li { border-top: 2px solid var(--accent); padding-top: 0.6rem; }
.years .yl {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.7rem;
}
.years .p { margin-bottom: 0.85rem; }
.years .p:last-child { margin-bottom: 0; }
.years .nc-name { display: block; font-size: var(--step--1); font-weight: 650; line-height: 1.3; }
.years .nc-dept,
.years .nc-prog { display: block; font-size: var(--step--1); color: var(--ink-3); line-height: 1.3; }

/* Subheading above a roster group */
.subhead {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.25rem 0 0;
}
.subhead + .roster { margin-top: 0.5rem; }

/* Compact roster rows (alumni, committee lists) */
.roster { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 82ch; }
.roster li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  font-size: var(--step-0);
}
.roster li:last-child { border-bottom: 1px solid var(--rule); }
.roster .roster__name { font-weight: 600; }
.roster .roster__meta { color: var(--ink-3); font-size: var(--step--1); display: block; }

/* ==========================================================================
   Teaching / talks / generic definition rows
   ========================================================================== */

.rows { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 84ch; }
.rows > li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.25rem 1.25rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.rows .when { color: var(--ink-3); font-size: var(--step--1); font-variant-numeric: tabular-nums; padding-top: 0.2em; }
.rows .what { font-weight: 600; }
.rows .detail { color: var(--ink-2); font-size: var(--step--1); display: block; font-weight: 400; }

@media (max-width: 560px) {
  .rows > li { grid-template-columns: 1fr; }
}

/* Single-column variant — no date gutter */
.rows--plain > li { grid-template-columns: 1fr; }

/* Quieter variant for secondary lists (talks, panels) */
.rows--compact > li { padding: 0.55rem 0; }
.rows--compact .what { font-weight: 500; font-size: var(--step--1); }
.rows--compact .detail { font-size: var(--step--1); color: var(--ink-3); }
.rows--compact .when { font-size: var(--step--1); }

/* Course code pill */
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.05rem 0.4rem;
}

/* ==========================================================================
   Photo gallery
   ========================================================================== */

.subalbum {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--ink);
  margin: 1.8rem 0 0;
}
.subalbum:first-of-type { margin-top: 0.4rem; }
/* the heading belongs to the photos under it, not to the gap above them */
.subalbum + .gallery { margin-top: 0.5rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: none;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.gallery figcaption {
  font-size: var(--step--1); color: var(--ink-3);
  margin-top: 0.45rem;
}

/* ==========================================================================
   Callouts, logos, buttons
   ========================================================================== */

.callout {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 76ch;
}
.callout p:last-child { margin-bottom: 0; }

.callout--tight { margin-top: 1.75rem; max-width: 80ch; }
.callout__title {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}
.callout--tight p { font-size: var(--step--1); margin-bottom: 0.7em; line-height: 1.3; }

/* --------------------------------------------------------------------------
   Framed panel — the label sits in a gap in the border, like a fieldset.
   The label's background must match whatever sits BEHIND the panel, or the
   gap won't read cleanly. It is white here because the hero is white; change
   --b4-behind if you move this panel onto a tinted section.
   ----------------------------------------------------------------------- */
.callout--b4 {
  --b4-behind: var(--paper);
  position: relative;
  background: none;
  border: 1px solid var(--accent-line);
  border-left-width: 1px;
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.4rem;
  max-width: 80ch;
  margin-top: 2rem;
}
.callout--b4 .callout__title {
  position: absolute;
  top: -0.62rem;
  left: 1.5rem;
  margin: 0;
  padding: 0 0.55rem;
  background: var(--b4-behind);
  color: var(--accent);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.callout--b4 p {
  max-width: none;
  font-size: var(--step--1);
  line-height: 1.3;
  color: var(--ink-2);
  margin-bottom: 0.7em;
}
.callout--b4 p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: var(--step--1);
  text-decoration: none;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  transition: background .15s ease, border-color .15s ease, color .15s ease,
              box-shadow .15s ease, transform .15s ease;
}
/* Hover: the button lifts and fills plum. The label stays white. */
.btn:hover,
.btn:focus-visible {
  background: var(--hover);
  border-color: var(--hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--hover) 34%, transparent);
}
.btn--ghost {
  background: transparent; color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--hover);
  border-color: var(--hover);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:focus-visible { transform: none; }
}

.logos {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.75rem; list-style: none; margin: 1.25rem 0 0; padding: 0;
}
.logos img { height: 46px; width: auto; opacity: 0.8; }
.logos img:hover { opacity: 1; }

/* Placeholder box — delete these once real assets are in place */
.placeholder {
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 10px, var(--paper) 10px, var(--paper) 20px);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-size: var(--step--1);
  text-align: center;
  padding: 1rem;
  min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding-block: 2.5rem 3rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.site-footer__grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-footer h4 { margin-bottom: 0.4em; font-family: var(--font-body); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.15rem 0; }
.site-footer a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 2px; }
.site-footer a:hover { text-decoration-color: currentColor; }
.site-footer__note { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-3); }

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */

.page-head {
  padding-block: clamp(1.6rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--rule);
}
.page-head h1 { font-size: var(--step-3); margin-bottom: 0.4em; }

/* A lockup set beside a page heading */
.page-head__row { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.4rem); flex-wrap: wrap; }
.page-head__row h1 { margin-bottom: 0; }
.page-head__mark { width: auto; height: clamp(62px, 9vw, 92px); flex: none; }

/* The ABI Lab page leads with the lockup instead of a typeset heading.
   The image is a 4x PNG, so it is shown at a quarter of its pixel size. */
.page-head__logo { margin-bottom: 0.4em; line-height: 0; }
.page-head__logo img {
  display: block;
  width: min(100%, 406px);
  height: auto;
}
.page-head .lead { max-width: 62ch; margin-bottom: 0; }

/* TOC for long pages */
.toc {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 1.1rem;
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0 0 0.25rem;
  max-width: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.toc li { flex: none; }
.toc a { white-space: nowrap; }
.toc a:hover,
.toc a:focus,
.toc a:active { color: var(--hover); }
/* Keep the chosen link plum after the jump */
.toc a.is-current { color: var(--hover); font-weight: 650; }
.toc a { font-size: var(--step--1); font-weight: 550; text-decoration: none; }

/* ==========================================================================
   Work cards — project above, its publications in an inset panel below
   The card is a grey tray holding two white panels, so the project link
   visibly ends where the publication list begins.
   ========================================================================== */

.strip--work > li {
  border: 1px solid var(--rule);
  border-radius: 9px;
  overflow: hidden;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
}
.wcard__head {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  transition: background .15s ease;
}
.wcard__head:hover { background: var(--accent-soft); }
.wcard__head:hover .strip__title { text-decoration: underline; }
.wcard__head:hover .wcard__go { color: var(--accent); }
.wcard__head .strip__shot,
.wcard__head .strip__shot--none { border-bottom: 1px solid var(--rule); }
.wcard__go {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-3);
  padding: 0.45rem 0.85rem 0.8rem;
}
.wcard__pubs {
  margin: 0.7rem;
  padding: 0.7rem 0.8rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 7px;
}
.wcard__lbl {
  margin: 0 0 0.3rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wcard__pubs ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.wcard__pubs > ul > li {
  padding: 0.32rem 0;
  font-size: 0.77rem;
  line-height: 1.35;
}
.wcard__pubs > ul > li + li { border-top: 1px solid var(--rule); }
.wcard__pubs a { color: var(--ink-2); text-decoration: none; }
.wcard__pubs a:hover { color: var(--hover); text-decoration: underline; }
.wcard__pubs a::after { content: " \2197"; color: var(--ink-3); }
.wcard__pubs .nolink { color: var(--ink-3); }


/* Papers beyond the first three */
.more { margin-top: 0.6rem; }
.more > summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
  padding: 0.3rem 0;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 0.45em;
  color: var(--accent);
  transition: transform .15s ease;
}
.more[open] > summary::before { transform: rotate(90deg); }
.more > summary:hover { color: var(--hover); }
.more .n { color: var(--ink-3); font-weight: 500; }
.more .cites { margin-top: 0.2rem; }

/* A card with no publication panel fills its own height */
.strip--work > li { background: var(--card); }
.wcard__head:only-child { height: 100%; border-bottom: 0; }

/* ==========================================================================
   Recent publications strip — each card is a paper's title block
   ========================================================================== */

.strip--pubs > li { flex: 0 0 260px; }
.strip--pubs .strip__card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
}
.strip--pubs .strip__card:hover { border-color: var(--accent); }

/* Typeset citation — venue, title, authors. No image to maintain. */
.pub__v {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--hover);
  padding: 0.75rem 0.85rem 0;
}
.pub__t {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--accent);
  padding: 0.5rem 0.85rem 0.2rem;
}
.pub__a {
  font-size: 0.72rem;
  color: var(--ink-3);
  padding: 0 0.85rem 0.85rem;
  margin-top: auto;
}

/* The old image cards, kept in case a figure is wanted again. */
.pub__shot {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
}

/* ==========================================================================
   News & Events strip on the About page — compact cards
   ========================================================================== */

.strip--news > li { flex: 0 0 170px; }
.strip--news time { font-size: 0.68rem; }
.strip--news p { font-size: 0.78rem; -webkit-line-clamp: 2; margin-bottom: 0.2rem; }
.strip--news .chip {
  font-size: 0.55rem;
  padding: 0.05rem 0.34rem;
  margin-right: 0.35em;
  letter-spacing: 0.05em;
}
.strip--news .strip__card::after {
  content: "[more]";
  display: block;
  padding: 0 0.85rem 0.8rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}
.strip--news .strip__card:hover::after { color: var(--hover); text-decoration: underline; }

/* Image and its credit share a frame, so the credit can sit on the image */
.strip__figure { position: relative; display: block; }
.strip__figure .strip__credit {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.18rem 0.5rem;
  background: rgba(21, 32, 44, 0.58);
  color: #fff;
  font-size: 0.58rem;
  line-height: 1.25;
}

/* Photographs crop to their subject; graphics are shown whole */
.strip--news .strip__shot { object-fit: cover; }
.strip--news img[src*="people/"]        { object-position: center 20%; }
.strip--news img[src*="news-best-demo"] { object-position: center 18%; }
.strip--news img[src*="hcc20-event"]    { object-position: center center; }
.strip--news img[src*="robot-dance"]    { object-position: center 30%; }
.strip--news img[src*="brain-meeting"]  { object-position: center center; }
.strip--news img[src*="telemedicine"]   { object-position: center 28%; }
.strip--news img[src*="user-studies-lab"] { object-position: center 42%; }
.strip--news img[src*="first-responders"] { object-position: center 55%; }
.strip--news img[src*="cwit-award"]     { object-position: center 35%; }
.strip--news .strip__shot--fit,
.strip--news img[src*="acii-2026"],
.strip--news img[src*="hcc20-tshirt"],
.strip--news img[src*="umbc-hcc"] {
  object-fit: contain;
  background: var(--card);
  padding: 4px;
}
/* The ACII mark is wide: a little more room so the city line fits */
.strip--news img[src*="acii-2026"] { padding: 10px 6px; }

/* ==========================================================================
   Side rail — section navigation for a long page (People)
   Collapses to a hamburger button below the header breakpoint.
   ========================================================================== */

.railpage {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}
.rail { position: sticky; top: 1.5rem; }
.rail-toggle { display: none; }
.toc--rail {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  overflow: visible;
  border-left: 2px solid var(--rule);
}
.toc--rail li { flex: none; }
.toc--rail a {
  display: block;
  white-space: normal;
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.4rem 0 0.4rem 0.9rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
}
.toc--rail a:hover { color: var(--hover); }
.toc--rail a.is-current {
  color: var(--hover);
  font-weight: 650;
  border-left-color: var(--hover);
}

/* Rail submenu — sections nested under a section */
.toc--sub { list-style: none; margin: 0.1rem 0 0.3rem; padding: 0; }
.toc--sub a {
  padding-left: 1.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
}
.toc--sub a:hover { color: var(--hover); }
.toc--sub a.is-current { color: var(--hover); font-weight: 600; }

/* Sections inside the rail layout are panels, not full-bleed bands */
.railbody .section { padding-block: clamp(1.25rem, 2.5vw, 1.9rem); }
.railbody .section--tint { background: none; border: 0; padding-inline: 0; }
.railbody .section:first-child { padding-top: 0; }

@media (max-width: 880px) {
  .railpage { display: block; }
  .rail { position: static; margin-bottom: 1rem; }
  .rail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: none;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 550;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
  }
  .rail-toggle svg { width: 1.05em; height: 1.05em; fill: currentColor; }
  .toc--rail {
    display: none;
    border-left: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--rule);
  }
  .toc--rail.is-open { display: block; }
  .toc--rail a {
    padding: 0.6rem 0;
    margin-left: 0;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
  .toc--rail a.is-current { border-left: 0; }
}


/* ==========================================================================
   News & coverage — one date-ordered stream, grouped by year
   ========================================================================== */

.stream { display: grid; gap: 1.4rem; margin-top: 1.4rem; }
.stream__yr {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}
.stream__yr h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--ink-3);
  position: sticky;
  top: 1rem;
}
.stream__yr ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.stream__yr > ul > li {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.8rem;
  align-items: start;
  /* the tint reaches 8px to the left of the image */
  padding: 0.45rem 0.4rem 0.45rem 8px;
  margin-left: -8px;
  border-top: 1px solid var(--rule);
  border-radius: 7px;
}
.stream__yr > ul > li:first-child { border-top: 0; }
.stream__yr p { margin: 0; font-size: var(--step--1); line-height: 1.38; max-width: 84ch; }
.stream__yr time { color: var(--ink-3); font-size: 0.78rem; margin-right: 0.5em; }

.stream__yr > ul > li > p { grid-column: 2; grid-row: 1 / span 2; }
.stream__thumblink,
.stream__yr > ul > li > .stream__thumb { grid-column: 1; grid-row: 1; }

/* Photo or design credit, on its own line under the item text */
.stream__credit {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.64rem;
  line-height: 1.3;
  text-align: left;
  color: var(--ink-3);
}

.stream__thumb {
  width: 90px; height: 90px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--rule);
  margin-top: 0.1rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stream__thumb--fit { object-fit: contain; background: #fff; padding: 2px; }
.stream__thumb--none {
  display: block;
  background: repeating-linear-gradient(45deg,
    var(--paper-2), var(--paper-2) 7px, var(--card) 7px, var(--card) 14px);
}
.stream__thumblink { display: block; }
.stream__thumblink:hover .stream__thumb,
.stream__thumblink:focus-visible .stream__thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .stream__thumblink:hover .stream__thumb { transform: none; }
}

/* Outlet, byline and photo credit under a press headline */
.stream__meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.76rem;
  color: var(--ink-3);
}

/* "In the press" marker */
/* Scoped to the stream so it does not touch the footer's .chip button */
.stream .chip,
.strip .chip {
  display: inline-block;
  margin-right: 0.45em;
  padding: 0.08rem 0.45rem;
  border-radius: 100px;
  background: none;
  border: 1px solid var(--hover);
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.08em;
}
.stream .award svg { width: 1.012em; height: 1.012em; vertical-align: -0.15em; filter: url(#edge-xfine); }
.stream .award { margin: 0 0.3em 0 0; }

@media (max-width: 560px) {
  .stream__yr { grid-template-columns: 1fr; gap: 0.3rem; }
  .stream__yr h3 { position: static; }
}

/* The whole row is a target; real links inside stay above the overlay */
.stream__hit { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.stream__yr > ul > li:hover { background: var(--accent-soft); }
/* Hovering anywhere on the row lifts its image */
.stream__yr > ul > li:hover .stream__thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 5px 16px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .stream__yr > ul > li:hover .stream__thumb { transform: none; }
}
.stream__yr > ul > li > p a,
.stream__yr > ul > li > .stream__thumblink { position: relative; z-index: 1; }

/* Research threads read a step smaller than body prose */
#reflection p, #affect p, #collaboration p, #embodied p, #broadening p {
  font-size: var(--step--1);
  line-height: 1.45;
}


/* ==========================================================================
   Photos — album index, then the albums
   ========================================================================== */

.albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}
.acard {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 9px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .15s ease, transform .15s ease;
}
.acard:hover { border-color: var(--accent); transform: translateY(-2px); }
.acard:hover .acard__t { color: var(--hover); text-decoration: underline; }
.acard__shot {
  display: block; width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; border-bottom: 1px solid var(--rule);
}
.acard__t {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600; line-height: 1.25;
  color: var(--accent);
  padding: 0.6rem 0.8rem 0.05rem;
}
.acard__n { display: block; font-size: 0.72rem; color: var(--ink-3); padding: 0 0.8rem 0.75rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem;
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  max-width: none;
}
.gphoto a { display: block; }
.gphoto img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.gphoto a:hover img,
.gphoto a:focus-visible img {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateY(-2px);
}
/* Album shown uncropped — for screenshots and anything where the edges matter */
.gallery--whole {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: start;
}
.gallery--whole img {
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--card);
}

/* The term is a label on the photo, not a section of its own */
.gphoto__label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.66rem;
  color: var(--ink-3);
}
.cnt {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 0.6em;
  letter-spacing: 0;
}
.backtop { margin-top: 1rem; font-size: var(--step--1); }
.backtop a { text-decoration: none; font-weight: 550; }
.backtop a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .acard:hover, .gphoto a:hover img { transform: none; }
}

/* Under-construction mark on a parked page */
.uc { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 1rem; }

/* ==========================================================================
   Research threads — image, heading, papers. No descriptions.
   ========================================================================== */

.threads { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 1.6rem; }
.thread {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}
.thread:first-child { border-top: 0; padding-top: 0; }
.thread__img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  display: block;
}
.thread__img--none {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg,
    var(--paper-2), var(--paper-2) 10px, var(--card) 10px, var(--card) 20px);
  display: grid;
  place-items: center;
}
/* Sits over the hatching, centred, until a real figure replaces it. */
.thread__img--none::after {
  content: "Coming soon";
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.thread h2 { margin-bottom: 0.6rem; }

.cites { list-style: none; margin: 0; padding: 0; max-width: none; }
.cites > li { border-top: 1px solid var(--rule); font-size: var(--step--1); line-height: 1.4; }
.cites > li:first-child { border-top: 0; }
/* The whole row is the target, not just the title */
.cites a,
.cites .nolink { display: block; padding: 0.34rem 0.45rem; margin-inline: -0.45rem; border-radius: 6px; }
.cites a { color: var(--ink); text-decoration: none; }
.cites a:hover { color: var(--hover); background: var(--accent-soft); }
.cites a:hover .cite__t { text-decoration: underline; }
.cites a::after { content: " \2197"; color: var(--ink-3); }
.cites .nolink { color: var(--ink); }
.cite__a { font-weight: 600; }
.cite__t { color: var(--accent); }
.cites .nolink .cite__t { color: var(--ink-2); }
.cite__v { color: var(--ink-3); }

@media (max-width: 680px) {
  .thread { grid-template-columns: 1fr; gap: 0.9rem; }
  .thread__img { max-width: 320px; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .pub-filters { display: none; }
  body { background: #fff; color: #000; }
}
