/* Shared styles for the homepage and CV. No external fonts or dependencies. */
:root {
  color-scheme: light;
  --background: #ffffff;
  --ink: #252c2f;
  --muted: #646b6d;
  --accent: #245a66;
  --accent-dark: #153e48;
  --line: #dedfd8;
  --tint: #edf2ef;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
::selection { background: #d7e5df; color: #173d43; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
p { margin: 0 0 1.1rem; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(2.7rem, 5vw, 3.6rem); letter-spacing: -.045em; line-height: 1.15; margin: .45rem 0 1.5rem; }
h2 { font-size: 1.9rem; line-height: 1.25; letter-spacing: -.025em; }
h3, h4 { font-size: 1.04rem; font-weight: 600; line-height: 1.5; }
strong { font-weight: 600; }
sup { font-size: .72em; line-height: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.page-width { width: min(100% - 64px, 1000px); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: .7rem 1.2rem; background: var(--ink); color: white; z-index: 20; }
.skip-link:focus { top: 10px; color: white; }
.site-header { background: var(--background); border-bottom: 1px solid var(--line); }
.navigation { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--ink); font-weight: 650; font-size: 1.08rem; text-decoration: none; letter-spacing: -.025em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; padding: 0; margin: 0; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: .88rem; color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) 246px; align-items: start; gap: 68px; padding-top: 72px; }
.eyebrow { font-size: .73rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .65rem; }
.intro-lead { font-size: 1.06rem; }
.background { color: var(--muted); font-size: .94rem; margin-top: 1.5rem; }
.portrait { margin: 5px 0 0; overflow: hidden; border-radius: 3px; background: #dce9ed; }
.portrait img { display: block; width: 100%; height: 318px; object-fit: cover; object-position: 50% 36%; }
.profile-links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 1.55rem; }
.profile-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .9rem; text-decoration: none; }
.profile-links a:hover { text-decoration: underline; }
.research-interests { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 23px 0; margin-top: 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.research-interests span { display: inline-flex; align-items: center; gap: 9px; }
.research-interests span::before { content: ""; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.section { margin-top: 64px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 8px; }
.section-note { color: var(--muted); font-size: .75rem; margin: 0; }
.section-description { color: var(--muted); margin-top: 15px; max-width: 700px; font-size: .95rem; }
.publications { list-style: none; padding: 0; margin: 20px 0 0; }
.publication { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 28px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.publication:last-child { border-bottom: 0; padding-bottom: 0; }
.publication-label { display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; gap: 3px; }
.venue { display: inline-block; padding: 4px 9px; background: var(--tint); color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .035em; line-height: 1.5; }
.venue-journal { font-size: .66rem; letter-spacing: 0; }
.year, .label-detail { color: var(--muted); font-size: .75rem; padding-left: 9px; }
.year { margin-top: 3px; font-variant-numeric: tabular-nums; }
.publication h3 a, .manuscripts h4 a { color: var(--ink); text-decoration: none; }
.publication h3 a:hover, .manuscripts h4 a:hover { color: var(--accent); text-decoration: underline; }
.authors { font-size: .86rem; line-height: 1.7; color: var(--muted); margin: 7px 0 4px; }
.authors strong { color: var(--ink); }
.publication-venue { margin: 4px 0; font-size: .8rem; font-style: italic; color: var(--muted); }
.paper-links { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 5px; }
.paper-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; font-size: .76rem; font-weight: 600; text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }
.subsection-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 1rem; }
.subsection-heading span { font-size: .74rem; color: var(--muted); font-weight: 400; }
.manuscripts { list-style: none; margin: 0; padding: 0; counter-reset: paper; }
.manuscripts > li { position: relative; padding: 22px 0 20px 41px; border-bottom: 1px solid var(--line); counter-increment: paper; }
.manuscripts > li::before { content: counter(paper, decimal-leading-zero); position: absolute; left: 0; top: 25px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.manuscripts h4, .project-list h4 { font-size: .98rem; }
.work-in-progress { margin-top: 28px; border: 1px solid var(--line); border-radius: 3px; }
.work-in-progress summary { cursor: pointer; padding: 18px 21px; font-size: .95rem; font-weight: 600; }
.work-in-progress summary::marker { color: var(--accent); font-size: .75em; }
.work-in-progress summary > span:first-child { margin-left: 8px; }
.summary-count { color: var(--muted); font-size: .75rem; font-weight: 400; float: right; padding-top: 3px; }
.work-in-progress[open] summary { border-bottom: 1px solid var(--line); }
.project-list { list-style: none; padding: 0 24px; margin: 0; }
.project-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.project-list li:last-child { border: 0; }
.contact { border-top: 1px solid var(--line); padding-top: 35px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.contact h2 { font-size: 1.65rem; }
.contact p:not(.eyebrow) { font-size: .87rem; color: var(--muted); max-width: 390px; margin: 12px 0 0; }
.contact-email { display: inline-flex; gap: 13px; align-items: center; min-height: 44px; font-size: .89rem; overflow-wrap: anywhere; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 26px; margin-top: 55px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* CV: also designed for the browser's Print / Save as PDF command. */
.cv-main { max-width: 850px; }
.cv-heading { padding-top: 55px; display: flex; justify-content: space-between; gap: 25px; align-items: center; }
.cv-heading h1 { font-size: 2.8rem; margin-bottom: .5rem; }
.cv-heading p { margin: 0; }
.cv-contact { font-size: .9rem; }
.print-button { font: inherit; font-size: .82rem; color: var(--accent); border: 1px solid var(--line); background: transparent; padding: 10px 16px; cursor: pointer; border-radius: 3px; }
.print-button:hover { background: var(--tint); }
.cv-section { margin-top: 36px; }
.cv-section > h2 { font-size: 1.45rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.cv-section p, .cv-section li { font-size: .91rem; }
.cv-item { margin-bottom: 20px; }
.cv-item-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cv-item-heading span { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.cv-item p { margin: 2px 0; }
.cv-list { padding-left: 23px; }
.cv-list li { padding-left: 5px; margin-bottom: 17px; }
.cv-list h3 { font-size: .94rem; }
.cv-list p { margin: 3px 0; }
.cv-list .authors, .cv-list .publication-venue { font-size: .83rem; }
.cv-list .publication-venue { font-style: normal; }

@media (max-width: 800px) {
  .about { grid-template-columns: minmax(0, 1fr) 195px; gap: 35px; padding-top: 48px; }
  .portrait img { height: 265px; }
  .contact { flex-direction: column; align-items: flex-start; gap: 15px; }
  .contact p:not(.eyebrow) { max-width: none; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 1.5rem; }
  .page-width { width: calc(100% - 40px); }
  .navigation { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 15px; padding-bottom: 7px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 5px 16px; }
  .nav-links a { font-size: .83rem; }
  .about { grid-template-columns: 1fr; gap: 28px; padding-top: 35px; }
  h1 { font-size: 2.8rem; }
  .intro-lead { font-size: 1rem; }
  .portrait { grid-row: 1; width: 132px; margin: 0; }
  .portrait img { height: 150px; object-position: 50% 28%; }
  .profile-links { gap: 20px; margin-top: 15px; }
  .research-interests { margin-top: 27px; padding-block: 18px; gap: 9px 24px; font-size: .78rem; }
  .section { margin-top: 45px; }
  h2 { font-size: 1.65rem; }
  .publication { grid-template-columns: 1fr; gap: 13px; padding-block: 24px; }
  .publication-label { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .venue-journal br { display: none; }
  .venue-journal { font-size: .7rem; }
  .year, .label-detail { padding: 0; margin: 0; }
  .publication h3 { font-size: 1rem; }
  .section-note { font-size: .72rem; }
  .manuscripts > li { padding-left: 30px; }
  .work-in-progress summary { padding-inline: 15px; }
  .project-list { padding-inline: 18px; }
  .contact-email { font-size: .85rem; gap: 8px; }
  .cv-heading { flex-direction: column; align-items: flex-start; padding-top: 35px; gap: 18px; }
  .cv-item-heading { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  @page { margin: 17mm; }
  :root { --background: #fff; --ink: #111; --muted: #444; --accent: #111; --line: #bbb; }
  body { font-size: 10pt; line-height: 1.5; }
  .site-header, .site-footer, .skip-link, .print-button { display: none !important; }
  .page-width, .cv-main { width: 100%; max-width: none; }
  .cv-heading { padding-top: 0; }
  .cv-heading h1 { font-size: 26pt; }
  .cv-section { margin-top: 20px; }
  .cv-section > h2 { font-size: 14pt; padding-bottom: 5px; margin-bottom: 12px; break-after: avoid; }
  .cv-section p, .cv-section li { font-size: 10pt; }
  .cv-list h3 { font-size: 10pt; }
  .cv-list .authors, .cv-list .publication-venue { font-size: 9pt; }
  .cv-item, .cv-list li { break-inside: avoid; margin-bottom: 12px; }
  a { color: inherit; text-decoration: none; }
}
