/* ========== 基础设置 ========== */
:root {
  --bg-main: #f7fbff;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(135deg, #e8f3ff, #fef9ff);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.15);
  --accent-strong: #1d4ed8;
  --accent-secondary: #f97316;
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.09);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --transition-fast: 0.2s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #eef4ff 0, #fdfdff 45%, #f8fafc 100%);
  color: var(--text-main);
  line-height: 1.6;
}

/* 页面整体容器 */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* 文本通用样式 */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* ========== Hero 区域 ========== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 32px;
  padding: 28px 24px;
  margin-bottom: 24px;
  border-radius: 32px;
  background: var(--bg-hero);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.12);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.18), transparent 55%);
  opacity: 0.95;
  pointer-events: none;
}

.hero-content,
.hero-logo {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  margin: 0 0 10px;
  color: #020617;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 12px;
  max-width: 32rem;
  font-size: 0.96rem;
  color: rgba(15, 23, 42, 0.85);
}

.authors {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: rgba(15, 23, 42, 0.8);
}
.authors a {
  color: inherit;
}
.authors a:hover {
  text-decoration: underline;
}

.affiliations {
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
}

/* Hero 右侧 Logo 卡片（放大） */
.hero-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-logo-card {
  width: 100%;
  max-width: 480px; /* 比原来更大一点 */
  padding: 22px 22px 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-logo-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: contain;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn.primary {
  background: #ffffff;
  color: var(--accent-strong);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.18);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.6);
}
.btn.secondary:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* ========== Section 导航 ========== */
.section-nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  margin: 16px 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(14px);
}
.section-nav a {
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.section-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* ========== Section 卡片 ========== */
.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-card {
  padding: 18px 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 1.1rem;
  margin: 0;
  color: #020617;
}

.section-tag {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(15, 23, 42, 0.75);
  white-space: nowrap;
}

.section-tag.accent {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-strong);
}

/* 左文右图布局 */
.section-with-media {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
}

.section-with-media.reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
}

.section-text {
  min-width: 0;
}

.section-media {
  min-width: 0;
}

/* 列表美化 */
.fancy-list {
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.fancy-list li {
  margin-bottom: 0.4rem;
}
.fancy-list li::marker {
  color: var(--accent-strong);
}

/* 有序列表 */
.fancy-ol {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.fancy-ol li {
  margin-bottom: 0.45rem;
}

/* 图片样式 */
.img-elevated {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.14);
  display: block;
}

/* 结果区布局：单列，大图显示 */
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* 每张图占整行，让 table_gsr 和 unseen_objects 更大 */
  gap: 20px;
  margin-top: 10px;
}

.result-item {
  margin: 0;
}

.result-item.wide {
  grid-column: 1 / -1; /* 保留 wide 类，未来需要更复杂布局时可用 */
}

/* 放大 Results 图下文字 */
.result-item figcaption {
  margin-top: 6px;
  font-size: 0.9rem;      /* 比原来的 0.8rem 大一号 */
  line-height: 1.5;
  color: #4b5563;         /* 略深一些，更好读 */
}

/* Video */
.video-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.22);
}
.video-wrapper video,
.video-wrapper iframe {
  width: 100%;
  height: auto;
  display: block;
}

/* Citation / BibTeX 代码块：浅灰背景 */
.code-block {
  background: #f3f4f6;      /* 浅灰，不再是黑色 */
  color: #111827;           /* 深灰文字 */
  padding: 12px 16px;
  border-radius: 16px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Footer */
.footer {
  margin-top: 26px;
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 18px;
  }
  .hero-logo {
    justify-content: flex-start;
  }
  .hero-logo-card {
    max-width: 260px;
  }
}

@media (max-width: 720px) {
  .page {
    padding-inline: 14px;
  }

  .section-card {
    padding: 16px 14px 16px;
  }

  .section-with-media,
  .section-with-media.reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-nav {
    position: static;
    border-radius: 18px;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .hero {
    border-radius: 24px;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-nav {
    padding-inline: 8px;
  }
}
