@font-face {
  font-family: "Latin Modern Roman";
  src: local("Latin Modern Roman"), local("LMRoman10-Regular"), url("fonts/lmroman10-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Latin Modern Roman";
  src: local("LMRoman10-Bold"), url("fonts/lmroman10-bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Site Sans";
  src: local("Helvetica Neue"), local("HelveticaNeue"), url("fonts/texgyreheros-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Site Sans";
  src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"), url("fonts/texgyreheros-bold.woff") format("woff");
  font-weight: 600 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #f6f9f6;
  --surface: #ffffff;
  --ink: #17241c;
  --muted: #58695e;
  --rule: #dce6de;
  --accent: #2e7d4a;
  --trace: #4f9e66;
  --accent-ink: #22643a;
  --plate: #ffffff;
  --serif: "Latin Modern Roman", "Computer Modern", Georgia, serif;
  --sans: "Site Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 46rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1712;
    --surface: #15211a;
    --ink: #e3ede6;
    --muted: #9aac9f;
    --rule: #26352b;
    --accent: #7fcf96;
    --trace: #6fc189;
    --accent-ink: #a3e0b3;
    --plate: #f1f5f2;
    color-scheme: dark;
  }
  .ico:not(.orcid) { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.28); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "kern", "liga";
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.85rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap; padding: 0.2rem 0; border-bottom: 1.5px solid transparent; }
.bar nav a:hover { color: var(--ink); }
.bar nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 760px) {
  .bar { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding-bottom: 0.5rem; }
  .bar nav { width: calc(100% + var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); gap: 1.1rem; }
  html { scroll-padding-top: 6.5rem; }
}

main { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: start;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 0;
}
.hero h1 { font-size: clamp(2.7rem, 7.5vw, 5.4rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; }
.degrees { font-family: var(--serif); font-size: 1.35rem; color: var(--muted); margin-top: 0.4rem; }
.lede { max-width: 38rem; font-size: 1.15rem; margin-top: 1.4rem; }
.portrait { margin-top: calc(clamp(2.7rem, 7.5vw, 5.4rem) * 0.244); width: clamp(8.5rem, 19vw, 13rem); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 16% / 13%; border: 1px solid var(--rule); background: #fff; }
.profiles { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.8rem 0 0; padding: 0; }
.profiles a { display: block; border-radius: 50%; }
.profiles img { display: block; width: 2.5rem; height: 2.5rem; transition: transform 0.15s; }
.profiles .ico:not(.orcid) { border-radius: 50%; }
@media (max-width: 420px) { .profiles { gap: 0.5rem; } .profiles img { width: 2.2rem; height: 2.2rem; } }
.profiles a:hover img { transform: translateY(-2px); }
.trace { grid-column: 1 / -1; margin: 1.5rem 0 0; height: clamp(4.5rem, 9vw, 7.5rem); }
.trace svg { width: 100%; height: 100%; display: block; overflow: visible; }
.trace path {
  fill: none; stroke: var(--trace); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .trace path { animation: draw 3.2s cubic-bezier(.35, .1, .25, 1) both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { grid-row: 1; width: 7.5rem; margin-top: 0; }
}

/* ---------- blocks ---------- */
.block {
  display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem 3rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule);
}
.block:first-of-type, .hero + .block { border-top-color: transparent; }
.block-head h2 { font-size: 1.65rem; position: sticky; top: 5.5rem; }
.block-head p { margin-top: 0.6rem; font-size: 0.92rem; }
.block-body { max-width: var(--measure); }
.block.wide .block-body { max-width: 52rem; }
.sub { font-size: 1.2rem; margin: 2.5rem 0 1rem; }
@media (max-width: 900px) {
  .block { grid-template-columns: 1fr; }
  .block-head h2 { position: static; }
}

.topics { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1.8rem; padding: 0; }
.topics li { border: 1px solid var(--rule); background: var(--surface); border-radius: 4px; padding: 0.2rem 0.6rem; font-size: 0.93rem; }
.metrics { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem; }
.metrics li { display: flex; align-items: baseline; gap: 0.5rem; }
.metrics b { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums; }

.roles { display: grid; gap: 2rem; }
.role { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.5rem; align-items: center; }
.role h3 { font-size: 1.3rem; }
.role p { margin-top: 0.25rem; }
.logo { background: var(--plate); border-radius: 8px; padding: 0.6rem; display: flex; justify-content: center; }
.logo img { max-height: 3.5rem; width: auto; }
@media (max-width: 520px) { .role { grid-template-columns: 1fr; gap: 0.8rem; } .logo { justify-self: start; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.2rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.timeline > li:first-child { border-top: 0; padding-top: 0; }
.timeline h3 { font-size: 1.2rem; }
.timeline h3 + p, .timeline p + p { margin-top: 0.3rem; }
.timeline.compact > li { padding: 0.6rem 0; }
.when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.93rem; padding-top: 0.15rem; }
@media (max-width: 520px) { .timeline > li { grid-template-columns: 1fr; gap: 0.2rem; } }
.members { columns: 2 16rem; column-gap: 2rem; margin: 0; padding-left: 1.1rem; }
.members li { break-inside: avoid; margin-bottom: 0.25rem; }

/* ---------- publications ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.4rem; margin-bottom: 2.2rem; }
.search { flex: 1 1 18rem; }
.search input {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px; padding: 0.6rem 0.8rem;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.chk { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; cursor: pointer; }
.chk input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
#count { font-size: 0.9rem; flex-basis: 100%; }

.year { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.4rem; margin-top: 1.4rem; }
.year:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.year-label { font-size: 1.5rem; color: var(--muted); font-variant-numeric: lining-nums; align-self: start; position: sticky; top: 5.5rem; }
.year-label-text { font-size: 1.15rem; padding-top: 0.15rem; }
@media (max-width: 640px) { .year { grid-template-columns: 1fr; } .year-label { position: static; margin-bottom: 0.6rem; } }

.pub, .sw { padding-bottom: 1.6rem; }
.pub + .pub, .sw + .sw { padding-top: 0.2rem; }
.pub-title { font-size: 1.22rem; font-weight: 500; line-height: 1.3; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); }
.pub-authors { color: var(--muted); font-size: 0.94rem; margin-top: 0.35rem; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: 0.94rem; margin-top: 0.2rem; display: flex; flex-wrap: wrap; column-gap: 1rem; }
.pub-venue .if, .pub-venue .doi { color: var(--muted); }
.pub-venue .doi { text-decoration: none; overflow-wrap: anywhere; }
.pub-venue .doi:hover { color: var(--accent); text-decoration: underline; }
.pub-venue .oa { color: var(--accent); }
.pub-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.acts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.5rem; font-size: 0.93rem; font-weight: 500; }
.act { text-decoration: none; }
.act:hover { text-decoration: underline; }
.act[aria-expanded="true"] { color: var(--ink); }
.bib { margin-top: 0.7rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; position: relative; }
.bib pre { margin: 0; padding: 0.9rem 1rem; overflow-x: auto; font: 0.8rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 5rem; }
.bib button {
  position: absolute; top: 0.5rem; right: 0.5rem; font: 500 0.82rem var(--sans); color: var(--accent);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 0.25rem 0.6rem; cursor: pointer;
}
.empty { padding: 1rem 0 2rem; color: var(--muted); }

/* ---------- info page ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; max-width: 52rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 400; }
.page-head > p { margin: 0.8rem 0 2rem; }
.page-head + .block { border-top-color: var(--rule); }
.conf-event { color: var(--muted); font-size: 0.95rem; }
.talks { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.95rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 2rem var(--gutter) 3rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.foot p + p { margin-top: 0.4rem; }
.foot a + a { margin-left: 1.2rem; }

@media print {
  .bar, .filters, .trace, .profiles, .skip, .acts { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .block { grid-template-columns: 1fr; padding: 1rem 0; }
  .year-label, .block-head h2 { position: static; }
}

.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.8rem 2.2rem; margin-bottom: 2rem; }
.theme h3 { font-size: 1.2rem; }
.theme p { margin-top: 0.35rem; font-size: 0.97rem; }
.theme .topics { margin: 0.6rem 0 0; }
.theme .topics li { font-size: 0.85rem; padding: 0.1rem 0.5rem; }
.tools { margin: -0.6rem 0 1.8rem; }
.roles .sub { margin-top: 0.5rem; }
.projects { list-style: none; margin: 0; padding: 0; }
.projects li { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
.projects li:first-child { border-top: 0; padding-top: 0; }
.projects h3 { font-size: 1.15rem; }

.topics li.tool { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); color: var(--accent); background: transparent; }
.logo-empty { background: transparent; }
.designs { margin: 0; padding-left: 1.1rem; }
.designs li { margin-bottom: 0.3rem; }
@media (max-width: 520px) { .logo-empty { display: none; } }
