/* ===== 学无止境 · 教育史专题 静态页 ===== */
/* 统一格点背景 + 双主题，风格对齐赛维小站 glassy 主题 */

html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.75;
  transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ---------- 统一格点背景 ---------- */
html[data-theme="light"] body {
  background-color: #f4f1ea;
  background-image:
    linear-gradient(to right, rgba(90,64,40,.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(90,64,40,.08) 1px, transparent 1px);
  background-size: 34px 34px;
  background-attachment: fixed;
  color: #2c3e50; 
}
html[data-theme="dark"] body {
  background-color: #1c1b1a;
  background-image:
    linear-gradient(to right, rgba(255,245,235,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,245,235,.07) 1px, transparent 1px);
  background-size: 34px 34px;
  background-attachment: fixed;
  color: #ecf0f1;
}

/* ---------- 漂浮光斑 ---------- */
.orb { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; }
html[data-theme="light"] .orb { opacity: .4; }
.orb-a { width: 380px; height: 380px; top: -120px; left: -100px; background: radial-gradient(circle, #ffb347, transparent 70%); }
.orb-b { width: 340px; height: 340px; bottom: -90px; right: -80px; background: radial-gradient(circle, #2ba0b4, transparent 70%); }
.orb-c { width: 260px; height: 260px; top: 40%; left: 55%; background: radial-gradient(circle, #ff9f43, transparent 70%); opacity: .35; }

/* ---------- 顶部栏 ---------- */
.edu-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; }
html[data-theme="light"] .edu-header { background: rgba(255,255,255,.6); border-color: rgba(255,159,67,.18); }
html[data-theme="dark"]  .edu-header { background: rgba(28,27,26,.6); border-color: rgba(255,159,67,.25); }
.edu-header-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 62px;
  display: flex; align-items: center; gap: 18px; }
.edu-logo { font-weight: 700; font-size: 1.05rem; cursor: pointer; white-space: nowrap; }
html[data-theme="light"] .edu-logo { color: #2c3e50; }
html[data-theme="dark"]  .edu-logo { color: #ecf0f1; }
.edu-nav { display: flex; gap: 6px; flex: 1; }
.edu-nav-btn { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: .92rem; cursor: pointer;
  font-weight: 500; transition: all .2s; }
html[data-theme="light"] .edu-nav-btn { color: #2c3e50; }
html[data-theme="dark"]  .edu-nav-btn { color: #cbd5d9; }
.edu-nav-btn:hover, .edu-nav-btn.is-active { color: #fff !important;
  background: linear-gradient(135deg, #1f6e7c, #2b8aa0); }
.edu-theme { margin-left: auto; border: 0; cursor: pointer; font-size: 1.1rem; background: none; padding: 6px 8px; border-radius: 10px; transition: transform .2s; }
.edu-theme:hover { transform: scale(1.15); }

/* ---------- 视图切换 ---------- */
.edu-view { display: none; padding: 30px 20px 10px; max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.edu-view.is-active { display: block; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.edu-hero { text-align: center; padding: 14px 0 6px; }
.edu-title { font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 800; margin: 0 0 10px; line-height: 1.2; }
.gradient-text { background: linear-gradient(135deg, #ff9f43, #e67e22 50%, #d35400); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="dark"] .gradient-text { background: linear-gradient(135deg, #ffb347, #ff8c42 50%, #ff6a2e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.edu-subtitle { font-size: 1rem; margin: 0 0 14px; }
html[data-theme="light"] .edu-subtitle { color: #5f6b7a; }
html[data-theme="dark"]  .edu-subtitle { color: #b8c7ce; }
.edu-hero-badge { display: inline-block; font-size: .82rem; padding: .3rem 1rem; border-radius: 2rem; font-weight: 600; }
html[data-theme="light"] .edu-hero-badge { background: rgba(255,159,67,.16); color: #c44f1c; }
html[data-theme="dark"]  .edu-hero-badge { background: rgba(255,159,67,.25); color: #ffb347; }

/* ---------- 目录卡片网格 ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 26px; }
.edu-card { text-align: left; cursor: pointer; border: 1px solid transparent; border-radius: 1.7rem;
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column; transition: all .22s;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-family: inherit; }
html[data-theme="light"] .edu-card { background: rgba(255,255,255,.75); border-color: rgba(255,159,67,.2);
  box-shadow: 0 8px 22px rgba(0,0,0,.05); }
html[data-theme="dark"]  .edu-card { background: rgba(34,31,29,.78); border-color: rgba(255,159,67,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.edu-card:hover { transform: translateY(-4px); }
html[data-theme="light"] .edu-card:hover { background: rgba(255,255,255,.9); box-shadow: 0 18px 35px rgba(255,159,67,.18); }
html[data-theme="dark"]  .edu-card:hover { background: rgba(42,38,35,.92); box-shadow: 0 18px 35px rgba(0,0,0,.4); }
.edu-card-icon { font-size: 2.2rem; margin: 0 0 .6rem; }
.edu-card-no { display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700;
  padding: .18rem .7rem; border-radius: 2rem; margin: 0 0 .5rem; letter-spacing: .5px; }
html[data-theme="light"] .edu-card-no { background: linear-gradient(135deg,#1f6e7c,#2b8aa0); color: #fff; }
html[data-theme="dark"]  .edu-card-no { background: linear-gradient(135deg,#0e7a9e,#0d4a8f); color: #fff; }
.edu-card-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 .7rem; line-height: 1.4; }
.edu-card-countries { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 .8rem; }
.chip { font-size: .74rem; padding: .15rem .7rem; border-radius: 2rem; font-weight: 600; }
html[data-theme="light"] .chip { background: rgba(30,136,168,.12); color: #0e6d80; }
html[data-theme="dark"]  .chip { background: rgba(43,138,160,.22); color: #7fd4e0; }
.edu-card-summary { font-size: .9rem; line-height: 1.6; margin: 0 0 1rem; flex: 1; }
html[data-theme="light"] .edu-card-summary { color: #5f6b7a; }
html[data-theme="dark"]  .edu-card-summary { color: #b8c7ce; }
.edu-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; margin-top: 2px; }
html[data-theme="light"] .edu-card-foot { color: #8a95a1; }
html[data-theme="dark"]  .edu-card-foot { color: #8a98a6; }
.edu-card-date { font-weight: 600; }
.edu-card-cat { padding: .12rem .7rem; border-radius: 2rem; }
html[data-theme="light"] .edu-card-cat { background: rgba(255,159,67,.14); color: #c44f1c; }
html[data-theme="dark"]  .edu-card-cat { background: rgba(255,159,67,.2); color: #ffb347; }

/* ---------- 文章详情 ---------- */
.edu-article { max-width: 820px; margin: 0 auto; padding: 1.6rem 2rem 2rem; border-radius: 1.7rem; border: 1px solid transparent; }
html[data-theme="light"] .edu-article { background: #fff; border-color: #e8ecef; box-shadow: 0 6px 20px rgba(0,0,0,.05); }
html[data-theme="dark"]  .edu-article { background: #24201d; border-color: #2c333a; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.edu-back { border: 0; cursor: pointer; font-weight: 600; font-size: .9rem; padding: .45rem .9rem; border-radius: 2rem;
  margin-bottom: 1.2rem; font-family: inherit; }
html[data-theme="light"] .edu-back { background: rgba(255,159,67,.14); color: #e07b2c; }
html[data-theme="dark"]  .edu-back { background: rgba(255,159,67,.22); color: #ffb347; }
.edu-back:hover { transform: translateX(-2px); }
.article-head { padding-bottom: 1rem; border-bottom: 2px dashed; margin-bottom: 1.4rem; }
html[data-theme="light"] .article-head { border-color: rgba(255,159,67,.35); }
html[data-theme="dark"]  .article-head { border-color: rgba(255,159,67,.4); }
.article-title { font-size: 1.7rem; margin: .4rem 0 .8rem; line-height: 1.35; }
.article-meta { font-size: .82rem; margin-bottom: .6rem; }
html[data-theme="light"] .article-meta { color: #7f8c8d; }
html[data-theme="dark"]  .article-meta { color: #a0abb8; }
.article-meta a { font-weight: 600; }
html[data-theme="light"] .article-meta a { color: #e67e22; }
html[data-theme="dark"]  .article-meta a { color: #ffb347; }

/* ---------- 正文排版 ---------- */
.edu-article-content { font-size: 1.02rem; line-height: 1.9; }
.edu-article-content p { margin: 0 0 1.1em; }
.edu-article-content h2 { font-size: 1.3rem; margin: 1.8em 0 .7em; line-height: 1.4; padding-left: .6rem; border-left: 4px solid; }
html[data-theme="light"] .edu-article-content h2 { border-color: #e67e22; color: #1f6e7c; }
html[data-theme="dark"]  .edu-article-content h2 { border-color: #ff8c42; color: #7fd4e0; }
.edu-article-content h3 { font-size: 1.12rem; margin: 1.5em 0 .6em; }
html[data-theme="light"] .edu-article-content h3 { color: #c44f1c; }
html[data-theme="dark"]  .edu-article-content h3 { color: #ffb347; }
.edu-article-content strong, .edu-article-content b { font-weight: 700; }
html[data-theme="dark"] .edu-article-content strong, html[data-theme="dark"] .edu-article-content b { color: #ffd9a8; }
.edu-article-content u { text-decoration: underline; }

/* ---------- 时间列表表格 ---------- */
.edu-table { width: 100%; max-width: 720px; border-collapse: collapse; margin: 1.4em auto; border-radius: .8rem; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.edu-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.08); }
html[data-theme="light"] .edu-table { background: #fff; }
html[data-theme="light"] .edu-table td { border-color: #eceff2; }
html[data-theme="dark"]  .edu-table { background: #262e3a; }
html[data-theme="dark"]  .edu-table td { border-color: rgba(255,255,255,.06); }
.edu-table tr:last-child td { border-bottom: none; }
.edu-table td:first-child { font-weight: 600; white-space: nowrap; width: 34%; }
html[data-theme="light"] .edu-table td:first-child { background: #fafafa; color: #2c3e50; }
html[data-theme="dark"]  .edu-table td:first-child { background: #2b3442; color: #ffd9a8; }

/* ---------- 页脚 ---------- */
.edu-footer { margin-top: 40px; padding: 22px 20px 28px; text-align: center; font-size: .84rem;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid transparent; position: relative; z-index: 1; }
html[data-theme="light"] .edu-footer { background: rgba(255,255,255,.4); color: #7d8a92; border-color: rgba(255,159,67,.18); }
html[data-theme="dark"]  .edu-footer { background: rgba(28,27,26,.5); color: #a0abb8; border-color: rgba(255,159,67,.25); }
.edu-footer p { margin: 0; }

@media (max-width: 620px) {
  .edu-header-inner { gap: 8px; padding: 6px 12px; height: auto; min-height: 62px; flex-wrap: wrap; align-items: center; }
  .edu-logo { font-size: .9rem; white-space: nowrap; }
  .edu-nav { flex: 1 1 100%; justify-content: center; gap: 4px; order: 3; }
  .edu-nav-btn { padding: 5px 10px; font-size: .78rem; white-space: nowrap; }
  .edu-theme { margin-left: auto; }
  .edu-article { padding: 1.2rem 1.1rem 1.5rem; }
  .edu-card-summary { font-size: .87rem; }
}