/* ============================================================
   赵恒松 · 个人学术主页
   极简 · 纯白 · 滑动式 · 科研风格
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --text: #1a1a1a;
  --text-soft: #444444;
  --muted: #6b6b6b;
  --light: #999999;
  --border: #ececec;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  --radius: 14px;
  --nav-h: 60px;
  --max-w: 1100px;
  --sidebar-w: 340px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================== 顶部导航栏 ===================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.topbar.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.topbar-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.topnav {
  display: flex;
  gap: 4px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  position: relative;
  display: inline-block;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.nav-link:active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
}

.nav-link:focus-visible {
  outline: none;
  background: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ===================== 页面布局 ===================== */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 24px 60px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 56px;
  align-items: start;
}

/* ===================== 左侧个人信息卡片 ===================== */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}

.profile-card {
  text-align: center;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #f3f4f6;
  margin: 0 auto 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 3px solid #ffffff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.position {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.affiliation {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  padding: 20px 4px 8px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.5;
  word-break: break-all;
}

.contact-item svg {
  flex-shrink: 0;
  opacity: 0.65;
  width: 16px;
  height: 16px;
}

a.contact-item:hover {
  color: var(--accent);
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}

.rtag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.2s;
}

.rtag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===================== 主内容区 ===================== */
.content {
  min-width: 0;
}

section {
  margin-bottom: 64px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-soft);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.section-body {
  font-size: 15px;
  color: var(--text-soft);
}

.section-body p {
  margin-bottom: 14px;
}

strong {
  font-weight: 600;
  color: var(--text);
}

em {
  font-style: italic;
}

/* ===================== 子标题 ===================== */
.subsection {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.subsection:first-child {
  margin-top: 0;
}

/* ===================== 教育背景 ===================== */
.entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.entry:last-child {
  border-bottom: none;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.entry-title {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
}

.entry-date {
  font-size: 13px;
  color: var(--light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.entry-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.entry-note {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

/* ===================== 论文列表 ===================== */
ul {
  list-style: none;
  padding: 0;
}

.pub-list li {
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 10px;
  transition: background 0.2s;
  font-size: 14.5px;
  line-height: 1.75;
}

.pub-list li:hover {
  background: var(--bg-soft);
}

.pub-list.working li {
  font-size: 14px;
  color: var(--muted);
}

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

.pub-authors {
  color: var(--text-soft);
}

.pub-journal {
  font-style: italic;
  color: var(--muted);
}

/* 标签 */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: 2%;
  white-space: nowrap;
}

.tag-top {
  background: #fef3c7;
  color: #92400e;
}

.tag-esi {
  background: #ede9fe;
  color: #5b21b6;
}

.tag-cssci {
  background: #dbeafe;
  color: #1e40af;
}

.tag-sci {
  background: #dcfce7;
  color: #166534;
}

.tag-ssci {
  background: #fce7f3;
  color: #9d174d;
}

/* ===================== 项目列表 ===================== */
.project-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.project-list li:last-child {
  border-bottom: none;
}

.proj-funder {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.proj-name {
  font-size: 14.5px;
  color: var(--text-soft);
  margin: 4px 0;
}

.proj-meta {
  font-size: 13px;
  color: var(--light);
}

/* ===================== 会议 ===================== */
.conf-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.conf-list li:last-child {
  border-bottom: none;
}

.conf-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}

.conf-meta {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===================== 页脚 ===================== */
footer {
  text-align: center;
  color: var(--light);
  font-size: 12.5px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ===================== 滚动渐入动画 ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: calc(var(--nav-h) + 32px);
  }

  .sidebar {
    position: static;
    margin-bottom: 48px;
  }

  .profile-card {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 54px;
  }

  .topbar-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 15px;
  }

  .nav-link {
    padding: 6px 9px;
    font-size: 13px;
  }

  .page {
    padding: calc(var(--nav-h) + 24px) 16px 40px;
  }

  .avatar {
    width: 110px;
    height: 110px;
  }

  .name {
    font-size: 21px;
  }

  .section-title {
    font-size: 18px;
  }

  .entry-head {
    flex-direction: column;
    gap: 2px;
  }

  .entry-date {
    font-size: 12px;
  }
}
