:root {
  --accent: #1772d0;
  --accent-dark: #115a9e;
  --heading: #000000;
  --text: #2d3748;
  --text-light: #4a5568;
  --muted: #718096;
  --border: #e2e8f0;
  --card-bg: #f8fafc;
  --bg: #ffffff;
  --nav-height: 60px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

p {
  margin: 0 0 1em;
}

/* Top navigation */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--card-bg);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
}

/* Layout */

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  margin-top: -40px;
  padding-bottom: 100px;
}

.sidebar .portrait {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  margin: 0 auto 18px;
  border: 1px solid var(--border);
}

.sidebar h1 {
  margin: 0 0 6px;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar .role {
  margin: 0 0 2px;
  font-size: 1rem;
  color: var(--text-light);
}

.sidebar .affiliation {
  margin: 0 0 2px;
  font-size: 0.95rem;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #000000;
  transition: background 0.15s ease, color 0.15s ease;
}

.profile-links a:hover {
  background: #000000;
  color: #fff;
  text-decoration: none;
}

/* Main content */

.content {
  max-width: 820px;
}

.content section {
  margin-bottom: 48px;
}

.content section:last-of-type {
  margin-bottom: 0;
}

.content h2 {
  margin: 0 0 18px;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

section[id] {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.bio p {
  font-size: 14px;
  text-align: justify;
}

/* News */

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
}

.news-list {
  margin: 0;
  padding: 0 8px 0 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.news-list li {
  display: flex;
  gap: 8px;
  padding: 2px 0;
  font-size: 11px;
}

.news-list li::before {
  content: "\2022";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
}

.news-date {
  flex-shrink: 0;
  width: 58px;
  font-weight: 600;
  color: var(--accent);
  text-align: left;
}

/* Research */

.research-item {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.research-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.research-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.research-summary {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.research-details {
  font-size: 0.92rem;
}

.research-details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
  list-style: none;
  user-select: none;
}

.research-details summary::-webkit-details-marker {
  display: none;
}

.research-details summary::before {
  content: "+ ";
  font-weight: 700;
}

.research-details[open] summary::before {
  content: "\2212 ";
}

.research-details summary:hover {
  color: var(--accent-dark);
}

.research-body {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.65;
  text-align: justify;
}

/* Publications */

.pub-entry {
  display: flex;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.pub-entry:last-child {
  border-bottom: none;
}

.pub-thumb {
  flex-shrink: 0;
  width: 170px;
}

.pub-thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

.pub-info {
  min-width: 0;
}

.pub-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
  color: var(--text);
}

.pub-title:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.45;
  margin-bottom: 0;
}

.pub-authors b {
  color: var(--text);
}

.pub-venue {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.pub-links {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 2px;
}

.pub-links a {
  white-space: nowrap;
}

/* Education, awards, talks */

.simple-list {
  margin: 0;
  padding-left: 22px;
}

.simple-list li {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.simple-list li:last-child {
  margin-bottom: 0;
}

/* Academic service */

.service h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.service h3:first-of-type {
  margin-top: 0;
}

.service ul {
  margin: 0;
  padding-left: 22px;
}

.service li {
  font-size: 0.95rem;
  line-height: 1.4;
}

.talk-item {
  margin-bottom: 14px;
}

.talk-item h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 600;
}

.talk-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
}

.experience-bullets {
  margin-top: 8px;
  padding-left: 18px;
}

.experience-bullets li {
  font-size: 0.92rem;
  font-style: normal;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

/* Footer */

.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Responsive */

@media (max-width: 992px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: calc(var(--nav-height) + 28px);
  }

  .sidebar {
    position: static;
    height: auto;
    margin: 0 auto;
    max-width: 460px;
    padding-bottom: 0;
  }

  .content {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 24px;
    border-radius: 0;
  }

  .pub-entry {
    flex-direction: column;
    gap: 14px;
  }

  .pub-thumb {
    width: 100%;
    max-width: 260px;
  }

  .sidebar .portrait {
    width: 200px;
    height: 200px;
  }
}
