/* global.css — 极简排版风格 */

:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-muted: #78716c;
  --color-accent: #d97706;
  --color-border: #e7e5e4;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 720px;
  --radius: 8px;
}

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

html {
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo .dot {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--color-text); }

/* Main */
.site-main {
  flex: 1;
  padding: 3rem 0 5rem;
}

/* Typography */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1.25rem; }
a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 600; }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-style: italic;
}
code {
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--color-border);
}

/* Cards (for list pages) */
.card-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.card a.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.card:hover a.card-title { color: var(--color-accent); }

.card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* Tags */
.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.7rem;
  background: var(--color-bg);
  color: var(--color-text-muted);
  padding: 0.15em 0.6em;
  border-radius: 100px;
  border: 1px solid var(--color-border);
}

/* Case detail sections */
.case-section {
  margin: 2rem 0;
}

.case-section h2 {
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-border);
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Meta bar */
.meta-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.meta-item strong {
  color: var(--color-text);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.main-site-link {
  font-size: 0.85rem !important;
  color: var(--color-accent) !important;
  font-weight: 500;
}

/* Hero (homepage) */
.hero {
  padding: 2rem 0 1rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* Section headings on homepage */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.3rem;
}

.section-heading a {
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .container { padding: 0 1rem; }
  .site-nav { gap: 1rem; }
  .hero h1 { font-size: 1.75rem; }
}
