/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* 正体 Regular：使用本地 woff2，避免 Google 外链加载失败导致正文不是 Lato */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(assets/fonts/Lato-Regular.woff2) format('woff2');
}
/* 正体 Bold */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(assets/fonts/Lato-Bold.woff2) format('woff2');
}


/* ========== 基础布局（参考 Song Wang / 学术个人主页模板） ========== */
html {
  background-color: #fff;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}

body {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  color: #222;
  margin: 50px auto;
  padding: 0 80px 60px;
  max-width: 900px;
  background-color: #fff;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 整页统一使用 Lato，避免被其他字体或继承覆盖 */
.main-container {
  width: 100%;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}
.main-container * {
  font-family: inherit;
}

.page-title {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 0.5em;
  border: none;
  padding: 0;
}

/* ========== 顶部区域：左侧信息 + 右侧头像（纵向与文字对齐） ========== */
.top-section {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 纵向上照片与文字块居中对齐 */
  flex-wrap: wrap;
    gap: 2.5rem;
  margin-bottom: 0.5rem;
}

.profile-info {
  flex: 1;
  min-width: 0;
  max-width: 560px;
  text-align: left;
}

.intro-contact {
  margin: 0 0 0.75em 0;
  font-size: 16px;
}

.intro-contact a {
  color: #2244aa;
  text-decoration: none;
}

.intro-contact a:hover {
  text-decoration: underline;
}

.profile-avatar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-links-below-avatar {
  margin-top: 1.25rem;
  text-align: center;
}

.contact-line-below-avatar {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: normal;
  color: #222;
}

.contact-line-below-avatar a {
  color: #2244aa;
  text-decoration: none;
}

.contact-line-below-avatar a:hover {
  text-decoration: underline;
}

.contact-line-below-avatar:last-child {
  margin-bottom: 0;
}

/* 大标题：姓名 */
.name {
  margin: 0 0 0.25em 0;
  padding-bottom: 0;
  border-bottom: none;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  line-height: 1.2;
}

/* 简介段落 */
.intro {
  margin: 0 0 0.5em 0;
}

.intro p {
  margin: 0 0 0.7em 0;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.6;
  color: #222;
}

.intro p:last-child {
  margin-bottom: 0;
}

.intro a {
  color: #2244aa;
  text-decoration: none;
}

.intro a:hover {
  text-decoration: underline;
}

/* 段落内文字背景高亮（浅紫/粉，文字保持黑色） */
.text-highlight {
  background: rgba(200, 180, 220, 0.45);
  padding: 0.08em 0.2em;
  border-radius: 2px;
}

/* 开源项目 */
.opensource-heading {
  margin: 0.65em 0 0.3em 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #111;
}

.opensource-list {
  margin: 0 0 0.4em 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.opensource-list a {
  color: #2244aa;
  text-decoration: none;
}

.opensource-list a:hover {
  text-decoration: underline;
}

.star-badge {
  display: inline-block;
  margin-left: 0.2em;
  margin-right: 0.75em;
  padding: 0.1em 0.4em;
  font-size: 0.8rem;
  color: #555;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* 联系方式：单行，斜杠分隔 */
.contact-line {
  margin: 0.45em 0 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #333;
}

.contact-line a {
  color: #2244aa;
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

.profile-pic {
  width: 220px;
  height: 220px;
  border-radius: 0;
  object-fit: cover;
  object-position: center 22%;
  box-shadow: none;
  transition: none;
  display: block;
  border: none;
}

.profile-pic:hover {
  transform: none;
}

.profile-pic-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #999;
}

/* ========== News：标题 + 项目符号列表 ========== */
.news-section {
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

.news-heading {
  margin: 0 0 0.5em 0;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 1.35rem;
  font-weight: bold;
  color: #222;
}

.news-list {
  margin: 0;
  padding-left: 1.4em;
  list-style: disc;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.6;
  color: #222;
}

.news-list li {
  margin-bottom: 0.35em;
}

.news-list a {
  color: #2244aa;
  text-decoration: underline;
}

.news-list a:hover {
  color: #1630a0;
}

.news-highlight {
  color: #c00;
  font-weight: 400;
}

/* ========== 标题（模板风格：无下划线、加粗） ========== */
h1, h2 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-weight: bold;
  color: #222;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 2rem;
  margin-bottom: 0.6em;
  font-size: 1.35rem;
}

h2 {
  font-size: 1.35rem;
}

/* ========== 段落与列表 ========== */
p {
  margin: 0.4em 0 0.6em 0;
  font-size: 16px;
  line-height: 1.6;
}

ul {
  padding-left: 1.4em;
  margin: 0.4em 0 0.6em 0;
}

.pub-legend {
  margin: -0.2em 0 0.6em 0;
  font-size: 0.85rem;
  color: #666;
}

ul.pub-list {
  list-style: none;
  padding-left: 0;
}

li {
  margin: 0.3em 0;
  line-height: 1.6;
}

a {
  color: #2244aa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========== 出版物条目（带图，模板风格：简洁无框） ========== */
.publication-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.publication-entry img {
  width: min(220px, 26vw);
  min-width: 120px;
  height: auto;
  aspect-ratio: 220 / 125;
  border-radius: 6px;
  object-fit: fill; /* 按框的宽高填满，不留白 */
  flex-shrink: 0;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  margin: 0 0 0.3em 0;
  line-height: 1.4;
}

.pub-authors {
  font-size: 15px;
  color: #222;
  line-height: 1.55;
  margin: 0 0 0.35em 0;
}

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

.pub-links {
  font-size: 15px;
  color: #2244aa;
  margin: 0;
}

.pub-links a {
  color: #2244aa;
  text-decoration: none;
}

.pub-links a:hover {
  text-decoration: underline;
}

.pub-links .pub-meta {
  font-size: 0.85em;
}

/* ========== 页脚 ========== */
#footer {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 3rem;
  border-top: none;
  color: #666;
  font-size: 14px;
  text-align: center;
}

#footer a {
  color: #2244aa;
}

#footer-template-credit {
  margin-top: 0.5rem;
  font-size: 12px;
  color: #999;
}

#footer-template-credit a {
  color: #2244aa;
}

/* ========== 访问量地图 (MapMyVisitors) ========== */
#pageviews-map-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  margin-bottom: 0;
  text-align: center;
}

.pageviews-map-label {
  margin: 0 0 0.6rem 0;
  font-size: 13px;
  color: #999;
  letter-spacing: 0.02em;
}

#pageviews-map-section .pageviews-map-link {
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#pageviews-map-section .pageviews-map-link:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

#pageviews-map-section img {
  display: block;
  max-width: 220px;
  height: auto;
  border: none;
  border-radius: 10px;
  vertical-align: middle;
}

/* 页脚与地图区间隔 */
#footer {
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

/* ========== 移动端 ========== */
@media (max-width: 768px) {
  body {
    padding: 28px 24px 36px;
  }

  .top-section {
    flex-direction: column;
  }

  .profile-info {
    text-align: left;
    max-width: none;
  }

  .profile-avatar {
    margin: 0 auto;
  }

  .profile-pic,
  .profile-pic-placeholder {
    width: 180px;
    height: 180px;
  }


  .publication-entry {
    flex-direction: column;
  }

  .publication-entry img {
    width: 100%;
    min-width: unset;
    height: auto;
    max-height: 200px;
  }
}

/* ========== 微信二维码弹窗 ========== */
.wechat-qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.wechat-qr-modal.is-open {
  display: flex;
}

.wechat-qr-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.wechat-qr-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 90vw;
}

.wechat-qr-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
}

.wechat-qr-modal-close:hover {
  color: #111;
}

.wechat-qr-modal-content img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.wechat-qr-modal-caption {
  margin: 0.75rem 0 0 0;
  font-size: 0.9rem;
  color: #666;
}
