:root {
  --bg: #edf3f8;
  --text: #202830;
  --blue: #173f67;
  --link: #1e5a86;
  --muted: #687582;
  --rule: #b7cad8;
  --rule-soft: rgba(183, 202, 216, 0.68);
}

* { box-sizing: border-box; }

html {
  font-size: 15.25px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.57;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site {
  width: min(1160px, calc(100% - 56px));
  margin: 0 auto;
  padding: 29px 0 24px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--blue); }

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  color: var(--blue);
  font-size: 1.48rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 19px;
  font-size: 0.89rem;
  line-height: 1.35;
}

nav a {
  color: var(--blue);
  text-decoration: none;
}

nav a:hover,
nav a.active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

main { padding-top: 24px; }
main > :first-child { margin-top: 0; }

p { margin: 0 0 13px; }

.lead,
.page-intro {
  margin-bottom: 23px;
  font-size: 0.99rem;
  line-height: 1.62;
}

.page-intro { white-space: nowrap; }

/* Home */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(215px, 0.62fr);
  gap: 48px;
  align-items: start;
}

.hero-copy {
  max-width: 760px;
  padding-top: 2px;
}

.hero-copy p { margin: 0 0 17px; }
.hero-copy > p:last-child { margin-bottom: 0; }

.home-welcome {
  font-size: 1.03rem;
  line-height: 1.64;
}

.home-welcome strong {
  color: var(--blue);
  font-weight: 600;
}

.home-contact {
  color: var(--text);
  padding-top: 2px;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 64%;
  display: block;
  border: 1px solid var(--rule);
}

/* Section hierarchy */
h2 {
  margin: 29px 0 8px;
  padding-bottom: 6px;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  border-bottom: 1px solid var(--rule);
}

h3 {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.42;
}

.section-box {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.section-box:last-child { border-bottom: none; }

.meta {
  color: var(--muted);
  font-size: 0.88em;
  font-weight: 400;
  white-space: nowrap;
}

.meta::before {
  content: " · ";
  color: #8da1b0;
}

.activities-page h2:first-child { margin-top: 0; }
.activities-page .section-box p { margin-bottom: 0; }

/* Research */
.research-list {
  margin: 2px 0 0;
  padding-left: 1.95rem;
  list-style: none;
  counter-reset: papers;
}

.paper {
  position: relative;
  counter-increment: papers;
  padding: 11px 0 13px 0.1rem;
  border-bottom: 1px solid var(--rule-soft);
}

.paper::before {
  content: "[" counter(papers) "]";
  position: absolute;
  left: -1.85rem;
  top: 11px;
  color: var(--muted);
  font-size: 0.91rem;
  font-variant-numeric: tabular-nums;
}

.paper:last-child { border-bottom: none; }

.paper-row {
  display: flex;
  align-items: baseline;
  gap: 0.34rem;
  white-space: nowrap;
  font-size: 0.94rem;
  line-height: 1.5;
}

.paper-title {
  font-weight: 600;
  color: var(--text);
}

.paper-coauthor {
  font-weight: 400;
  color: var(--text);
}

.paper-detail {
  color: var(--muted);
}

.paper-sep {
  color: #8da1b0;
  margin: 0 0.06rem;
}

.paper-row a { white-space: nowrap; }

.note {
  color: var(--muted);
  font-style: italic;
}

.compact p { margin-bottom: 7px; }


/* Compact one-line entries for Teaching and Academic Activities */
.inline-list {
  margin-top: 2px;
}

.inline-entry {
  padding: 11px 0 13px;
  border-bottom: 1px solid var(--rule-soft);
}

.inline-entry:last-child {
  border-bottom: none;
}

.inline-row {
  display: flex;
  align-items: baseline;
  gap: 0.34rem;
  white-space: nowrap;
  font-size: 0.94rem;
  line-height: 1.5;
}

.inline-title {
  color: var(--blue);
  font-weight: 600;
}

.inline-detail {
  color: var(--text);
}

.inline-muted {
  color: var(--muted);
}

.inline-sep {
  color: #8da1b0;
  margin: 0 0.06rem;
}

.inline-row a {
  white-space: nowrap;
}

.inline-description {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Footer */
footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 37px;
  padding-top: 11px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
}

footer .center { text-align: center; }
footer .right { text-align: right; }

@media (max-width: 900px) {
  .site {
    width: min(100% - 34px, 1160px);
    padding-top: 21px;
  }

  header { display: block; }
  .site-name { margin-bottom: 11px; }
  nav { justify-content: flex-start; gap: 7px 16px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-photo { max-width: 320px; }

  .paper-row,
  .inline-row {
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 0;
  }

  .page-intro { white-space: normal; }

  footer {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  footer .center,
  footer .right { text-align: left; }
}

@media (max-width: 560px) {
  html { font-size: 14.75px; }
  .site-name { font-size: 1.4rem; }
  nav { font-size: 0.88rem; }
  h2 { font-size: 1.1rem; }
}
