/* 个人技术博客 - 备案用静态站点样式 */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-bg: #f8fafc;
  --color-card: #ffffff;
  --color-border: #e2e8f0;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 960px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* 顶部导航 */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
}

/* 主内容区 */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* 首页横幅 */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 40px;
  margin-bottom: 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 卡片 */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  color: var(--color-text);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.card h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
  color: var(--color-text);
}

.card p,
.card li {
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.card ul,
.card ol {
  padding-left: 24px;
}

/* 文章列表 */
.post-list {
  list-style: none;
}

.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.post-item h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--color-primary);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.post-tag {
  display: inline-block;
  background: #eff6ff;
  color: var(--color-primary);
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 12px;
  margin-right: 6px;
}

/* 分类标签 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.category-item {
  background: #f1f5f9;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.category-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.category-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* 页面标题 */
.page-title {
  font-size: 1.75rem;
  margin-bottom: 24px;
  color: var(--color-text);
}

/* 联系信息 */
.contact-info {
  list-style: none;
}

.contact-info li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 12px;
}

.contact-info li:last-child {
  border-bottom: none;
}

.contact-label {
  font-weight: 600;
  color: var(--color-text);
  min-width: 80px;
}

/* 页脚 */
.site-footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  line-height: 1.8;
}

.footer-links {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 12px;
}

.footer-icp {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-icp a {
  color: var(--color-text-muted);
}

.footer-copyright {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* 响应式 */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 24px;
    gap: 12px;
  }

  .site-nav {
    gap: 20px;
  }

  .hero {
    padding: 32px 24px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 24px 16px;
  }
}
