/* ============================================================
   NCML 2026 — 第二十届现代逻辑学术研讨会
   简约风格 + 逻辑学元素（∀ ∃ → ∧ ∨ ¬ ⊢ ⊨ 文氏图）
   版本可维护：变量统一、组件化类名
   ============================================================ */

:root {
  --ink: #22303c;
  --ink-soft: #4a5a6a;
  --paper: #f6f3ec;
  --paper-deep: #ece7dc;
  --brand: #1f3a5f;
  --brand-soft: #33527a;
  --accent: #a97a2e;
  --accent-soft: #d9b96a;
  --line: #d8d2c4;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(31, 58, 95, 0.08);
  --radius: 12px;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(169, 122, 46, 0.05) 0, transparent 26%),
    radial-gradient(circle at 88% 78%, rgba(31, 58, 95, 0.05) 0, transparent 30%);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1120px, 92vw); margin: 0 auto; }

/* ---------- 顶部 ---------- */
.site-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #eef2f7;
  padding: 14px 0;
  border-bottom: 3px solid var(--accent);
}
.header-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand-logo {
  width: 74px; height: 74px; border-radius: 50%;
  background: #fff; padding: 5px; object-fit: cover;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.header-text h1 {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 700; letter-spacing: 1px; line-height: 1.4;
}
.header-text .sub { font-size: 0.9rem; color: var(--accent-soft); margin-top: 2px; }
.header-badge {
  margin-left: auto; text-align: center;
  border: 1px solid var(--accent-soft); border-radius: 10px;
  padding: 4px; background: transparent;
  line-height: 0;
}
.header-badge img {
  display: block; height: 62px; width: auto; max-width: 150px;
  object-fit: contain; border-radius: 8px;
  /* 黑底融入深蓝背景：screen 模式下黑色变透明、亮色内容保留 */
  mix-blend-mode: screen;
}

/* ---------- 导航 ---------- */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.nav-inner { display: flex; flex-wrap: wrap; gap: 2px; }
.nav-inner a {
  display: block; padding: 12px 16px; font-size: 0.95rem;
  color: var(--ink-soft); border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.nav-inner a:hover, .nav-inner a.active { color: var(--brand); border-bottom-color: var(--accent); background: rgba(169,122,46,.06); }
.nav-inner a.active { font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--brand);
  color: #cdd8e6;
  padding: 26px 0 30px;
  margin-top: 48px;
  font-size: 0.88rem;
}
.footer-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-logo { width: 56px; height: 56px; border-radius: 50%; background: #fff; padding: 4px; object-fit: cover; flex-shrink: 0; }
.footer-text { flex: 1; text-align: left; min-width: 0; }
.footer-text p { line-height: 1.9; color: #cdd8e6; margin: 2px 0; }
.footer-text .line1 { font-weight: 600; color: #eef2f7; }
.footer-symbols { font-size: 1.2rem; letter-spacing: 6px; color: var(--accent-soft); }

/* ---------- 主页 Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--paper) 0%, #f0ecdf 100%);
  border-bottom: 1px solid var(--line);
  padding: 46px 0 40px;
  overflow: hidden;
}
.hero::before {
  content: "∀ ∃ → ∧ ∨ ¬ ⊢ ⊨";
  position: absolute; top: 14px; left: 0; right: 0; text-align: center;
  font-size: 2.4rem; letter-spacing: 18px; color: rgba(31,58,95,.07);
  white-space: nowrap; overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.hero-logo {
  width: clamp(120px, 20vw, 190px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.hero-text { flex: 1; min-width: 260px; }
.hero-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--brand); letter-spacing: 2px; line-height: 1.5;
}
.hero-text .en { color: var(--ink-soft); margin-top: 6px; letter-spacing: 1px; }
.hero-text .tagline {
  display: inline-block; margin-top: 14px;
  background: var(--accent); color: #fff;
  padding: 4px 14px; border-radius: 999px; font-size: 0.9rem;
}

/* ---------- 区块标题 ---------- */
.section-title {
  font-family: var(--font-serif);
  color: var(--brand);
  font-size: 1.35rem;
  letter-spacing: 2px;
  margin: 34px 0 18px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-title .sym { color: var(--accent); }

/* ---------- 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: block;
  color: var(--ink);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(31,58,95,.12); }
.card .icon { font-size: 1.7rem; color: var(--accent); }
.card h3 { margin: 8px 0 6px; color: var(--brand); font-size: 1.05rem; }
.card p { font-size: 0.88rem; color: var(--ink-soft); }
.card .link-more { color: var(--accent); font-size: 0.85rem; }

/* ---------- 通用内容页 ---------- */
.page {
  padding: 34px 0 20px;
}
.page-head { margin-bottom: 22px; }
.page-head h2 { font-family: var(--font-serif); color: var(--brand); font-size: 1.6rem; letter-spacing: 2px; }
.page-head .desc { color: var(--ink-soft); margin-top: 6px; font-size: 0.95rem; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.panel h3 {
  color: var(--brand); font-size: 1.1rem; margin-bottom: 12px;
  border-left: 4px solid var(--accent); padding-left: 10px;
}

/* ---------- PDF 卡片 ---------- */
.pdf-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.pdf-card .pdf-icon {
  width: 46px; height: 56px; background: #c0392b; border-radius: 6px;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2);
}
.pdf-card .meta { flex: 1; }
.pdf-card .meta h4 { color: var(--brand); }
.pdf-card .meta span { font-size: 0.85rem; color: var(--ink-soft); }
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 8px;
  font-size: 0.9rem; cursor: pointer; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; transition: opacity .2s;
  text-align: center;
}
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; color: var(--brand); }

/* ---------- 照片网格 ---------- */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.photo-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s;
  display: block; color: var(--ink);
}
.photo-item:hover { transform: translateY(-3px); }
.photo-item img { width: 100%; height: 170px; object-fit: cover; display: block; }
.photo-item .cap { padding: 10px 12px; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- 视频 ---------- */
.video-wrap {
  background: #0f1520; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.video-wrap video { width: 100%; display: block; aspect-ratio: 16/9; background: #0f1520; }

/* ---------- 网盘入口 ---------- */
.download-entry {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--white); border: 1px dashed var(--accent);
  border-radius: var(--radius); padding: 20px; margin-top: 14px;
}
.download-entry .qrcode-box { width: 132px; height: 132px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.download-entry .info { flex: 1; min-width: 220px; }
.download-entry .link { color: var(--accent); word-break: break-all; }

/* ---------- 地图 ---------- */
.map-box {
  background: #f2eee4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
}
.map-box svg { width: 100%; height: auto; display: block; }
.map-caption { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin-top: 8px; }

/* ---------- 提示条 ---------- */
.notice {
  background: rgba(169, 122, 46, 0.10);
  border-left: 4px solid var(--accent);
  padding: 10px 14px; border-radius: 0 8px 8px 0;
  font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 16px;
}

/* ---------- 折叠菜单按钮 ---------- */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 38px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--brand);
  border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 背景希腊字母浮动层 ---------- */
.greek-layer {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.greek-layer span {
  position: absolute;
  font-family: "Times New Roman", "Songti SC", serif;
  color: var(--brand);
  will-change: transform, opacity;
  animation: greek-float 16s ease-in-out infinite alternate;
  transform: translate(var(--px, 0), var(--py, 0));
}
@keyframes greek-float {
  0%   { margin-top: 0;    margin-left: 0; }
  50%  { margin-top: -14px; margin-left: 10px; }
  100% { margin-top: 6px;  margin-left: -8px; }
}

/* ---------- 地图 ---------- */
#map {
  width: 100%; height: 460px;
  border-radius: 8px; overflow: hidden;
  background: #e8e2d4;
}
.map-pin { text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.map-pin .pin-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff; margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}
.map-pin .pin-label {
  font-size: 11px; color: #22303c; background: rgba(255,255,255,.88);
  border-radius: 4px; padding: 1px 5px; margin-top: 2px;
  white-space: nowrap;
}
.leaflet-popup-content { font-family: var(--font-body); color: var(--ink); }

/* ---------- 内容层置于浮动字母之上 ---------- */
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ---------- 表格横向滚动容器 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 560px; }

/* ---------- 全局移动端响应式 ---------- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .container { width: 94vw; }

  /* 折叠导航 */
  .site-nav { padding: 8px 0; }
  .nav-toggle { display: flex; }
  .nav-inner {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-top: 8px;
    border-top: 1px solid var(--line);
  }
  .nav-open .nav-inner { display: flex; }
  .nav-inner a { padding: 12px 10px; font-size: 0.95rem; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
  .nav-inner a:hover, .nav-inner a.active { border-left-color: var(--accent); border-bottom-color: transparent; }

  .header-badge {
    display: block; margin-left: auto; margin-top: 2px;
    border-width: 1px; padding: 3px; border-radius: 8px;
  }
  .header-badge img { height: 40px; max-width: 110px; border-radius: 6px; }
  .brand-logo { width: 58px; height: 58px; }
  .hero-inner { justify-content: center; text-align: center; }
  .hero-logo { width: 140px; }
  .section-title { font-size: 1.15rem; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pdf-card { flex-wrap: wrap; }
  .pdf-card .btn { flex: 1; text-align: center; }
  .panel { padding: 16px; }
  .pdf-card iframe, .panel iframe { height: 420px; }
  #map { height: 320px; }
  .download-entry { flex-direction: column; align-items: center; text-align: center; }
  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .card-grid, .photo-grid { grid-template-columns: 1fr; }
  .header-text .sub { font-size: 0.78rem; }
}
