/* ============================================================
   Horizon Daily — aihot-daily Magazine Style (复刻)
   ============================================================ */

:root {
  --paper: #f5f0e6;
  --paper-dark: #eae3d4;
  --ink: #1a1a1a;
  --news-red: #8b1a1a;
  --brown-gray: #6b6358;
  --rule: #2a2a2a;
  --rule-light: #c4b99a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--paper);
  font-family: 'EB Garamond', 'Noto Serif SC', 'Songti SC', serif;
  color: var(--ink);
  line-height: 1.7;
  padding: 40px 20px;
}

.container { max-width: 860px; margin: 0 auto; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead { text-align: center; padding-bottom: 20px; }
.masthead-top {
  font-family: 'EB Garamond', serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--brown-gray);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.masthead h1 {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 18px;
  color: var(--ink);
  line-height: 1;
  padding-left: 18px;
}
.masthead .subtitle {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  letter-spacing: 6px;
  color: var(--brown-gray);
  margin-top: 8px;
}
.masthead-rule {
  border-bottom: 4px double var(--rule);
  margin-top: 15px;
}
.masthead-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--brown-gray);
  padding-top: 8px;
  letter-spacing: 1px;
}

/* ============================================================
   NAV BAR
   ============================================================ */
.nav-bar {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  padding: 8px 0;
  margin: 15px 0 30px;
  font-size: 12px;
  letter-spacing: 1px;
}
.nav-bar a { color: var(--news-red); text-decoration: none; }
.nav-bar a:hover { text-decoration: underline; }

/* ============================================================
   LEAD (导语)
   ============================================================ */
.lead {
  text-align: center;
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 35px;
  padding: 0 40px;
  line-height: 1.8;
}
.lead::before, .lead::after {
  content: "❧";
  color: var(--news-red);
  margin: 0 8px;
  font-style: normal;
}

/* ============================================================
   ARTICLE GRID (单篇)
   ============================================================ */
.article {
  border-bottom: 1px solid var(--rule-light);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
}
.article-num {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 900;
  color: var(--news-red);
  text-align: center;
  line-height: 1;
}
.article-num small {
  display: block;
  font-size: 10px;
  color: var(--brown-gray);
  letter-spacing: 1px;
  margin-top: 4px;
  font-weight: 400;
}
.article-body h2 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.article-body h2 a { color: var(--ink); text-decoration: none; }
.article-body h2 a:hover { color: var(--news-red); }
.article-meta {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--brown-gray);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.article-meta .tag {
  display: inline-block;
  background: var(--news-red);
  color: var(--paper);
  padding: 2px 8px;
  font-weight: 600;
  margin-right: 6px;
}
.article-summary {
  font-size: 15px;
  color: #333;
  margin-bottom: 12px;
}
.article-comment {
  font-size: 14px;
  font-style: italic;
  color: var(--news-red);
  border-left: 3px solid var(--news-red);
  padding-left: 12px;
}

/* ============================================================
   JEKYLL POST CONTENT (Markdown 渲染后的样式适配)
   ============================================================ */

/* post 头部信息 */
.post-header {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 10px;
}
.post-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 8px;
  line-height: 1;
  color: var(--ink);
  padding-left: 8px;
}
.post-header .post-date {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--brown-gray);
  margin-top: 10px;
}

/* 摘要 blockquote → lead 风格 */
.main-content > blockquote:first-of-type {
  text-align: center;
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 35px;
  padding: 0 40px;
  line-height: 1.8;
  border: none;
}
.main-content > blockquote:first-of-type::before,
.main-content > blockquote:first-of-type::after {
  content: "❧";
  color: var(--news-red);
  margin: 0 8px;
  font-style: normal;
}

/* TOC 列表 */
.main-content > ol {
  background: var(--paper-dark);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  border-radius: 0;
  padding: 20px 20px 20px 40px;
  margin: 20px 0 30px;
  list-style: none;
  counter-reset: toc-counter;
}
.main-content > ol > li {
  counter-increment: toc-counter;
  padding: 4px 0;
}
.main-content > ol > li::before {
  content: counter(toc-counter, decimal-leading-zero) ".";
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--news-red);
  margin-right: 8px;
}
.main-content > ol a {
  color: var(--ink);
  text-decoration: none;
}
.main-content > ol a:hover { color: var(--news-red); }

/* section h2 (科技新闻) → 横幅标题 */
.main-content h2 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--news-red);
  margin-top: 44px;
  margin-bottom: 20px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--rule);
}

/* item h3 → 文章标题 */
.main-content h3 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 36px;
  margin-bottom: 8px;
  color: var(--ink);
}
.main-content h3 a { color: var(--ink); text-decoration: none; }
.main-content h3 a:hover { color: var(--news-red); }

/* score badge */
.score-badge {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--news-red);
  padding: 2px 8px;
  border-radius: 1px;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

/* 正文段落 */
.main-content p {
  font-size: 15px;
  color: #333;
  margin-bottom: 12px;
  text-align: justify;
}

/* 「背景」「影响」标签 */
.main-content p > strong:first-child {
  font-family: 'Playfair Display', serif;
  color: var(--news-red);
  font-weight: 700;
}

/* source line */
.main-content .source-line {
  font-family: 'EB Garamond', serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--brown-gray);
  text-transform: uppercase;
  border-left: 3px solid var(--news-red);
  padding-left: 12px;
  margin: 14px 0;
}

/* tags */
.main-content .tag-line {
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  color: var(--brown-gray);
}
.main-content .tag-line code {
  font-family: 'EB Garamond', monospace;
  background: var(--paper-dark);
  border: 1px solid var(--rule-light);
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--brown-gray);
}

/* references */
.main-content details {
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  border-left: none;
  border-right: none;
  border-radius: 0;
  margin: 20px 0;
  background: transparent;
}
.main-content details summary {
  cursor: pointer;
  padding: 10px 0;
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brown-gray);
}
.main-content details[open] summary {
  border-bottom: 1px solid var(--rule-light);
}
.main-content details > ul {
  padding: 10px 0 14px 20px;
  font-size: 13px;
  color: #555;
}
.main-content details > ul li { padding: 2px 0; }

/* hr */
.main-content hr {
  border: none;
  border-top: 1px solid var(--rule-light);
  margin: 28px 0;
}

/* code */
.main-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--paper-dark);
  border-radius: 2px;
  padding: 0 4px;
  font-size: 0.88em;
}
.main-content pre {
  background: var(--paper-dark);
  border: 1px solid var(--rule-light);
  border-radius: 2px;
  padding: 12px;
  overflow-x: auto;
}
.main-content pre code { background: none; padding: 0; }

/* inline links */
.main-content p a {
  text-decoration: underline;
  text-decoration-color: var(--rule-light);
  text-underline-offset: 2px;
}
.main-content p a:hover {
  text-decoration-color: var(--news-red);
  color: var(--news-red);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 4px double var(--rule);
  font-size: 12px;
  color: var(--brown-gray);
  letter-spacing: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .masthead h1 { font-size: 42px; letter-spacing: 10px; }
  .post-header h1 { font-size: 32px; letter-spacing: 4px; }
  body { padding: 20px 12px; }
  .article { grid-template-columns: 1fr; }
  .article-num { font-size: 32px; text-align: left; }
  .lead { padding: 0 10px; font-size: 15px; }
}
