/* Academic editorial: restrained color, expressive headings, clear reading rhythm. */
:root {
  color-scheme: light;
  --ink: #172535;
  --text: #35404d;
  --muted: #626e7d;
  --accent: #205c96;
  --accent-hover: #123e69;
  --line: #e3e8ef;
  --surface: #f5f8fc;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #dce9f6; color: var(--ink); }
a { color: var(--accent); text-decoration: none; text-underline-offset: .22em; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
p, h1, h2, h3, figure { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
img { display: block; max-width: 100%; }
.page { width: min(100% - 5rem, 1000px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; top: .75rem; left: 1rem; padding: .6rem 1rem; background: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

/* A light navigation line leaves the profile as the visual entry point. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 82px; border-bottom: 1px solid var(--line); }
.site-name { font-family: var(--serif); color: var(--ink); font-size: 1.15rem; font-weight: 600; letter-spacing: -.025em; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.7rem; font-size: .875rem; }
nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--muted); }
nav a:last-child { color: var(--ink); }
nav a:hover { color: var(--accent); }

/* Profile: broad text column and an uncrowded photographic portrait. */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 224px; column-gap: 3.75rem; align-items: start; margin-top: 3.5rem; }
h1 { font-family: var(--serif); font-size: clamp(2.65rem, 4.5vw, 3.5rem); font-weight: 500; line-height: 1.15; letter-spacing: -.05em; color: var(--ink); }
.research-interests { color: var(--accent); font-size: .875rem; font-weight: 500; letter-spacing: .025em; line-height: 1.7; margin: .8rem 0 1.65rem; }
.bio > p:not(.research-interests) + p { margin-top: 1rem; }
.bio > p:not(.research-interests, .phd-note) { text-wrap: pretty; }
.portrait { margin-top: .5rem; }
.portrait > a { display: block; border-radius: 14px; }
.portrait img {
  width: 224px;
  height: 274px;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 14px;
  box-shadow: 0 2px 5px #1725350a, 0 12px 28px #17253510;
}
.portrait figcaption { margin-top: 1.1rem; text-align: center; font-size: .875rem; }
.portrait figcaption a { display: block; color: var(--muted); overflow-wrap: anywhere; }
.portrait figcaption a:hover { color: var(--accent); }
.phd-note { padding: .85rem 1rem; background: var(--surface); border-left: 2px solid #759cc0; border-radius: 0 5px 5px 0; font-size: .9375rem; line-height: 1.7; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.2rem; margin-top: 1.1rem; font-size: .875rem; }
.contact-links > span { display: none; }
.contact-links > a { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; font-weight: 500; }

/* Serif section titles and understated rules define the page rhythm. */
main > section:not(.about) { margin-top: 3.75rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1.9rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
h2 { font-family: var(--serif); font-size: 1.85rem; font-weight: 500; letter-spacing: -.035em; line-height: 1.3; color: var(--ink); }
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.5; color: var(--ink); }
.section-note { color: var(--muted); font-size: .875rem; }

/* Publications read as entries, with a consistent figure / citation gutter. */
.publication { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
.publication + .publication { margin-top: 1.8rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.paper-image { display: flex; align-items: center; min-height: 154px; margin-top: .3rem; padding: .65rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.paper-image:hover { border-color: #a9bfd5; }
.paper-image img { width: 100%; height: auto; }
.paper-body h3 { font-size: 1.125rem; line-height: 1.48; letter-spacing: -.012em; text-wrap: pretty; }
.paper-body h3 a { color: var(--ink); }
.paper-body h3 a:hover { color: var(--accent); }
.authors { margin-top: .5rem; font-size: .9375rem; line-height: 1.6; }
.authors strong { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: #a3afbd; }
.venue { margin-top: .3rem; font-size: .875rem; color: var(--muted); }
.venue em { font-style: normal; font-weight: 500; }
.oral { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 3px; background: #faf0ec; color: #9b4530; font-size: .875rem; font-weight: 600; }
.paper-links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: .55rem; font-size: .875rem; }
.paper-links a { display: inline-flex; align-items: center; min-height: 40px; gap: .3rem; font-weight: 500; }
.paper-links a::after { content: "↗"; font-weight: 400; font-size: .85em; }
.paper-reference { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: .15rem; padding-top: .1rem; color: var(--muted); font-size: .875rem; }
.paper-reference span:last-child { font-family: var(--serif); font-size: 2.5rem; color: #66798e; letter-spacing: -.04em; line-height: 1.2; }
.paper-reference span:first-child { margin-top: .2rem; font-size: .8125rem; font-weight: 500; letter-spacing: .075em; }

/* A shared date column makes short research entries easy to scan. */
.experience { position: relative; display: grid; grid-template-columns: 10rem minmax(0, 1fr); column-gap: 2.1rem; padding: 0 0 1.85rem; }
.experience:last-child { padding-bottom: 0; }
.experience::before { content: ""; position: absolute; top: .65rem; bottom: -.65rem; left: 10.95rem; width: 1px; background: var(--line); }
.experience:last-child::before { display: none; }
.experience::after { content: ""; position: absolute; top: .55rem; left: calc(10.95rem - 3px); width: 7px; height: 7px; border-radius: 50%; background: #b2bdc9; box-shadow: 0 0 0 4px #fff; }
.experience:first-of-type::after { background: var(--accent); }
.experience .experience-heading { display: contents; }
.experience .experience-heading h3 { grid-column: 2; grid-row: 1; }
.experience .experience-heading .date { grid-column: 1; grid-row: 1; padding-top: .16rem; }
.experience > .role, .experience > .advisor { grid-column: 2; }
.team { font-size: .9375rem; font-weight: 400; color: var(--muted); }
.date { color: var(--muted); white-space: nowrap; font-size: .875rem; font-variant-numeric: tabular-nums; }
.role { font-size: .9375rem; margin-top: .25rem; line-height: 1.65; }
.location { color: var(--muted); }
.advisor { color: var(--muted); font-size: .875rem; margin-top: .18rem; }

/* Two compact education entries finish the page without another long list. */
#education { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
#education > .section-heading { grid-column: 1 / -1; }
.education { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1.1rem; align-content: start; }
.education:last-child { padding-left: 2rem; border-left: 1px solid var(--line); }
.university-logo { width: 44px; height: 52px; object-fit: contain; margin-top: .15rem; }
.education .experience-heading { margin-bottom: .45rem; }
.education .date { margin-top: .18rem; }
.education > div > p { font-size: .9375rem; line-height: 1.65; }
.education > div > .education-detail { margin-top: .55rem; font-size: .875rem; color: var(--muted); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 4rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
footer span { margin-inline: .35rem; }
footer a { color: var(--muted); text-decoration: underline; text-decoration-color: #c4cdd6; }

@media (max-width: 900px) {
  .page { width: calc(100% - 4rem); }
  .about { grid-template-columns: minmax(0, 1fr) 180px; gap: 2.25rem; }
  .portrait img { width: 180px; height: 224px; }
  .publication { grid-template-columns: 180px minmax(0, 1fr); gap: 1.7rem; }
  .paper-image { min-height: 128px; }
  .experience { grid-template-columns: 9.7rem minmax(0, 1fr); column-gap: 1.8rem; }
  .experience::before { left: 10.5rem; }
  .experience::after { left: calc(10.5rem - 3px); }
  #education { column-gap: 1.5rem; }
  .education { gap: .8rem; }
  .education:last-child { padding-left: 1.5rem; }
}

@media (max-width: 700px) {
  .page { width: calc(100% - 3rem); }
  .site-header { min-height: 74px; gap: 1rem; }
  nav { gap: .3rem 1rem; }
  .about { grid-template-columns: minmax(0, 1fr) 144px; column-gap: 1.5rem; margin-top: 2.5rem; }
  .bio { display: contents; }
  .bio h1, .bio .research-interests { grid-column: 1; }
  .bio h1 { align-self: end; grid-row: 1; font-size: 2.75rem; }
  .bio .research-interests { grid-row: 2; align-self: start; margin: .65rem 0 0; max-width: 19rem; }
  .portrait { grid-column: 2; grid-row: 1 / 3; margin-top: 0; align-self: start; }
  .portrait img { width: 144px; height: 166px; border-radius: 10px; }
  .portrait figcaption { display: none; }
  .bio > p:not(.research-interests) { grid-column: 1 / -1; }
  .bio > p:not(.research-interests, .phd-note) { margin-top: 1rem; }
  .bio > .research-interests + p { margin-top: 1.6rem; }
  .bio > .contact-links { grid-column: 1 / -1; }
  main > section:not(.about) { margin-top: 3rem; }
  .section-heading { margin-bottom: 1.5rem; }
  .publication { grid-template-columns: 145px minmax(0, 1fr); gap: 1.4rem; }
  .paper-image { min-height: 110px; padding: .4rem; }
  .paper-body h3 { font-size: 1.0625rem; }
  .experience { grid-template-columns: 1fr; padding: 0 0 1.65rem 1.2rem; }
  .experience::before { left: 2px; }
  .experience::after { left: -1px; }
  .experience .experience-heading .date { grid-column: 1; grid-row: 1; margin: 0 0 .25rem; padding: 0; }
  .experience .experience-heading h3 { grid-column: 1; grid-row: 2; }
  .experience > .role, .experience > .advisor { grid-column: 1; }
  .date { white-space: normal; }
  #education { grid-template-columns: 1fr; row-gap: 1.4rem; }
  #education > .section-heading { margin-bottom: 0; }
  .education:last-child { border-left: 0; padding-left: 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
  .education { grid-template-columns: 44px minmax(0, 1fr); gap: 1.1rem; }
}

@media (max-width: 480px) {
  .page { width: calc(100% - 2.5rem); }
  .site-header { flex-wrap: wrap; padding: .7rem 0 .65rem; gap: .05rem; }
  .site-name { width: 100%; font-size: 1.075rem; }
  nav { width: 100%; justify-content: space-between; gap: .25rem .65rem; }
  nav a { min-height: 40px; }
  .about { grid-template-columns: minmax(0, 1fr); margin-top: 2rem; }
  .bio h1 { grid-row: 2; font-size: 2.35rem; text-align: center; }
  .bio .research-interests { grid-row: 3; max-width: none; margin-top: .5rem; font-size: .875rem; letter-spacing: 0; text-align: center; }
  .portrait { grid-column: 1; grid-row: 1; justify-self: center; margin-bottom: 1.25rem; }
  .portrait img { width: 112px; height: 146px; border-radius: 8px; }
  .contact-links { gap: .35rem 1rem; }
  h2 { font-size: 1.65rem; }
  .section-heading { gap: .35rem .75rem; }
  .section-note { font-size: .8125rem; }
  .publication { grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }
  .paper-image { width: 100%; min-height: 0; padding: .8rem; }
  .paper-reference { display: none; }
  .paper-body h3 { font-size: 1.125rem; }
  .publication + .publication { margin-top: 1.4rem; padding-top: 1.4rem; }
  .phd-note { padding: .75rem .85rem; }
  .team { font-size: .875rem; }
  .education { grid-template-columns: 38px minmax(0, 1fr); gap: .85rem; }
  .university-logo { width: 38px; height: 46px; }
  footer { margin-top: 3rem; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a { transition: none; }
}

@media print {
  body { font-size: 10pt; line-height: 1.5; }
  .page { width: 100%; }
  .site-header, .skip-link, footer { display: none; }
  .about { margin-top: 0; grid-template-columns: minmax(0, 1fr) 140px; }
  .bio { display: block; }
  .portrait { grid-column: auto; grid-row: auto; }
  .portrait img { width: 140px; height: 170px; box-shadow: none; }
  main > section:not(.about) { margin-top: 1.5rem; }
  a { color: inherit; }
  .section-heading { margin-bottom: 1rem; }
  .publication, .experience, .education { break-inside: avoid; }
  .publication { grid-template-columns: 145px minmax(0, 1fr); gap: 1rem; }
  .paper-image { min-height: 0; }
  .paper-links a { min-height: 0; }
  .experience { padding-bottom: 1rem; }
  #education { grid-template-columns: 1fr 1fr; }
  .education:last-child { padding-top: 0; border-top: 0; }
}
