/* ===============================================
   量子类脑网络与智能汽车安全 — 科普网站样式
   参考：THETA Lab 个人主页风格
   风格：专业 · 学术 · 简洁
   =============================================== */

/* --- 变量 --- */
:root {
  --primary: #003399;
  --primary-light: #eef3fb;
  --primary-dark: #002266;
  --text: #2c2c2c;
  --text-secondary: #555;
  --text-muted: #999;
  --bg: #f5f6f8;
  --bg-white: #fff;
  --border: #e0e4ea;
  --max-w: 1160px;
}

/* --- 基础重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: url(/assets/images/background.jpg) no-repeat fixed left center;
  background-size: cover;
  line-height: 1.8;
  font-size: 15px;
}

/* 所有内容放在半透明背景上保证可读性 */
.site-wrapper {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ========== 导航栏 ========== */
.site-header {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.site-logo {
  font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.3px;
}
.site-logo:hover { text-decoration: none !important; }
.site-nav { display: flex; gap: 2px; }
.nav-link {
  color: var(--text-secondary) !important;
  padding: 6px 14px; border-radius: 4px;
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--primary) !important;
  background: var(--primary-light);
  text-decoration: none !important;
}
.nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
  font-weight: 600;
}

/* ========== 横幅 Banner ========== */
.banner {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1040 50%, #0d1530 100%);
  color: #fff; text-align: center;
  padding: 64px 20px 52px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0,212,255,0.05);
}
.banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,212,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(124,58,237,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.banner::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  animation: bannerGrid 20s linear infinite;
}
@keyframes bannerGrid {
  0% { transform: translate(0,0); }
  100% { transform: translate(40px,40px); }

}
.banner h1 {
  font-size: 1.9rem; font-weight: 700;
  letter-spacing: 1.5px; margin-bottom: 10px;
}
.banner .subtitle {
  font-size: 1rem; opacity: 0.85;
  margin-bottom: 20px;
}
.banner .tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.banner .tag {
  padding: 4px 16px; border-radius: 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
}

/* ========== 通用区块 ========== */
.section { padding: 44px 0; }
.section-white { background: var(--bg-white); }
.section-title {
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.section-desc { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 24px; }

/* ========== 课程简介 ========== */
.intro-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 24px 28px;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.8;
}
.intro-box strong { color: var(--text); }

/* ========== 双栏 ========== */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ========== 文章列表 ========== */
.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-item {
  display: flex; gap: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.article-item:hover { border-color: var(--primary); }
.article-icon {
  font-size: 1.5rem; flex-shrink: 0;
  width: 40px; text-align: center; padding-top: 2px;
}
.article-body { flex: 1; min-width: 0; }
.article-body h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.article-body h3 a { color: var(--text); }
.article-body h3 a:hover { color: var(--primary); }
.article-body p {
  font-size: 0.84rem; color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.article-meta { font-size: 0.78rem; color: var(--primary); margin-top: 4px; }

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 22px 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--primary); }
.card .card-icon { font-size: 1.8rem; margin-bottom: 10px; display: inline-block; }
.card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.card p { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; }
.card .read-more { display: inline-block; margin-top: 8px; color: var(--primary); font-size: 0.84rem; font-weight: 500; }

/* ========== 课程模块 ========== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.module-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  transition: background 0.15s;
}
.module-card:hover { background: var(--primary-light); }
.module-card h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.module-card p { font-size: 0.82rem; color: var(--text-secondary); }

/* ========== 视频 ========== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.video-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}
.video-card:hover { border-color: var(--primary); }
.video-card video { width: 100%; display: block; background: #000; }
.video-placeholder {
  aspect-ratio: 16/9;
  background: #f0f2f5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-muted);
}
.video-placeholder .icon { font-size: 2.2rem; margin-bottom: 4px; }
.video-placeholder .label { font-size: 0.82rem; }
.video-info { padding: 14px 16px; }
.video-info h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.video-info p { font-size: 0.82rem; color: var(--text-secondary); }

/* ========== 视频页面标题区 ========== */
.page-hd {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1040 50%, #0d1530 100%);
  color: #fff; text-align: center;
  padding: 52px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0,212,255,0.05);
}
.page-hd::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,212,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(124,58,237,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.page-hd::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  animation: hdGrid 20s linear infinite;
}
@keyframes hdGrid {
  0% { transform: translate(0,0); }
  100% { transform: translate(40px,40px); }
}
.page-hd h1 { font-size: 1.5rem; margin-bottom: 4px; position: relative; z-index: 1; }
.page-hd p { opacity: 0.8; font-size: 0.9rem; position: relative; z-index: 1; }

/* ========== 文章内容区 ========== */
.markdown-content {
  max-width: 780px; margin: 0 auto; padding: 32px 0;
}
.markdown-content h1 { font-size: 1.4rem; color: var(--text); margin: 28px 0 12px; }
.markdown-content h2 { font-size: 1.15rem; color: var(--text); margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.markdown-content h3 { font-size: 1rem; color: var(--text); margin: 20px 0 8px; }
.markdown-content p { margin-bottom: 14px; color: var(--text-secondary); line-height: 1.9; }
.markdown-content ul, .markdown-content ol { margin: 0 0 14px 22px; color: var(--text-secondary); }
.markdown-content li { margin-bottom: 4px; }
.markdown-content img { max-width: 100%; margin: 16px 0; border: 1px solid var(--border); }
.markdown-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 16px 0; padding: 10px 18px;
  background: var(--primary-light);
  color: var(--text-secondary);
}
.markdown-content code {
  background: #f0f2f5; padding: 1px 6px;
  border-radius: 3px; font-size: 0.88em; color: #c00;
}
.markdown-content pre {
  background: #1e1e2e; color: #cdd6f4;
  padding: 16px; border-radius: 6px;
  overflow-x: auto; margin: 16px 0; font-size: 0.85rem;
}
.markdown-content pre code { background: none; padding: 0; color: inherit; }

/* ========== 关于页 ========== */
.about-content { max-width: 780px; margin: 0 auto; padding: 32px 0; }
.about-content h2 { font-size: 1.15rem; color: var(--text); margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.about-content p { margin-bottom: 14px; color: var(--text-secondary); line-height: 1.9; }

/* ========== 团队 ========== */

/* ========== 课程团队 ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  padding: 20px 0;
  max-width: 1100px;
  margin: 0 auto;
}
.team-card {
  background: #fff;
  border-radius: 14px;
  padding: 30px 24px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #eef2f7;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.team-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary, #2d5a8e);
  margin: 0 auto 14px;
  background: #e8edf5;
}
.team-avatar-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #2d5a8e), #4a90d9);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.team-card h4 {
  font-size: 1.1rem; color: #1a2332; font-weight: 700; margin: 0 0 4px;
}
.team-card .team-title {
  font-size: 0.85rem; color: var(--primary, #2d5a8e);
  font-weight: 500; margin: 0 0 10px; line-height: 1.4;
}
.team-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; margin: 0 0 12px;
}
.team-tag {
  font-size: 0.72rem; padding: 3px 10px; border-radius: 12px;
  background: #eef4ff; color: #2d5a8e; font-weight: 500;
  border: 1px solid #d6e2f5; white-space: nowrap;
}
.team-tag-gold { background: #fff8e8; color: #8a6d1a; border-color: #f0e0a0; }
.team-tag-green { background: #e8f8ee; color: #1a7a3a; border-color: #b8e0c8; }
.team-bio {
  font-size: 0.82rem; color: #445566; line-height: 1.65;
  margin: 0; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; max-height: 8.25em;
}
.team-bio-expand {
  font-size: 0.78rem; color: var(--blue, #4a90d9);
  cursor: pointer; margin-top: 6px;
  background: none; border: none; padding: 0;
}
.team-bio-expand:hover { text-decoration: underline; }

/* ========== 页脚 ========== */
.site-footer {
  background: rgba(0,34,102,0.95);
  color: rgba(255,255,255,0.6);
  text-align: center; padding: 24px 20px;
  font-size: 0.82rem;
  backdrop-filter: blur(6px);
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-members { margin-top: 2px; }
.site-footer .license { margin-top: 4px; opacity: 0.6; font-size: 0.78rem; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 10px 16px; gap: 6px; }
  .site-nav { flex-wrap: wrap; justify-content: center; gap: 2px; }
  .nav-link { font-size: 0.8rem; padding: 4px 10px; }
  .banner { padding: 40px 16px 36px; }
  .banner h1 { font-size: 1.3rem; }
  .section { padding: 30px 0; }
  .article-item { flex-direction: column; gap: 6px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

a.module-card { transition: transform 0.15s, box-shadow 0.15s; border-radius: 8px; }
a.module-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important; }

/* Page content (About, Syllabus) */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  line-height: 1.8;
  color: #333;
}
.page-content h1 {
  font-size: 28px;
  color: #003893;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}
.page-content h2 {
  font-size: 22px;
  color: #003893;
  margin: 30px 0 15px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8e8e8;
}
.page-content h3 {
  font-size: 18px;
  color: #333;
  margin: 20px 0 10px;
}
.page-content p {
  margin-bottom: 14px;
  text-align: justify;
}
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.page-content th, .page-content td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
}
.page-content th {
  background: #003893;
  color: #fff;
  font-weight: 600;
}
.page-content tr:nth-child(even) td {
  background: #f8f9fa;
}
.page-content ul, .page-content ol {
  margin: 10px 0 20px 24px;
}
.page-content li {
  margin-bottom: 8px;
}

/* About page background */
.page-content {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px 50px !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  margin-top: 30px;
  margin-bottom: 30px;
}
