/* DESIGN SETTINGS: edit these variables to customize the whole site. */
:root {
  --background: #fff;
  --text: #292f35;
  --heading: #1c2c3d;
  --accent: #254f77;
  --muted: #667079;
  --rule: #e1e5e8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --content-width: 1040px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(var(--content-width), calc(100% - 96px)); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--heading); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 1px; }
p, h1, h2, h3, h4 { margin: 0; }
h1, h2, h4 { font-family: var(--serif); font-weight: 400; color: var(--heading); }
.skip-link { position: absolute; left: 16px; top: -80px; padding: 8px 16px; background: white; z-index: 2; }
.skip-link:focus { top: 12px; }

/* Navigation remains visible on small screens; no hamburger or JS required. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 30px 24px; border-bottom: 1px solid var(--rule); }
.wordmark { font-family: var(--serif); color: var(--heading); font-size: 26px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
nav ul { display: flex; flex-wrap: wrap; gap: 28px; padding: 0; margin: 0; list-style: none; }
nav a { display: inline-block; padding-block: 6px; color: var(--text); font-size: 15px; text-decoration: none; }

/* HOME: a natural 4:5 portrait and a comfortably sized reading column. */
.home { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 72px; align-items: start; padding-block: 72px 80px; }
.portrait picture, .portrait img { display: block; width: 100%; }
.portrait img { height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; border-radius: 2px; }
.introduction { padding-top: 0; }
h1 { font-size: 36px; line-height: 1.2; letter-spacing: -0.6px; }
.academic-role { margin-top: 10px; font-size: 18px; line-height: 1.5; }
.academic-role span { color: var(--muted); }
.research-topics { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.biography { margin-top: 22px; font-size: 16px; line-height: 1.7; }
.biography p + p { margin-top: 18px; }
.biography strong { font-weight: 600; }
.email-line { margin-top: 22px; font-size: 16px; }
.profile-links { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 5px; list-style: none; padding: 0; margin: 8px 0 0; font-size: 16px; }
.profile-links a { text-decoration: none; border-bottom: 1px solid #bac7d1; padding-bottom: 2px; }

/* SECTIONS: repeat paper articles freely; spacing is automatic. */
.content-section { display: grid; grid-template-columns: 228px minmax(0, 1fr); column-gap: 48px; border-top: 1px solid var(--rule); padding-block: 42px 48px; }
h2 { font-size: 28px; line-height: 1.35; letter-spacing: -0.35px; }
.section-body { min-width: 0; }
.group-label { font-size: 14px; font-weight: 600; letter-spacing: 0.045em; color: var(--accent); line-height: 1.5; margin-bottom: 16px; }
.research-group + .research-group { margin-top: 36px; padding-top: 29px; border-top: 1px solid var(--rule); }
.paper + .paper { margin-top: 28px; }
.paper h4 { font-size: 21px; line-height: 1.4; }
.featured-paper h4 { font-size: 25px; }
.paper-meta { font-size: 14px; margin-top: 6px; }
.paper-links { font-size: 14px; margin-top: 9px; }
.paper-links a + a { margin-left: 16px; }
.abstract { margin-top: 13px; font-size: 15px; }
.teaching-entry { display: flex; justify-content: space-between; gap: 24px; }
.teaching-entry + .teaching-entry { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--rule); }
.entry-title { font-family: var(--serif); color: var(--heading); font-size: 21px; line-height: 1.4; font-weight: 400; margin-bottom: 7px; }
.teaching-entry p { font-size: 14px; }
.teaching-term { white-space: nowrap; padding-top: 3px; }
.cv-line { margin-bottom: 8px; }
.cv-download { font-size: 17px; color: var(--accent); }
.contact-layout { display: flex; justify-content: space-between; gap: 28px; }
address { font-style: normal; font-size: 15px; line-height: 1.8; }
.contact-name { font-weight: 600; }
.contact-email { font-size: 14px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px 32px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 960px) {
  .wrap { width: calc(100% - 64px); }
  .home { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding-block: 54px 60px; }
  .content-section { grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
  .contact-layout { flex-direction: column; gap: 18px; }
  .teaching-entry { flex-direction: column; gap: 10px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 24px 16px; }
  .wordmark { font-size: 25px; }
  nav { width: 100%; }
  nav ul { gap: 0; justify-content: space-between; }
  nav a { font-size: 14px; padding-block: 8px; }
  .home { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 42px; }
  .portrait { width: min(280px, 100%); }
  h1 { font-size: 30px; }
  .profile-links { column-gap: 18px; }
  .content-section { grid-template-columns: 1fr; gap: 26px; padding-block: 32px 36px; }
  h2 { font-size: 27px; }
  .research-group + .research-group { margin-top: 29px; padding-top: 25px; }
  .featured-paper h4 { font-size: 23px; }
  .site-footer { padding-bottom: 24px; }
}

@media print {
  .wrap { width: 100%; }
  nav, .skip-link, .site-footer a { display: none; }
  .site-header { padding-top: 0; }
  .home { padding-block: 30px; grid-template-columns: 170px 1fr; gap: 30px; }
  .content-section { padding-block: 24px; }
  .paper, .teaching-entry { break-inside: avoid; }
}
