:root {
  --bg: #fdfdfb;
  --surface: #f4f3ef;
  --text: #1c1c1a;
  --muted: #61605c;
  --rule: #dddcd6;
  --accent: #1d3557;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171a;
    --surface: #1f2126;
    --text: #e8e7e3;
    --muted: #a0a09b;
    --rule: #32343a;
    --accent: #9db9d8;
  }
}
:root[data-theme="dark"] {
  --bg: #16171a;
  --surface: #1f2126;
  --text: #e8e7e3;
  --muted: #a0a09b;
  --rule: #32343a;
  --accent: #9db9d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4.5rem 16px 6rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
a:hover { border-bottom-color: var(--accent); }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.portrait {
  width: min(380px, 78vw);
  height: min(380px, 78vw);
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 4px;
  background: var(--surface);
  margin-bottom: 1.6rem;
}

h1 {
  margin: 0;
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.role {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
}

.affil {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.45;
}

.links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.links a {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--text);
}
.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- sections ---------- */

section { margin-top: 3rem; }

h2 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

section > p { margin: 0 0 1rem; }

.interests {
  margin-top: 1.4rem;
  font-size: 0.96rem;
  color: var(--muted);
}
.interests .label {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.group {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 2rem 0 0.85rem;
}
.group:first-of-type { margin-top: 0; }

.paper {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 1.6rem;
}

.paper .title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.4;
}

.paper .meta {
  margin: 0.3rem 0 0;
  font-size: 0.93rem;
  color: var(--muted);
}

.sep {
  color: var(--rule);
  margin: 0 0.15rem;
}

.jmp {
  color: var(--accent);
  font-weight: 600;
}

.status {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.education {
  list-style: none;
  margin: 0;
  padding: 0;
}

.education li {
  margin-bottom: 0.4rem;
  font-size: 0.97rem;
}

details {
  margin-top: 0.7rem;
  font-size: 0.95rem;
}

summary {
  cursor: pointer;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  width: fit-content;
}
summary::marker { font-size: 0.7em; }

details p {
  margin: 0.55rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: 3px;
  color: var(--muted);
}

.paperlinks {
  margin: 0.7rem 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact { color: var(--muted); font-size: 0.97rem; }
.contact a { color: var(--accent); }

/* ---------- narrow screens ---------- */

@media (max-width: 34rem) {
  main { padding-top: 3rem; }
  h1 { font-size: 1.95rem; }
}
