/* Shared visual system. Retains the site's Outfit typography and academic blue. */
:root {
  --home-navy: #142a43;
  --home-navy-muted: #233f60;
  --home-accent: #245fa6;
  --home-accent-light: #edf3fa;
  --home-bg: #f7f9fc;
  --home-card-bg: #fff;
  --home-border: #dce3eb;
  --home-text: #25394d;
  --home-text-muted: #5b6b7c;
  --color-bg: var(--home-bg);
  --color-text: var(--home-text);
  --color-muted: var(--home-text-muted);
  --radius: 12px;
  --space-page: clamp(28px, 5vw, 72px);
}
html { font-size: 16px; }
body { background: var(--home-bg); line-height: 1.7; }
.container { width: 100%; max-width: 1184px; padding-inline: 32px; }
p { padding: 0; }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--home-navy); text-wrap: balance; }
a { text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--home-accent); outline-offset: 4px; }
:target::before { content: none; }
.form-control { height: auto; min-height: 44px; padding: 10px 14px; font-size: .875rem; color: var(--home-text); border: 1px solid var(--home-border); border-radius: 8px; box-shadow: none; background: var(--home-card-bg); }
.form-control:focus { border-color: var(--home-accent); box-shadow: 0 0 0 3px var(--home-accent-light); }
#language-select { flex: 0 0 auto; min-width: 112px; font-size: .8125rem; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 500; padding: 10px 18px; border-radius: 8px; text-shadow: none; white-space: normal; }
.btn:active { transform: translateY(1px); }
.btn-default { color: var(--home-text); background: var(--home-card-bg); border-color: var(--home-border); }
.btn-primary, .btn-home-primary:link, .btn-home-primary:visited { background: var(--home-accent); color: var(--home-card-bg); border-color: var(--home-accent); text-shadow: none; }
.btn-home-secondary { background: var(--home-card-bg); border-color: var(--home-border); color: var(--home-navy); }
.btn-primary:hover, .btn-home-primary:hover { background: var(--home-navy); border-color: var(--home-navy); }
.btn-home-secondary:hover { background: var(--home-accent-light); }
/* A calm, stable navigation bar. */
.site-header-sticky { background: var(--home-card-bg); border-bottom: 1px solid var(--home-border); }
.main-navbar--light { margin: 0; padding: 14px 0; }
.main-navbar--light .navbar-flex { flex-wrap: nowrap; gap: 24px; }
.header-profile-wrap { flex: 1 1 auto; }
.header-profile-pill, .header-nav-pill, .header-brand-pill { border: 0; box-shadow: none; border-radius: 0; background: transparent; backdrop-filter: none; padding: 0; }
.header-profile-pill:hover, .header-brand-pill:hover { box-shadow: none; opacity: 1; }
.header-profile-pill { gap: 12px; }
.header-profile-pill img { width: 40px; height: 40px; }
.header-profile-name { font-size: .875rem; line-height: 1.5; color: var(--home-navy); }
.header-profile-meta { font-size: .75rem; line-height: 1.6; color: var(--home-text-muted); }
.header-profile-pill:hover img, .header-brand-pill:hover img { filter: none; transform: none; }
.main-navbar--light .navbar-collapse { padding: 0; }
.header-nav-pill .nav > li { padding: 0; }
.header-nav-pill .nav > li > a { min-height: 40px; font-size: .8125rem; padding: 10px 13px; border-radius: 6px; color: var(--home-text-muted); }
.header-nav-pill .nav > li > a.active { background: var(--home-accent-light); color: var(--home-accent); }
.header-nav-pill .nav > li > a:hover { background: var(--home-bg); color: var(--home-navy); }
.header-nav-pill .dropdown-menu { margin-top: 12px; padding: 8px; border: 1px solid var(--home-border); border-radius: 10px; box-shadow: 0 12px 30px #142a4314; font-size: .875rem; }
.header-nav-pill .dropdown-menu li { padding: 0; }
.header-nav-pill .dropdown-menu a { padding: 12px; border-radius: 6px; }
.header-nav-pill .dropdown-menu a.active { background: var(--home-accent-light); color: var(--home-accent); }
.header-brand-wrap { flex: 0 0 auto; padding-left: 20px; border-left: 1px solid var(--home-border); }
.header-brand-pill img { height: 30px; }
/* Consistent page hierarchy and reading widths. */
main.page-main { padding: var(--space-page) 0 80px; min-height: 65vh; }
.page-main .section-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--home-border); }
.page-main .section-title { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 500; line-height: 1.15; letter-spacing: -.04em; padding: 0; margin: 0; }
.page-main h2.section-title { font-size: 2rem; }
.section-subtitle, #research-subtitle { max-width: 70ch; font-size: 1.0625rem; line-height: 1.75; color: var(--home-text-muted); }
.page-profile p { font-size: 1.0625rem; line-height: 1.85; margin-bottom: 24px; }
.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 64px; align-items: start; }
.profile-portrait { margin: 0; }
.profile-portrait img { width: 100%; height: 330px; object-fit: cover; border-radius: var(--radius); }
.profile-portrait figcaption { margin-top: 16px; font-size: .9375rem; color: var(--home-navy); }
.profile-portrait figcaption span { display: block; font-size: .75rem; color: var(--home-text-muted); margin-top: 4px; }
#profile-content { max-width: 70ch; }
#profile-content p:first-child { font-size: 1.1875rem; line-height: 1.8; }
/* Homepage: portrait, generous type and a quiet research impact strip. */
.home-main { padding-bottom: 0; }
.home-hero { background: var(--home-bg); padding: 64px 0 56px; border-bottom: 0; }
.home-hero-inner { gap: 56px; align-items: center; flex-wrap: nowrap; }
.home-hero-photo img { width: 280px; height: 336px; border-radius: var(--radius); box-shadow: none; }
.home-hero-text { max-width: none; }
.home-hero-text > div:first-child { align-items: flex-start !important; gap: 16px; }
.home-hero-name { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 500; line-height: 1.12; letter-spacing: -.04em; max-width: 13ch; margin-bottom: 24px; }
.home-hero-aff { max-width: 66ch; font-size: .9375rem; line-height: 1.75; margin-bottom: 20px; }
.home-hero-logos { gap: 24px; margin: 20px 0; }
.home-hero-logos img { height: 32px; }
.home-hero-lead { max-width: 62ch; font-size: 1.0625rem; line-height: 1.75; }
.home-stats { padding: 0 0 40px; }
.home-stats-grid { max-width: none; gap: 0; border-block: 1px solid var(--home-border); padding: 28px 0; }
.home-stat-card, .home-stat-card:hover { text-align: left; padding: 0 32px; border: 0; border-right: 1px solid var(--home-border); border-radius: 0; background: transparent; box-shadow: none; }
.home-stat-card:first-child { padding-left: 0; }
.home-stat-card:last-child { border-right: 0; }
.home-stat-value { font-size: 2.5rem; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.home-stat-label { font-size: .8125rem; margin-top: 8px; }
.home-stat-src { display: block; }
.home-cta { padding: 0 0 56px; border: 0; }
.home-keywords { font-size: .875rem; margin-bottom: 24px; }
.home-cta-buttons { gap: 12px; }
.home-latest { padding: 48px 0 64px; }
.home-section-title { font-size: 1.75rem; font-weight: 500; letter-spacing: -.025em; margin-bottom: 28px; }
.home-latest-item { padding: 20px 0; font-size: 1rem; line-height: 1.8; }
.home-latest-item .home-pub-year { color: var(--home-accent); }
/* Research and teaching use a real grid, with no nested Bootstrap gutters. */
#research-cards > .row, #teaching-sections > .row { margin: 0; }
#research-cards > .row > .row, #teaching-sections > .row > .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0 0 24px; }
#research-cards .row::before, #research-cards .row::after, #teaching-sections .row::before, #teaching-sections .row::after { display: none; }
#research-cards .col-md-6, #teaching-sections .col-md-6 { width: auto; float: none; padding: 0; min-width: 0; }
.page-experience .experience { padding: 28px; margin: 0; border-radius: var(--radius); box-shadow: none; width: 100%; }
.page-experience .experience:hover { box-shadow: none; border-color: var(--home-border); }
.page-experience .experience header h3 { font-size: 1.375rem; line-height: 1.4; margin-bottom: 12px; }
.page-experience .experience header p { font-size: .8125rem; color: var(--home-text-muted); }
.page-experience .experience p { line-height: 1.8; }
.page-experience .experience img { float: none !important; display: block; width: 100%; height: 220px; object-fit: contain; margin: 24px 0; box-shadow: none; background: var(--home-bg); }
#page-selected-publications { margin-top: 56px; }
#page-selected-publications .section-header { display: block; }
#page-selected-publications .section-subtitle { margin-top: 16px; }
.page-portfolio .pub-list li { padding-block: 16px; border-bottom: 1px solid var(--home-border); margin: 0; }
#teaching-sections .col-md-6 { padding: 28px; background: var(--home-card-bg); border: 1px solid var(--home-border); border-radius: var(--radius); }
.page-teaching h4 { font-size: 1.25rem; line-height: 1.4; margin-bottom: 20px; }
.page-teaching .teaching-list { margin-bottom: 0; font-size: 1rem; line-height: 1.8; }
.page-teaching .teaching-list li { margin-bottom: 16px; }
/* Publication archive. */
#publications-root { max-width: none; padding: 0; }
.pub-year-group { margin-top: 40px; }
.pub-year-title { text-align: left; font-size: 1.5rem; font-weight: 500; border-bottom: 2px solid var(--home-navy); padding: 0 0 12px; margin-bottom: 0; }
.pub-entry { padding: 24px 0; gap: 24px; }
.pub-entry-line { font-size: .9375rem; line-height: 1.85; }
.pub-link, .pub-cite-btn { width: 44px; height: 44px; border-radius: 8px; background: var(--home-card-bg); }
.pub-cite-dropdown { z-index: 20; }
/* Collaborations. */
#collaborations-intro { max-width: 76ch; margin-bottom: 24px; }
.collab-toolbar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 0; border-block: 1px solid var(--home-border); }
.collab-toolbar::before, .collab-toolbar::after { display: none; }
.collab-grid { display: flex; flex-wrap: wrap; margin-top: 28px; }
.collab-card { display: flex; margin-bottom: 24px; }
.collab-card .panel { width: 100%; margin: 0; border-color: var(--home-border); border-radius: var(--radius); box-shadow: none; }
.collab-card .panel-body { padding: 28px 20px; height: 100%; gap: 12px; }
.collab-name { font-size: 1.125rem; line-height: 1.4; font-weight: 500; }
.collab-keywords { font-size: .875rem; color: var(--home-text-muted); }
.collab-details { margin-top: auto; }
.collab-modal-window { max-height: 85vh; overflow-y: auto; }
.collab-modal-content { font-size: 1rem; line-height: 1.7; }
.collab-modal-close { min-width: 44px; min-height: 44px; }
/* Contact. */
#page-contact .contact-form { max-width: 720px; padding: 36px; background: var(--home-card-bg); border: 1px solid var(--home-border); border-radius: var(--radius); }
#page-contact .contact-form .form-group { margin-bottom: 24px; }
#page-contact .contact-form .form-control { max-width: none; min-height: 48px; padding: 12px 16px; }
#page-contact .contact-form textarea { resize: vertical; }
/* Footer. */
.site-footer { margin-top: 0; padding: 40px 0 28px; background: var(--home-card-bg); border-color: var(--home-border); }
.site-footer > .container { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: center; }
.footer-identity > a { display: block; font-size: 1.25rem; font-weight: 500; color: var(--home-navy); text-decoration: none; }
.footer-identity > a > span { display: block; font-size: .875rem; font-weight: 400; color: var(--home-text-muted); }
.footer-affiliation { display: block; font-size: .75rem; margin-top: 8px; }
.footer-social { margin: 0; gap: 8px; }
.footer-social a { min-width: 40px; min-height: 40px; border: 1px solid var(--home-border); border-radius: 8px; opacity: 1; }
.footer-social img { height: 21px; max-width: 28px; object-fit: contain; }
.footer-social a:hover { background: var(--home-accent-light); }
.footer-meta { font-size: .75rem; padding-top: 20px; border-top: 1px solid var(--home-border); }
.footer-meta:last-child { text-align: right; }
@media (max-width: 991px) {
  .main-navbar--light .navbar-flex { flex-wrap: wrap; gap: 0; }
  .header-profile-name { font-size: .875rem; }
  .header-profile-meta { font-size: .75rem; }
  .main-navbar--light .navbar-toggle { min-width: 44px; min-height: 44px; margin: 0; box-shadow: none; border: 1px solid var(--home-border); }
  .header-nav-pill { padding: 12px 0; }
  .header-nav-pill .nav { align-items: stretch; gap: 4px; }
  .header-nav-pill .nav > li { display: block; width: 100%; }
  .header-nav-pill .nav > li > a { justify-content: flex-start; min-height: 44px; font-size: .9375rem; }
  .header-nav-pill .nav .dropdown-menu { position: static; float: none; box-shadow: none; margin: 8px 0; width: 100%; }
  .header-brand-wrap--mobile { padding: 12px 0; border: 0; }
  .header-brand-wrap--mobile .header-brand-pill { padding: 0; }
  .home-hero-inner { flex-direction: row; gap: 32px; max-width: none; }
  .home-hero-photo img { width: 220px; height: 300px; }
  .home-hero-text { flex: 1; }
  .home-hero-text > div:first-child { flex-wrap: wrap; }
  .home-hero-text #language-select { margin: 0 0 16px !important; }
  .home-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .home-stat-card { padding-inline: 20px; }
  .profile-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .profile-portrait img { height: 280px; }
  .site-footer > .container { grid-template-columns: 1fr; gap: 20px; }
  .footer-meta:last-child { text-align: left; padding-top: 0; border: 0; }
}
@media (max-width: 600px) {
  .container { padding-inline: 20px; }
  .page-main .section-header { align-items: flex-start; gap: 16px; margin-bottom: 28px; padding-bottom: 24px; }
  .page-main .section-title { font-size: 2rem; overflow-wrap: anywhere; }
  main.page-main { padding-bottom: 48px; }
  .home-hero { padding: 32px 0; }
  .home-hero-inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .home-hero-photo img { width: 100%; height: 280px; object-position: center 35%; }
  .home-hero-text > div:first-child { flex-wrap: nowrap; }
  .home-hero-name { font-size: 2.25rem; }
  .home-hero-text #language-select { min-width: 96px; max-width: 96px !important; }
  .home-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .home-stat-card:nth-child(odd) { padding-left: 0; }
  .home-stat-card:nth-child(even) { border: 0; }
  .home-stat-value { font-size: 2rem; }
  .home-cta { padding-bottom: 32px; }
  .home-cta-buttons .btn { flex: 1 1 45%; }
  .profile-layout { grid-template-columns: 1fr; gap: 28px; }
  .profile-portrait img { height: 320px; object-position: center 35%; }
  #research-cards > .row > .row, #teaching-sections > .row > .row { grid-template-columns: 1fr; }
  .page-experience .experience, #teaching-sections .col-md-6 { padding: 24px; }
  .pub-entry { gap: 12px; }
  .pub-entry-line { flex-basis: 100%; }
  #page-contact .contact-form { padding: 24px; }
  .collab-card { width: 100%; }
  .footer-social { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Bootstrap clearfix pseudo-elements must not become CSS grid cells. */
.site-footer > .container::before, .site-footer > .container::after { display: none; }
.footer-social { justify-content: flex-end; max-width: 490px; }
.footer-social a { padding: 8px 12px; font-size: .75rem; text-decoration: none; }
.footer-social a.footer-scholar { padding: 8px 12px; }
@media (max-width: 991px) { .footer-social { justify-content: flex-start; } }
/* Override legacy ID-specific heading rules on the archive and contact pages. */
:is(#page-contact, #page-publications-full) .section-title { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 500; line-height: 1.15; letter-spacing: -.04em; margin: 0; }
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.contact-intro h2 { font-size: 2.25rem; font-weight: 500; letter-spacing: -.035em; margin: 0 0 20px; padding: 0; }
.contact-intro p { font-size: 1.0625rem; color: var(--home-text-muted); line-height: 1.8; max-width: 36ch; }
.contact-affiliations { display: flex; align-items: center; gap: 28px; margin-top: 32px; }
.contact-affiliations img { height: 40px; width: auto; object-fit: contain; }
.form-hint { color: var(--home-text-muted); font-size: .8125rem; margin-bottom: 24px; }
.contact-status { background: var(--home-accent-light); border-radius: 8px; padding: 16px; margin-top: 24px; font-size: .875rem; }
.contact-status.is-error { border-left: 3px solid var(--home-text-muted); }
@media (max-width: 767px) {
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-intro p { max-width: none; }
}
@media (max-width: 600px) {
  .page-main .section-header { flex-wrap: wrap; }
  .page-main .section-title { flex: 1 1 220px; overflow-wrap: normal; }
}
#collab-modal { border: 0; margin: auto; padding: 48px 32px 32px; width: min(620px, calc(100% - 32px)); max-width: 620px; }
#collab-modal::backdrop { background: #10243caa; backdrop-filter: blur(4px); }
#collab-dialog-title { font-size: 1.5rem; line-height: 1.3; margin: 0 0 24px; }
body:has(#collab-modal[open]) { overflow: hidden; }
.collab-empty { padding: 32px 0; color: var(--home-text-muted); }
