/* ============ Li Lu Knowledge Base Shared Stylesheet ============ */

:root {
  --bg: #f7f5f0;
  --bg-card: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #8a8a8a;
  --line: #e5e1d6;
  --accent: #8b2e2a;
  --accent-soft: #d4a5a2;
  --gold: #b8923b;
  --green: #3a6b3a;
  --blue: #2c4a6b;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------- Header / Navigation -------- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.05em;
}

.logo small {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: normal;
  letter-spacing: 0.1em;
  margin-left: 6px;
}

.nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 14px;
}

.nav a {
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav a:hover, .nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* -------- Main Container -------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

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

/* -------- Hero / Page Header -------- */
.hero {
  text-align: center;
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 15px;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
}

.hero .version {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-sans);
}

/* -------- Stats Row -------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 48px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

/* -------- Navigation Cards -------- */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.nav-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  color: var(--ink);
}

.nav-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent-soft);
}

.nav-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.nav-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--ink);
}

.nav-card p {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.nav-card .arrow {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-sans);
}

/* -------- Section Headers -------- */
.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
}

.section-subtitle {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

/* -------- Top Lists -------- */
.top-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.top-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.top-item:hover {
  border-color: var(--accent-soft);
  text-decoration: none;
}

.top-item-name {
  color: var(--ink);
  font-size: 15px;
}

.top-item-count {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  background: #fbeeed;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* -------- Speech / Article Cards -------- */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all 0.15s;
  display: block;
  color: var(--ink);
}

.article-card:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.article-date {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.article-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.article-excerpt {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.article-badges {
  margin-top: 12px;
}

.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  margin-right: 6px;
}

.badge-zh { background: #e8e0d0; color: #6b5d3a; }
.badge-en { background: #d0dce8; color: #3a5d6b; }
.badge-pdf { background: #e8d0d0; color: #8b2e2a; }
.badge-md { background: #d0e8d0; color: #3a6b3a; }
.badge-full { background: var(--accent); color: white; }
.badge-summary { background: var(--ink-muted); color: white; }

/* -------- Concept / Person / Company Detail -------- */
.detail-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.detail-title-en {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.detail-meta {
  margin-top: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-muted);
}

.detail-section {
  margin-bottom: 32px;
}

.detail-section h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.detail-section h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  margin: 20px 0 10px;
}

.detail-section p {
  margin-bottom: 14px;
  color: var(--ink);
  line-height: 1.85;
}

.detail-section ul, .detail-section ol {
  margin: 0 0 16px 24px;
  color: var(--ink);
}

.detail-section li {
  margin-bottom: 6px;
  line-height: 1.8;
}

/* -------- Quote -------- */
.quote {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 16px 22px;
  margin: 18px 0;
  font-style: italic;
  color: var(--ink-soft);
}

.quote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* -------- Cross-refs table -------- */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 14px;
  margin: 16px 0;
}

.ref-table th, .ref-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.ref-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--ink);
}

.ref-table tr:hover td {
  background: #faf8f2;
}

/* -------- Category Section -------- */
.category-section {
  margin-bottom: 40px;
}

.category-header {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

/* -------- Timeline -------- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-year {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* -------- Footer -------- */
.site-footer {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-muted);
}

.site-footer p { margin-bottom: 6px; }

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 16px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 12px 18px; }
  main { padding: 24px 16px 60px; }
  .hero h1 { font-size: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-cards { grid-template-columns: 1fr; }
  .top-list { grid-template-columns: 1fr; }
}

/* -------- Utility -------- */
.u-center { text-align: center; }
.u-muted { color: var(--ink-muted); }
.u-small { font-size: 13px; }
.u-mt-8 { margin-top: 8px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-24 { margin-top: 24px; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-24 { margin-bottom: 24px; }
