@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --max-w: 1080px;
  --bg: #f7f6f2;
  --paper: #ffffff;
  --text: #242e2b;
  --text-2: #58625d;
  --accent: #235c50;
  --accent-hover: #123f35;
  --rule: #d1d7cf;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
}

/* A quiet reading surface; type and rules carry the hierarchy. */
html { scroll-padding-top: 7rem; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #d7e5db; color: #162c24; }
#quarto-content { background: var(--bg); }
#quarto-document-content { min-width: 0; padding-top: 2.5rem; padding-bottom: 1rem; }
#title-block-header { margin: 0 0 2.2rem; }
#title-block-header:empty { display: none; }
h1, h2, h3, h4 { color: var(--text); font-family: var(--font-serif); font-weight: 500; }
h1.title { font-size: clamp(2.5rem, 4vw, 3.2rem); line-height: 1.15; letter-spacing: -0.035em; }
h2 { font-size: 1.65rem; line-height: 1.3; border: 0; padding: 0; }
h3 { font-size: 1.25rem; line-height: 1.4; }
strong, b { font-weight: 600; }
p { margin-bottom: 1rem; }
main a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
main a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 4px;
  border-radius: 2px;
  box-shadow: none !important;
}

/* A compact mobile menu; the header include supplies inline links without JS. */
#quarto-header { position: sticky; top: 0; }
body.nav-fixed { padding-top: 0 !important; }
.navbar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem 0;
  font-family: var(--font-sans);
}
.navbar > .navbar-container { max-width: calc(var(--max-w) + 3rem); margin: 0 auto; padding-inline: 1.5rem; }
.navbar-brand, .navbar-title { font: 500 1.2rem/1.4 var(--font-serif); color: var(--text) !important; }
.navbar-brand { margin-right: 2.5rem; }
.navbar-brand-container { margin-left: 0 !important; margin-right: auto !important; }
.navbar .navbar-brand-container { order: 0; }
.navbar-nav { gap: 0.7rem; }
.navbar-nav .nav-link {
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 0.2rem !important;
  text-underline-offset: 0.45em;
}
.navbar-nav .nav-link.active { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.navbar-nav .nav-link:hover { color: var(--accent); }
.navbar-nav .menu-text { position: relative; }
.navbar-nav .nav-link:not(.active) .menu-text::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.35em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
.navbar-nav .nav-link:is(:hover, :focus-visible) .menu-text::after { transform: scaleX(1); }
#quarto-search { color: var(--text-2); }
#quarto-search .aa-DetachedSearchButton { min-width: 44px; min-height: 44px; }
.navbar-toggler { color: var(--text-2); border-color: var(--rule); }
.navbar-toggler-icon { filter: brightness(0) saturate(100%); opacity: 0.65; }
@media (min-width: 992px) {
  .navbar .navbar-collapse { order: 1; }
  .navbar #quarto-search { order: 2; }
  .navbar-nav.me-auto { margin-left: auto; margin-right: 1.3rem !important; }
}

/* Home: identity, affiliation and email on the left; profile links on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  column-gap: 3rem;
  margin: 0 0 2.5rem;
}
.last-update { grid-column: 1 / -1; font-size: 0.78rem; letter-spacing: 0.025em; color: var(--text-2); margin: 0 0 1.2rem; }
.hero-identity { grid-column: 1; }
.hero-name { font-size: clamp(2.7rem, 5vw, 3.8rem); line-height: 1.1; letter-spacing: -0.045em; margin: 0 0 0.85rem; }
.hero-position { font-size: 1.12rem; font-weight: 600; color: var(--accent); margin: 0 0 0.2rem; }
.hero-expected { font-size: 0.9rem; font-weight: 400; color: var(--text-2); }
.hero-dept { font-size: 1rem; margin: 0; }
.hero-affiliation { grid-column: 1; margin-top: 1.1rem; }
.hero-lab { font-size: 0.96rem; font-weight: 600; margin: 0; }
.hero-lab-dept, .hero-advisor { font-size: 0.9rem; color: var(--text-2); margin: 0; }
.hero-email { font-size: 0.94rem; margin: 0.8rem 0 0; overflow-wrap: anywhere; }
.hero-contact { grid-column: 2; grid-row: 2 / 4; align-self: center; border-left: 1px solid var(--rule); padding-left: 2rem; margin: 0; font-size: 0.94rem; }
.contact-row { margin-bottom: 0.85rem; }
.contact-row:last-child { margin-bottom: 0; }
.contact-label { font-size: 0.73rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 0.15rem; }
.contact-row dd { margin: 0; overflow-wrap: anywhere; }
.home-section { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.home-section > .home-heading {
  max-width: 36ch;
  font: 500 clamp(1.5rem, 2.8vw, 2rem)/1.3 var(--font-serif);
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}
.research-keywords { display: flex; flex-wrap: wrap; gap: 0.45rem 0.55rem; }
.research-keywords > span {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--rule);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
}
.home-statements, .research-intro { max-width: 88ch; margin: 1.3rem 0 1rem; padding-left: 1.05rem; font-size: 1rem; line-height: 1.65; }
.home-statements > li, .research-intro > li { padding-left: 0.25rem; margin-bottom: 0.5rem; }
.home-statements > li:last-child, .research-intro > li:last-child { margin-bottom: 0; }
.home-statements > li::marker, .research-intro > li::marker { color: var(--text-2); font-size: 0.75em; }
.home-statements .rs-tech, .home-statements .rs-method { color: inherit; font-weight: 600; }
.home-more { margin: 0; font-size: 0.92rem; font-weight: 500; }
.home-more a { display: inline-block; padding-block: 0.15rem; text-underline-offset: 0.24em; }

/* Research: questions and subject headings beside the supporting work. */
.research-content > .research-intro { margin-top: 0; margin-bottom: 2.5rem; }
.research-theme {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.7fr);
  grid-template-rows: min-content min-content 1fr auto;
  column-gap: 3.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-top: 2rem;
}
.research-theme > h2 { grid-column: 1; font-size: 1.5rem; margin: 0 0 0.75rem; }
.rs-question { grid-column: 1; color: var(--text-2); font-size: 0.95rem; line-height: 1.55; font-style: italic; margin: 0; }
.research-theme > ul { grid-column: 2; grid-row: 1 / 5; margin: 0; padding: 0; list-style: none; }
.research-theme:has(> .rs-figures) > ul { grid-row: 4; }
/* Representative figures: small white plates above the theme's items; click to enlarge (JS only). */
/* Two per row, so each figure is at most half the column; per-figure widths (research.yml) even out in-figure text size. */
.rs-figures { grid-column: 2; grid-row: 1 / 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.4rem; align-items: start; margin: 0 0 1.6rem; }
.rs-fig { margin: 0; }
.rs-zoom { display: block; width: fit-content; max-width: 100%; padding: 0; border: 0; background: none; line-height: 0; cursor: default; }
.rs-js .rs-zoom { cursor: zoom-in; }
.rs-js .rs-zoom:hover img { opacity: 0.88; }
.rs-zoom img { display: block; max-width: 100%; height: auto; margin: 0; transition: opacity 140ms ease; }
.rs-fig figcaption { margin-top: 0.45rem; font-size: 0.78rem; line-height: 1.45; color: var(--text-2); }
.rs-fig-src { white-space: nowrap; }
.rs-dialog { max-width: min(92vw, 1100px); border: 0; padding: 1.4rem 1.4rem 1rem; background: #fff; color: var(--text); }
.rs-dialog::backdrop { background: rgba(20, 25, 23, 0.6); }
.rs-dialog img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.rs-dialog-cap { margin: 0.7rem 0 0; font-size: 0.9rem; color: var(--text-2); }
.rs-dialog-close { position: absolute; top: 0.3rem; right: 0.6rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--text-2); cursor: pointer; }
.research-theme li { margin-bottom: 1.2rem; line-height: 1.6; }
.research-theme li:last-child { margin-bottom: 0; }
.research-content .rs-tech, .research-content .rs-method { font-weight: 600; }
.rs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.65rem;
  margin-top: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.65;
}
.rs-refs { min-width: 0; }

/* Citation targets: clear the pinned navbar and mark the paper a citation jumped to. */
.pub-styled li[id] { scroll-margin-top: 6rem; }
.pub-styled li:target { box-shadow: inset 3px 0 0 var(--accent); padding-left: 0.9rem; }

/* Career: stable section labels and a clear rhythm between entries. */
.career-edu, .career-fellowship, .career-skills {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  column-gap: 3rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-top: 2rem;
}
.career-edu > h2, .career-fellowship > h2, .career-skills > h2 { grid-column: 1; grid-row: 1 / 20; font-size: 1.45rem; margin: 0; }
.career-edu > p, .career-fellowship > p, .career-skills > table { grid-column: 2; }
.edu-entry { margin: 0 0 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--rule); }
.edu-entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.edu-degree { color: var(--accent); font-weight: 700; }
.edu-school { font-weight: 600; }
.edu-detail, .edu-advisor, .edu-thesis { font-size: 0.94rem; color: var(--text-2); }
.edu-lab { font-size: 0.96rem; }
.edu-thesis { font-style: italic; }
.career-fellowship > p { margin: 0; }
.career-fellowship strong { display: inline-block; font-weight: 600; line-height: 1.5; margin-bottom: 0.5rem; }
.skills-tbl { --bs-table-bg: transparent; width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; font-size: 0.95rem; }
.skills-tbl th, .skills-tbl td { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.skills-tbl th { width: 30%; text-align: left; font-weight: 600; padding-right: 1.2rem; color: var(--accent); }
.skills-tbl td { color: var(--text-2); }
.skills-tbl tr:first-child > * { padding-top: 0; }
.skills-tbl tr:last-child > * { border-bottom: 0; padding-bottom: 0; }

/* Publications retain the approved order, with the title as the visual anchor. */
.pub-note { margin: -0.5rem 0 1.5rem; font-size: 0.85rem; color: var(--text-2); }
.pub-styled { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.pub-styled > li { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); font-size: 0.94rem; line-height: 1.6; }
.pub-authors { display: block; max-width: 100ch; margin-bottom: 0.4rem; font-size: 0.89rem; color: var(--text-2); }
.pub-authors u { text-decoration: none; }
.pub-authors u b { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.pub-title { display: block; max-width: 85ch; font-size: 1.14rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.45rem; }
.pub-journal { font-style: italic; }
.pub-assignee { color: var(--text-2); font-size: 0.9rem; }
.pub-year { font-weight: 600; }
.pub-doi { font-size: 0.82rem; margin-left: 0.6rem; }
.pub-pdf { font-size: 0.83rem; font-weight: 600; margin-left: 0.6rem; }
.pub-pdf a { display: inline-block; padding-block: 0.1rem; }
.pub-patent-header { margin: 2.4rem 0 0.9rem; font-size: 1.4rem; letter-spacing: -0.01em; }
.pub-compact { list-style: none; padding: 0; margin: 0; color: var(--text-2); font-size: 0.9rem; line-height: 1.55; }
.pub-compact > li { margin-bottom: 0.45rem; }
.pub-compact > li:last-child { margin-bottom: 0; }
.pub-compact .pub-authors { display: inline; max-width: none; margin: 0; font-size: inherit; }

/* The footer is secondary, but still meets text contrast requirements. */
.nav-footer { background: var(--bg); border-top: 1px solid var(--rule); margin-top: 3rem; color: var(--text-2); font-size: 0.82rem; padding: 1.2rem 1.5rem; }
.nav-footer a { color: var(--accent); }
.nav-footer .nav-footer-contents { color: var(--text-2); }

@media (max-width: 991.98px) {
  .navbar { padding-block: 0.35rem; }
  .navbar > .navbar-container { flex-wrap: wrap; padding-inline: 1rem; min-height: 44px; }
  .navbar-brand { margin-right: 0.75rem; }
  .navbar .navbar-toggler { display: block; order: 3; flex: 0 0 44px; width: 44px; height: 44px; padding: 0.45rem; margin-left: 0.4rem; }
  .navbar .navbar-collapse { order: 4; flex-basis: 100%; }
  .navbar-collapse.show, .navbar-collapse.collapsing { padding-block: 0.5rem; border-top: 1px solid var(--rule); }
  .navbar .navbar-nav { gap: 0.15rem; margin: 0; max-height: calc(100dvh - 80px); }
  .navbar #quarto-search { order: 2; margin-left: auto; }
  .navbar .nav-link { font-size: 0.94rem; padding-block: 0.5rem !important; }
  .hero { column-gap: 2rem; }
  .hero-contact { padding-left: 1.4rem; }
  .research-theme { column-gap: 2rem; }
  .career-edu, .career-fellowship, .career-skills { grid-template-columns: 10rem minmax(0, 1fr); column-gap: 2rem; }
}
@media (max-width: 680px) {
  #quarto-document-content { padding-top: 1.5rem; }
  #title-block-header { margin-bottom: 1.5rem; }
  .hero { grid-template-columns: minmax(0, 1fr); margin-bottom: 2rem; }
  .hero-name { font-size: 2.8rem; }
  .hero-contact { grid-column: 1; grid-row: auto; border: 0; border-top: 1px solid var(--rule); margin-top: 1.4rem; padding: 1rem 0 0; }
  .contact-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; margin-bottom: 0.6rem; }
  .contact-label { padding-top: 0.2rem; }
  .research-theme { display: block; margin-top: 1.8rem; padding-top: 1.3rem; }
  .rs-question { margin-bottom: 1.4rem; }
  .career-edu, .career-fellowship, .career-skills { display: block; margin-top: 1.8rem; padding-top: 1.3rem; }
  .career-edu > h2, .career-fellowship > h2, .career-skills > h2 { margin-bottom: 1.3rem; }
  .skills-tbl, .skills-tbl tbody, .skills-tbl tr, .skills-tbl th, .skills-tbl td { display: block; width: 100%; }
  .skills-tbl th { border: 0; padding: 0.8rem 0 0.25rem; }
  .skills-tbl td { padding: 0 0 0.8rem; }
  .pub-styled > li { padding: 1.3rem 0; }
  .pub-doi { display: inline-block; margin: 0.35rem 0 0; }
  .pub-title { font-size: 1.1rem; }
  .nav-footer { margin-top: 2rem; }
}

/* Content starts readable; this one-time entrance never depends on JavaScript. */
@keyframes content-enter {
  from { opacity: 0.65; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.research-theme:focus-within { border-top-color: var(--accent); }
.pub-styled > li:focus-within { background-color: #235c5006; }
@media (hover: hover) {
  .research-theme:hover { border-top-color: var(--accent); }
  .pub-styled > li:hover { background-color: #235c5006; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  #quarto-document-content > :is(header, .hero, .home-section, .section-block, .cv-toolbar, .cv-sheet) {
    animation: content-enter 380ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  #quarto-document-content > :nth-child(2) { animation-delay: 45ms; }
  #quarto-document-content > :nth-child(3) { animation-delay: 90ms; }
  #quarto-document-content > :nth-child(n + 4) { animation-delay: 120ms; }
  a, button { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, text-decoration-color 180ms ease; }
  .navbar-nav .menu-text::after { transition: transform 220ms ease; }
  .research-theme { transition: border-color 220ms ease; }
  .pub-styled > li { transition: background-color 220ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
