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

:root {
  --bg-desk: #e9e9e9;
  --bg-paper: #fafafa;
  --text: #212121;
  --text-light: #666;
  --text-muted: #999;
  --heading: #000;
  --border: #e0e0e0;
  --border-dark: #ccc;
  --accent: #212121;
  --tag-bg: #f0f0f0;
  --tag-border: #d5d5d5;
}

body {
  background: var(--bg-desk);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === Paper Container === */
.paper {
  background: var(--bg-paper);
  max-width: 960px;
  margin: 2rem auto;
  padding: 3.5rem 4rem 3rem;
  border: 1px solid #dbdbdb;
  box-shadow: 0 4px 8px rgba(0,0,0,.04), 0 10px 20px rgba(0,0,0,.08);
}

/* === Top Actions === */
.top-actions {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
}

.top-actions a {
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.top-actions a:hover {
  color: var(--heading);
  border-bottom-color: var(--heading);
}

.top-actions .sep {
  color: var(--border);
}

/* === Hero === */
.hero {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 2px;
  margin-bottom: 0.2rem;
}

.hero .name-en {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.hero .headline {
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 3px;
}

/* === Profile === */
.profile {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.85;
}

/* === Section Headings === */
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.45rem;
  margin-bottom: 1.3rem;
}

section + section {
  margin-top: 2.5rem;
}

/* === Info Grid (two-column) === */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem 3rem;
}

.info-block-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.info-block-value {
  font-size: 0.95rem;
  color: var(--text);
}

.info-block-value a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color .2s;
}

.info-block-value a:hover {
  border-bottom-color: var(--heading);
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--border-dark);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.timeline-org {
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
}

.timeline-role {
  font-size: 0.9rem;
  color: var(--text-light);
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-details {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
}

.timeline-details ul {
  list-style: none;
  padding: 0;
}

.timeline-details li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.3rem;
}

.timeline-details li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--border-dark);
}

/* === Projects === */
.project-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.project-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

.project-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.project-meta .badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--tag-border);
  border-radius: 2px;
  background: var(--tag-bg);
  color: var(--text-light);
  margin-left: 0.4rem;
  vertical-align: middle;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* === Skills Tags === */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--tag-border);
  border-radius: 2px;
  background: var(--tag-bg);
  color: var(--text);
}

/* === Publications === */
.pub-list {
  list-style: none;
  padding: 0;
  counter-reset: pub;
}

.pub-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-light);
}

.pub-list li::before {
  counter-increment: pub;
  content: counter(pub) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--text-muted);
}

.pub-list em {
  font-style: italic;
}

.review-summary {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.review-summary strong {
  color: var(--text);
}

/* === Contact Footer === */
.contact-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-dark);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-footer a {
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color .2s, color .2s;
}

.contact-footer a:hover {
  color: var(--heading);
  border-bottom-color: var(--heading);
}

.contact-footer .contact-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

/* === Print === */
@media print {
  body { background: #fff; }
  .paper { box-shadow: none; border: none; margin: 0; padding: 1.5rem; max-width: 100%; }
  .top-actions { display: none; }
}

/* === Responsive === */
@media (max-width: 720px) {
  .paper {
    margin: 0;
    padding: 2rem 1.5rem 1.5rem;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .top-actions {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .hero h1 { font-size: 1.8rem; }
  .hero .headline { font-size: 0.9rem; letter-spacing: 2px; }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.15rem;
  }

  .skills-list { gap: 0.4rem; }
  .skill-tag { font-size: 0.8rem; padding: 0.25rem 0.7rem; }
}
