:root {
  --paper: #ffffff;
  --panel: #f0f5f9;
  --ink: #243238;
  --muted: #58676d;
  --accent: #176c70;
  --line: #d8e3e4;
  color-scheme: light;
  scroll-padding-top: 8rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.7em;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: calc(100% - 64px);
  max-width: 1060px;
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -5rem;
  left: 1rem;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
  color: var(--paper);
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  flex-shrink: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 26px;
  row-gap: 8px;
  font-size: 0.88rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  text-underline-offset: .24em;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
}

.intro {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  padding-block: 80px;
  align-items: start;
}

.identity {
  text-align: center;
}

.portrait {
  width: 184px;
  height: 184px;
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.identity h1 {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.identity p {
  margin-bottom: 0.45em;
  font-size: 0.93rem;
  line-height: 1.6;
}

.affiliation,
.location {
  color: var(--muted);
}

.location {
  font-size: 0.85rem;
}

.bio h2 {
  margin-bottom: 1rem;
}

.bio p {
  max-width: 66ch;
}

.text-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 18px;
  row-gap: 6px;
  font-size: 0.92rem;
}

.bio .text-links {
  margin-top: 25px;
}

.section {
  padding-block: 68px;
}

.section--tinted {
  background: var(--panel);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > a {
  flex-shrink: 0;
  font-size: 0.9rem;
}

.section-split {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.section-label p {
  color: var(--muted);
  font-size: 0.94rem;
}

.event-list,
.publication-list,
.publication-list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.events-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
}

.event {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding-block: 12px;
  scroll-margin-top: 8rem;
}

.event:first-child { padding-top: 0; }
.event:last-child { padding-bottom: 0; }
.event-icon {
  width: 17px;
  height: 17px;
  margin-top: 5px;
  color: var(--muted);
}

.event h3 {
  margin-bottom: 5px;
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
}
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a:hover { color: var(--accent); text-decoration: underline; }
.event-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}
.event-date { color: inherit; font-weight: 400; }
.events-all {
  display: inline-block;
  margin-top: 24px;
  font-size: .9rem;
  font-weight: 500;
}


.meta,
.event-note,
.publication-venue {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.event-note {
  margin-top: 0.5em;
}

.publication {
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.publication:first-child {
  padding-top: 0;
}

.publication:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.publication h3 {
  margin-bottom: 0.4em;
  font-size: 1.03rem;
  line-height: 1.5;
}

.publication p {
  margin-bottom: 0.35em;
  font-size: 0.92rem;
  line-height: 1.65;
}

.publication .publication-venue {
  font-size: 0.86rem;
}

.publication .text-links {
  margin-top: 0.7em;
  font-size: 0.86rem;
}

.music-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 18px;
  max-width: 100%;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.music-link:hover {
  background: var(--panel);
}

.music-symbol {
  flex-shrink: 0;
  font-size: 2.25rem;
  line-height: 1;
}

.music-caption {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.music-section { margin-top: 42px; }
.music-section > h2 { font-size: 1.3rem; }
.music-entry { padding-block: 18px; }
.music-entry h3 { margin-bottom: 6px; font-size: 1.05rem; }
.music-entry p { margin-bottom: 10px; }
.music-post { font-size: .88rem; }
.concert-poster { max-width: 480px; margin: 20px 0; }
.concert-poster img { width: 100%; height: auto; border-radius: 4px; }

.page-content {
  max-width: 850px;
  padding-block: 62px 80px;
}

.page-header {
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  margin-bottom: 0.45em;
  font-size: 2.05rem;
}

.page-header p {
  color: var(--muted);
}

.year-group {
  margin-block: 36px;
}

.year-group > h2 {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 1.15rem;
}

.compact-list {
  margin: 0.65em 0;
  padding-left: 1.2em;
}

.compact-list li {
  margin-bottom: 0.4em;
}

.site-footer {
  padding-block: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-footer p,
.site-footer .text-links {
  margin: 0;
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .site-header__inner {
    min-height: 100px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding-block: 14px;
  }

  .site-nav {
    column-gap: 14px;
    row-gap: 7px;
    font-size: 13px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-block: 48px 52px;
  }

  .portrait {
    width: 152px;
    height: 152px;
    margin-bottom: 18px;
  }

  .identity h1 {
    font-size: 1.7rem;
  }

  .section {
    padding-block: 48px;
  }

  .section-heading {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
  }

  .section-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .section-label h2 {
    margin-bottom: 0.5em;
  }

  .event {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 9px;
    padding-block: 13px;
  }

  .event-date {
    font-size: 0.79rem;
  }

  .page-content {
    padding-block: 42px 56px;
  }

  .page-header {
    margin-bottom: 30px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .skip-link,
  #music {
    display: none;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .intro {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 32px;
    padding-block: 0 24px;
  }

  .portrait {
    width: 120px;
    height: 120px;
  }

  .section,
  .page-content {
    padding-block: 22px;
  }

  .section--tinted {
    background: none;
  }

  a {
    color: inherit;
  }

  .event,
  .publication,
  .software-feature,
  .music-entry {
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }
}


.publication-list + h2 { margin-top: 42px; }
.publication .meta strong { color: var(--ink); font-weight: 600; }
main:focus { outline: none; }

.news-section { padding-block: 40px 50px; border-top: 1px solid var(--line); }
.news-section .section-heading { margin-bottom: 22px; }
.news-layout { max-width: 900px; }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-item { display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 16px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item time { color: var(--muted); font-size: .75rem; padding-top: 3px; }
.news-item h3 { margin: 0 0 5px; font-size: .95rem; line-height: 1.4; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--accent); text-decoration: underline; }
.news-item p { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--muted); }
@media (max-width: 640px) {
  .news-item { grid-template-columns: 74px minmax(0,1fr); gap: 12px; }
}


[hidden] { display: none !important; }

.portrait {
  width: 220px;
  height: 250px;
  border-radius: 12px;
  object-position: 50% 42%;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.software-heading { align-items: end; }
.software-heading > p {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.software-heading h2 { font-size: 1.85rem; }
.software-feature {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.7fr);
  gap: 48px;
  align-items: start;
  padding-block: 52px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 6rem;
}
.software-feature:first-child { border-top: 2px solid var(--accent); }
.software-feature:last-child { padding-bottom: 0; }
.software-copy h3 { font-size: 2rem; margin-bottom: 14px; }
.software-copy > p { font-size: .91rem; }
.software-copy > .software-headline {
  font-size: 1.13rem;
  line-height: 1.45;
  letter-spacing: -.015em;
}
.software-copy > .eyebrow { font-size: .69rem; }
.project-links { gap: 10px 20px; font-size: .84rem; }
.software-figure { min-width: 0; margin: 0; }
.software-figure > a {
  padding: 16px;
  border: 0;
  background: transparent;
}
.software-figure img { width: 100%; max-height: 460px; object-fit: contain; mix-blend-mode: normal; }
.software-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.7;
}
.expand-image { display: block; position: relative; overflow: hidden; border-radius: 6px; }
.expand-image:focus-visible { outline-offset: 5px; }
.image-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 5px 10px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: .68rem;
  box-shadow: 0 1px 8px #302c2810;
}
.expand-image:hover .image-hint { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.workflow { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.workflow summary { width: fit-content; color: var(--accent); cursor: pointer; font-size: .84rem; }
.workflow-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 16px; }
.workflow-steps button {
  appearance: none;
  padding: 6px 10px;
  border: 1px solid #c8baab;
  border-radius: 4px;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
}
.workflow-steps button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.workflow-panel { margin-top: 14px; }
.workflow-panel h4 { margin: 0 0 8px; font-size: .85rem; line-height: 1.5; }
.workflow-panel p { font-size: .8rem; color: var(--muted); line-height: 1.65; }

.lab-gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.lab-gallery figure { margin: 0; min-width: 0; }
.lab-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.lab-gallery figcaption { margin-top: 15px; font-size: .9rem; }
.lab-gallery figcaption a { color: var(--ink); text-decoration: none; }
.lab-gallery figcaption a:hover { color: var(--accent); text-decoration: underline; }

.image-viewer {
  width: min(1200px,94vw);
  max-width: 94vw;
  max-height: 94vh;
  padding: 46px 26px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.image-viewer::backdrop { background: rgba(28,25,23,.85); }
.image-viewer img { width: auto; max-width: 100%; max-height: calc(90vh - 140px); margin-inline: auto; object-fit: contain; }
.image-viewer p { margin: 18px 0 0; font-size: .78rem; line-height: 1.6; }
.viewer-close {
  position: absolute;
  top: 10px;
  right: 16px;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
.viewer-close span { margin-left: 12px; }

.music-page .page-header p { max-width: 68ch; }
.performance-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) 250px;
  gap: 32px;
  align-items: start;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
}
.performance-card:last-child { border-bottom: 0; }
.performance-card h3 { font-size: 1.2rem; }
.performance-poster { min-width: 0; margin: 0; }
.performance-poster img { width: 100%; height: auto; }
.performance-card figcaption { margin-top: 12px; color: var(--muted); font-size: .78rem; }
.performance-card .archive-note { color: var(--muted); font-size: .85rem; }

@media (max-width: 860px) {
  .software-feature { grid-template-columns: minmax(0,1fr); gap: 28px; padding-block: 36px; }
  .software-copy { max-width: 65ch; }
  .software-figure img { max-height: 560px; }
}
@media (max-width: 640px) {
  .portrait { width: 190px; height: 216px; }
  .software-heading { align-items: start; }
  .software-heading > p { max-width: 38ch; }
  .software-copy h3 { font-size: 1.75rem; }
  .software-figure > a { padding: 8px; }
  .image-hint { right: 6px; bottom: 6px; font-size: .63rem; }
  .lab-gallery { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .performance-card { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .performance-poster { width: min(100%,400px); }
  .image-viewer { padding: 48px 14px 18px; }
  .image-viewer img { max-height: calc(90vh - 190px); }
}
@media print {
  .software-feature { break-inside: avoid; }
  .image-hint, .image-viewer, .workflow-steps { display: none; }
}

.news-archive { margin-top: 18px; border-top: 1px solid var(--line); }
.news-archive summary { padding-block: 14px; color: var(--accent); cursor: pointer; font-size: .8rem; }
.news-archive summary:hover { text-decoration: underline; }
.news-archive .news-list { padding-bottom: 8px; }
.news-presentations-link { display: inline-block; margin-top: 16px; font-size: .8rem; }

/* First-page paper previews alongside the selected citations. */
.publication--preview { display: grid; grid-template-columns: minmax(0,1fr) 136px; gap: 24px; align-items: center; }
.publication-citation { min-width: 0; }
.paper-preview { display: block; color: var(--accent); text-decoration: none; }
.paper-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 3px 12px rgb(50 40 25 / 8%); transition: transform .18s ease, box-shadow .18s ease; }
.paper-preview > span { display: flex; justify-content: space-between; margin-top: 7px; font-size: .7rem; }
.paper-preview:hover img { transform: translateY(-3px); box-shadow: 0 6px 16px rgb(50 40 25 / 14%); }
.paper-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 640px) {
  .publication--preview { grid-template-columns: minmax(0,1fr) 92px; gap: 14px; align-items: start; }
  .paper-preview > span { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .paper-preview img { transition: none; } }
@media print { .paper-preview { display: none; } .publication--preview { display: block; } }

.featured-project .software-figure img { max-height: 560px; }

/* White project canvas preserves the original figure colours without blending. */
#projects { background: #ffffff; }

.contact-icons { gap: 12px; }
.contact-icons a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); text-decoration: none; }
.contact-icons svg { width: 21px; height: 21px; }
.contact-icons a:hover { background: var(--panel); border-color: var(--accent); }
.contact-icons a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.about-background { background: #edf7f6; }
