/* ═══════════════════════════════════════════
   中成泵业技术博客 — Industrial Engineering Design
   ═══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --navy: #0a1628;
  --navy-light: #13203a;
  --navy-mid: #1e3a5f;
  --gold: #d4a030;
  --gold-light: #e8b84a;
  --amber: #f59e0b;
  --white: #f8f9fc;
  --gray-100: #eef0f4;
  --gray-200: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #6b7280;
  --gray-800: #374151;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e2e5eb;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --font-display: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.brand-mark.small {
  width: 36px;
  height: 36px;
  font-size: 17px;
}
.site-header h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}
.site-header h1 a { color: #fff; text-decoration: none; }
.site-header h1 a:hover { color: var(--gold-light); }
.subtitle { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 1px; letter-spacing: 0.5px; }

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.nav-link:hover { border-color: var(--gold); color: var(--gold-light); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 56px 0 40px;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.hero-desc {
  font-size: 14px;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Post Grid (首页) ── */
.post-grid {
  display: grid;
  gap: 20px;
  padding: 32px 0 48px;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
  animation: fadeUp 0.4s ease-out both;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}
.post-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.post-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-card h2 a { color: var(--navy); text-decoration: none; }
.post-card h2 a:hover { color: var(--navy-mid); }
.card-excerpt {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 14px;
}
.read-more {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-mid);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.read-more:hover { color: var(--gold); }

/* ── Article Page ── */
.post-layout {
  display: flex;
  gap: 32px;
  padding: 32px 0 48px;
  align-items: flex-start;
}
.post-article {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  min-width: 0;
}
.post-header { margin-bottom: 28px; }
.post-article .post-date {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.post-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: 0.5px;
}

/* 文章正文排版 */
.post-body { font-size: 15px; line-height: 1.85; }
.post-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
}
.post-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-mid);
  margin: 24px 0 10px;
}
.post-body p { margin-bottom: 14px; }
.post-body ul, .post-body ol { margin: 0 0 14px 20px; }
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--navy); }
.post-body a { color: var(--navy-mid); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--gold); }
.post-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 3px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.back-link, .next-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover, .next-link:hover { color: var(--gold); }

/* ── Sidebar ── */
.post-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.sidebar-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  letter-spacing: 1px;
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}
.sidebar-list li:last-child { border: none; }
.sidebar-list a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.2s;
}
.sidebar-list a:hover { color: var(--navy-mid); }

.brand-card { text-align: center; }
.brand-mini { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; text-align: left; }
.brand-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.brand-info { font-size: 12px; color: var(--text-light); }

.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 8px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--navy-mid); }

/* ── 404 ── */
.error-404 {
  text-align: center;
  padding: 80px 24px;
}
.error-code {
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.15;
}
.error-msg {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.error-hint {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  padding: 32px 0;
  margin-top: 0;
}
.footer-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
.footer-sub { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-links { text-align: right; font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.8; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header .container { flex-wrap: wrap; gap: 8px; }
  .post-layout { flex-direction: column; }
  .post-sidebar { width: 100%; }
  .post-article { padding: 24px; }
  .post-title { font-size: 22px; }
  .hero-title { font-size: 22px; }
  .hero { padding: 32px 0 24px; }
  .footer-content { flex-direction: column; }
  .footer-links { text-align: left; }
  .post-footer { flex-direction: column; align-items: flex-start; }
}
