/*
  静态单页样式（无数据依赖、无交互）
  仅供上传到任意静态服务器或对象存储后直接访问。
*/

:root {
  --bg-start: #0f172a;
  --bg-end: #0b1226;
  --text-main: #e5e7eb;
  --text-sub: #9aa4b2;
  --card-bg: #0b1324;
  --card-border: #1f2a44;
  --accent: #7dd3fc; /* cyan */
  --accent-weak: #60a5fa; /* blue */
}

html, body {
  height: 100%;
}
body.portal-page {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(13,21,41,0.9) 0%, transparent 70%),
    radial-gradient(800px 400px at 80% 0%, rgba(12,20,34,0.65) 0%, transparent 65%),
    linear-gradient(160deg, var(--bg-start), var(--bg-end));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 1; /* 让背景文字在下层 */
}

/* Hero */
.hero {
  padding: 64px 24px 12px;
  text-align: center;
}
.hero-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}
.hero-subtitle {
  margin: 0;
  font-size: clamp(14px, 2.5vw, 16px);
  color: var(--text-sub);
}

.hero-banner {
  width: min(1100px, 94vw);
  height: 140px;
  margin: 16px auto 8px;
  border-radius: 16px;
  background: linear-gradient(90deg, #3b0764, #4c1d95, #1e293b);
  box-shadow: inset 0 0 40px rgba(255,255,255,0.04), 0 12px 40px rgba(0,0,0,0.35);
  position: relative;
}

/* Main */
.portal-main {
  display: grid;
  place-items: center;
  padding: 24px;
}
/* 通用段落与标题 */
.section { width: min(1100px, 94vw); margin: 8px auto 18px; }
.section-title { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.section-desc { margin: 0 0 8px; color: var(--text-sub); }

/* 信息卡片 */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } }
.info-card {
  background: linear-gradient(180deg, rgba(22,28,48,0.8), rgba(14,20,34,0.85));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.info-card-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.info-card-text { margin: 0; color: var(--text-sub); }

/* 联系方式 */
.contact-list { margin: 0; padding-left: 16px; color: var(--text-sub); }
.contact-list li { margin: 6px 0; }

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 20px 12px 28px;
  color: var(--text-sub);
}
.site-footer p { margin: 6px 0; }
.record-link { color: var(--accent); text-decoration: none; }
.record-link:hover { text-decoration: underline; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card {
  background: linear-gradient(180deg, rgba(22,28,48,0.8), rgba(14,20,34,0.85));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.32); border-color: rgba(96,165,250,0.35); }
.post-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.post-excerpt { margin: 0 0 8px; color: var(--text-sub); }
.post-meta { margin: 0; color: var(--text-sub); font-size: 13px; }

/* 背景大字样层 */
.bg-words { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-words .word {
  position: absolute;
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.045);
  mix-blend-mode: overlay;
  user-select: none;
}
.bg-words .w1 { top: 8%; left: 6%; transform: rotate(-8deg); }
.bg-words .w2 { top: 32%; left: 10%; transform: rotate(6deg); }
.bg-words .w3 { top: 60%; left: 4%; transform: rotate(-4deg); }
.bg-words .w4 { top: 18%; right: 6%; transform: rotate(-2deg); }
.bg-words .w5 { bottom: 10%; right: 10%; transform: rotate(8deg); }

/* 横幅叠字文案层 */
.hero-banner-words {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.85);
  font-size: clamp(16px, 2.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.4px;
}
.hb-word { text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.hb-dot { opacity: 0.6; }

/* 弹窗样式 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: center; z-index: 50; }
.modal { width: min(720px, 92vw); border-radius: 14px; background: #0f172a; border: 1px solid #1f2a44; box-shadow: 0 18px 46px rgba(0,0,0,0.45); position: relative; }
.modal-title { margin: 14px 16px 0; font-size: 18px; font-weight: 700; }
.modal-close { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,0.08); color: #e5e7eb; font-size: 20px; cursor: pointer; }
.modal-close:hover { background: rgba(255,255,255,0.12); }
.modal-content { padding: 12px 16px 18px; color: var(--text-main); }
.modal-content h4 { margin: 6px 0 8px; }
.modal-content p { margin: 0 0 10px; color: var(--text-sub); }

/* 修复：确保带有 hidden 属性的元素被正确隐藏 */
[hidden] { display: none !important; }