/* NEXDIG Lab — hand-written stylesheet replacing Tailwind.
 *
 * Values are transcribed from the Tailwind 3.4 build that this site shipped
 * before the migration, not from memory. Sections 1 and 2 reproduce Tailwind's
 * Preflight reset: the markup depends on it, and dropping any of it visibly
 * breaks every page (see the notes on each rule).
 */

/* ------------------------------------------------------------------ 1. reset */

*,
::before,
::after {
  box-sizing: border-box;
  border: 0 solid #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  /* Exact Tailwind 3.4 stack. It deliberately omits -apple-system/Segoe UI/
     Roboto; substituting the more familiar stack shifts every line break. */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
  margin: 0;
  line-height: inherit;
}

/* Nav labels are <h1>. Without this they render at 2em bold. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* The two intro paragraphs on the homepage carry no spacing utility and run
   together today. That is the current appearance; keep it. */
blockquote,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
pre {
  margin: 0;
}

menu,
ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Header links and project link pills carry no colour class. Without this they
   turn browser-blue and underlined. */
a {
  color: inherit;
  text-decoration: inherit;
}

b,
strong {
  font-weight: bolder;
}

button {
  background-color: transparent;
  background-image: none;
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

audio,
canvas,
embed,
iframe,
img,
object,
svg,
video {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

code,
kbd,
pre,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

/* ----------------------------------------------------------------- 2. tokens */

:root {
  --usc-red: #990000;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --blue-600: #2563eb;

  --shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
  --shadow-sm: 0 1px 2px 0 #0000000d;
  --shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
  --shadow-lg: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;

  --page-max: 1200px;
}

/* ------------------------------------------------------------------ 3. shell */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 10px 30px;
  background-color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.025em;
  font-weight: 500;
  color: var(--gray-800);
}

.site-header__brand {
  flex: 0 0 auto;
  display: block;
  min-width: 0;
}

.site-header__logo {
  height: 20px;
  width: auto;
  cursor: pointer;
}

/* margin-left:auto keeps the links grouped hard against the right edge instead
   of spreading across the header. */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.nav-link {
  position: relative;
  padding-bottom: 5px;
  white-space: nowrap;
}

.nav-link__inner {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* width:auto only works because the outer <svg> carries a viewBox; without one
   it would fall back to the 300px default replaced-element width. */
.nav-icon {
  height: 20px;
  width: auto;
  flex: none;
  fill: currentColor;
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

/* Replaces the 300ms JS class toggle with the same visual effect, no script. */
.nav-link__inner:active .nav-icon {
  transform: scale(1.4) rotate(15deg);
  color: var(--usc-red);
}

.nav-label {
  display: none;
}

/* Active page: driven by <body class="page-*"> so the header markup is
   identical on every page and lives in exactly one template. */
body.page-home [data-nav="home"] .nav-label,
body.page-people [data-nav="people"] .nav-label,
body.page-people [data-nav="people"] .nav-icon,
body.page-research [data-nav="research"] .nav-label,
body.page-research [data-nav="research"] .nav-icon,
body.page-publications [data-nav="publications"] .nav-label,
body.page-publications [data-nav="publications"] .nav-icon,
body.page-news [data-nav="news"] .nav-label,
body.page-news [data-nav="news"] .nav-icon,
body.page-opportunities [data-nav="opportunities"] .nav-label,
body.page-opportunities [data-nav="opportunities"] .nav-icon {
  color: var(--usc-red);
}

body.page-home [data-nav="home"]::after,
body.page-people [data-nav="people"]::after,
body.page-research [data-nav="research"]::after,
body.page-publications [data-nav="publications"]::after,
body.page-news [data-nav="news"]::after,
body.page-opportunities [data-nav="opportunities"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--usc-red);
  border-radius: 2px;
}

.page {
  padding: 90px 30px 60px;
}

/* The homepage manages its own containers so its bands can span the viewport. */
.page--full {
  padding: 60px 0 60px;
}

.page__inner--full {
  max-width: none;
}

.page__inner {
  max-width: var(--page-max);
  width: 100%;
  margin-inline: auto;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 5px 30px;
  background-color: #000;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1rem;
}

/* ----------------------------------------------------------- 4. shared bits */

.page-title {
  font-size: 30px;
  margin-bottom: 30px;
}

.red-title {
  color: var(--usc-red);
  font-weight: bold;
}

.clickable-link {
  color: var(--usc-red);
  text-decoration: underline;
  cursor: pointer;
}

.separator {
  border-top: 2px solid var(--usc-red);
  margin: 20px 0;
}

.custom-h2 {
  font-size: 26px;
  color: var(--usc-red);
  font-weight: bold;
}

/* ------------------------------------------------------------------- 5. home */

.home { display: block; }

/* Full-width bands with a constrained inner container. Alternating tints give
   the page vertical rhythm -- without them every section reads identically. */
.band { padding: 4.5rem 0; }
.band + .band { padding-top: 4.5rem; }

.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 30px;
}

.band--hero {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background:
    radial-gradient(60rem 26rem at 88% 8%, #9900000c, transparent 70%),
    linear-gradient(180deg, #fafafa, #fff);
  border-bottom: 1px solid var(--gray-200);
}

.band--tint {
  background-color: #fafafa;
  border-block: 1px solid var(--gray-200);
}


.band--cta {
  background-color: var(--usc-red);
  color: #fff;
}

/* --- buttons --- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--gray-300);
  background-color: #fff;
  color: var(--gray-800);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover { border-color: var(--gray-500); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background-color: var(--usc-red);
  border-color: var(--usc-red);
  color: #fff;
}

.btn--primary:hover { background-color: #7d0000; border-color: #7d0000; }

.btn--outline {
  background-color: transparent;
  border-color: var(--usc-red);
  color: var(--usc-red);
}

.btn--outline:hover { background-color: #99000010; }

.btn--light {
  background-color: #fff;
  border-color: #fff;
  color: var(--usc-red);
}

.btn--light:hover { background-color: #ffffffe0; border-color: #ffffffe0; }

.btn--ghost { border-color: transparent; color: var(--gray-500); font-weight: 500; }
.btn--ghost:hover { color: var(--usc-red); border-color: var(--gray-300); }

.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.8125rem; }

/* Artifact buttons: the paper, the code, the demo. These are the things a
   visitor came for, so they are the largest control on the page. */
.btn--lg {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  border-radius: 0.6rem;
}

/* --- hero: logo, tagline, intro. Everything spans the full page column: no
   block in here is narrowed below the width the page itself sets. --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.hero__logo { height: 46px; width: auto; margin-bottom: 0.35rem; }

.hero__tagline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--usc-red);
}

.hero__intro { color: var(--gray-600); line-height: 1.7; }
.hero__intro p + p { margin-top: 0.8rem; }
.hero__intro a { color: var(--usc-red); text-decoration: underline; }








/* --- section scaffolding --- */
.home__section { display: flex; flex-direction: column; gap: 1.5rem; }

.home__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.home__head .section-heading { flex: 1; }

.home__more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--usc-red);
  white-space: nowrap;
}

.home__more:hover { text-decoration: underline; }

.home__split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }

/* --- news --- */
.news-list { display: flex; flex-direction: column; }

.news-item {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--gray-200);
}

.news-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.news-date {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--usc-red);
  margin-bottom: 0.3rem;
}

.news-description { color: var(--gray-700); line-height: 1.6; }

.news-description a { color: var(--gray-800); font-weight: 600; text-decoration: underline; }
.news-description a:hover { color: var(--usc-red); }

/* --- photo gallery: one photo at a time, arrows to move through them ----
   The photos are for looking at, not for opening: nothing in here is a link or
   a button except the controls.

   The track is a scroll-snap strip, so it swipes on a touch screen and still
   works if the JavaScript never runs -- the arrows and dots are hidden until
   site.js unhides them, so no control is ever dead. Every photo is cropped to
   the same 3:2 frame: the lab's photos are a mix of landscape and portrait, so
   each carries its own focus and zoom, otherwise a portrait shot gets cropped
   straight through the middle. */
.carousel {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
}

.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 0.75rem;
  background-color: var(--gray-100);
  /* The dots report the position; a scrollbar under the photo only adds noise. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel__viewport::-webkit-scrollbar { display: none; }

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

.carousel__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* No scroll-snap-stop here: it forbids passing a snap point, so jumping
   straight from the first photo to the third stalls between the two. */
.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.carousel__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.carousel__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* White text over an unknown photo needs the scrim to stay legible. */
.carousel__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.1rem 0.95rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 2px #0009;
  background-image: linear-gradient(to top, #000000bf, #0000005c 55%, #0000);
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding-bottom: 0.2rem;
  border-radius: 9999px;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gray-800);
  background-color: #ffffffe6;
  box-shadow: 0 2px 10px #00000038;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}

.carousel__nav:hover { background-color: #fff; }
.carousel__nav[hidden] { display: none; }

.carousel__nav:focus-visible {
  outline: 2px solid var(--usc-red);
  outline-offset: 2px;
}

.carousel__nav--prev { left: 0.75rem; }
.carousel__nav--next { right: 0.75rem; }

/* Wraps: the gallery has no cap on how many photos an editor adds, and forty
   dots in one row would be squeezed to slivers on a phone. */
.carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.carousel__dots[hidden] { display: none; }

.carousel__dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border-radius: 9999px;
  background-color: var(--gray-300);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}

.carousel__dot:hover { background-color: var(--gray-500); }

.carousel__dot[aria-current="true"] {
  background-color: var(--usc-red);
  transform: scale(1.35);
}

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

@media (max-width: 640px) {
  .carousel__nav { width: 2.25rem; height: 2.25rem; font-size: 1.5rem; }
  .carousel__nav--prev { left: 0.4rem; }
  .carousel__nav--next { right: 0.4rem; }
  .carousel__caption { font-size: 0.8125rem; padding: 2rem 0.85rem 0.8rem; }
}

/* --- call to action --- */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta__heading { font-size: 1.6rem; font-weight: 700; }
.cta__body { margin-top: 0.4rem; color: #ffffffcc; }

/* ----------------------------------------------------------------- 6. people */

.people {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.people__group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.people__heading {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* A grid rather than wrapped fixed-width boxes: cards line up on every row, and
   a long name grows downward instead of being squeezed into a 150px column
   beside its photo. */
.people__list {
  display: grid;
  /* A capped track, not 1fr: cards keep a modest size instead of stretching to
     fill the row when a group only has three or four people in it. Faculty is
     unaffected -- that list is not a grid. */
  grid-template-columns: repeat(auto-fill, minmax(6rem, 6.75rem));
  gap: 1.4rem 1.25rem;
}

.person {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

/* Faculty keeps the photo-beside-text shape: one person, a full title to read,
   and no row of siblings to line up against. */
.people__list--faculty { display: block; }

.person--feature {
  flex-direction: row;
  align-items: center;
  gap: 1.75rem;
  max-width: 46rem;
}

/* Deliberately larger than a member card (8.5rem against 6.75rem): the PI is
   the person most visitors arrive looking for, and size is what says so now
   that nothing else on the page distinguishes the row. */
.person--feature .person__photo { width: 8.5rem; flex: none; }
.person--feature .person__name { font-size: 1.25rem; }

.person__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.6rem;
  background-color: var(--gray-100);
  box-shadow: 0 0 0 1px var(--gray-200), var(--shadow-sm);
}

.person__photo img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.person__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  box-shadow: 0 0 0 1px var(--gray-200);
  background-image: linear-gradient(150deg, #99000010, #ffcc0014);
}

.person__placeholder svg {
  width: 3rem;
  height: 3rem;
  color: var(--gray-300);
  fill: currentColor;
}

.person__body { min-width: 0; }

.person__name {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.person__name a {
  color: var(--red-700);
}

.person__name a:hover {
  text-decoration: underline;
}

.person__blurb {
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gray-600);
}

/* Alumni: a two-column list. Names read down the page and the destination sits
   beside each one, which is the part anyone actually scans for. */
.alums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
  gap: 0.15rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.alum {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0.35rem;
  transition: background-color 0.15s;
}

.alum:hover { background-color: #99000006; }

.alum__name { font-weight: 600; color: var(--gray-800); }
.alum__name a { color: var(--red-700); }
.alum__name a:hover { text-decoration: underline; }

/* The destination sits beside the name rather than pushed to the far right of
   the column: at this width a right-aligned one reads as an unrelated column. */
.alum__where {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.alum__where::before {
  content: "·";
  margin-right: 0.5rem;
  color: var(--gray-300);
}

/* -------------------------------------------------------- 7. shared: venue */

.section-heading {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.25rem;
}

/* "Where it was published". No pill, no border, no background: those all read
   as a button, and this sits directly above the real Paper and Code buttons on
   a project page. The small-uppercase treatment matches the hero tagline, which
   is the site's existing idiom for a label that is not a control. */
.venue {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--usc-red);
}

/* --------------------------------------------------------------- 8. research */

.research__section {
  margin-bottom: 2.25rem;
}

/* Three across, matching the cards on the homepage. A row of tall cards reads
   as a set to compare; the full-width rows this replaced read as a queue. */
.rrows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Deliberately no "widen a lone card" rule here, unlike the homepage: this page
   stacks sections, and a single Past Research card sized to fill its row towers
   over the three-up cards above it. A short last row is what a grid should look
   like. */

/* The whole card is the link, so the target is large and obvious. */
.rrow {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  background-color: #fff;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.rrow:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.rrow:hover .rrow__title {
  color: var(--usc-red);
}

/* A 2:1 letterbox rather than 16:10: on a card this wide the taller frame made
   each one about 350px, and two sections of them never fitted on a screen. The
   crop tool still offers 16:10, which this crops a little further top and
   bottom -- fine for a cover, and the subject stays centred. */
.rrow__media {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background-color: var(--gray-100);
}

.rrow__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rrow:hover .rrow__media img {
  transform: scale(1.04);
}

.rrow__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  /* Grows so the meta line sits on the baseline of every card in the row,
     however long the hooks above it are. */
  flex: 1;
  padding: 0.9rem 1.05rem 1rem;
}

/* Pushed to the bottom of the card, below whatever the hook and venue take. */
.rrow__meta { margin-top: auto; }

.rrow__title {
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 600;
  transition: color 0.2s;
}

.rrow__hook {
  color: var(--gray-600);
  line-height: 1.5;
}

.rrow__meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
}



/* ----------------------------------------------------------- 8. publications */

.publications {
  width: 100%;
}

.publications__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.pub__title {
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.375;
}

.pub__authors {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--gray-800);
}

.pub__venue {
  font-style: italic;
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.pub__note {
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--gray-500);
  font-style: italic;
}

.pub__links {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub__links a {
  color: var(--blue-600);
}

.pub__links a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- 9. project */

.project {
  margin-inline: auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-500);
  align-self: flex-start;
}

.breadcrumb:hover {
  color: var(--usc-red);
}

/* Left-aligned rather than centred: long hooks read badly centred, and a left
   edge gives the eye something to track down the page. Full page width, like
   every other text block on the site. */
.project__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.project__title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
}

.project__subtitle {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--gray-600);
}

/* The one thing a visitor should read if they read nothing else. */
.project__hook {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--gray-800);
  border-left: 3px solid var(--usc-red);
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

/* Key-results strip -- the eye-catcher. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background-color: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
}

.stat {
  background-color: #fff;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.stat__value {
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--usc-red);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--gray-600);
}

.figure {
  margin: 0;
}

.figure img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* Citation: BibTeX blocks with a copy control in the top-right corner. */
/* One citation: a title, and one block a visitor can copy. */
.cite {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cite__title {
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray-800);
}

.cite__box {
  position: relative;
  background-color: #f6f8fa;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem 3rem 1rem 1rem;
}

/* pre-wrap, not pre: BibTeX keeps its line breaks, and a long plain reference
   wraps instead of hiding itself behind a horizontal scrollbar. */
.cite__box pre {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--gray-800);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.cite__copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid var(--gray-300);
  background-color: #fff;
  color: var(--gray-500);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.cite__copy svg { width: 0.875rem; height: 0.875rem; fill: currentColor; }

.cite__copy:hover { color: var(--usc-red); border-color: var(--usc-red); }

.cite__copy.is-copied {
  color: #fff;
  background-color: var(--usc-red);
  border-color: var(--usc-red);
}

/* Shown after the icon flips to the copied state. */
.cite__copy.is-copied::after {
  content: "Copied";
  position: absolute;
  right: calc(100% + 0.4rem);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--usc-red);
  white-space: nowrap;
}

.cites {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.project__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Prose rendered from Markdown. The reset above strips list markers and all
   heading sizes, so everything a body can contain is restyled here. */
.project__body {
  color: var(--gray-700);
  line-height: 1.7;
}

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

.project__body h3,
.project__body h4,
.project__body h5,
.project__body h6 {
  color: var(--gray-800);
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2rem;
}

.project__body h3 { font-size: 1.375rem; }
.project__body h4 { font-size: 1.125rem; }
.project__body h5,
.project__body h6 { font-size: 1rem; }

.project__body ul,
.project__body ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project__body ul { list-style: disc; }
.project__body ol { list-style: decimal; }
.project__body li::marker { color: var(--gray-500); }

/* Nested lists sit tight against their parent item. */
.project__body li > ul,
.project__body li > ol {
  margin-top: 0.35rem;
}

.project__body blockquote {
  border-left: 3px solid var(--gray-300);
  padding-left: 1rem;
  color: var(--gray-600);
  font-style: italic;
}

.project__body code {
  background-color: var(--gray-100);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.project__body pre {
  background-color: #f6f8fa;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

.project__body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.project__body hr {
  border-top: 1px solid var(--gray-200);
  margin: 2rem 0;
}

.project__body a {
  color: var(--usc-red);
  text-decoration: underline;
}

.project__body img {
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.project__body del { color: var(--gray-500); }
.project__body strong { font-weight: 600; color: var(--gray-800); }

.project__body p + p {
  margin-top: 1rem;
}

.project__body a {
  color: var(--usc-red);
  text-decoration: underline;
}

.bibtex {
  position: relative;
  background-color: #f6f8fa;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem;
}

.bibtex__copy {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--gray-300);
  background-color: #fff;
  transition: background-color 0.15s;
}

.bibtex__copy:hover {
  background-color: var(--gray-100);
}

.bibtex pre {
  overflow-x: auto;
  font-size: 0.875rem;
  color: var(--gray-800);
  white-space: pre;
  line-height: 1.625;
}

.members {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member img {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.member:hover img {
  transform: translateY(-3px);
}

.member:hover .member__name {
  color: var(--usc-red);
}

.member__name {
  margin-top: 0.75rem;
  color: var(--gray-800);
  font-weight: 500;
}

/* ------------------------------------------------------------- 10. not found */

.notfound {
  text-align: center;
  color: #ef4444;
  padding: 5rem 0;
}

/* ----------------------------------------------------------- 11. breakpoints */

/* Nav sizing steps down as the window narrows so the links never clip.
   Labels appear only when there is room for all five. */
@media (min-width: 900px) {
  .nav-label {
    display: inline;
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .site-header {
    gap: 16px;
    padding-inline: 16px;
  }

  .site-nav {
    gap: 16px;
  }
}

@media (max-width: 960px) {
  .home__split { grid-template-columns: 1fr; gap: 2.5rem; }
  .band { padding: 3rem 0; }
}

@media (max-width: 960px) {
  .rrows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .rrows { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .project__title {
    font-size: 1.75rem;
    line-height: 2.15rem;
  }

  .project__hook {
    font-size: 1.0625rem;
  }

  .stat {
    padding: 1.15rem 1rem;
  }

  .stat__value {
    font-size: 1.6rem;
  }
}

/* The homepage grid is a fixed two-column layout in the current design and has
   no responsive rule; below ~900px it becomes cramped, so collapse it. This is
   a deliberate improvement over the current behaviour, not a transcription. */
@media (max-width: 900px) {
  .homepage-grid {
    grid-template-columns: 1fr;
  }
}
