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

:root {
  --text: #333;
  --text-secondary: #555;
  --text-muted: #888;
  --link: #0366d6;
  --link-hover: #0550ae;
  --bg: #fff;
  --bg-code: #f6f8fa;
  --border: #e1e4e8;
  --accent: #b31b1b;
  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-size: 17px;
  --content-width: 1020px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: 0.25s ease;
}

/* ===== Content ===== */
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px 60px;
}

/* ===== Profile ===== */
.profile {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.profile-photo {
  flex-shrink: 0;
  width: 200px;
  text-align: center;
}

.profile-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.profile-contact {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.profile-contact a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color 0.2s;
  text-decoration: none;
}

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

.profile-text {
  flex: 1;
  min-width: 0;
}

.profile-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  line-height: 1.3;
}

.name-zh {
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--text-muted);
}

.profile-position {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.profile-affiliation {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.profile-text p {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.profile-email {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.profile-email i {
  color: var(--text-muted);
  margin-right: 4px;
}

/* ===== Section titles ===== */
section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
  display: inline-block;
}

section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
}

/* ===== News ===== */
.news-list table {
  width: 100%;
  border-collapse: collapse;
}

.news-list td {
  padding: 6px 0;
  vertical-align: top;
  font-size: 0.95rem;
  line-height: 1.6;
}

.news-date {
  width: 110px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  padding-right: 16px;
}

/* ===== Publications ===== */
.pub-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

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

.pub-item {
  margin-bottom: 24px;
}

.pub-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.pub-img {
  flex-shrink: 0;
  width: 160px;
  height: 110px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-code);
}

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

.pub-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.65;
}

.pub-title {
  font-weight: 600;
  color: var(--text);
}

.pub-text em {
  color: var(--text-secondary);
}

.pub-text a {
  margin-right: 6px;
  font-size: 0.88rem;
}

.badge-ccf {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
  font-style: normal;
}

.patent-list {
  padding-left: 20px;
  font-size: 0.93rem;
  line-height: 1.8;
}

.patent-list li {
  margin-bottom: 6px;
}

/* ===== Experience & Education ===== */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 20px;
}

/* 时间轴竖线 */
.exp-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}

.exp-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px 24px;
  border-radius: 8px;
  position: relative;
  transition: background 0.2s;
}

.exp-item:hover {
  background: var(--bg-code);
}

/* 时间轴圆点 */
.exp-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--border);
  z-index: 1;
  transition: border-color 0.2s, background 0.2s;
}

.exp-item:first-child::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(179, 27, 27, 0.12);
}

.exp-item:hover::before {
  border-color: var(--link);
}

.exp-left {
  flex-shrink: 0;
  width: 160px;
  padding-top: 2px;
}

.exp-date {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg-code);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.exp-logo-wrap {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-logo {
  width: 80%;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.25s;
}

.exp-item:hover .exp-logo {
  opacity: 1;
}

.exp-right {
  flex: 1;
  font-size: 1rem;
  line-height: 1.75;
}

.exp-right strong a {
  font-size: 1.08rem;
}

.exp-role {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}

.exp-right ul {
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
}

.exp-right li {
  margin-bottom: 5px;
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}

.exp-right li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--link);
  opacity: 0.6;
}

.badge-star {
  display: inline-block;
  background: linear-gradient(135deg, #fef3cd, #fff3cd);
  color: #856404;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  vertical-align: middle;
  border: 1px solid #ffeeba;
}

/* ===== Awards ===== */
.awards-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.awards-table td {
  padding: 5px 0;
  font-size: 0.93rem;
  vertical-align: top;
  line-height: 1.6;
}

.awards-table td:first-child {
  width: 60px;
  color: var(--text-muted);
  font-weight: 500;
}

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

.service-list li {
  font-size: 0.93rem;
  line-height: 1.8;
}

/* ===== Footer ===== */
.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 10px 24px;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 160px;
  }

  .profile-photo img,
  .photo-placeholder {
    width: 160px;
    height: 160px;
  }

  .profile-text h1 {
    font-size: 1.5rem;
  }

  .pub-row {
    flex-direction: column;
  }

  .pub-img {
    width: 100%;
    height: 140px;
  }

  .exp-list {
    padding-left: 0;
  }

  .exp-list::before {
    display: none;
  }

  .exp-item {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }

  .exp-item::before {
    display: none;
  }

  .exp-left {
    width: auto;
  }

  .exp-logo-wrap {
    display: none;
  }

  .content {
    padding: 32px 16px 48px;
  }
}
