/* Site look: EB Garamond headings, Source Sans 3 text, burgundy accent, cool gray background. */
:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --ink: #1c1f23;
  --muted: #4d545e;
  --faint: #5b626c;
  --rule: #dfe2e6;
  --accent: #7a2230;
  --accent-hover: #5c1824;
  --accent-soft: #f6ecee;
  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --abstract-ink: #33383f;
  --head-weight: 500;
  --measure: 46rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: var(--head-weight); line-height: 1.2; margin: 0; letter-spacing: -0.005em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; display: block; }

.section-title {
  font-size: 1.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

/* ---------- Bio block ---------- */
.bio { display: grid; grid-template-columns: 180px 1fr; gap: 2.25rem; align-items: center; }
.bio img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; }
.bio .name { font-size: 2.6rem; margin-bottom: 0.35rem; }
.bio .role { color: var(--muted); font-size: 1.02rem; margin: 0 0 1rem; }
.bio p { margin: 0 0 0.75rem; }
@media (max-width: 640px) {
  .bio { grid-template-columns: 1fr; gap: 1.25rem; }
  .bio img { width: 132px; height: 132px; }
  .bio .name { font-size: 2.1rem; }
}

.contact { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.contact strong { color: var(--ink); font-weight: 600; }

/* ---------- Research list ---------- */
.filters { margin-bottom: 1.75rem; }
.seg { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.seg button {
  font: inherit; font-size: 0.9rem; color: var(--muted);
  background: transparent; border: 1px solid var(--rule); border-radius: 6px;
  padding: 0.42rem 0.9rem; cursor: pointer;
}
.seg button:hover { color: var(--ink); border-color: var(--faint); }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg .n, .chip .n { opacity: 0.7; margin-left: 0.3rem; font-variant-numeric: tabular-nums; }
.seg button:disabled, .chip:disabled { opacity: 0.4; cursor: default; }
.seg button:disabled:hover, .chip:disabled:hover { color: var(--muted); border-color: var(--rule); }

.topics { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; align-items: center; }
.topics .label { font-size: 0.82rem; color: var(--faint); margin-right: 0.25rem; }
.chip {
  font: inherit; font-size: 0.82rem; color: var(--muted);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.22rem 0.75rem; cursor: pointer;
}
.chip:hover { border-color: var(--faint); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.clear { font: inherit; font-size: 0.82rem; color: var(--accent); background: none; border: 0; padding: 0.22rem 0.4rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.group-title {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint);
  margin: 2.25rem 0 0.25rem;
}
.group-title:first-child { margin-top: 0.5rem; }

.paper { position: relative; border-bottom: 1px solid var(--rule); }
.paper-head {
  position: relative; display: block;
  width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 0.95rem 3.6rem 0.15rem 0; cursor: pointer;
}
.paper-title { font-family: var(--serif); font-size: 1.28rem; font-weight: var(--head-weight); line-height: 1.3; }
.paper-head:hover .paper-title { color: var(--accent); }
.paper-year { display: inline-block; margin-left: 0.45rem; color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chev {
  position: absolute; right: 0; top: 1.2rem;
  width: 17px; height: 17px; display: grid; place-items: center; color: var(--accent);
  border-radius: 50%; transition: background-color 0.2s ease, color 0.2s ease;
}
.chev .v { transition: opacity 0.2s ease; }
.paper-head:hover .chev { background: var(--accent-soft); }
.paper.open .chev { background: var(--accent); color: #fff; }
.paper.open .chev .v { opacity: 0; }
.paper-line2 { color: var(--muted); font-size: 0.9rem; padding: 0 3.6rem 0.95rem 0; }
.paper-line2 .venue { color: var(--ink); font-style: italic; }
.paper-line2 .links a + a { margin-left: 0.8rem; }
.paper-line2 .links a { font-weight: 500; white-space: nowrap; }
.ic { display: inline-flex; align-items: center; gap: 0.25rem; vertical-align: -0.2em; }
.ic:hover { text-decoration: none; }
.ic:hover svg { opacity: 0.75; }
.ic .lt { font-size: 0.88rem; }
.award { font-style: italic; color: var(--muted); font-size: 0.88rem; margin: -0.7rem 0 0.95rem; padding-right: 2rem; }
.paper-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.paper.open .paper-body { grid-template-rows: 1fr; }
.paper-body > div { overflow: hidden; }
.paper-body .inner { padding: 0 2.1rem 1.25rem 0; }
.oneliner {
  font-family: var(--serif); font-size: 1.06rem; line-height: 1.5;
  border-left: 2px solid var(--accent); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0 0 0.9rem;
}
.abstract { margin: 0; font-size: 0.95rem; color: var(--abstract-ink); }
.abstract-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.3rem; font-weight: 600; }
.empty { color: var(--muted); padding: 1rem 0; }
@media (prefers-reduced-motion: reduce) { .paper-body, .chev, .chev .v { transition: none; } }
@media (max-width: 640px) {
  .paper-body .inner { padding-right: 0; }
}


/* Keep-together blocks: a block that would split moves whole to the next line. */
.blk { display: inline-block; max-width: 100%; margin-right: 1.1rem; }
.blk:last-child { margin-right: 0; }
.nb { display: inline-block; }
.seg button, .chip { white-space: nowrap; }

/* Extra links inside the opened panel */
.more { margin: 0.9rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.9rem; }
.more a { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; white-space: nowrap; }
.more svg { width: 15px; height: 15px; }

/* Main link icon, top right, just left of the open/close toggle */
.side-links { position: absolute; right: 1.75rem; top: 1.18rem; display: flex; gap: 0.5rem; line-height: 1; z-index: 1; }
.side-links .ic { vertical-align: 0; }
.side-links svg { width: 17px; height: 17px; }
/* Desktop only: a little more room between the link icon and the plus sign */
@media (min-width: 641px) {
  .side-links { right: 2.3rem; }
  .paper-head { padding-right: 4.1rem; }
  .paper-line2 { padding-right: 4.1rem; }
}
