:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-text: #1a1a1a;
  --color-light: #555;
  --color-link: #1a56a0;
  --color-accent: #b91c2c;
  --color-muted: #37393c;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --max-width: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  overflow-x: auto;
}

nav a {
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

nav a:hover { color: var(--color-link); }

/* ── Main layout ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Profile header ── */
.profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.profile img {
  width: 175px;
  height: 175px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.profile-info .position {
  font-size: 0.975rem;
  color: var(--color-light);
  margin-bottom: 0.5rem;
}

.profile-info .contact {
  font-size: 0.9rem;
  color: var(--color-light);
  margin-bottom: 0.25rem;
}

.profile-info .affiliations {
  margin-top: 0.65rem;
}

.affiliations ul {
  list-style: disc;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.affiliations li { margin-bottom: 0.15rem; }

/* ── Section headings ── */
section { margin-bottom: 2.5rem; }

section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
  color: var(--color-text);
}

section p { margin-bottom: 0.75rem; }

section ul { padding-left: 1.4rem; }
section ul li { margin-bottom: 0.4rem; }

/* ── Links ── */
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Info box (prospective students) ── */
.info-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0 2.5rem;
  font-size: 0.95rem;
}

.info-box > strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.975rem;
}

.info-box > p { margin-bottom: 0.5rem; }

.info-box ul {
  padding-left: 1.2rem;
}

.info-box li { margin-bottom: 0.45rem; }

/* ── Publication tabs ── */
.pub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pub-tab {
  padding: 0.3rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--color-light);
  transition: all 0.15s;
}

.pub-tab:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.pub-tab.active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

/* ── Topic chip row (Option A) ── */
.topic-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.topic-chip-label {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-right: 0.15rem;
  white-space: nowrap;
}

.topic-chip {
  display: inline-block;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.topic-chip:hover { opacity: 0.75; }

.topic-chip.active {
  opacity: 1;
  outline: 2px solid #111;
  outline-offset: 1px;
}

.chip-count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: 700;
  padding: 0 0.35em;
  margin-left: 0.35em;
  line-height: 1.5;
}

/* ── Publications ── */
.pub-disclaimer {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding: 0.7rem 1rem;
  background: var(--color-bg-alt);
  border-radius: 5px;
}

.pub-year-group { margin-bottom: 0.5rem; }

.pub-year {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-light);
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}

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

.pub-entry {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-entry:last-child { border-bottom: none; }

.pub-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.45;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.pub-title-text { flex: 1; }

.pub-title-tags {
  flex-shrink: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.pub-title a { color: var(--color-text); }
.pub-title a:hover { color: var(--color-link); text-decoration: none; }

.pub-authors {
  font-size: 0.9rem;
  color: var(--color-light);
  margin-bottom: 0.3rem;
}

.pub-authors a {
  color: var(--color-light);
  font-weight: 500;
}

.pub-authors a:hover { color: var(--color-link); text-decoration: underline; }

.pub-self { font-weight: 700; color: var(--color-text) !important; }

.pub-meta {
  font-size: 0.875rem;
  line-height: 1.8;
}

.venue-conf { color: var(--color-accent); font-weight: 500; }
.venue-preprint { color: var(--color-muted); }

.pub-award {
  font-weight: 600;
  color: #16a34a;
}

.pub-links { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; vertical-align: middle; }

/* ── Topic badges ── */
.topic-badge {
  display: inline-block;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #111;
  vertical-align: middle;
  cursor: default;
  white-space: nowrap;
}

.topic-safety           { background: #fde8c4; }  /* amber pastel  */
.topic-interpretability { background: #ede9fb; }  /* violet pastel */
.topic-reasoning        { background: #dbeafe; }  /* blue pastel   */
.topic-agents           { background: #ccfbf1; }  /* teal pastel   */
.topic-retrieval        { background: #cffafe; }  /* cyan pastel   */
.topic-evaluation       { background: #dcfce7; }  /* green pastel  */
.topic-ai-for-science   { background: #ecfccb; }  /* lime pastel   */
.topic-multilinguality  { background: #fae8ff; }  /* fuchsia pastel*/
.topic-social-impact    { background: #fee2e2; }  /* red pastel    */
.topic-embodied         { background: #ffedd5; }  /* orange pastel */
.topic-multimodal       { background: #e0e7ff; }  /* indigo pastel */
.topic-long-context     { background: #e0f2fe; }  /* navy pastel   */
.topic-grounding        { background: #fef9c3; }  /* golden pastel */
.topic-training         { background: #fce7f3; }  /* rose pastel   */


.pub-link {
  font-size: 0.72rem;
  padding: 0.05rem 0.3rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-link);
  white-space: nowrap;
  transition: background 0.15s;
}

.pub-link:hover {
  background: #dbeafe;
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .profile { flex-direction: column; gap: 1rem; }
  .profile img { width: 110px; height: 110px; }
  .nav-inner { gap: 1.1rem; }
  main { padding: 1.5rem 1rem 3rem; }
}
