/* SGT 空能引力理论 · 双语学术静态官网 sgt.ac.cn */
/* #004792 | #222222 | #666666 | #FFFFFF | #EEEEEE */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }
html.lang-en .lang-zh { display: none !important; }
html.lang-zh .lang-en { display: none !important; }
html.lang-switching body { opacity: 0.88; transition: opacity 0.15s ease; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  background: #ffffff; color: #222222; line-height: 1.8;
  min-height: 100vh; display: flex; flex-direction: column;
  position: relative;
}

/* 引力场 Canvas 背景 */
#gravity-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
html.lang-en body { font-family: "Times New Roman", "Segoe UI", Georgia, serif; }

a { color: #004792; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 71, 146, 0.12);
  box-shadow: 0 2px 20px rgba(0, 71, 146, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; gap: 12px;
}
.site-logo {
  display: flex; align-items: center; gap: 8px;
  color: #004792; white-space: nowrap; flex-shrink: 0;
  min-height: 40px;
}
.site-logo:hover { text-decoration: none; }
.logo-icon {
  width: 28px; height: 28px; display: block; flex-shrink: 0;
  object-fit: contain; object-position: center;
}
.logo-text {
  display: flex; flex-direction: column; justify-content: center;
  line-height: 1.25; gap: 1px;
}
.logo-brand {
  font-size: 0.92rem; font-weight: 700; color: #004792;
  letter-spacing: 0.04em;
}
.site-logo .logo-sub {
  color: #666666; font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.01em; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis;
}
html.lang-en .site-logo .logo-sub.lang-en { max-width: 280px; }
.header-right { display: flex; align-items: center; gap: 4px; }
.site-nav { display: flex; list-style: none; }
.site-nav a {
  display: block; padding: 18px 11px; font-size: 0.84rem;
  color: #222222; border-bottom: 2px solid transparent;
  position: relative; transition: color 0.25s ease;
}
.site-nav a:hover { color: #004792; text-decoration: none; }
.site-nav a.active { color: #004792; font-weight: 600; border-bottom-color: #004792; }
.nav-indicator {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: #004792; border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 71, 146, 0.5);
  animation: navPulse 2s ease-in-out infinite;
}
@keyframes navPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.3); }
}
.lang-switch { display: flex; border: 1px solid #eeeeee; margin-left: 6px; flex-shrink: 0; }
.lang-switch button {
  background: none; border: none; padding: 6px 11px; font-size: 0.78rem;
  color: #666666; cursor: pointer; font-family: inherit;
}
.lang-switch button:hover { color: #004792; }
.lang-switch button.active { background: #004792; color: #ffffff; }
.lang-switch button { transition: background 0.25s ease, color 0.25s ease; }
.nav-toggle {
  display: none; background: none; border: 1px solid #eeeeee;
  padding: 6px 10px; font-size: 0.8rem; color: #222222; cursor: pointer; font-family: inherit;
}

/* Main */
main {
  flex: 1; max-width: 1080px; margin: 0 auto;
  padding: 96px 24px 56px; width: 100%;
  position: relative; z-index: 1;
}
.site-header { z-index: 100; }
.site-footer { position: relative; z-index: 1; background: rgba(255,255,255,0.9); }

.page-title {
  font-size: 1.5rem; font-weight: 700; color: #004792;
  margin-bottom: 8px; line-height: 1.5;
}
.page-subtitle { font-size: 0.9rem; color: #666666; margin-bottom: 28px; }

/* Document meta bar */
.doc-meta {
  border: 1px solid rgba(0, 71, 146, 0.12); padding: 20px 24px; margin-bottom: 32px;
  background: rgba(250, 251, 253, 0.85); font-size: 0.88rem;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 16px rgba(0, 71, 146, 0.04);
}
.doc-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px;
}
.doc-meta p { margin: 0; line-height: 1.7; }
.doc-meta .label { color: #666666; }
.doc-meta .value { color: #222222; }
.doc-meta-full { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eeeeee; }

.section { margin-bottom: 36px; }
.section-title {
  font-size: 1.125rem; font-weight: 700; color: #004792;
  margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid #eeeeee;
}
.subsection-title { font-size: 1rem; font-weight: 700; color: #222222; margin: 20px 0 10px; }
.section p, .section li { text-align: justify; margin-bottom: 0.6em; }
.section ul, .section ol { padding-left: 1.5em; }
.section li { margin-bottom: 0.35em; }

/* Hero */
.hero {
  text-align: center; padding: 40px 24px 32px;
  border-bottom: 1px solid rgba(0, 71, 146, 0.1); margin-bottom: 32px;
  background: linear-gradient(180deg, rgba(0, 71, 146, 0.04) 0%, rgba(255,255,255,0) 100%);
  border-radius: 2px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #004792, transparent);
  opacity: 0.5;
}
.hero-title {
  font-size: 1.65rem; font-weight: 700; color: #004792; line-height: 1.5; margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(0, 71, 146, 0.08);
}
.hero-sub { font-size: 0.92rem; color: #666666; margin-bottom: 4px; }

/* 物理参数 ticker */
.hero-ticker {
  margin-top: 24px; overflow: hidden;
  border-top: 1px solid rgba(0, 71, 146, 0.08);
  padding-top: 16px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex; gap: 32px; width: max-content;
  animation: tickerScroll 40s linear infinite;
}
.ticker-item {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem; color: #004792; white-space: nowrap;
  padding: 4px 12px; border: 1px solid rgba(0, 71, 146, 0.15);
  background: rgba(0, 71, 146, 0.04); border-radius: 2px;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Formulas */
.formula-block {
  margin: 16px 0; padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0,71,146,0.03) 0%, rgba(248,249,251,1) 100%);
  border-left: 3px solid #004792;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-size: 1rem; line-height: 2; overflow-x: auto;
  position: relative; overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.formula-block:hover {
  box-shadow: 0 4px 24px rgba(0, 71, 146, 0.08);
  border-left-color: #0066cc;
}
.formula-block .eq { display: block; margin: 6px 0; text-align: center; }
.formula-note { font-size: 0.85rem; color: #666666; margin-top: 8px; font-family: inherit; text-align: left; }
.formula-scan {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,71,146,0.06), transparent);
  animation: formulaScan 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes formulaScan {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* Tables — academic three-line */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
.academic-table {
  width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.7;
}
.academic-table thead { border-top: 2px solid #222222; border-bottom: 1px solid #222222; }
.academic-table tbody { border-bottom: 2px solid #222222; }
.academic-table th, .academic-table td {
  padding: 9px 12px; text-align: left; vertical-align: top; border: none;
}
.academic-table th { font-weight: 700; background: none; }
.academic-table tbody tr { border-bottom: 1px solid #eeeeee; transition: background 0.2s ease, transform 0.2s ease; }
.academic-table tbody tr:not(.cat-row):hover { background: rgba(0, 71, 146, 0.04); }
.academic-table tbody tr:last-child { border-bottom: none; }
.academic-table .grade-a { color: #004792; font-weight: 600; }
.academic-table .grade-am { color: #336699; font-weight: 600; }
.academic-table .grade-bp { color: #5588aa; font-weight: 600; }
.academic-table .check { color: #004792; }

/* Audit category row */
.academic-table .cat-row td {
  background: #f0f4f8; font-weight: 700; color: #004792;
  border-bottom: 1px solid #dddddd;
}

/* Highlight box */
.info-box {
  padding: 16px 20px; margin: 16px 0;
  border: 1px solid rgba(0, 71, 146, 0.12); background: rgba(250, 251, 253, 0.9);
  border-left: 3px solid #004792;
  transition: box-shadow 0.3s ease;
}
.info-box:hover { box-shadow: 0 4px 20px rgba(0, 71, 146, 0.06); }
.info-box strong { color: #004792; }

/* 滚动显现 */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Grade badges */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #fff; background: #004792; padding: 2px 7px; margin-right: 6px; vertical-align: middle; }
.badge-am { background: #336699; }
.badge-bp { background: #5588aa; }
.badge-b { background: #778899; }
.badge-c { background: #999999; }

/* Liability lists */
.liability-block { margin-top: 28px; padding: 20px 24px; border: 1px solid #eeeeee; background: #fafafa; }
.liability-block h3 { font-size: 1rem; color: #004792; margin-bottom: 10px; }
.liability-block ul { list-style: none; padding: 0; }
.liability-block li { padding-left: 1em; text-indent: -1em; margin-bottom: 0.3em; }
.liability-block li::before { content: "· "; color: #004792; font-weight: 700; }

/* Declaration */
.declaration-box {
  margin-top: 28px; padding: 24px; border: 1px solid #eeeeee; background: #fafafa;
}
.declaration-box h3 { font-size: 1rem; color: #004792; margin-bottom: 12px; }
.declaration-box p { font-size: 0.9rem; text-align: justify; margin-bottom: 0.5em; }

/* Footer */
.site-footer {
  border-top: 1px solid #eeeeee; padding: 20px 24px;
  text-align: center; font-size: 0.78rem; color: #666666; line-height: 1.8;
}

/* 论文扩展样式 */
.keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.keywords span {
  font-size: 0.78rem; padding: 4px 10px;
  border: 1px solid rgba(0,71,146,0.2); color: #004792;
  background: rgba(0,71,146,0.04); border-radius: 2px;
}
.analogy-box {
  margin: 20px 0; padding: 20px 24px;
  border-left: 3px solid #004792;
  background: linear-gradient(90deg, rgba(0,71,146,0.05) 0%, transparent 100%);
}
.analogy-box p { margin-bottom: 0.6em; }
.quote-box {
  margin: 28px 0; padding: 24px 28px;
  border: 1px solid rgba(0,71,146,0.15); background: rgba(0,71,146,0.03);
}
.quote-box p { font-size: 1.02rem; color: #004792; font-weight: 500; line-height: 1.9; margin-bottom: 0.6em; text-align: center; }
.quote-box p:last-child { margin-bottom: 0; }
.timeline-list { list-style: none; padding: 0; }
.timeline-list li {
  position: relative; padding: 10px 0 10px 22px;
  border-left: 2px solid rgba(0,71,146,0.2); margin-left: 8px;
}
.timeline-list li::before {
  content: ''; position: absolute; left: -5px; top: 16px;
  width: 8px; height: 8px; background: #004792; border-radius: 50%;
}
.compare-highlight { color: #004792; font-weight: 600; }
.site-nav a { font-size: 0.8rem; padding: 18px 9px; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
  .formula-scan, .nav-indicator { animation: none; }
  .site-header { transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-right { width: 100%; flex-direction: column; align-items: stretch; }
  .site-nav { display: none; flex-direction: column; width: 100%; border-top: 1px solid #eeeeee; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 0; border-bottom: 1px solid #eeeeee; }
  .site-nav a.active { border-left: 3px solid #004792; padding-left: 12px; border-bottom-color: #eeeeee; }
  .lang-switch { margin-left: 0; align-self: flex-end; }
  .logo-icon { width: 24px; height: 24px; }
  .logo-brand { font-size: 0.85rem; }
  .site-logo .logo-sub { display: none; }
  main { padding: 80px 16px 40px; }
  .doc-meta-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.3rem; }
  .page-title { font-size: 1.25rem; }
  .academic-table { font-size: 0.8rem; }
  .ticker-track { animation-duration: 60s; }
  .hero-ticker { mask-image: none; -webkit-mask-image: none; }
}
