:root {
  color-scheme: light;
  --ink: #161c2b;
  --muted: #4e5c73;
  --blue: #244bce;
  --blue-dark: #1c36a0;
  --line: #dbe2ee;
  --pale: #f2f5ff;
  --wash: #f7f9fd;
  --white: #fff;
  --display: Georgia, "Times New Roman", serif;
  --text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body-size: 0.9166667rem; /* 11 pt at the browser's default root size */
  --title-size: clamp(1.5rem, 2.3vw, 1.875rem);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--white); color: var(--ink); font: var(--body-size)/1.6 var(--text); text-align: justify; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid #3760ee; outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.07; letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3.7vw, 3rem); }
h3 { line-height: 1.35; }
ul, ol { padding: 0; margin: 0; }
img { max-width: 100%; display: block; }
[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.skip { position: absolute; z-index: 3; top: .5rem; left: .5rem; padding: .5rem .8rem; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }

.header-inner { min-height: 3.75rem; display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem 1.55rem; }
.site-header nav a { color: var(--ink); font-weight: 550; font-size: .94rem; text-decoration: none; }
.site-header nav a:hover, .site-header nav [aria-current] { color: var(--blue); text-decoration: underline; }
.site-header nav a:last-child { background: var(--blue); color: var(--white); border-radius: .25rem; padding: .35rem .9rem; }

.home-layout { display: grid; grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 4rem); padding-block: 2rem 4.5rem; }
.home-sidebar { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .75rem; min-width: 0; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: .32rem; align-content: start; min-height: 0; }
.intro h1, .page-heading h1 { font-size: var(--title-size); }
.preferred-name { color: var(--muted); }
.portrait { width: clamp(6.25rem, calc(37dvh - 7.5rem), 13rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .3rem; }
.intro-email { overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .64rem 1rem; border: 1px solid transparent; border-radius: .25rem; background: var(--blue); color: var(--white); font: 650 .95rem/1.25 var(--text); min-height: 2.75rem; text-decoration: none; cursor: pointer; }
.button:hover { color: var(--white); background: var(--blue-dark); }
.button-outline { background: var(--white); color: var(--blue); border-color: var(--line); }
.button-outline:hover { background: var(--pale); color: var(--blue-dark); }
.text-link, .paper-link { font-weight: 600; }
.profiles { display: flex; flex-wrap: wrap; gap: .15rem .65rem; }
.profile-link { font-weight: 550; }
.home-content { min-width: 0; }
.home-content > section + section { border-top: 1px solid var(--line); margin-top: 2.1rem; padding-top: 1.9rem; }
.home-content h2 { font-size: var(--title-size); }
.home-prose h2 { margin-bottom: .9rem; }
.home-prose p + p { margin-top: .85rem; }
.eyebrow { font-size: .82rem; font-weight: 700; color: var(--blue); letter-spacing: .08em; text-transform: uppercase; line-height: 1.45; margin-bottom: .75rem; }
.interest-links { display: block; margin-top: .2rem; }
/* The profile determines both row heights so news stays within half the sidebar. */
.sidebar-news { contain: size; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border: 1px solid var(--line); border-radius: .4rem; padding: .7rem .8rem; background: var(--wash); font-size: .75rem; }
.sidebar-news-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .45rem; margin-bottom: .5rem; }
.sidebar-news-heading h2 { font-weight: 700; letter-spacing: -.015em; }
.news-toggle { padding: .18rem 0; border: 0; background: transparent; color: var(--blue); font: 600 1em/1.3 var(--text); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.news-scroll { position: relative; overflow-y: auto; border-block: 1px solid var(--line); padding-right: .45rem; scrollbar-gutter: stable; }
.sidebar-news .news { border: 0; margin: 0; }
.sidebar-news .news li { padding-block: .6rem; }
.sidebar-news .news li:last-child { border-bottom: 0; }
.sidebar-news-heading h2, .sidebar-news .news h3 { font-size: .833333rem; }
.sidebar-news .news p { line-height: 1.4; }
.sidebar-news .news-meta, .sidebar-news .tag { font-size: inherit; }
.sidebar-news > a { justify-self: start; margin-top: .45rem; }

.awards, .news, .papers, .cv-list { list-style: none; }
.awards, .news { border-top: 1px solid var(--ink); margin-top: 1.15rem; }
.awards li { display: grid; grid-template-columns: minmax(4rem, 6.5rem) 1fr; gap: .9rem; border-bottom: 1px solid var(--line); padding-block: .75rem; }
.awards strong, .news h3 { font-size: .98rem; line-height: 1.4; }
.awards p, .news p, .award-date { color: var(--muted); }
.award-date { font-variant-numeric: tabular-nums; }
.news li { border-bottom: 1px solid var(--line); padding-block: .85rem; }
.news-meta { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .83rem; margin-bottom: .25rem; }
.news h3 a, .awards strong a { color: var(--ink); text-decoration-color: #9baad3; }
.news h3 a:hover, .awards strong a:hover { color: var(--blue); }
.news p { margin-top: .22rem; }
.tag { display: inline-flex; align-items: center; width: fit-content; background: var(--pale); color: #294484; border-radius: .2rem; padding: .16rem .42rem; font: 650 .75rem/1.35 var(--text); }

.page { min-height: 60vh; padding-block: clamp(1.8rem, 4vw, 3rem) 4.25rem; }
.page-heading h1 { max-width: 58rem; overflow-wrap: anywhere; }
.page-heading p { max-width: 43rem; color: var(--muted); margin-top: .7rem; }
.page-heading { margin-bottom: 1.5rem; }
.breadcrumb { margin-bottom: 1.25rem; }
.archive-link { margin-bottom: 1.15rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { min-height: 11rem; padding: 1.35rem; border: 1px solid var(--line); border-top: 3px solid var(--blue); background: var(--wash); border-radius: .24rem; display: flex; flex-direction: column; align-items: flex-start; }
.project-card h3 { font: 400 clamp(1.45rem, 3vw, 2rem)/1.16 var(--display); margin-bottom: .65rem; }
.project-card h3 a { color: var(--ink); text-decoration: none; }
.project-card h3 a:hover { color: var(--blue); text-decoration: underline; }
.project-card p:not(.eyebrow) { margin-bottom: 1rem; color: var(--muted); }
.card-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 620; margin-top: auto; }
.group-title { margin-block: 3rem 1.25rem; }
.project-detail { display: grid; gap: 1.7rem; max-width: 49rem; }
.project-detail h2, .related h2, .resources h2, .cv-layout h2 { font-size: clamp(1.65rem, 2.6vw, 2.3rem); margin-bottom: .65rem; }
.related, .resources { margin-top: 2.7rem; }
.resources ul { padding-left: 1.2rem; }
.page > .news { max-width: 52rem; }

.paper-filters { display: grid; grid-template-columns: minmax(11rem, 2fr) 1fr 1fr auto; align-items: end; gap: .7rem; margin: 1.5rem 0 .65rem; }
.paper-filters label { display: grid; gap: .35rem; font-weight: 650; font-size: .86rem; }
.paper-filters input, .paper-filters select { width: 100%; border: 1px solid #a8b5cc; border-radius: .25rem; min-height: 2.75rem; background: var(--white); color: var(--ink); font: 1rem/1.3 var(--text); padding: .55rem .7rem; }
.results-count { margin-bottom: .65rem; font-size: .9rem; color: var(--muted); }
.results-count:empty { display: none; }
.papers { border-top: 1px solid var(--ink); }
.paper { display: grid; gap: .5rem 1.3rem; grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) auto; align-items: start; padding-block: 1.05rem; border-bottom: 1px solid var(--line); }
.paper h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.paper:target { background: var(--pale); }
.paper-meta { display: flex; flex-direction: column; gap: .3rem; color: var(--blue); font-size: .9rem; font-weight: 700; }
.authors { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.paper-link { font-size: .92rem; white-space: nowrap; }
.empty { margin-top: 1rem; color: var(--muted); }
.cv-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; margin-top: 2rem; }
.cv-list li { display: grid; gap: .2rem; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.cv-list span, .cv-list p { color: var(--muted); }

.site-footer { background: var(--wash); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.15rem; padding-block: 1.6rem; }
.footer-inner strong { font: 400 1.32rem/1.3 var(--display); margin-right: .95rem; }
.footer-inner span { font-size: .9rem; color: var(--muted); }
.footer-inner > div { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .91rem; }

.research-figure { margin: 1.45rem 0 1.65rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--wash); max-width: 65rem; break-inside: avoid; }
.research-figure figcaption { font-weight: 700; margin-bottom: .9rem; }
.figure-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.figure-steps li { position: relative; padding: .8rem .9rem; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: .25rem; background: var(--white); }
.figure-steps li strong, .figure-steps li span { display: block; }
.figure-steps li strong { font-size: .94rem; }
.figure-steps li span { color: var(--muted); margin-top: .25rem; }
.figure-steps li:not(:last-child)::after { content: ""; position: absolute; border-top: 1px solid #abb9d9; width: 1.1rem; left: 100%; top: 50%; }
.research-overlap .figure-steps li::after { content: ""; position: absolute; width: auto; height: .8rem; border: 0; border-left: 1px solid #abb9d9; top: 100%; left: 50%; }
.figure-connection { margin-top: .8rem; padding: .55rem .7rem; border: 1px solid var(--line); background: var(--pale); color: var(--blue-dark); font-weight: 650; }
.figure-goal { margin-top: .8rem; color: var(--ink); }
.figure-goal strong { color: var(--blue-dark); }
.publication-year { margin-top: 1.65rem; }
.publication-year h2, .activity-group h2 { margin: 0 0 .65rem; font-size: clamp(1.55rem, 2.8vw, 2.15rem); }
.activity-group { max-width: 59rem; margin: 1.8rem 0 2.3rem; }
.activity-list { list-style: none; border-top: 1px solid var(--line); margin-top: .45rem; }
.activity-list li { display: grid; grid-template-columns: minmax(5rem, 10rem) minmax(0, 1fr); padding: .65rem 0; column-gap: .85rem; border-bottom: 1px solid var(--line); }
.activity-date, .activity-list p, .dataset-list li p { color: var(--muted); }
.teaching-role { color: var(--blue-dark); font-weight: 650; margin-bottom: .35rem; }
.teaching-group .activity-list { margin-top: 1rem; }
.cv-layout .cv-list + p { margin-top: .65rem; }
.dataset-list ul { list-style: none; padding-left: 0; border-top: 1px solid var(--line); }
.dataset-list li { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.dataset-list .tag { margin-left: .3rem; }

@media (min-width: 681px) and (min-height: 600px) {
  .home-sidebar { position: sticky; top: 1.25rem; max-height: calc(100dvh - 6.5rem); }
  .intro { overflow-y: auto; padding: .2rem .3rem .2rem .2rem; }
}
@media (min-width: 681px) and (max-height: 660px) {
  .intro { gap: .15rem; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 2rem, 70rem); }
  .header-inner { min-height: 0; padding-block: .6rem; }
  .site-header nav { gap: .4rem .9rem; }
  .site-header nav a { font-size: .88rem; }
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding-block: 1.8rem 3rem; }
  .project-grid, .cv-layout { grid-template-columns: 1fr; }
  .paper-filters { grid-template-columns: 1fr 1fr; }
  .paper-filters label:first-child { grid-column: 1 / -1; }
  .paper-filters button { justify-self: start; }
  .paper { grid-template-columns: 1fr auto; }
  .paper > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .paper-link { grid-column: 2; grid-row: 1; }
  .footer-inner span { display: block; }
  .figure-steps { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .figure-steps li:not(:last-child)::after { width: auto; height: .7rem; border: 0; border-left: 1px solid #abb9d9; top: 100%; left: 50%; }
  .research-overlap .figure-steps li:not(:last-child)::after { display: none; }
  .activity-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
}
@media print {
  .site-header, .site-footer, .button, .paper-filters, .skip { display: none !important; }
  .page { padding-block: 0; }
  .shell { width: 100%; }
  a { color: inherit; }
  .paper, .cv-list li, .awards li { break-inside: avoid; }
}
