/* ==========================================================================
   Carbosensing group @SEU — 站点样式表
   简洁、现代、响应式。变量统一，便于未来维护与换肤。
   ========================================================================== */

:root {
  --color-primary: #3354aa;      /* 主色：链接、强调 */
  --color-text: #333333;          /* 正文 */
  --color-text-light: #666666;    /* 次要文字 */
  --color-bg: #ffffff;            /* 背景 */
  --color-bg-soft: #f7f8fa;       /* 浅色底 */
  --color-border: #e5e7eb;        /* 边框 */
  --color-header: #2c3e50;        /* 标题 */
  --font-serif: Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 920px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--color-header);
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.35em; border-bottom: 2px solid var(--color-border); padding-bottom: 0.3em; }
h3 { font-size: 1.15em; }
h4 { font-size: 1.05em; color: var(--color-primary); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0.8em 0; text-wrap: pretty; }

img { max-width: 100%; height: auto; }

blockquote {
  margin: 1em 0;
  padding: 0.5em 1.2em;
  border-left: 4px solid var(--color-border);
  background: var(--color-bg-soft);
  color: var(--color-text-light);
}

code, pre {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: #f3f3f3;
}
code { padding: 2px 5px; border-radius: 3px; }
pre { padding: 12px; overflow: auto; border-radius: 4px; }

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

/* ---------- 布局 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 页头 ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0 0;
  background: var(--color-bg);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 1.7em;
  font-weight: bold;
  color: #333;
}
.site-header .brand img { width: 40px; height: 40px; border-radius: 4px; }
.site-header .brand a { color: #333; }
.site-header .brand a:hover { text-decoration: none; color: var(--color-primary); }

/* 导航 */
.site-nav { margin-top: 16px; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 8px 18px;
  color: #444;
  font-family: var(--font-sans);
  font-size: 0.95em;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
}
.site-nav a:hover { background: var(--color-bg-soft); text-decoration: none; }
.site-nav a.current {
  color: var(--color-primary);
  border-color: var(--color-border);
  border-bottom-color: #fff;
  background: var(--color-bg);
  font-weight: bold;
}

/* ---------- 主体 ---------- */
.site-main {
  padding: 28px 0 60px;
  min-height: 60vh;
}

/* 两端对齐（中文用 inter-ideograph，英文由浏览器按默认 justify 处理） */
article.justify p,
article.justify blockquote {
  text-align: justify;
  text-justify: inter-ideograph;
  text-wrap: pretty;
}

/* 首页欢迎 */
.hero-img { margin: 0 0 1.2em; text-align: center; }
.hero-img img {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- 成员卡片网格 ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px 12px;
  margin: 1em 0 1.5em;
  align-items: start;
}
.member-card { text-align: center; margin: 0; }
.member-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 6px;
}
.member-card figcaption {
  font-size: 0.9em;
  line-height: 1.35;
  color: var(--color-text);
  white-space: nowrap;
}
.member-card figcaption .note {
  display: block;
  font-size: 0.8em;
  color: var(--color-text-light);
  white-space: normal;
  margin-top: 2px;
}

/* 个人主页头部 */
.person-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 1.5em;
}
.person-header img {
  width: 120px;
  height: auto;
  flex-shrink: 0;
}
.person-header .meta { flex: 1; }
.person-header .meta h1 { margin-top: 0; }

/* ---------- 研究图 ---------- */
.research-figure {
  margin: 1.2em 0;
  text-align: center;
}
.research-figure img {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.research-figure figcaption { color: var(--color-text-light); font-size: 0.9em; margin-top: 6px; }

/* ---------- 团队合影 ---------- */
.photo-gallery figure { margin: 0 0 1.6em; text-align: center; }
.photo-gallery img {
  display: block;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.photo-gallery figcaption { font-weight: bold; margin-bottom: 0.6em; color: var(--color-header); }

/* ---------- 论文列表 ---------- */
.publication {
  padding: 1.5em 0 1.6em;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
}
.publication:last-child { border-bottom: none; }
.publication .pub-no {
  display: block;
  min-width: 2.4em;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-weight: bold;
  color: var(--color-primary);
  margin-right: 0.5em;
}
.publication .pub-body {
  flex: 1;
  min-width: 0;
}
.publication .pub-title { font-weight: bold; color: var(--color-header); }
.publication .pub-authors { color: var(--color-text); }
.publication .pub-journal { }
.publication .pub-meta { color: var(--color-text-light); font-size: 0.92em; margin-top: 0.3em; }
.publication .pub-links a { font-size: 0.9em; margin-right: 12px; }
.publication .pub-toc {
  display: block;
  max-width: 500px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.35em 0 0.15em;
}
.publication blockquote { font-size: 0.95em; margin: 0.5em 0 0.3em; padding: 0.35em 1em; }

/* 年份分隔 */
.pub-year {
  font-family: var(--font-sans);
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  background: var(--color-primary);
  padding: 4px 14px;
  border-radius: 4px;
  display: inline-block;
  margin: 1.5em 0 0.5em;
}

/* ---------- 荣誉/列表 ---------- */
ul.plain { padding-left: 1.4em; }
ul.plain li { margin: 0.3em 0; }

/* ---------- 媒体报道徽章 ---------- */
.media-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0.6em 0;
  font-family: var(--font-sans);
  font-size: 1em;
  line-height: 1.5;
  color: var(--color-text);
  text-decoration: none;
}
.media-badge:hover {
  text-decoration: none;
}
.media-badge .media-logo {
  flex-shrink: 0;
  height: 34px;
  width: 34px;
}
.media-badge .media-text {
  color: var(--color-primary);
}
.media-badge:hover .media-text {
  text-decoration: underline;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0 30px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.88em;
  background: var(--color-bg-soft);
}
.site-footer a { color: var(--color-text-light); }
.site-footer a:hover { color: var(--color-primary); }
.site-footer .beian { margin-top: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .site-header .brand { font-size: 1.3em; }
  .site-nav a { padding: 8px 12px; }
  .person-header { flex-direction: column; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .publication .pub-toc {
    max-width: 100%;
    max-height: 180px;
  }
}

/* 打印优化 */
@media print {
  .site-nav, .site-footer { display: none; }
}
