/* Personal-site redesign. No build step or external font dependency. */
:root {
  --paper: #ffffff;
  --tint: #f5f7f3;
  --ink: #172c25;
  --muted: #53635b;
  --green: #183f36;
  --green-light: #e7efe8;
  --accent: #b28a29;
  --line: #dce4dd;
  --radius: 14px;
  --container: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: #d6e6d7; color: var(--ink); }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
a, button, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #946a0c; outline-offset: 5px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h2 { font-size: clamp(2rem, 3.3vw, 2.95rem); line-height: 1.15; letter-spacing: -.045em; font-weight: 650; }
h3 { font-size: 1.23rem; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; }
.container { width: min(var(--container), calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px 20px; background: var(--green); color: white; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 5; top: 0; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 20px; }
#nav { display: flex; align-items: center; gap: 20px; }
#nav a { color: var(--muted); text-decoration: none; font-size: .85rem; padding-block: 12px; }
#nav a:hover, #nav a[aria-current="location"] { color: var(--green); text-decoration: underline; }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); padding: 10px 14px; min-height: 44px; border-radius: 8px; align-items: center; gap: 9px; }
.menu-lines { display: inline-block; width: 16px; height: 9px; border-block: 1.5px solid currentColor; }
.hero { background: var(--tint); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 720px) 180px; justify-content: start; align-items: center; column-gap: 24px; padding-block: 26px; }
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); font-weight: 650; margin-bottom: 14px; }
h1 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 700; }
.accent { color: var(--accent); }
.hero-copy > .eyebrow { margin-bottom: 9px; }
.hero-description { color: var(--muted); max-width: 720px; margin-top: 12px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 15px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 24px; min-height: 48px; padding: 12px 20px; border-radius: 8px; font-size: .88rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: background .18s ease, color .18s ease; }
.button:hover { text-decoration: none; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: #245a4c; }
.button-secondary { border-color: #c4d0c5; background: transparent; color: var(--green); }
.button-secondary:hover { background: var(--green-light); }
.affiliation { margin-top: 12px; color: var(--muted); font-size: .77rem; }
/* Small official institution logos, kept with their linked names. */
.affiliation-institutions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.affiliation .institution-link { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding-block: 2px; color: inherit; line-height: 1.5; text-decoration: none; }
.affiliation .institution-link > span { min-width: 0; }
.affiliation .institution-link:hover > span { text-decoration: underline; }
/* Both marks share one center line; the text starts after the same 36px slot. */
.affiliation .institution-logo-slot { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 24px; }
.affiliation .institution-logo { display: block; width: auto; height: 24px; max-width: 36px; object-fit: contain; object-position: center; }
.affiliation .institution-logo-citius { width: 24px; height: 24px; }
.affiliation .institution-logo-usc { width: 36px; height: 24px; }
.affiliation-location { display: block; margin-top: 4px; }

.profile-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; font-size: .78rem; font-weight: 550; }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; text-decoration: none; }
.profile-links a:hover { text-decoration: underline; }
.portrait { align-self: center; padding-top: 0; }
.portrait img { width: 100%; aspect-ratio: 336/424; object-fit: cover; border-radius: 6px; border: 3px solid white; box-shadow: 0 0 0 1px var(--line); filter: saturate(.8); }
.section { padding-block: 32px; }
.section-tinted { background: var(--tint); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 16px; }
.section-heading > div { flex: 1; }
.section-heading > p { max-width: 365px; color: var(--muted); font-size: .92rem; }
.section-heading .eyebrow { margin-bottom: 7px; }
.text-link { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.text-link span { margin-left: 12px; }
.research-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.research-card { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; align-items: flex-start; }
.research-number { color: var(--muted); font-size: .72rem; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.research-card h3 { font-size: 1.15rem; min-height: 3.1em; margin-bottom: 10px; }
.research-card p { color: var(--muted); font-size: .87rem; margin-bottom: 16px; }
.research-card a { margin-top: auto; font-size: .76rem; font-weight: 600; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.work-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: flex-start; }
.tag { color: var(--green); font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 650; display: inline-block; }
.work-card h3 { margin-block: 10px 8px; font-size: 1.4rem; }
.work-card h3 a { color: inherit; text-decoration: none; }
.work-card h3 a:hover { text-decoration: underline; }
.work-card > p { color: var(--muted); font-size: .92rem; }
.work-card .venue { font-size: .76rem; margin-top: 14px; margin-bottom: 10px; }
.resource-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .77rem; font-weight: 600; }
.resource-links a { display: inline-flex; align-items: center; min-height: 34px; text-decoration: none; }
.resource-links a::after { content: "↗"; font-size: .9em; margin-left: 6px; }
.resource-links a:hover { text-decoration: underline; }
.work-card .resource-links { margin-top: auto; }
.software-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.software-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: white; }
.software-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.software-visual { flex: 0 0 76px; width: 76px; height: 64px; display: grid; place-items: center; background: var(--tint); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 6px; }
.software-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.software-visual.visual-photo { padding: 0; }
.software-visual.visual-photo img { object-fit: cover; }
.software-label { min-width: 0; }
.software-card h3 { margin-block: 5px 0; font-size: 1.45rem; letter-spacing: -.04em; }
.software-card > p { font-size: .87rem; color: var(--muted); min-height: 0; line-height: 1.45; margin-bottom: 0; }
.software-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin-top: 6px; }
.software-actions > .resource-links { gap: 0 12px; margin: 0; }
.software-actions .repo-stats { gap: 0 10px; margin: 0; }
.software-actions .resource-links a, .software-actions .repo-stats a { min-height: 24px; line-height: 1.3; }
.repo-icon { flex: 0 0 13px; width: 13px; height: 13px; }
.publication-alias { display: none; }
.software-card > details { margin-top: 8px; padding-top: 6px; }
.repo-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 0; font-size: .72rem; color: var(--muted); }
.repo-stats a { color: var(--muted); text-decoration: none; min-height: 28px; display: inline-flex; align-items: center; gap: 5px; }
.repo-stats a:hover { color: var(--green); text-decoration: underline; }
.repo-stats span { font-variant-numeric: tabular-nums; }
.repo-scope { font-size: .62rem; color: var(--muted); }
details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 9px; }
summary { font-size: .75rem; font-weight: 550; color: var(--green); padding-block: 5px; }
.technical-details { padding-top: 12px; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.technical-details p { margin-bottom: 14px; }
.technical-details table { border-collapse: collapse; width: 100%; font-size: .72rem; margin-block: 18px; }
.technical-details td, .technical-details th { padding: 8px 5px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.technical-details a { min-height: 24px; }
.software-publications { list-style: none; padding: 0; margin: 10px 0 0; }
.software-publications li + li { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; }
.software-publications a { display: block; font-weight: 550; line-height: 1.4; text-decoration: none; }
.software-publications a:hover { text-decoration: underline; }
.software-publication-meta { display: block; margin-top: 3px; font-size: .74rem; line-height: 1.4; }
.publication-filters { display: grid; grid-template-columns: minmax(0, 1fr) 140px 190px auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.publication-filters label { display: block; margin-bottom: 8px; font-size: .73rem; color: var(--muted); font-weight: 600; }
.publication-filters input, .publication-filters select { width: 100%; min-width: 0; min-height: 48px; border: 1px solid #bfcac1; border-radius: 7px; padding: 11px 13px; background: white; color: var(--ink); font-size: .85rem; }
.reset-filters { min-height: 48px; border: 0; background: none; color: var(--green); font-size: .8rem; padding: 10px; text-decoration: underline; text-underline-offset: 3px; }
.publication-count { color: var(--muted); font-size: .77rem; margin-bottom: 15px; }
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication { padding-block: 11px; border-top: 1px solid var(--line); }
.pub-meta { display: flex; gap: 14px; align-items: center; font-size: .68rem; color: var(--muted); margin-bottom: 5px; }
.pub-meta span:first-child { font-weight: 650; color: var(--green); }
.publication h3 { max-width: 900px; font-size: 1.09rem; line-height: 1.35; margin-bottom: 5px; }
.publication h3 a { color: var(--ink); text-decoration: none; }
.publication h3 a:hover { text-decoration: underline; }
.pub-citation { font-size: .82rem; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.pub-citation b { font-weight: 550; }
.publication .resource-links { margin-top: 4px; }
.publication .resource-links a { min-height: 26px; }
.more-publications { margin-top: 18px; }
.empty-state { padding: 30px; border: 1px dashed #bfcac1; border-radius: var(--radius); color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-card { border-top: 1px solid var(--line); padding-top: 16px; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: .72rem; }
.project-status { padding: 3px 9px; border-radius: 4px; background: #edf1eb; color: var(--muted); font-size: .65rem; font-weight: 650; }
.project-status[data-active="true"] { color: #17573a; background: #e0efe3; }
.project-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.project-card h3 a { text-decoration: none; }
.project-title { color: var(--ink); font-size: .93rem; }
.project-title a { color: inherit; text-decoration: none; }
.project-title a:hover { text-decoration: underline; }
.project-overview { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.project-source { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; font-size: .77rem; margin-top: 8px; }
.funding { color: var(--muted); font-size: .76rem; margin-top: 10px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.about-copy { color: var(--muted); font-size: .95rem; }
.about-copy p + p { margin-top: 12px; }
.contact-section { background: var(--green); color: white; }
.contact-section .eyebrow { color: #ccdbb7; }
.contact-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; }
.contact-grid h2 { font-size: clamp(2.3rem, 4vw, 3.3rem); }
.contact-grid p { color: #d6e1d9; max-width: 440px; margin-top: 18px; font-size: .92rem; }
.contact-email { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; color: white; font-size: .86rem; font-weight: 550; margin-top: 0; overflow-wrap: anywhere; }
.contact-icon { display: inline-block; flex: 0 0 16px; width: 16px; height: 16px; opacity: .9; }
.contact-email-text { min-width: 0; overflow-wrap: anywhere; }
.contact-email .contact-arrow { margin-left: 2px; }
.contact-address { display: flex; align-items: flex-start; gap: 9px; }
.contact-address > .contact-icon { margin-top: 3px; }
.contact-address > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.contact-phone { display: inline-flex; align-items: center; gap: 9px; }
.contact-grid address { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; font-style: normal; color: #d6e1d9; font-size: .86rem; }
.contact-grid address strong { color: white; font-size: .88rem; font-weight: 550; }
.contact-grid address a { color: #e2ebd9; min-height: 30px; }
.site-footer { padding-block: 18px; font-size: .7rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 25px; }
.footer-inner a { color: inherit; }
section, article[id] { scroll-margin-top: 72px; }
@media (max-width: 1050px) {
  #nav { gap: 18px; }
  .hero-grid { gap: 20px; }
  .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .research-card h3 { min-height: 0; }
  .software-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-filters { grid-template-columns: minmax(0, 1fr) 115px 165px; }
  .reset-filters { grid-column: 1/-1; justify-self: start; min-height: 32px; padding: 0; }
}
@media (max-width: 800px) {
  html { scroll-padding-top: 68px; }
  .container { width: calc(100% - 48px); }
  .header-inner { min-height: 56px; position: relative; flex-wrap: wrap; justify-content: flex-end; gap: 0; }
  .menu-toggle:not([hidden]) { display: inline-flex; }
  #nav { width: 100%; flex-wrap: wrap; padding-bottom: 16px; gap: 4px 22px; }
  #nav a { font-size: .85rem; min-height: 44px; display: inline-flex; align-items: center; }
  body.js-enabled #nav { display: none; }
  body.js-enabled #nav[data-open="true"] { display: flex; }
  .hero-grid { padding-block: 22px; grid-template-columns: minmax(0, 520px) 150px; gap: 16px; }
  h1 { font-size: clamp(2rem, 4.6vw, 2.7rem); }
  .hero-description { font-size: .91rem; }
  .hero-actions { gap: 10px; }
  .button { font-size: .81rem; padding: 11px 15px; }
  .section { padding-block: 28px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .section-heading > p { max-width: 550px; }
  .work-card { padding: 20px; }
  .work-card h3 { font-size: 1.22rem; }
  .publication-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1/-1; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 22px; }
  section, article[id] { scroll-margin-top: 68px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .menu-toggle { padding: 10px 12px; font-size: .8rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 118px; gap: 10px 10px; align-items: start; padding-block: 20px; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { grid-column: 1; grid-row: 1; font-size: .65rem; letter-spacing: .08em; margin: 0; align-self: end; }
  h1 { grid-column: 1; grid-row: 2; font-size: clamp(1.85rem, 6.8vw, 2.4rem); }
  .hero-description { grid-column: 1 / -1; grid-row: 3; font-size: .95rem; margin-top: 3px; }
  .hero-actions { grid-column: 1 / -1; grid-row: 4; align-items: stretch; margin-top: 4px; gap: 8px; }
  .hero-actions .button { flex-grow: 1; font-size: .81rem; }
  .affiliation { grid-column: 1 / -1; grid-row: 5; font-size: .73rem; margin-top: 3px; }
  .affiliation-institutions { flex-direction: column; align-items: flex-start; gap: 4px; }
  .profile-links { grid-column: 1 / -1; grid-row: 6; margin-top: 0; gap: 4px 16px; }
  .profile-links a { min-height: 36px; }
  .portrait { grid-column: 2; grid-row: 1 / 3; width: 112px; justify-self: start; align-self: center; padding: 0; }
  .section { padding-block: 24px; }
  h2 { font-size: 2rem; }
  .eyebrow { font-size: .65rem; }
  .research-grid, .work-grid, .software-grid, .project-grid { grid-template-columns: 1fr; }
  .research-grid { gap: 20px; }
  .research-card { padding-top: 14px; }
  .research-number { margin-bottom: 10px; }
  .research-card p { margin-bottom: 14px; font-size: .92rem; }
  .research-card a { font-size: .82rem; }
  .work-card { padding: 20px; }
  .work-card h3 { font-size: 1.4rem; }
  .software-card > p { min-height: 0; font-size: .92rem; }
  .resource-links { font-size: .82rem; }
  .resource-links a { min-height: 40px; }
  summary { font-size: .81rem; padding-block: 9px; }
  .technical-details { font-size: .9rem; }
  .publication-filters { gap: 12px; }
  .publication-filters input, .publication-filters select { font-size: 16px; padding-inline: 10px; }
  .publication h3 { font-size: 1.09rem; }
  .pub-citation { font-size: .89rem; }
  .project-title { font-size: .98rem; }
  .funding { font-size: .82rem; }
  .contact-grid address { font-size: .9rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .site-header, .hero-actions, .publication-filters, .more-publications, .skip-link { display: none !important; }
  .container { width: 100%; }
  .hero-grid { padding: 20px 0; grid-template-columns: 1fr 180px; }
  .hero-copy { display: block; }
  .portrait { width: auto; grid-row: auto; grid-column: 2; }
  .section { padding: 25px 0; }
  .section-tinted, .hero, .contact-section { background: white; color: black; }
  .publication[hidden] { display: block !important; }
  .contact-grid p, .contact-grid address, .contact-grid address a, .contact-grid address strong, .contact-email { color: black; }
  .publication, .work-card, .software-card, .project-card { break-inside: avoid; }
}
