:root {
  --accent: #4682B4;          /* links */
  --text: #2c2c2c;            /* main body text */
  --text-muted: #8a8a8a;      /* author lists, captions */
  --heading: #1f1f1f;         /* headings */
  --bg: #ffffff;              /* intro background */
  --bg-alt: #f7f7f7;          /* publications background */
  --card-bg: #ffffff;
  --border: #e6e6e6;
  --pill-border: #d8d4e0;

  --font-body: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
}

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

/* ---------------- Intro ---------------- */
.intro {
  background: var(--bg);
  padding: 64px 24px 56px;
}

.intro-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  gap: 56px;
  align-items: flex-start;
  justify-content: center;
}

.intro-photo {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.intro-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
  display: block;
}

.intro-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #555;
}

.intro-links a {
  color: #4682B4;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}
.intro-links a:hover { color: var(--accent); text-decoration: none; }

.cv-link {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.intro-text { flex: 1 1 auto; max-width: 570px; padding-top: 6px; }

.intro-text h1 {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.intro-text p { margin: 0; font-size: 14px; color: var(--text); }
.intro-text strong { color: var(--heading); font-weight: 700; }
.intro-text a { color: var(--accent); font-weight: 700; }

/* ---------------- Publications ---------------- */
.publications {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 24px 72px;
}

.pub-inner { max-width: 800px; margin: 0 auto; }

.publications h2 {
  margin: 0 0 36px;
  font-size: 26px;
  font-weight: 700;
  color: var(--heading);
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.topic-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

.topic-pill {
  font-family: inherit;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--card-bg);
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
}
.topic-pill:hover { border-color: var(--accent); color: var(--accent); }

.topic-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }

.pub-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 26px;
}

.pub-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
}

.pub-authors {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.pub-authors strong { color: var(--text); font-weight: 700; }

.pub-venue {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pub-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: transparent;
  transition: all 0.15s ease;
}
.pub-btn:hover { background: var(--accent); color: #fff; text-decoration: none; }

.pub-card.is-hidden { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .intro { padding: 44px 22px 40px; }
  .intro-inner { flex-direction: column; align-items: center; text-align: center; gap: 28px; }
  .intro-text { text-align: left; max-width: 100%; }
  .intro-text h1 { font-size: 32px; text-align: center; }
  .pub-card { padding: 18px 20px; }
}

/* Accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------- Expandable publication panels (Abstract / BibTeX) ---------------- */
.pub-panel {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
}
.pub-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: #f0f0f0;
  border-bottom: 1px solid var(--border);
}
.pub-panel-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.pub-copy {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.pub-copy:hover { text-decoration: underline; }
.pub-panel-body {
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
}
/* BibTeX (monospace) variant — preserves whitespace/indentation */
.pub-panel.is-mono .pub-panel-body {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre;
  overflow-x: auto;
}
