:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1c1b18;
  --muted: #6b675f;
  --line: #e7e4dd;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --accent-soft: #eef1fd;
  --chip: #f3f1ec;
  --chip-ink: #3f3d38;
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.04), 0 8px 24px rgba(28, 27, 24, 0.06);
  --radius: 14px;
  --maxw: 860px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  font-weight: 650;
  letter-spacing: 0.2px;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.navlinks {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a {
  color: var(--muted);
  font-size: 14.5px;
  padding: 7px 11px;
  border-radius: 9px;
}
.navlinks a:hover {
  color: var(--ink);
  background: var(--chip);
  text-decoration: none;
}

/* ----------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 56px 0 28px;
}

.hero .id { order: 0; }
.hero .photo { order: 1; }

.photo img {
  width: 168px;
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: block;
}

h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  font-weight: 700;
}

.role {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 600;
  font-size: 16.5px;
}
.role .org { color: var(--muted); font-weight: 500; }

.about p { margin: 0 0 12px; color: #33312c; max-width: 62ch; }

.quicklinks { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------------- section shell */
section { padding: 34px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: 22px;
  margin: 0 0 18px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2 .tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- lists */
.socials { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--chip);
  color: var(--chip-ink);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14.5px;
}
.chip:hover { background: var(--accent-soft); color: var(--accent); border-color: #d5dcf6; text-decoration: none; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

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

/* ------------------------------------------------------------- education */
.row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.row:last-child { border-bottom: none; }
.row .when { color: var(--muted); font-size: 15px; }
.row .what .t { font-weight: 600; }
.row .what .s { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ news */
.news { list-style: none; margin: 0; padding: 0; }
.news li {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.news li:last-child { border-bottom: none; }
.news .date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.news .body { margin: 0; }
.news .title { font-weight: 650; margin-bottom: 3px; }

/* ----------------------------------------------------------- publications */
.pub-year {
  margin: 26px 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.entry {
  padding: 14px 2px;
  border-bottom: 1px dashed var(--line);
}
.entry:last-child { border-bottom: none; }

.entry .title {
  font-size: 16.5px;
  font-weight: 620;
  line-height: 1.4;
}
.entry .title:hover { color: var(--accent); text-decoration: none; }

.entry .meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14.5px;
}
.entry .authors {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 2px;
}
.entry .authors em { color: var(--ink); font-style: normal; font-weight: 600; }
.entry .authors em a { color: var(--ink); }

.entry .badges { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #dbe1fb;
  padding: 4px 10px;
  border-radius: 8px;
}
.badge .i { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; opacity: 0.9; }

.note-star {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #9a6b00;
  background: #fff6df;
  border: 1px solid #f0dfa6;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

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

/* ---------------------------------------------------------------- awards */
.awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.award {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.award .year { color: var(--accent); font-weight: 700; font-size: 15px; }
.award .name { font-weight: 600; margin-top: 4px; }

/* -------------------------------------------------------------- thesis */
.thesis {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.thesis .t { font-size: 17px; font-weight: 640; margin-bottom: 6px; }
.thesis .d { color: var(--muted); font-size: 15px; }
.thesis .d b { color: var(--ink); font-weight: 600; }
.thesis .actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------- contact */
.contact .lede { color: var(--muted); margin: 0 0 14px; max-width: 60ch; }

/* --------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--chip); }
.btn .i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---------------------------------------------------------------- filter */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.toolbar .count { color: var(--muted); font-size: 14px; }
.search {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  margin-left: auto;
}
.search input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  background: var(--surface);
  color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hidden { display: none !important; }

/* --------------------------------------------------------- thumbnails */
.entry.has-img,
.thesis.has-img {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.entry-body { flex: 1; min-width: 0; }
.thumb {
  flex: 0 0 auto;
  display: block;
  width: 120px;
  line-height: 0;
}
.thumb img {
  width: 120px;
  height: 160px;
  object-fit: contain;
  object-position: center;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.thumb:hover img,
a.thumb:focus-visible img {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px rgba(28, 27, 24, .14);
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 34px; }
  .photo { order: 0; }
  .photo img { width: 128px; height: 150px; }
  h1 { font-size: 28px; }
  .navlinks a { padding: 6px 8px; font-size: 13.5px; }
  .news li { grid-template-columns: 92px 1fr; gap: 12px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .entry.has-img, .thesis.has-img { gap: 12px; }
  .thumb { width: 88px; }
  .thumb img { width: 88px; height: 118px; }
}
