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

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17.5px;
  line-height: 1.7;
  color: #333;
  background: #fafafa;
}

a {
  color: #4a6fa5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* ── SECTIONS ─────────────────────────────────────────── */

section {
  margin-bottom: 1.75rem;
}

h1 {
  font-size: 1.9rem;
  font-weight: normal;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  text-align: center;
}

h2 {
  font-size: 0.92rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a6fa5;
  border-bottom: 1px solid #e4e4e4;
  padding-bottom: 0.5rem;
  margin-bottom: 1.1rem;
}

/* ── RESEARCH ─────────────────────────────────────────── */

#research ul {
  padding-left: 2rem;
  margin-top: 0.5rem;
}

#research ul li {
  margin-bottom: 0.5rem;
}

/* ── ABOUT ────────────────────────────────────────────── */

.about-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.profile-photo {
  width: 230px;
  height: 290px;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 4px;
  flex-shrink: 0;
}

.bio {
  margin-top: 0.6rem;
  margin-bottom: 1.1rem;
}

/* ── ICON LINKS ───────────────────────────────────────── */

.icon-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4a6fa5;
  text-decoration: none;
  font-size: 0.92rem;
}

.icon-link:hover {
  text-decoration: underline;
}

/* ── NEWS ─────────────────────────────────────────────── */

.news-list {
  list-style: disc;
  padding-left: 1.25rem;
}

.news-list li {
  padding: 0.15rem 0;
}

.news-extra {
  display: none;
}

.news-date {
  color: #4a6fa5;
  font-style: italic;
  margin-right: 0.3rem;
}

/* ── PUBLICATIONS ─────────────────────────────────────── */

.pub-toggle {
  display: inline-flex;
  margin-bottom: 0.75rem;
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.3rem;
}

.topic-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #999;
  cursor: pointer;
  font-family: Georgia, serif;
}

.topic-btn.active[data-topic=""]       { background: #333;    color: #fff;    border-color: #333; }
.topic-btn-rl.active                   { background: #e8f4ee; color: #3a7a52; border-color: #b8d9c5; }
.topic-btn-tc.active                   { background: #ede8f4; color: #6a4fa0; border-color: #c8b8e8; }
.topic-btn-mot.active                  { background: #f4ede8; color: #a06030; border-color: #e0c8b0; }
.topic-btn-misc.active                 { background: #ebebeb; color: #555;    border-color: #ccc; }

.pub-btn {
  background: none;
  border: 1px solid #ccc;
  color: #555;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 0.88rem;
  padding: 0.35rem 0.9rem;
  line-height: 1.4;
}

.pub-btn:first-child {
  border-radius: 3px 0 0 3px;
}

.pub-btn:last-child {
  border-radius: 0 3px 3px 0;
}

.pub-btn + .pub-btn {
  border-left: none;
}

.topic-group-heading {
  margin: 1.4rem 0 0.6rem;
}

.pub-btn.active {
  background: #4a6fa5;
  border-color: #4a6fa5;
  color: #fff;
}

.pub-btn:not(.active):hover {
  background: #f0f0f0;
}

.paper {
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
}

.paper:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.paper-extra {
  display: none;
}

.paper-title {
  margin-bottom: 0.15rem;
}

.paper-title a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: bold;
}

.paper-title a:hover {
  color: #4a6fa5;
}

.paper-authors {
  color: #555;
  font-size: 0.93rem;
  margin-bottom: 0.1rem;
}

.paper-venue {
  color: #888;
  font-size: 0.88rem;
  font-style: italic;
}

.topic-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-style: normal;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  margin-left: 0.4rem;
}

#research .topic-tag {
  font-size: 0.85rem;
  margin-left: 0;
  margin-bottom: 0.2rem;
}

#topic-list .topic-group-heading .topic-tag {
  font-size: 1rem;
  padding: 0.2rem 0.65rem;
  margin-left: 0;
}

.topic-rl   { background: #e8f4ee; color: #3a7a52; }
.topic-tc   { background: #ede8f4; color: #6a4fa0; }
.topic-mot  { background: #f4ede8; color: #a06030; }
.topic-misc { background: #ebebeb; color: #555; }

.pub-year {
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: #aaa;
  border-top: 1px solid #e4e4e4;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0.4rem;
}

.paper-badge {
  font-size: 0.78rem;
  font-style: normal;
  color: #fff;
  background: #b03030;
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.pub-section {
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin: 1.8rem 0 0.8rem;
}

.pub-note {
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
  margin-top: 0.75rem;
}

/* ── SHARED BUTTON STYLE ──────────────────────────────── */

.text-btn {
  background: none;
  border: none;
  color: #4a6fa5;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 0.88rem;
  padding: 0.5rem 0;
  display: block;
  margin-top: 0.25rem;
}

.text-btn:hover {
  text-decoration: underline;
}

/* ── MOBILE ───────────────────────────────────────────── */

@media (max-width: 540px) {
  .container {
    padding: 2rem 1.25rem 3rem;
  }

  .about-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .profile-photo {
    width: 110px;
    height: auto;
  }

  h1 {
    font-size: 1.6rem;
  }

  .icon-links {
    gap: 1rem;
  }
}
