/* Locally hosted Source Sans 3, licensed under SIL Open Font License. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/SourceSans3-Regular.ttf") format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/SourceSans3-Medium.ttf") format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/SourceSans3-Semibold.ttf") format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/SourceSans3-Bold.ttf") format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/SourceSans3-Italic.ttf") format("truetype"); }

/* Material Design 3 color roles: warm yellow primary and tonal surfaces. */
:root {
  color-scheme: light;
  --md-sys-color-primary: #715c00;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #ffe17b;
  --md-sys-color-on-primary-container: #554500;
  --md-sys-color-surface: #fff9ee;
  --md-sys-color-surface-container-low: #faf3e2;
  --md-sys-color-surface-container: #f2ecd9;
  --md-sys-color-surface-container-high: #ece6d4;
  --md-sys-color-on-surface: #201c13;
  --md-sys-color-on-surface-variant: #4d4737;
  --md-sys-color-outline: #7f7764;
  --md-sys-color-outline-variant: #cfc5ae;
  --bg: var(--md-sys-color-surface);
  --surface: var(--md-sys-color-surface-container);
  --text: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --line: var(--md-sys-color-outline-variant);
  --accent: var(--md-sys-color-primary);
  --accent-soft: var(--md-sys-color-primary-container);
  --on-accent: var(--md-sys-color-on-primary);
  --on-accent-soft: var(--md-sys-color-on-primary-container);
  --width: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 24px;
  --elevation: 0 2px 6px #00000014, 0 1px 2px #00000014;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --md-sys-color-primary: #e7c449;
  --md-sys-color-on-primary: #3b2f00;
  --md-sys-color-primary-container: #554500;
  --md-sys-color-on-primary-container: #ffe17b;
  --md-sys-color-surface: #17140b;
  --md-sys-color-surface-container-low: #211e14;
  --md-sys-color-surface-container: #2b281e;
  --md-sys-color-surface-container-high: #363228;
  --md-sys-color-on-surface: #eae2d0;
  --md-sys-color-on-surface-variant: #cec5ae;
  --md-sys-color-outline: #98907c;
  --md-sys-color-outline-variant: #4d4737;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
  --md-sys-color-primary: #e7c449;
  --md-sys-color-on-primary: #3b2f00;
  --md-sys-color-primary-container: #554500;
  --md-sys-color-on-primary-container: #ffe17b;
  --md-sys-color-surface: #17140b;
  --md-sys-color-surface-container-low: #211e14;
  --md-sys-color-surface-container: #2b281e;
  --md-sys-color-surface-container-high: #363228;
  --md-sys-color-on-surface: #eae2d0;
  --md-sys-color-on-surface-variant: #cec5ae;
  --md-sys-color-outline: #98907c;
  --md-sys-color-outline-variant: #4d4737;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Source Sans 3", system-ui, sans-serif; font-size: 17px; line-height: 1.65; overflow-wrap: break-word; }
body { text-align: left; }
p, li, figcaption { -webkit-hyphens: none; hyphens: none; }
::selection { background: var(--accent-soft); color: var(--on-accent-soft); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; }
.wrap { width: min(var(--width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 12px 20px; background: var(--accent-soft); color: var(--on-accent-soft); border-radius: 16px; z-index: 10; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; border-bottom: 1px solid var(--line); }
.brand { font-size: 21px; font-weight: 600; text-decoration: none; letter-spacing: -.3px; }
.brand::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; margin-right: 10px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
nav { display: flex; align-items: center; gap: 8px; }
nav a { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 18px; border-radius: 999px; color: var(--muted); font-size: 16px; font-weight: 500; text-decoration: none; }
nav a[aria-current="page"] { color: var(--on-accent-soft); background: var(--accent-soft); font-weight: 600; }
.theme-toggle { display: none; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent); cursor: pointer; flex-shrink: 0; }
.theme-toggle svg { width: 22px; height: 22px; }
main { min-height: calc(100svh - 212px); padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(40px, 5.4vw, 68px); font-weight: 500; line-height: 1.08; letter-spacing: -1.6px; margin-bottom: 26px; }
h2 { font-size: clamp(25px, 3vw, 32px); font-weight: 500; line-height: 1.25; letter-spacing: -.5px; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.35; margin-bottom: 12px; }
.eyebrow, .number { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 1.5px; }
.eyebrow { text-transform: uppercase; margin-bottom: 22px; }
.number { display: block; margin-bottom: 20px; }
.muted, .intro, .description { color: var(--muted); }
.intro { font-size: clamp(18px, 2vw, 21px); line-height: 1.65; max-width: 64ch; }
.small, .placeholder { font-size: 14px; }
.placeholder { color: var(--muted); }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-bottom: clamp(48px, 7vw, 88px); }
.hero h1 span { color: var(--accent); }
.hero .intro { max-width: 48ch; }
.portrait { margin: 0; width: min(100%, 380px); justify-self: end; padding: 12px; border-radius: 36px; background: var(--accent-soft); }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 26px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; min-height: 48px; color: var(--accent); font-size: 15px; font-weight: 600; }
.links .text-link { padding-inline: 18px; border-radius: 999px; background: var(--surface); text-decoration: none; }
.hero .links .text-link:first-child { background: var(--accent-soft); color: var(--on-accent-soft); }
.section-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; margin-bottom: 24px; }
.section-top h2 { margin: 0; }
.explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.research-focus, .featured-research { margin-bottom: 56px; }
.explore-card { display: block; min-width: 0; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--md-sys-color-surface-container-low); text-decoration: none; }
.explore-card h3 { display: flex; justify-content: space-between; gap: 12px; }
.explore-card p { font-size: 16px; color: var(--muted); margin: 0; }
.featured-research h3 { font-size: 21px; }
.page-heading { margin-bottom: 48px; max-width: 850px; }
.page-heading .intro { margin-bottom: 0; }
.entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; border-top: 1px solid var(--line); padding-block: 28px; }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry-label { color: var(--muted); font-size: 15px; }
.entry p { max-width: 72ch; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; max-width: 100%; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 8px; color: var(--on-accent-soft); background: var(--accent-soft); }
.package { padding-block: 40px 48px; border-bottom: 1px solid var(--line); }
.package:first-of-type { padding-top: 12px; }
.package-heading .number { margin-bottom: 12px; }
.package-heading h3 { font-size: clamp(30px, 4vw, 38px); letter-spacing: -.7px; margin-bottom: 4px; }
.package-subtitle { color: var(--accent); font-size: 19px; margin-bottom: 18px; }
.package-description { max-width: 78ch; }
.jax-overview { padding: clamp(22px, 4vw, 40px); margin-bottom: 48px; background: var(--surface); border-radius: var(--radius); }
.jax-overview > p { max-width: 85ch; }
.jax-overview > p:last-child { margin-bottom: 0; }
.jax-overview ul, .package-details ul { padding-left: 22px; color: var(--muted); }
.jax-overview li, .package-details li { margin-bottom: 16px; padding-left: 3px; }
.jax-overview strong, .package-details strong { color: var(--text); font-weight: 600; }
.jax-overview a, .architecture-sources a { color: var(--accent); }
.package-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.package-details section { padding: 24px; border-radius: var(--radius); background: var(--md-sys-color-surface-container-low); }
.package-details h4 { font-size: 21px; font-weight: 600; margin-bottom: 18px; }
.package-details ul { margin-block: 0; }
.package-details li:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, monospace; font-size: .85em; overflow-wrap: anywhere; }
.architecture-sources, .gallery-note { font-size: 14px; color: var(--muted); margin-top: 18px; }
.package-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.package-gallery figure { min-width: 0; margin: 0; }
.figure-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 12px; background: white; border: 2px solid var(--line); border-radius: 20px; }
.figure-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.package-gallery figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.package-gallery figcaption a { color: var(--accent); }
.year-nav { flex-wrap: wrap; gap: 8px; margin-block: 24px 36px; }
.year-nav a { min-width: 64px; background: var(--surface); color: var(--accent); }
.publication-year { margin-top: 42px; }
.publication-year > h3 { color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.publication { padding: 26px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.publication h4 { font-size: 21px; font-weight: 600; line-height: 1.4; margin: 14px 0 10px; }
.publication h4 a { text-decoration: none; }
.publication h4 a:hover { text-decoration: underline; }
.publication p { margin-bottom: 8px; }
.publication-venue { color: var(--muted); font-size: 15px; font-style: italic; }
.highlight { padding: 18px 22px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: 4px 20px 20px 4px; font-size: 16px; }
.publication .highlight { margin-block: 20px; max-width: 85ch; }
.publication .highlight a { color: var(--accent); }
.publication-note { margin-top: 30px; }
.research-summary { margin-block: 16px; max-width: 85ch; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.research-summary summary { min-height: 48px; padding: 12px 18px; cursor: pointer; color: var(--accent); font-weight: 600; }
.research-summary summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 16px; }
.research-summary-body { padding: 0 18px 14px; }
.research-summary-body p { margin-top: 0; }
.summary-sources { margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.resume-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; max-width: none; align-items: start; gap: 36px; }
.download { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px 24px; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; }
.download:hover { color: var(--on-accent); box-shadow: var(--elevation); }
.download-block { min-width: 0; max-width: 280px; padding: 24px; border-radius: var(--radius); background: var(--surface); }
.download-block .download + .download { margin-top: 12px; }
.download-block p { margin: 12px 0 0; }
.resume-section { margin-top: 44px; }
.resume-section .entry { grid-template-columns: 190px minmax(0, 1fr); }
.resume-list { padding-left: 22px; color: var(--muted); }
.resume-list li { margin-bottom: 12px; }
.resume-publications { padding: 0 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.resume-publications summary { padding-block: 18px; min-height: 56px; color: var(--accent); cursor: pointer; font-weight: 600; }
.resume-publications .publication h3 { margin-top: 14px; }
.resume-publications .publication:last-child { border-bottom: 0; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; min-height: 112px; padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
@media (hover: hover) {
  nav a:hover, .theme-toggle:hover, .links .text-link:hover { background: var(--accent-soft); color: var(--on-accent-soft); }
  .explore-card:hover { background: var(--surface); border-color: var(--accent); box-shadow: var(--elevation); }
  .figure-image:hover { border-color: var(--accent); }
}
@media (prefers-reduced-motion: no-preference) {
  .explore-card, .theme-toggle, nav a, .download, .links .text-link { transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
}
/* Medium windows: let reading columns and cards breathe. */
@media (min-width: 600px) and (max-width: 1039px) {
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .package-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-gallery > :last-child { grid-column: 1 / -1; max-width: 560px; width: 100%; justify-self: center; }
}
@media (max-width: 839px) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 16px; padding-block: 20px; }
  .header-actions { display: contents; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; background: var(--surface); border-radius: 999px; }
  .site-header nav a { padding-inline: 4px; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; }
  .hero h1 { font-size: clamp(38px, 6vw, 50px); }
  .package-details { grid-template-columns: 1fr; }
  .resume-heading { grid-template-columns: 1fr; gap: 24px; }
  .download-block { max-width: none; width: fit-content; }
}
/* Compact windows: single columns and full-width navigation. */
@media (max-width: 599px) {
  .brand { font-size: 19px; line-height: 1.3; }
  .brand::before { width: 9px; height: 9px; margin-right: 8px; }
  .site-header nav a { font-size: 15px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero h1 { font-size: clamp(40px, 10vw, 54px); }
  .portrait { justify-self: start; width: min(100%, 320px); }
  .explore-grid, .package-gallery { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .figure-image { aspect-ratio: auto; min-height: 180px; }
  .figure-image img { height: auto; max-height: 420px; }
  .entry, .resume-section .entry { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .page-heading { margin-bottom: 36px; }
  .section-top { flex-direction: column; gap: 10px; }
  .download-block { width: 100%; }
  .download { width: 100%; }
  .resume-publications { padding-inline: 16px; }
  .site-footer { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
}
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme]) { --bg: white; --text: black; --muted: #444; --line: #ccc; --accent: #554500; --surface: #f4f1e8; --accent-soft: #fff0b2; --on-accent-soft: #201c13; --md-sys-color-surface-container-low: white; }
  .site-header, .site-footer, .download-block, .skip-link { display: none; }
  main { padding: 0; }
  .wrap { width: 100%; }
  .entry, .explore-card, figure { break-inside: avoid; }
}

/* Portfolio: lead with scientific outputs, with technical detail on demand. */
.hero { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; }
.hero h1 { font-size: clamp(36px, 4.1vw, 56px); line-height: 1.12; }
.hero .portrait { max-width: 290px; }
.section-intro { max-width: 72ch; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.work-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--md-sys-color-surface-container-low); }
.work-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.work-image { display: flex; align-items: center; padding: 24px; background: white; }
.work-image img { display: block; width: 100%; height: auto; }
.work-copy { padding: clamp(24px, 3vw, 36px); }
.work-copy .eyebrow { margin-bottom: 14px; }
.work-copy p { color: var(--muted); }
.work-copy .result-number { font-size: 42px; line-height: 1.2; color: var(--accent); margin-bottom: 12px; }
.contribution { max-width: 78ch; margin-block: 24px 16px; color: var(--muted); }
.contribution strong { color: var(--text); }
.package-nav { flex-wrap: wrap; margin-bottom: 28px; }
.package-nav a { background: var(--surface); }
.technical-details { margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; }
.technical-details summary { padding: 16px 22px; min-height: 48px; cursor: pointer; color: var(--accent); font-weight: 600; }
.technical-details .package-details { margin: 0; padding: 0 20px 20px; }
.technical-details .architecture-sources { padding: 0 24px 8px; }
.technical-body { padding: 0 24px 16px; }
.jax-details { margin-bottom: 48px; }
.featured-research .paper-title { font-size: 14px; margin-top: 16px; }
@media (max-width: 839px) {
  .work-card:first-child { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
}
@media (max-width: 599px) {
  .hero, .work-grid { grid-template-columns: 1fr; }
  .hero .portrait { max-width: 220px; }
  .hero h1 { font-size: clamp(34px, 8vw, 46px); }
}
