/* =============================================================
   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 / sidebar nav ---------- */

header[role="banner"] {
  /* keep the left rail at large widths, but make it lighter */
  padding-right: 24px;
}

@media (min-width: 1382px) {
  header[role="banner"] { width: 22%; margin-right: 3%; }
  .content { width: 75%; }
}

header h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
header h1 a { color: var(--ink); background: none; }
header h1 a:hover { color: var(--maroon); background: none; }

/* Override Bootstrap .list-group/.list-group-item entirely for the nav */
nav#access .list-group { border: 0; background: transparent; }

nav#access .list-group-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0 !important;
  padding: 14px 0 13px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 160ms ease, padding-left 200ms ease;
  position: relative;
}
nav#access .list-group-item:first-child { border-top: 1px solid var(--rule); }
nav#access .list-group-item:hover {
  background: transparent;
  color: var(--maroon);
  padding-left: 6px;
}
nav#access .list-group-item.active,
nav#access .list-group-item.active:hover,
nav#access .list-group-item.active:focus {
  background: transparent;
  border-bottom-color: var(--maroon);
  color: var(--maroon);
  padding-left: 12px;
}
nav#access .list-group-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  background: var(--maroon);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* Nav icons: keep but tone down */
nav#access .list-group-item .fa {
  color: var(--muted-soft);
  font-size: 14px !important;
  transition: color 160ms ease;
}
nav#access .list-group-item:hover .fa,
nav#access .list-group-item.active .fa { color: var(--maroon); }

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

address {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
address strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin-bottom: 6px;
}
address .fa { color: var(--muted); margin-right: 4px; }
address a[href^="mailto:"] {
  font-family: var(--mono);
  font-size: 13.5px;
}

/* Hero "Professor" column */
.main-content > .row:first-of-type > [class*="col-"] > p:first-child strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.main-content > .row:first-of-type > [class*="col-"] > p { font-size: 14.5px; line-height: 1.55; }
.main-content > .row:first-of-type { margin-bottom: 28px; }

/* Photo styling: gentle rounded corners (override img-rounded radius) */
.main-content > .row:first-of-type img.img-rounded[width="200px"] {
  border-radius: 3px;
  filter: saturate(0.95);
}

/* 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; }

/* Logo cells: normalize to fixed dimensions with grayscale-on-rest.
   Target only cells that contain a position logo, not the hero address column. */
.content .row > [class*="col-"]:has(img[height="100px"]),
.content .row > [class*="col-"]:has(img[height="75px"]) {
  text-align: center;
}
.content .row > [class*="col-"]:has(img[height="100px"]) > p,
.content .row > [class*="col-"]:has(img[height="100px"]) > div,
.content .row > [class*="col-"]:has(img[height="75px"]) > p,
.content .row > [class*="col-"]:has(img[height="75px"]) > div {
  text-align: center;
}

/* Wrap each logo in a fixed-size flex box so logos in a row visually align
   regardless of source aspect ratios. The img is centered inside via object-fit. */
.content .row > [class*="col-"]:has(img[height="100px"]) a,
.content .row > [class*="col-"]:has(img[height="75px"]) a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 84px;
  margin: 14px auto;
  background: none;
}
.content .row img[height="100px"],
.content .row img[height="75px"] {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  object-fit: contain;
  mix-blend-mode: multiply;        /* white backgrounds dissolve into paper */
  filter: saturate(0.35) contrast(0.95);
  opacity: 0.85;
  transition: filter 280ms ease, opacity 280ms ease;
}
.content .row a:hover img[height="100px"],
.content .row a:hover img[height="75px"] {
  filter: saturate(1.1) contrast(1);
  opacity: 1;
}

.content .row strong,
.content .row em {
  display: block;
  font-style: normal;
  font-size: 13px;
}
.content .row strong { color: var(--ink); font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; }
.content .row small,
.content .row em {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.content .row p { font-size: 13px; line-height: 1.5; }

/* 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;
}

/* ---------- group page: member cards ---------- */

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px 24px;
  margin: 8px 0 40px;
  /* override Bootstrap .row negative side margins so the grid aligns to content edge */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Each Bootstrap .col-* wrapper inside .member-grid → reset to fill grid cell */
.member-grid > [class*="col-"] {
  width: 100%;
  float: none;
  padding: 0;
}

/* Kill the Bootstrap panel chrome inside member grid */
.member-grid .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}
.member-grid .panel-heading,
.member-grid .panel-footer {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
}
.member-grid .panel-body {
  padding: 0 0 12px;
  text-align: left;
}

.member-grid .panel-body img {
  width: 100% !important;
  max-width: none !important;        /* override global img { max-width:150px } */
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  filter: saturate(0.4) contrast(0.98);
  transition: filter 320ms ease, transform 420ms ease;
}
.member-grid .panel-body a:hover img {
  filter: saturate(1.05) contrast(1);
}

.member-grid .panel-heading a {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding: 12px 0 4px;
  background: none;
}
.member-grid .panel-heading a:hover { color: var(--maroon); background: none; }

.member-grid .panel-footer a {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
}
.member-grid .panel-footer a:hover { color: var(--maroon); background: none; }

/* ---------- 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-block;
  margin: 4px 0 0;
  color: var(--maroon);
  font-weight: 600;
  font-size: 13.5px;
}
.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);
}

/* Awards / grants lists */
.main-content > ul:not(.papers):not(.nav) {
  list-style: none;
  padding: 0;
}
.main-content > ul:not(.papers):not(.nav) > 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) > li:last-child { border-bottom: 0; }

/* ---------- 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 ---------- */

@media (max-width: 1381px) {
  body { padding: 36px 28px 80px; }
  header h1 { font-size: 26px; }
  nav#access .list-group-item { padding: 12px 14px; }
}

@media (max-width: 768px) {
  body { padding: 24px 18px 64px; font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }
  .alumni > ul > li > ul {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .alumni > ul > li > ul > li .student,
  .alumni-meta { grid-column: 1; }
  .alumni-meta { margin-bottom: 14px; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 24px 16px; }
}
