:root {
  --bg: #f7f7f5;
  --surface: #fff;
  --text: #15171a;
  --muted: #5e6269;
  --accent: #2457d6;
  --accent-dark: #183e9f;
  --accent-soft: #eef2ff;
  --border: #dfe1e5;
  --border-strong: #b9bdc5;
  --shadow: 0 14px 34px rgba(21, 23, 26, .07);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 3px solid rgba(36, 87, 214, .35); outline-offset: 4px; }
.container, .nav { width: min(100% - 3rem, var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 245, .94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  color: var(--text);
  font: 1.45rem/1 var(--serif);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--muted); font-size: .87rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: .25rem;
  background: var(--accent);
}

.hero {
  position: relative;
  max-width: var(--max);
  margin-inline: auto;
  padding: 7rem 0 6.5rem;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4.75rem;
  width: 32%;
  height: 1px;
  background: var(--border-strong);
}
.hero-bg { display: none; }
.hero-content { max-width: 760px; }
.hero-eyebrow {
  margin: 0 0 1.4rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 1.35rem;
  font: 400 clamp(4rem, 9vw, 7.25rem)/.9 var(--serif);
  letter-spacing: -.045em;
}
.hero-lead {
  max-width: 680px;
  margin: 0 0 1.15rem;
  color: #35383e;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.55;
}
.hero-affiliation { margin: 0 0 2rem; color: var(--muted); font-size: .9rem; }
.hero-links, .contact-links, .paper-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-links a, .contact-links a {
  padding: .55rem .95rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
}
.hero-links a:first-child { color: #fff; background: var(--accent); border-color: var(--accent); }
.hero-links a:hover, .contact-links a:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.hero-links a:first-child:hover { color: #fff; background: var(--accent-dark); }

.section { padding: 5.5rem 0; border-top: 1px solid var(--border); scroll-margin-top: 68px; }
.section-alt { background: var(--surface); }
.section-title {
  margin: 0 0 2.6rem;
  font: 400 clamp(2.25rem, 5vw, 3.4rem)/1 var(--serif);
  letter-spacing: -.025em;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 5rem;
  align-items: start;
}
.about-text { max-width: 690px; }
.about-text p { margin: 0 0 1.2rem; color: #3f4248; font-size: 1.05rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-aside { padding: 1.4rem 0; border-block: 2px solid var(--text); border-bottom-width: 1px; }
.about-aside h3 {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.timeline li:last-child { margin: 0; padding: 0; border: 0; }
.timeline-date { color: var(--accent); font-size: .78rem; font-weight: 600; }
.timeline-role { font-size: .91rem; font-weight: 600; }
.timeline-org { color: var(--muted); font-size: .84rem; }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border-strong); }
.theme-card {
  min-height: 230px;
  padding: 1.65rem 2rem 1.8rem 0;
  border-right: 1px solid var(--border);
}
.theme-card + .theme-card { padding-left: 2rem; }
.theme-card:last-child { padding-right: 0; border-right: 0; }
.theme-card::before {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--accent);
  font: 1.1rem var(--serif);
}
.theme-card:nth-child(1)::before { content: "01"; }
.theme-card:nth-child(2)::before { content: "02"; }
.theme-card:nth-child(3)::before { content: "03"; }
.theme-card h3 { margin: 0 0 .65rem; font-size: 1rem; }
.theme-card p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.6; }

.pub-group { margin-bottom: 4rem; }
.pub-group:last-child { margin-bottom: 0; }
.pub-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border-strong);
}
.pub-group-header h3 { margin: 0; font: 400 1.65rem var(--serif); }
.pub-group-note { margin: 0; color: var(--muted); font-size: .78rem; }
.paper {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 180ms, box-shadow 180ms;
}
.paper:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.paper:last-child { margin-bottom: 0; }
.paper-figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: inherit;
  background: #f1f2f4;
  border-right: 1px solid var(--border);
  text-decoration: none;
}
.paper-figure img { display: block; width: 100%; height: 175px; padding: .8rem; object-fit: contain; }
.paper-figure-caption {
  padding: .55rem .8rem;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  border-top: 1px solid var(--border);
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.paper-body { min-width: 0; padding: 1.45rem 1.6rem; }
.paper-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.badge {
  padding: .18rem .48rem;
  color: var(--muted);
  background: #f1f2f4;
  border-radius: 3px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-first, .badge-accepted, .badge-conference { color: var(--accent-dark); background: var(--accent-soft); }
.paper-title { margin: 0 0 .55rem; font: 400 1.42rem/1.22 var(--serif); }
.paper-authors, .paper-venue, .paper-abstract { color: var(--muted); }
.paper-authors { margin: 0 0 .3rem; font-size: .82rem; line-height: 1.5; }
.paper-authors strong { color: var(--text); }
.paper-venue { margin: 0 0 .7rem; font-size: .78rem; font-weight: 600; }
.paper-abstract { margin: 0 0 .85rem; font-size: .88rem; line-height: 1.55; }
.paper-links a { font-size: .8rem; font-weight: 600; text-decoration: none; }
.paper-links a::after { content: " ↗"; }

.section-contact { background: var(--text); border-top: 0; }
.section-contact .section-title, .contact-block p a { color: #fff; }
.contact-block p { max-width: 610px; margin: 0 0 1.7rem; color: #c3c6cc; font-size: 1.05rem; }
.contact-links a { color: #fff; border-color: #555a63; }
.contact-links a:hover { color: #fff; background: #292c31; border-color: #8d929a; }
.site-footer { padding: 1.5rem 0; background: #0c0d0f; }
.site-footer p { margin: 0; color: #8f949d; font-size: .75rem; text-align: center; }

@media (max-width: 820px) {
  .hero { width: min(100% - 3rem, var(--max)); padding: 5.5rem 0; }
  .hero::after { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .about-aside { max-width: 500px; }
  .paper { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .container, .nav, .hero { width: min(100% - 2rem, var(--max)); }
  .nav { min-height: 60px; overflow-x: auto; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .8rem; white-space: nowrap; }
  .hero { padding: 4.25rem 0; }
  .hero h1 { font-size: clamp(3.5rem, 18vw, 5rem); }
  .section { padding: 4rem 0; scroll-margin-top: 60px; }
  .theme-grid { grid-template-columns: 1fr; }
  .theme-card, .theme-card + .theme-card {
    min-height: auto;
    padding: 1.4rem 0 1.6rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .theme-card:last-child { border-bottom: 0; }
  .theme-card::before { margin-bottom: 1.25rem; }
  .pub-group-header { display: block; }
  .pub-group-note { margin-top: .2rem; }
  .paper { display: block; }
  .paper-figure { border-right: 0; border-bottom: 1px solid var(--border); }
  .paper-figure img { height: 190px; }
  .paper-body { padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Profile-led academic layout */

.page-home #research,
.page-home #publications { display: none; }

main {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  column-gap: 5rem;
  align-items: start;
}

main > .hero {
  position: sticky;
  top: 92px;
  grid-row: 1 / span 5;
  width: auto;
  margin: 0;
  padding: 4.5rem 0;
  overflow: visible;
}

main > .hero::after { display: none; }
.profile-monogram {
  width: 148px;
  aspect-ratio: 1;
  margin-bottom: 1.6rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--text);
  border-radius: 50%;
  font: 400 3.4rem/1 var(--serif);
  letter-spacing: -.04em;
}

main > .hero .hero-eyebrow {
  margin-bottom: .75rem;
  font-size: .7rem;
  line-height: 1.5;
}

main > .hero h1 {
  margin-bottom: .9rem;
  font-size: 2.65rem;
  line-height: .95;
  letter-spacing: -.035em;
}

main > .hero .hero-lead {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}

main > .hero .hero-affiliation {
  margin-bottom: 1.4rem;
  font-size: .8rem;
  line-height: 1.5;
}

main > .hero .hero-links {
  display: grid;
  justify-items: start;
  gap: .4rem;
}

main > .hero .hero-links a,
main > .hero .hero-links a:first-child {
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: .82rem;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
}

main > .hero .hero-links a:hover,
main > .hero .hero-links a:first-child:hover {
  color: var(--accent);
  background: transparent;
}

main > .section {
  grid-column: 2;
  width: 100%;
  padding: 4.5rem 0;
  background: transparent;
  border-top: 1px solid var(--border);
}

main > #about { border-top: 0; }
main > .section .container { width: 100%; }
main > .section .section-title {
  margin-bottom: 2rem;
  font-size: 2.65rem;
}

main .about-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
main .about-aside { max-width: none; }
main .timeline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
main .timeline li { margin: 0; padding: 0; border: 0; }

.updates-list { margin: 0; padding: 0; list-style: none; }
.updates-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.updates-list li:first-child { border-top-color: var(--border-strong); }
.updates-list time { color: var(--accent); font-size: .78rem; font-weight: 600; }
.updates-list strong { font-size: .95rem; }
.updates-list p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

.page-intro { padding-bottom: 3.5rem; }
.page-kicker {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.page-intro .section-title { max-width: 720px; margin-bottom: 1.5rem; }
.page-summary { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.question-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border-strong); }
.question-list li {
  position: relative;
  padding: 1.2rem 0 1.2rem 2rem;
  color: #3f4248;
  border-bottom: 1px solid var(--border);
}
.question-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.next-page-link { margin: 2rem 0 0; font-weight: 600; }

.project-list { border-top: 1px solid var(--border-strong); }
.project {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 2.25rem;
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.project-meta { display: flex; flex-direction: column; gap: .35rem; }
.project-meta span:first-child { color: var(--accent); font: 1.25rem var(--serif); }
.project-meta span:last-child {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.project-content h3 { margin: 0 0 .65rem; font: 400 1.75rem/1.15 var(--serif); }
.project-content > p { color: var(--muted); }
.project-content .project-lead { margin: 0 0 1rem; color: var(--text); font-size: 1rem; font-weight: 600; }
.project-visual { margin: 1.4rem 0; background: #f1f2f4; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.project-visual img { display: block; width: 100%; height: 260px; padding: 1rem; object-fit: contain; }
.project-visual figcaption { padding: .55rem .8rem; color: var(--muted); background: #fff; border-top: 1px solid var(--border); font-size: .7rem; text-align: center; }
.project-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.project-gallery .project-visual img { height: 200px; }
.project-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.35rem 0; }
.project-details div { padding-top: .75rem; border-top: 1px solid var(--border); }
.project-details dt { color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.project-details dd { margin: .25rem 0 0; font-size: .82rem; }
.project-output { font-size: .82rem; font-weight: 600; text-decoration: none; }

.legacy-publications { display: none; }
.publication-year { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 2rem; margin-bottom: 3.5rem; }
.publication-year:last-child { margin-bottom: 0; }
.publication-year > h3 { margin: 0; color: var(--accent); font: 400 1.8rem var(--serif); }
.citation-list { border-top: 1px solid var(--border-strong); }
.citation { padding: 1.35rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.citation h4 { margin: 0 0 .45rem; font: 400 1.16rem/1.4 var(--serif); }
.citation p { margin: .16rem 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.citation p strong { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.citation-links { font: 600 .72rem var(--sans); white-space: nowrap; }
.citation-links a { text-decoration: none; }

main .theme-card { min-height: 255px; }
main .paper { grid-template-columns: 210px minmax(0, 1fr); }
main .paper-figure img { height: 155px; }

main > .section-contact {
  margin-bottom: 4.5rem;
  padding-inline: 2.25rem;
  color: #fff;
  background: var(--text);
  border-radius: 8px;
}
main > .section-contact .container { width: 100%; }

@media (max-width: 900px) {
  main {
    width: auto;
    display: block;
  }
  main > .hero {
    position: relative;
    top: auto;
    grid-row: auto;
    width: min(100% - 3rem, var(--max));
    margin-inline: auto;
    padding: 4.5rem 0;
  }
  .profile-monogram { width: 116px; font-size: 2.75rem; }
  main > .hero .hero-content { max-width: 680px; }
  main > .hero .hero-lead { font-size: 1.05rem; }
  main > .hero .hero-links { display: flex; gap: .8rem; }
  main > .section { padding: 4rem 0; }
  main > .section .container { width: min(100% - 3rem, var(--max)); }
  main > .section-contact { margin: 0; padding-inline: 0; border-radius: 0; }
}

@media (max-width: 640px) {
  main > .hero,
  main > .section .container { width: min(100% - 2rem, var(--max)); }
  main .timeline { grid-template-columns: 1fr; gap: 1.25rem; }
  main .theme-card { min-height: auto; }
  main .paper { display: block; }
  .updates-list li { grid-template-columns: 50px minmax(0, 1fr); gap: .75rem; }
  .project { grid-template-columns: 1fr; gap: 1rem; }
  .project-meta { flex-direction: row; align-items: baseline; gap: .75rem; }
  .project-details { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-visual img, .project-gallery .project-visual img { height: 210px; }
  .publication-year { grid-template-columns: 1fr; gap: .5rem; }
}
