/* Simple personal site. System fonts, white page, one link color. */
body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: #0b5cad; }
a:hover { color: #083f78; }
img { max-width: 100%; height: auto; }
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { border-bottom: 1px solid #e3e3e3; }
header .container { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 14px; }
.site-name { font-size: 1.2rem; font-weight: 600; color: #222; text-decoration: none; }
nav a { color: #444; text-decoration: none; margin-left: 18px; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a.current { color: #0b5cad; text-decoration: underline; }

main { padding: 28px 0 48px; }
h1 { font-size: 1.9rem; font-weight: 600; line-height: 1.25; margin: 0.4em 0 0.3em; }
h2 { font-size: 1.35rem; font-weight: 600; margin: 2em 0 0.6em; padding-bottom: 4px; border-bottom: 1px solid #e3e3e3; }
h3 { font-size: 1.08rem; font-weight: 600; margin: 1.4em 0 0.3em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
.meta { color: #666; font-size: 0.95rem; margin-bottom: 0.2em; }
.links { margin: 0.8em 0 1.4em; }
.links a { margin-right: 18px; }
.page-head { margin-bottom: 1.8em; }
.page-head .links { margin-bottom: 0; }

/* Home (About) */
.photo { float: right; width: 240px; margin: 6px 0 16px 28px; border-radius: 4px; }
.news { list-style: none; padding: 0; }
.news li { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; margin-bottom: 0.45em; }
.news .date { color: #666; }
h2 { clear: both; }

/* Home intro */
.intro { display: flex; gap: 28px; align-items: flex-start; }
.intro .text { flex: 1; }
.intro .photo { width: 170px; flex: none; }
.intro .photo img { border-radius: 4px; display: block; }

/* Project list */
.project-list { list-style: none; padding: 0; margin: 0; }
.project-list li { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid #ececec; margin: 0; }
.project-list li:first-child { border-top: 0; padding-top: 6px; }
.project-list img { width: 200px; height: 125px; object-fit: cover; border: 1px solid #ddd; display: block; background: #fff; }
.project-list .noimg { width: 200px; height: 125px; border: 1px solid #ddd; background: #f5f6f7; display: flex; align-items: center; justify-content: center; color: #888; font-size: 0.85rem; }
.project-list h3 { margin: 0 0 4px; font-size: 1.08rem; }
.project-list h3 a { text-decoration: none; }
.project-list h3 a:hover { text-decoration: underline; }
.project-list p { margin: 0; }
.project-list li.text-only > div { grid-column: 2; }

/* Figures */
figure { margin: 1.6em 0; }
figure img { display: block; border: 1px solid #ddd; margin: 0 auto; max-height: 520px; width: auto; }
figcaption { font-size: 0.9rem; color: #666; margin-top: 6px; text-align: center; }
.fig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fig-grid figure { margin: 0; }
.fig-grid img { width: 100%; height: 170px; object-fit: contain; background: #fff; }
.fig-grid figcaption { text-align: left; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 0.6em 0 1.4em; font-size: 0.95rem; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid #e6e6e6; vertical-align: top; }
thead th { border-bottom: 2px solid #ccc; }
.table-wrap { overflow-x: auto; }

/* Lists of papers etc. */
.refs li { margin-bottom: 0.9em; }

.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 3em; padding-top: 14px; border-top: 1px solid #e3e3e3; font-size: 0.95rem; }

footer { border-top: 1px solid #e3e3e3; color: #777; font-size: 0.88rem; }
footer .container { padding-top: 16px; padding-bottom: 24px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  nav a { margin-left: 12px; }
  .project-list li { grid-template-columns: 1fr; gap: 10px; }
  .project-list li.text-only > div { grid-column: 1; }
  .project-list img, .project-list .noimg { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .fig-grid { grid-template-columns: 1fr 1fr; }
  .intro { flex-direction: column-reverse; }
  h1 { font-size: 1.6rem; }
  .photo { float: none; display: block; width: 220px; margin: 0 0 18px 0; }
  .news li { grid-template-columns: 1fr; gap: 0; }
}

/* Leadership page: photo grid and video */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1.2em 0; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; height: 230px; object-fit: cover; object-position: center top; }
.photo-grid figcaption { text-align: left; }
.photo-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
.photo-grid.two img { height: 380px; object-position: center; }
figure video { display: block; width: 100%; max-width: 680px; margin: 0 auto; background: #000; border: 1px solid #ddd; }
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid img { height: 170px; }
  .photo-grid.two img { height: 240px; }
  nav a { margin-left: 10px; font-size: 0.95rem; }
}

/* Editorial review: navigation, focus visibility and small-screen readability. */
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
a:focus-visible { outline: 3px solid #0b5cad; outline-offset: 4px; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 10; padding: 8px 14px; background: white; }
.skip-link:focus { top: 10px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 0; margin: 1.3em 0; border-block: 1px solid #e3e3e3; }
.section-nav a { margin: 0; color: #0b5cad; text-decoration: underline; }
.fig-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.experience-list h3 { margin-top: 1em; }
.experience-list .meta { margin-bottom: .4em; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.links a { margin-right: 0; }
.pager > * { min-width: 0; flex: 1; }
.pager > :last-child { text-align: right; }
@media (max-width: 480px) {
  header nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
  header nav a { margin-left: 0; }
  .fig-grid, .fig-grid.two, .photo-grid, .photo-grid.two { grid-template-columns: minmax(0, 1fr); }
  .photo-grid img, .photo-grid.two img { height: auto; }
  .pager { flex-direction: column; }
  .pager > :last-child { text-align: left; }
}
