/* ===== Base ===== */
:root {
  --ink:      #1a1a1a;
  --muted:    #5a5a5a;
  --link:     #15507a;
  --link-hov: #0d3a5c;
  --rule:     #e3e3e3;
  --maxw:     760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { color: var(--link-hov); text-decoration: underline; }

/* ===== Masthead ===== */
.masthead {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 8px;
}

.photo {
  width: 260px;
  height: 260px;
  flex: 0 0 260px;
  border-radius: 6px;
  object-fit: cover;
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
  color: #9aa7b3;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  user-select: none;
}

.intro h1 {
  margin: 0 0 6px;
  font-size: 1.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--link);
}

.intro .title {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.4;
}
.intro .affil { color: var(--muted); }

.quicklinks { margin: 0; }
.quicklinks a {
  display: inline-block;
  margin-right: 16px;
  font-size: 0.95rem;
  font-weight: 550;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--rule);
  margin: 24px 0 8px;
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  font-size: 0.92rem;
}
.nav a { color: #8a8a8a; font-weight: 400; }
.nav a:hover { color: var(--link); text-decoration: none; }

/* ===== Sections ===== */
section { margin-top: 34px; }
#about { margin-top: 26px; }

section h2 {
  font-size: 1.22rem;
  font-weight: 650;
  color: #2f4a63;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 22px 0 8px;
}

p { margin: 0 0 14px; }

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

/* ===== Publication lists ===== */
ul.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.pubs li { margin-bottom: 18px; }

.pub-title {
  display: block;
  font-weight: 600;
}
.pub-meta {
  display: block;
  color: var(--muted);
  font-size: 0.97rem;
}
.pub-meta em { font-style: italic; }
.status { font-style: italic; }

details.abstract { margin-top: 5px; }
details.abstract > summary {
  cursor: pointer;
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--link);
  list-style: none;
}
details.abstract > summary::-webkit-details-marker { display: none; }
details.abstract > summary::before { content: "\25B8\00A0"; font-size: 0.8em; }
details.abstract[open] > summary::before { content: "\25BE\00A0"; }
details.abstract > p {
  margin: 8px 0 2px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

/* ===== Teaching ===== */
ul.teaching {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
ul.teaching li { margin-bottom: 8px; }
.note { color: var(--muted); font-size: 0.97rem; }

/* ===== Footer ===== */
footer {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

/* ===== Responsive ===== */
@media (max-width: 560px) {
  .container { padding: 32px 18px 48px; }
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .photo, .photo-placeholder { width: 150px; height: 150px; flex-basis: 150px; }
  .intro h1 { font-size: 1.7rem; }
}
