:root {
  --bg-color: #fff;
  --text-color: #2d3748;
  --text-secondary: #4a5568;
  --accent-color: #4a74b9;
  --accent-hover: #3a5c9e;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0,0,0,0.05);
}

body {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  line-height: 1.65;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: 300;
}

header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-content { flex: 1; }

.header-image img {
  width: 138px;
  height: 138px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

h1 {
  font-size: 2.25rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 1.8rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.affiliation-line {
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.social-links-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.social-links-header a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
}

.social-links-header a:hover {
  color: var(--accent-color);
  background-color: rgba(74,116,185,0.08);
}

.social-links-header a i { margin-right: 0.4rem; }

section {
  margin-bottom: 2rem;
  width: 100%;
}

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

a:hover { color: var(--accent-hover); }

strong {
  font-weight: 600;
  color: var(--accent-color);
}

em { color: var(--text-secondary); }
ul { padding-left: 1.25rem; }
p { margin: 0.5rem 0 0.8rem; }

.publications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.publications-header h2 {
  flex: 1;
  margin-right: 1rem;
}

.toggle-publications {
  background-color: rgba(74,116,185,0.08);
  color: var(--accent-color);
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
}

.toggle-publications:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.publication-item {
  margin-bottom: 1.35rem;
  padding: 0.65rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 1.25rem;
}

.pub-thumbnail {
  width: 125px;
  height: 125px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  overflow: hidden;
  border-radius: 6px;
  background: #f8fafc;
}

.pub-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-content { flex: 1; }
.pub-title { font-weight: 500; margin-bottom: 0.4rem; font-size: 1.05rem; line-height: 1.45; }
.pub-authors { font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text-secondary); line-height: 1.5; }
.highlight-name { font-weight: 600; color: var(--accent-color); }
.pub-venue { font-size: 0.9rem; font-style: italic; color: var(--text-secondary); margin-bottom: 0.5rem; }
.pub-links, .inline-links { font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pub-links a, .inline-links a { padding: 0.2rem 0.5rem; border-radius: 4px; background: rgba(74,116,185,0.08); }

.project-item {
  padding-bottom: 0.5rem;
}

.project-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

.timeline-item {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.timeline-date {
  color: var(--accent-color);
  font-weight: 500;
  font-size: 0.92rem;
}

.compact-list {
  margin: 0.55rem 0 0;
}

.compact-list li {
  margin-bottom: 0.35rem;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show { opacity: 1; }
.modal-content { margin: auto; display: block; max-width: 85%; max-height: 85%; }
.modal-close { position: absolute; top: 15px; right: 35px; color: #fff; font-size: 35px; cursor: pointer; }

@media (max-width: 768px) {
  body { padding: 1.1rem; }
  header { flex-direction: column-reverse; text-align: center; gap: 1rem; }
  .social-links-header { justify-content: center; }
  .publication-item { flex-direction: column; }
  .pub-thumbnail { width: 100%; height: 180px; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .publications-header { align-items: flex-end; }
  h1 { font-size: 2rem; }
}
