/* =============================================================
   refresh.css — editorial academic refresh
   Loaded LAST so it cascades over Bootstrap + legacy stylesheets.
   ============================================================= */

:root {
  --ink:          #1a1714;
  --ink-soft:     #322d27;
  --paper:        #fbf8f2;
  --paper-deep:   #f3ecdf;
  --rule:         #e6dfd2;
  --muted:        #7a7367;
  --muted-soft:   #a59f93;
  --maroon:       #6e0019;
  --maroon-dark:  #4a0010;
  --maroon-tint:  rgba(110, 0, 25, 0.08);

  --serif:        "Fraunces", "Source Serif 4", Georgia, serif;
  --sans:         "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:         "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-soft:  0 1px 2px rgba(26, 23, 20, 0.04), 0 8px 24px rgba(26, 23, 20, 0.04);
}

/* ---------- layout reclaim ----------
   The right .sidebar-light is empty (the news/twitter widgets were removed),
   yet sidebar-light.css still reserves 350px for it. Reclaim that space and
   give the content a sensible max width for readability. */

.sidebar-light { display: none !important; }

.main-content {
  font-family: var(--sans) !important;
  width: 100% !important;
  float: none !important;
  max-width: 920px;
}

/* ---------- base typography & color ---------- */

html, body {
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
  padding: 56px 48px 96px;
}

/* Bio paragraph on the about page — give it a generous reading size and measure. */
.main-content > .row > div > p > p,
.main-content > .row + .row p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 78ch;
}

p, ul, ol, table, pre, address {
  color: var(--ink-soft);
  margin: 0 0 18px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  margin: 0 0 18px;
}

h1 { font-size: 44px; line-height: 1.05; font-weight: 600; font-variation-settings: "opsz" 144, "SOFT" 30; }
h2 { font-size: 30px; line-height: 1.15; font-weight: 600; }
h3 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.014em; }
h4 { font-size: 16px; line-height: 1.55; font-weight: 400; font-style: italic; font-variation-settings: "opsz" 20, "SOFT" 30; color: var(--ink-soft); margin: 12px 0 24px; }

a {
  color: var(--maroon);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color 200ms ease;
  padding-bottom: 1px;
}
a:hover,
a:focus,
a:active,
a:focus-visible {
  color: var(--maroon-dark);
  background-size: 100% 1px;
  text-decoration: none; /* Bootstrap forces text-decoration:underline on hover, kill it */
}
a:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}

address {
  font-style: normal;
  line-height: 1.55;
}

strong, b { color: var(--ink); font-weight: 600; }

code { font-family: var(--mono); font-size: 0.92em; color: var(--ink); background: var(--paper-deep); padding: 1px 6px; border-radius: 3px; }

::selection { background: var(--maroon); color: var(--paper); }

/* ===========================================================
   HEADER / NAVBAR (responsive)

   Three breakpoints:
     ≥1100px  desktop  — sidebar on left, nav stacked vertically
     768–1099 tablet   — horizontal top bar: name left, nav right
     <768px   mobile   — name on top centered, nav wraps below
   =========================================================== */

header[role="banner"] {
  padding: 0;
}
header h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  line-height: 1.05;
}
header h1 a { color: var(--ink); background: none; }
header h1 a:hover { color: var(--maroon); background: none; }

/* Nav base — kill Bootstrap chrome, set typography */
nav#access .list-group { border: 0; background: transparent; margin: 0; padding: 0; }
nav#access .list-group-item {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  transition: color 160ms ease;
}
nav#access .list-group-item:hover {
  color: var(--maroon);
}
nav#access .list-group-item.active,
nav#access .list-group-item.active:hover,
nav#access .list-group-item.active:focus {
  color: var(--maroon);
}
nav#access .list-group-item .nav-icon {
  color: var(--muted-soft);
  transition: color 160ms ease;
  flex: 0 0 auto;
}
nav#access .list-group-item:hover .nav-icon,
nav#access .list-group-item.active .nav-icon { color: var(--maroon); }

/* ---- DESKTOP (≥1100px): sidebar layout, vertical nav with hairlines ---- */
@media (min-width: 1100px) {
  header[role="banner"] {
    width: 22% !important;
    margin: 0 3% 0 0 !important;
    padding-right: 24px;
    float: left !important;
    text-align: left;
  }
  .content {
    width: 75% !important;
    float: left !important;
  }

  header h1 {
    margin-bottom: 28px;
    text-align: left !important;
  }

  nav#access {
    text-align: left !important;
    margin: 0 !important;
  }
  nav#access .list-group-item {
    display: block !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--rule) !important;
    padding: 14px 0 13px 16px !important;
    font-size: 13.5px;
    text-align: left;
  }
  nav#access .list-group-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  nav#access .list-group-item:first-child { border-top: 1px solid var(--rule) !important; }
  nav#access .list-group-item.active::before {
    content: "";
    position: absolute;
    left: 4px; top: 50%;
    width: 6px; height: 6px;
    background: var(--maroon);
    border-radius: 50%;
    transform: translateY(-50%);
  }
  nav#access .list-group-item .nav-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
  }
}

/* ---- TABLET & MOBILE (<1100px): horizontal top bar ----
   Base rules (apply to both tablet and phone): no item borders,
   flex inline links, no icons. */
@media (max-width: 1099px) {
  header[role="banner"] {
    width: 100% !important;
    float: none !important;
    margin: 0 0 32px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 10px;
    column-gap: 24px;
  }
  header h1 {
    margin: 0;
    font-size: 24px;
    flex: 0 0 auto;
    line-height: 1;
  }
  nav#access {
    width: auto !important;
    min-width: 0;
    float: none !important;
    margin: 0 !important;
  }
  nav#access .list-group {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px 22px;
    border: 0;
    margin: 0;
  }
  nav#access .list-group-item {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 2px 0 !important;
    margin: 0 !important;
    border: 0 !important;
    font-size: 12px;
    line-height: 1.4;
    flex: 0 0 auto;
  }
  nav#access .list-group-item:first-child { border-top: 0 !important; }
  nav#access .list-group-item:hover { padding-left: 0 !important; }
  nav#access .list-group-item.active {
    padding-left: 0 !important;
    border-bottom: 2px solid var(--maroon) !important;
    padding-bottom: 0 !important;
  }
  nav#access .list-group-item.active::before { display: none; }
  nav#access .list-group-item .nav-icon { display: none; }
}

/* ---- TABLET (600–1099px): name left, nav right ---- */
@media (min-width: 600px) and (max-width: 1099px) {
  header[role="banner"] { justify-content: space-between; }
  header h1 { text-align: left; }
  nav#access { flex: 1 1 auto; }
  nav#access .list-group { justify-content: flex-end; }
}

/* ---- PHONE (<600px): centered stack ---- */
@media (max-width: 599px) {
  header[role="banner"] {
    justify-content: center;
    text-align: center;
  }
  header h1 {
    flex: 0 0 100%;
    text-align: center;
  }
  nav#access {
    flex: 0 0 100%;
    width: 100% !important;
  }
  nav#access .list-group { justify-content: center; }
}

/* Group availability notice */
.recruitment-notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  background: var(--maroon-tint);
  border-left: 3px solid var(--maroon);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- hero (about page) ---------- */

.hero {
  display: grid;
  grid-template-columns: 200px minmax(220px, 1fr) minmax(220px, 1.1fr);
  gap: 36px 40px;
  align-items: start;
  margin: 4px 0 36px;
}

/* Photo column */
.hero-photo { width: 200px; }
.hero-photo a { display: block; background: none; padding: 0; }
.hero-photo a:hover { background: none; }
.hero-photo img {
  display: block;
  width: 200px !important;
  max-width: 200px !important;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(0.95);
}

/* Identity column (name + address + email) */
.hero-identity address {
  display: block;
  font-style: normal;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.hero-identity address strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero-identity address span { display: block; }

.hero-contact {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.hero-contact .fa { color: var(--muted); margin-right: 6px; }
.hero-contact a {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.hero-contact a:hover { color: var(--maroon); }

/* Affiliation column (Professor + departments) */
.hero-affiliation p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-affiliation strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-affiliation a { display: block; }
.hero-affiliation .hero-affiliated {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.hero-affiliation .hero-affiliated a {
  display: inline;
  font-style: normal;
}

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

/* Tablet: keep three columns but tighter */
@media (max-width: 1099px) {
  .hero {
    grid-template-columns: 160px minmax(180px, 1fr) minmax(200px, 1.1fr);
    gap: 28px 28px;
  }
  .hero-photo,
  .hero-photo img { width: 160px !important; max-width: 160px !important; }
  .hero-identity address strong { font-size: 22px; }
  .hero-affiliation strong { font-size: 18px; }
}

/* Mobile (<768px): single column stack.
   Photo centered at top, identity centered below, affiliation centered below
   with a hairline separator. Reads top-to-bottom as a clean column. */
@media (max-width: 767px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "identity"
      "aff";
    gap: 16px;
    margin-bottom: 32px;
    justify-items: center;
    text-align: center;
  }
  .hero-photo {
    grid-area: photo;
    width: 168px;
  }
  .hero-photo img {
    width: 168px !important;
    max-width: 168px !important;
  }
  .hero-identity {
    grid-area: identity;
    width: 100%;
  }
  .hero-identity address {
    margin-bottom: 10px;
    text-align: center;
  }
  .hero-identity address strong {
    font-size: 26px;
    margin-bottom: 8px;
  }
  .hero-contact { text-align: center; }
  .hero-affiliation {
    grid-area: aff;
    width: 100%;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid var(--rule);
    text-align: center;
  }
  .hero-affiliation p { text-align: center; }
  .hero-affiliation strong { font-size: 18px; margin-bottom: 8px; }
}

/* External links panel → simple inline row */
.panel.panel-default {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-bottom: 32px;
}
.panel.panel-default > .panel-heading {
  background: transparent;
  border: 0;
  padding: 0 0 8px;
}
.panel.panel-default > .panel-heading .panel-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel.panel-default > .panel-body {
  background: transparent;
  border-top: 1px solid var(--rule);
  padding: 14px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.panel.panel-default > .panel-body a {
  display: inline-block;
  margin-right: 2px;
}

/* CV button → editorial pill */
.btn.btn-default {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  border-radius: 0;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn.btn-default:hover,
.btn.btn-default:focus {
  background: var(--ink);
  color: var(--paper) !important;
  border-color: var(--ink);
}
.btn.btn-default .fa { margin-left: 6px; opacity: 0.7; }

/* ---------- positions (appointments / industry / education) ---------- */

#content > div > h3,           /* anywhere */
.content h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  margin-top: 36px;
}

.main-content > div > .row + h3 { margin-top: 28px; }

/* Position cells (appointments/industry/education) and teaching/sponsors/members
   are all unified under the .cardrow system — see the "UNIFIED CARD SYSTEM"
   section further below. */

/* UCI hero logo: keep it color but cap size */
.main-content > .row:first-of-type img[src*="uci-stacked"] {
  filter: none;
  opacity: 1;
  margin: 0;
  max-width: 220px;
  height: auto !important;
}

/* ============================================================
   UNIFIED CARD SYSTEM (.cardrow)

   One layout for every card-row on the site: members, sponsors,
   appointments, industry, education, teaching courses.

   The grid container is `.cardrow` (flex, wrap, center, gap).
   Each direct child (Bootstrap col-* div, or any block element)
   becomes a fixed-width card. A content-type modifier on the
   container drives image presentation:

     .cardrow--photo   square cover-cropped photos (members)
     .cardrow--logo    transparent logos in a fixed box (sponsors,
                       appointments, industry, education)
     .cardrow--image   wider course images (teaching)
   ============================================================ */

:root {
  --card-w: 184px;
  --card-gap-y: 36px;
  --card-gap-x: 20px;
  --card-img-box-w: 140px;
  --card-img-box-h: 80px;
  --card-name-size: 12px;
  --card-name-lh: 1.4;
  --card-meta-size: 11px;
}

.cardrow {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--card-gap-y) var(--card-gap-x);
  margin: 18px 0 40px !important;
}
.cardrow::before,
.cardrow::after {
  content: none !important;
  display: none !important;
}

/* The card — fixed width, vertical stack */
.cardrow > [class*="col-"],
.cardrow > .card-item {
  width: var(--card-w) !important;
  flex: 0 0 var(--card-w) !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

/* Bootstrap panel chrome reset inside cardrow */
.cardrow .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.cardrow .panel-heading,
.cardrow .panel-body,
.cardrow .panel-footer {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: center;
}
.cardrow .panel-body::before,
.cardrow .panel-body::after { content: none !important; display: none !important; }

/* ---- card name (above image) ---- */
.cardrow .panel-heading,
.cardrow .card-name {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 2.8em;          /* ~2 lines so images align */
  padding: 0 0 10px !important;
}
.cardrow .panel-heading a,
.cardrow .card-name,
.cardrow > [class*="col-"] > p > strong:first-child,
.cardrow > [class*="col-"] > div > strong:first-child {
  display: block;
  font-family: var(--sans);
  font-size: var(--card-name-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: var(--card-name-lh);
  padding: 0;
  background: none;
}
.cardrow .panel-heading a:hover { color: var(--maroon); background: none; }

/* ---- image area: variant-specific ----
   Common scaffold: <a> wraps the image, sits in a fixed-size box,
   img inside is contained or cover-cropped per variant. */
.cardrow .panel-body,
.cardrow > [class*="col-"] > p,
.cardrow > [class*="col-"] > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  padding: 0 !important;
}

.cardrow .panel-body a,
.cardrow > [class*="col-"] > p > a,
.cardrow > [class*="col-"] > div > a {
  display: grid !important;
  place-items: center;
  margin: 8px auto 10px !important;
  padding: 0 !important;
  background: none;
}

/* Common image base: reset all the legacy global rules. */
.cardrow img {
  display: block;
  margin: 0 !important;
  border-radius: 0 !important;
  transition: filter 280ms ease, opacity 280ms ease;
}

/* ---- variant: --logo (sponsors, appointments, industry, education) ---- */
.cardrow--logo .panel-body a,
.cardrow--logo > [class*="col-"] > p > a,
.cardrow--logo > [class*="col-"] > div > a {
  width: var(--card-img-box-w);
  height: var(--card-img-box-h);
}
.cardrow--logo img {
  width: auto !important;
  height: auto !important;
  max-width: var(--card-img-box-w) !important;
  max-height: var(--card-img-box-h) !important;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: saturate(0.35) contrast(0.95);
  opacity: 0.85;
}
.cardrow--logo a:hover img {
  filter: saturate(1.1) contrast(1);
  opacity: 1;
}
/* Sponsors have very long names that wrap to 3 lines → roomier heading slot */
.cardrow--logo.cardrow--long-names .panel-heading {
  min-height: 4.4em;
}

/* ---- variant: --photo (members) ---- */
/* The default panel-body has align-items:center (so logos sit centered).
   For photos we need the <a> and <img> to stretch full-width — otherwise
   when an img's natural width is smaller than the card, align-items:center
   shrinks the <a> to the image's intrinsic size and photos come out
   different sizes per card. */
.cardrow--photo .panel-body {
  align-items: stretch;
  width: 100%;
}
.cardrow--photo .panel-body a,
.cardrow--photo > [class*="col-"] > p > a {
  display: block !important;
  width: 100% !important;
  height: auto;
  margin: 0 !important;
}
.cardrow--photo img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px !important;
  filter: saturate(0.4) contrast(0.98);
}
.cardrow--photo a:hover img {
  filter: saturate(1.05) contrast(1);
}

/* ---- variant: --image (teaching course thumbnails) ---- */
.cardrow--image .panel-body a {
  display: block !important;
  width: 100%;
  margin: 0 !important;
}
.cardrow--image img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px !important;
  filter: saturate(0.55) contrast(0.98);
}
.cardrow--image a:hover img {
  filter: saturate(1) contrast(1);
}

/* ---- card footer / meta caption ---- */
.cardrow .panel-footer,
.cardrow .card-meta {
  margin-top: auto;
  padding-top: 10px !important;
}
.cardrow .panel-footer a,
.cardrow .card-meta,
.cardrow > [class*="col-"] em {
  display: block;
  font-family: var(--sans);
  font-size: var(--card-meta-size);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: none;
}
.cardrow .panel-footer a:hover { color: var(--maroon); background: none; }

/* For position cells (no panel chrome) the `<em>` is the date and the
   following text is the position. Style siblings into the rhythm. */
.cardrow > [class*="col-"] > p,
.cardrow > [class*="col-"] > div {
  font-size: var(--card-meta-size);
  color: var(--muted);
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.cardrow > [class*="col-"] > p > br + br { display: none; }   /* collapse extra spacing */

/* Highlight modifier (used by current course on teaching page) */
.cardrow .panel-highlight {
  position: relative;
}
.cardrow .panel-highlight::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--maroon);
}

/* Legacy aliases — let old class names route to the unified system. */
.member-grid { /* alias for .cardrow.cardrow--photo */ }
.sponsor-grid { /* alias for .cardrow.cardrow--logo.cardrow--long-names */ }

/* ---- variant: --photo overrides (members) ----
   Members keep a larger serif name for prominence; the photo is the
   visual anchor and the name sits below in a more personal voice. */
.cardrow--photo > [class*="col-"] { width: 220px !important; flex-basis: 220px !important; }
.cardrow--photo .panel-heading {
  align-items: flex-start;
  min-height: 2.6em;
  padding: 12px 0 4px !important;
  order: 2;                 /* name BELOW the photo */
}
.cardrow--photo .panel-heading a {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  line-height: 1.25;
  text-align: left;
}
.cardrow--photo .panel-body { order: 1; }
.cardrow--photo .panel-footer { order: 3; padding-top: 4px !important; text-align: left; }
.cardrow--photo .panel-footer a { text-align: left; }
.cardrow--photo > [class*="col-"] { align-items: stretch; text-align: left; }

/* ---------- group page: alumni list ---------- */

/* Alumni nested-ul markup is invalid (inner <ul> is a sibling of <li>),
   so target the inner ul as a direct child of the outer ul. */
.alumni > ul,
.alumni > ul > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.alumni > ul > li { /* group label rows: PhD / Visitors / Masters / etc */
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding: 32px 0 4px;
  margin-top: 4px;
  list-style: none;
}
.alumni > ul > li:first-child { border-top: 0; padding-top: 12px; }

.alumni > ul > ul { /* the alumni rows */
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 2fr;
  column-gap: 32px;
  row-gap: 10px;
  margin: 4px 0 12px;
}
.alumni > ul > ul > li {
  display: contents; /* children participate in the grid directly */
}

.alumni > ul > ul > li .student {
  grid-column: 1;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.4;
  align-self: baseline;
}
.alumni > ul > ul > li .student a { color: var(--ink); }
.alumni > ul > ul > li .student a:hover { color: var(--maroon); }

/* Everything after the .student span flows into the second grid column via
   a wrapper we'll add (.alumni-meta) in group.html. */
.alumni-meta {
  grid-column: 2;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  align-self: baseline;
}
.alumni-meta strong { color: var(--ink); font-weight: 500; }

/* ---------- publications ---------- */

.papers {
  list-style: none;
  padding: 0;
  margin: 24px 0 40px;
}

.papers > li {
  position: relative;
  padding: 18px 0 20px 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
  list-style: none;
  font-size: 15px;
  line-height: 1.55;
}
.papers > li::marker { content: ""; }
ul.papers > li::before { content: none; }

/* hide the default UA bullet on nested lists Jekyll renders */
ol.papers > li { list-style: none; }

.papers .title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.papers .author {
  color: var(--ink-soft);
  font-size: 14.5px;
}
.papers .author a { color: var(--ink-soft); }
.papers .author a:hover { color: var(--maroon); }

.papers .mainAuthor a,
.papers .mainAuthor {
  color: var(--maroon);
  font-weight: 600;
}

.papers .venue {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}
.papers .year {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.papers .emphasisNote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 4px 12px 4px 10px;
  background: var(--maroon-tint);
  border-left: 2px solid var(--maroon);
  color: var(--maroon);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.papers .emphasisNote::before {
  content: "★";
  font-size: 11px;
  color: var(--maroon);
  letter-spacing: 0;
}
.papers .note {
  display: block;
  margin: 4px 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* Hide the bracket/comma noise rendered by paper.html.
   paper.html emits literal "[" and "]" and "," as text nodes.
   We can't select text nodes directly, but we wrap link rows in
   .paper-links in our updated paper.html. */
.paper-links {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.paper-links a {
  display: inline-block;
  margin-right: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.1em;
}
.paper-links a:hover { color: var(--maroon); }

/* Conference / Demo / TechReport badges → small-caps text instead of pill */
.papers .tag.label {
  background: transparent !important;
  color: var(--maroon) !important;
  border: 1px solid var(--maroon);
  border-radius: 0;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: 2px;
}
.papers .tag_TechReport.label,
.papers .tag_Workshop.label {
  color: var(--muted) !important;
  border-color: var(--muted);
}
.papers .tag_Demo.label,
.papers .tag_Chapter.label {
  color: var(--maroon-dark) !important;
  border-color: var(--maroon-dark);
  background: var(--maroon-tint) !important;
}

/* Year heading on pubs page */
.yearGroup,
h2.yearGroup,
.papers + h2,
.content h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 56px 0 12px;
  color: var(--ink);
}
.main-content > h2:first-of-type { margin-top: 8px; }

/* Year jump rail */
.year-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin: 16px 0 32px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
}
.year-jump-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 14px;
}
.year-jump a {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  background: none;
}
.year-jump a:hover { color: var(--ink); background: var(--paper-deep); }

/* The bibere yearGroup is a <span>; promote it visually to a section heading */
.yearGroup {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 56px 0 4px;
  font-variant-numeric: tabular-nums;
}

/* ---------- awards page ---------- */

.nav-pills > li > a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 8px 14px;
  margin-right: 6px;
}
.nav-pills > li > a:hover {
  color: var(--maroon);
  border-color: var(--maroon);
  background: var(--maroon-tint);
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:focus,
.nav-pills > li.active > a:hover {
  color: var(--paper);
  background: var(--maroon);
  border-color: var(--maroon);
}

/* Grants list (and any other generic content lists) — keep flat layout */
.main-content > ul:not(.papers):not(.nav):not(.honors-grid) {
  list-style: none;
  padding: 0;
}
.main-content > ul:not(.papers):not(.nav):not(.honors-grid) > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.main-content > ul:not(.papers):not(.nav):not(.honors-grid) > li:last-child { border-bottom: 0; }

/* ---------- awards: honors grid (plaque cards) ---------- */

.honors-grid {
  list-style: none;
  padding: 0;
  margin: 28px 0 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 14px;
}

.honor-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  row-gap: 6px;
  padding: 18px 20px 18px 22px;
  background: var(--paper-deep);
  border-left: 2px solid var(--maroon);
  position: relative;
  transition: background 220ms ease, transform 220ms ease;
  list-style: none;
}
.honor-card::before { content: none; }
.honor-card:hover {
  background: color-mix(in srgb, var(--paper-deep) 70%, var(--maroon-tint));
}

.honor-card .honor-year {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--maroon);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  line-height: 1;
}

.honor-card .honor-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.honor-card .honor-who {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

/* Mobile: single column honor cards */
@media (max-width: 767px) {
  .honors-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .honor-card { padding: 14px 16px; }
  .honor-card .honor-name { font-size: 15.5px; }
}

/* ---------- bibere abstract / bibtex collapse panels ---------- */

.papers .panel-primary,
.papers .panel-info {
  background: var(--paper-deep);
  border: 0;
  border-left: 2px solid var(--maroon);
  box-shadow: none;
  margin: 12px 0;
  border-radius: 0;
}
.papers .panel-primary .panel-body,
.papers .panel-info .panel-body {
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
}
.papers .panel-info .panel-body pre,
.papers .panel-info pre {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: pre-wrap;
}
.collapse-clicker { cursor: pointer; }

/* ---------- entry animations (subtle, one-time) ---------- */

@keyframes fade-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

header[role="banner"] h1,
.main-content > .row:first-child,
.main-content > h2:first-of-type,
.main-content > div > h3:first-of-type {
  animation: fade-rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.main-content > .row:first-child { animation-delay: 80ms; }
.main-content > h2:first-of-type { animation-delay: 120ms; }
.main-content > div > h3:first-of-type { animation-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- :target highlight (deep links to papers) ---------- */

:target {
  background-color: transparent;
  position: relative;
}
:target::before {
  content: "";
  position: absolute;
  left: -18px; right: -18px; top: 0; bottom: 0;
  background: var(--maroon-tint);
  border-left: 2px solid var(--maroon);
  z-index: -1;
  animation: target-fade 2.4s ease-out both;
}
@keyframes target-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; background: transparent; }
}

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

/* Tablet / narrow desktop */
@media (max-width: 1099px) {
  body { padding: 32px 32px 80px; }
  .main-content { max-width: none; }
}

/* Mobile (<768px) — navbar rules live in the unified <1100px block above. */
@media (max-width: 767px) {
  body { padding: 24px 22px 64px; font-size: 16px; line-height: 1.55; }
  .main-content { padding: 0 2px; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }

  /* Tighter header on phones; name + nav wrap onto two lines */
  header[role="banner"] {
    margin-bottom: 24px;
    padding-bottom: 12px;
  }
  header h1 { font-size: 22px; }
  nav#access .list-group { gap: 6px 16px; }
  nav#access .list-group-item { font-size: 11px; letter-spacing: 0.08em; }

  /* Bio paragraph at narrower size */
  .main-content > .row + .row p,
  .hero + .row p { font-size: 16px; max-width: none; }

  /* Cards: smaller widths so 2 fit per row on phones */
  .cardrow {
    gap: 28px 12px !important;
  }
  .cardrow > [class*="col-"] {
    width: 150px !important;
    flex-basis: 150px !important;
  }
  .cardrow--photo > [class*="col-"] {
    width: 160px !important;
    flex-basis: 160px !important;
  }
  .cardrow--logo .panel-body a,
  .cardrow--logo > [class*="col-"] > p > a,
  .cardrow--logo > [class*="col-"] > div > a {
    width: 120px;
    height: 70px;
  }
  .cardrow--logo img {
    max-width: 120px !important;
    max-height: 70px !important;
  }

  /* Alumni: single column */
  .alumni > ul > ul {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .alumni > ul > ul > li .student,
  .alumni-meta { grid-column: 1; }
  .alumni-meta { margin-bottom: 14px; }

  /* External Links: tighter wrap */
  .panel.panel-default > .panel-body { font-size: 14px; }

  /* Publications: more compact */
  .papers > li { padding: 14px 0 16px; font-size: 14.5px; }
  .papers .title { font-size: 17px; line-height: 1.3; }
  .papers .author { font-size: 13.5px; }
  .papers .venue, .papers .year { font-size: 13px; }
  .papers .tag.label {
    display: inline-block;
    margin-left: 0;
    margin-top: 4px;
    font-size: 10px;
  }

  /* Year jump rail wraps tightly */
  .year-jump { gap: 4px 2px; font-size: 12px; padding: 10px 0; }
  .year-jump a { padding: 3px 6px; }
  .year-jump-label { margin-right: 8px; font-size: 10px; }
  .yearGroup { font-size: 26px; margin: 36px 0 4px; }

  /* Awards: pill tabs scroll horizontally */
  .nav-pills { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .nav-pills > li > a { white-space: nowrap; font-size: 11px; padding: 7px 12px; }
}

/* Nav-pills: spacing below the tab bar (replaces the removed <hr>) */
.nav-pills { margin: 4px 0 0; }
