:root {
  --bg: #fbfaf7;
  --text: #2e2b28;
  --heading: #1d1b19;
  --muted: #8a857c;
  --muted-2: #5f5a53;
  --thumb-bg: #f0eee8;
  --rule: #e7e3da;
  --link: #1f6f8b;
  --link-hover: #c2561f;
  --pill-bg: #eef6f9;
  --pill-border: #cfe3ea;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1000px; margin: 0 auto; padding: 48px 30px 32px; }

a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px;
}

h1 { margin: 0 0 20px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); line-height: 1.2; color: var(--heading); }
h2 {
  margin: 44px 0 16px; padding-bottom: 6px;
  font-size: 1.35rem; font-weight: 600; color: var(--heading);
  border-bottom: 1px solid var(--rule);
}

.profile { display: flex; flex-direction: row-reverse; gap: 40px; align-items: flex-start; }
.photo { flex-shrink: 0; width: 240px; height: 240px; object-fit: cover; border-radius: 12px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.about { flex: 1; min-width: 0; }
.about p { margin: 0 0 12px; }
.role { color: var(--muted); font-size: .95rem; margin-bottom: 18px !important; }
.links { margin-top: 18px !important; }
.links a { text-decoration: underline; }
.links i { margin-right: 2px; }
.links .sep { margin: 0 .35rem; color: var(--muted); }

.entries { list-style: none; margin: 0; padding: 0; }
.entry { margin-bottom: 26px; }
.title { font-size: 1.08rem; font-weight: 500; line-height: 1.4; }
.authors { font-size: .93rem; margin-top: 4px; color: var(--muted-2); }
.authors strong { color: var(--heading); }
.venue { font-size: .93rem; color: var(--muted-2); }
.summary { margin: 8px 0 0; font-size: .93rem; color: var(--muted-2); }

.pills { margin-top: 6px; font-size: .93rem; }
.pills a + a::before { content: "/"; margin: 0 .5rem; color: var(--muted); display: inline-block; }
.pills a:hover { text-decoration: none; }
.abstract p { margin: 10px 0 0; font-size: .9rem; color: var(--muted-2); text-align: justify; hyphens: auto; }


footer { margin-top: 56px; color: var(--muted); font-size: .85rem; text-align: center; }

@media (max-width: 640px) {
  .profile { flex-direction: column; align-items: center; gap: 24px; }
  .photo { width: 180px; height: 180px; }
  .about { width: 100%; }
}

/* entries with a picture */

/* entries with a picture: fixed-size box on the left, text on the right */
.entry.has-thumb { display: grid; grid-template-columns: 270px 1fr; gap: 26px; align-items: center; }
.thumb {
  display: flex; align-items: center; justify-content: center;
  width: 270px; aspect-ratio: 8 / 5; overflow: hidden;
  background: var(--thumb-bg); border-radius: 4px;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.body { min-width: 0; }
@media (max-width: 640px) {
  .entry.has-thumb { grid-template-columns: 1fr; gap: 12px; }
  .thumb { width: 100%; max-width: 320px; }
  .abstract p { text-align: left; }
}

/* experience logos */
.entry.has-logo { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; }
.logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 4px; box-sizing: border-box; }
.exp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.exp-head .date { flex-shrink: 0; font-size: .9rem; color: var(--muted); white-space: nowrap; }
#experience .summary { margin: 4px 0 0; }
@media (max-width: 640px) { .exp-head { flex-direction: column; gap: 0; } }

/* section headers with "all ..." link */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 44px 0 16px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.section-head h2 { margin: 0; padding: 0; border: 0; }
.section-head .all { font-size: .93rem; white-space: nowrap; }

/* top bar on subpages */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--rule); }
.topbar-inner { max-width: 1000px; margin: 0 auto; padding: 14px 30px; font-size: .95rem; }
.container.subpage { padding-top: 8px; }
.topbar-inner a { font-weight: 600; font-size: 1.1rem; color: var(--heading); }
.topbar-inner a:hover { color: var(--link-hover); text-decoration: none; }
.subpage h2 { margin: 36px 0 6px; padding: 0; border: 0; font-size: 2rem; line-height: 1.2; }
.subpage .lede { margin: 0 0 28px; }
.back { margin: 24px 0 0; font-size: .95rem; }
.subpage h2 { margin-top: 16px; }

/* ---- visual refresh: serif headings, Inter body, indigo accent ---- */
body { font-size: 16px; line-height: 1.65; font-feature-settings: "cv11", "ss01"; }
h1, h2, .topbar-inner a { font-family: var(--serif); }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.3rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.005em; }
.subpage h2 { font-size: 1.9rem; }
.topbar-inner a { font-size: 1.15rem; font-weight: 600; letter-spacing: -.005em; }
.title { font-weight: 600; letter-spacing: -.003em; }
.photo { border-radius: 18px; box-shadow: 0 6px 20px rgba(40, 30, 20, .14); }
.thumb { border-radius: 10px; border: 1px solid var(--rule); box-shadow: 0 1px 3px rgba(40, 30, 20, .06); }
.logo { border-radius: 12px; }
.links a { text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 3px; }
.section-head, .topbar { border-bottom-color: var(--rule); }
.section-head .all { font-weight: 500; }
.exp-head .date { font-variant-numeric: tabular-nums; }
footer { color: var(--muted); }
.exp-head + .exp-head { margin-top: 4px; }
