/* ── Reset ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Tokens ───────────────────────────────────────────────────────── */
:root {
  --bg: #faf8f8;
  --text: #232221;
  --muted: #555;
  --accent: #3872e9;
  --accent-hover: #2a5bbf;
  --border: #e0dedd;
  --content-w: 680px;
  --header-w: 780px;
}

/* ── Base ─────────────────────────────────────────────────────────── */
html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ── Typography ───────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  line-height: 1.25;
}

h1 { font-size: 2rem; margin-bottom: 0.4em; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img { max-width: 100%; display: block; }

/* ── Page header ──────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.15em;
}

.page-header h1 a {
  color: var(--text);
  text-decoration: none;
}

.page-header h1 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.section-title {
  margin-bottom: 24px;
}

/* ── Main ─────────────────────────────────────────────────────────── */
main {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

section + section {
  margin-top: 32px;
}

/* ── Intro section ────────────────────────────────────────────────── */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.intro .photo {
  width: 150px;
  border-radius: 8px;
}

/* social row */
.social {
  display: flex;
  gap: 18px;
  list-style: none;
  align-items: center;
  padding: 0;
}

.social a {
  color: #2b0080;
  font-size: 1.15rem;
  transition: color 0.15s;
}

.social a:hover {
  color: var(--accent);
  text-decoration: none;
}

.social .ai-google-scholar {
  font-size: 1.15rem;
}

/* ── About section ────────────────────────────────────────────────── */
.about p {
  margin-bottom: 1em;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ── Papers page ──────────────────────────────────────────────────── */
.papers-list {
  padding: 0;
  padding-left: 36px;
}

.papers-list > li {
  padding: 20px 0 20px 8px;
  border-bottom: 1px solid var(--border);
}

.papers-list > li:first-child {
  padding-top: 0;
}

.papers-list > li:last-child {
  border-bottom: none;
}

.papers-list > li::marker {
  font-size: 0.88rem;
  color: var(--muted);
}

.papers-list b {
  font-weight: 425;
}

.paper-title {
  font-weight: 400;
}

.papers-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  padding-bottom: 0.5px;
}

.papers-list a:hover {
  color: var(--accent);
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
}

.paper-venue {
  font-style: italic;
}

.venue-link {
  border-bottom: none !important;
}

.venue-link:hover {
  border-bottom: 1px solid var(--accent) !important;
}

.paper-links {
  margin-top: 4px;
  font-size: 0.88rem;
}

.paper-links a {
  margin-right: 10px;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  section + section {
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  html { font-size: 16px; }

  .page-header h1 { font-size: 1.8rem; }

  .intro .photo {
    width: 120px;
    height: 120px;
  }

  main {
    padding: 32px 20px 60px;
  }

  section + section {
    margin-top: 40px;
  }

  .papers-list {
    padding-left: 28px;
  }
}
