:root {
  --bg: #fbfaf7;
  --text: #1f2328;
  --muted: #5d636b;
  --accent: #0b3d91;      /* change this one color to re-theme the site */
  --accent-soft: #e8eef9;
  --line: #e3e1db;
  --card: #ffffff;
  --todo-bg: #fff3c4;
  --todo-text: #7a5a00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --text: #e6e6e3;
    --muted: #a0a4aa;
    --accent: #8fb3ff;
    --accent-soft: #1f2a40;
    --line: #2c3036;
    --card: #1c1f23;
    --todo-bg: #3d3310;
    --todo-text: #f3d77a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Source Serif 4", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.topnav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: Inter, system-ui, sans-serif; font-size: 14px;
}
.topnav .wrap { display: flex; justify-content: space-between; align-items: center; height: 54px; gap: 16px; }
.brand { font-weight: 600; color: var(--text); }
.navlinks { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; }
.navlinks a { color: var(--muted); }
.navlinks a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero { display: flex; gap: 28px; align-items: center; padding: 56px 0 28px; }
.avatar { flex: 0 0 140px; height: 140px; border-radius: 50%; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.initials {
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font: 600 44px Inter, sans-serif; letter-spacing: 1px;
}
h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 600; }
.subtitle { margin: 6px 0 0; font-size: 20px; }
.affil { margin: 2px 0 10px; color: var(--muted); }
.contact { margin: 0; font-family: Inter, sans-serif; font-size: 14px; }
.sep { color: var(--line); margin: 0 8px; }

.announcement {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 12px 16px; border-radius: 4px; margin-bottom: 8px;
}

/* Sections */
section { padding: 20px 0 8px; }
h2 {
  font: 600 13px Inter, sans-serif; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin: 28px 0 18px;
}
h3 { font-size: 19px; font-weight: 600; margin: 28px 0 10px; }
.interests { color: var(--muted); }
.interests strong { color: var(--text); font-weight: 600; }

/* Papers */
.papers { list-style: none; padding: 0; margin: 0; }
.papers > li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.papers > li:last-child { border-bottom: 0; }
.title { font-weight: 600; font-size: 18px; line-height: 1.4; }
.meta { color: var(--muted); font-size: 15.5px; }
.status { font-style: italic; font-size: 15.5px; }
.links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.btn {
  font: 500 12px Inter, sans-serif; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer;
}
.btn:hover, .btn[aria-expanded="true"] { background: var(--accent); color: var(--bg); text-decoration: none; }
.abstract { margin-top: 10px; font-size: 15.5px; color: var(--text); padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }

.jmp {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 16px 20px; margin-bottom: 8px;
}
.tag { font: 600 11px Inter, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 4px; }

/* Lists */
.timeline { display: grid; grid-template-columns: 64px 1fr; gap: 6px 16px; margin: 0; }
.timeline dt { font: 600 15px Inter, sans-serif; color: var(--muted); padding-top: 2px; }
.timeline dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain > li { margin-bottom: 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.years { color: var(--muted); font: 14px Inter, sans-serif; white-space: nowrap; }
.details { margin: 4px 0 0; padding-left: 20px; font-size: 15.5px; color: var(--muted); }
.refs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.todo { background: var(--todo-bg); color: var(--todo-text); padding: 1px 4px; border-radius: 3px; border: 1px dashed currentColor; }

footer { border-top: 1px solid var(--line); margin: 48px 0 0; padding: 20px 0 40px; color: var(--muted); font: 13px Inter, sans-serif; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 32px; }
  .avatar { flex-basis: 96px; width: 96px; height: 96px; }
  .avatar.initials { font-size: 32px; }
  h1 { font-size: 32px; }
  .navlinks { gap: 12px; }
  .navlinks a:not(#nav-cv) { display: none; }
}
