/* hdop家 · 瑞士极简白纸黑字主题 */
:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-hover: #f4f4f5;
  --ink: #171717;
  --ink-body: #262626;
  --muted: #666666;
  --border: #e5e5e5;
  --accent: #0f4c5c;
  --accent-soft: #eef5f6;
  --max-wide: 980px;
  --max-read: 720px;
  --radius: 8px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 20px;
}

.read-container {
  width: 100%;
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 4px 0;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a.active {
  border-bottom: 2px solid var(--accent);
}

.hero {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0 0 20px;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.identity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-body);
}

.identity-chip strong {
  color: var(--ink);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-body);
  background: var(--bg);
}

.pill:hover,
.pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 20px;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.section-more {
  font-size: 13.5px;
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: #c4c4c8;
  transform: translateY(-1px);
}

.post-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.cat-badge {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.post-card-title {
  margin: 0 0 10px;
  font-size: 17.5px;
  line-height: 1.45;
  color: var(--ink);
}

.post-card-title a {
  color: var(--ink);
}

.post-card-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.page-header {
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.6vw, 30px);
  color: var(--ink);
  line-height: 1.35;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.search-input {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
}

.search-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.article-row {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.article-row h2 {
  margin: 6px 0 8px;
  font-size: 19px;
  line-height: 1.4;
}

.article-row h2 a {
  color: var(--ink);
}

.article-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

.post-article {
  padding: 34px 0 52px;
}

.back-link {
  display: inline-block;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.post-title {
  margin: 10px 0 14px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.post-lead {
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.post-cover {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-body);
}

.prose h2 {
  margin: 36px 0 14px;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

.prose p {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid #d4d4d8;
  color: var(--muted);
}

.prose code {
  background: var(--surface-hover);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: Consolas, Menlo, Monaco, monospace;
}

.prose pre {
  background: #18181b;
  color: #f4f4f5;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 22px 0;
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  width: 52px;
  margin: 32px auto;
}

.references-block {
  margin-top: 28px;
  padding-top: 4px;
}

.references-title {
  margin: 0 0 10px !important;
  font-size: 14px !important;
  color: var(--muted) !important;
}

.references-list {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.origin-box {
  margin-top: 32px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.post-nav {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.post-nav-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  display: block;
}

.post-nav-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.post-nav-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 0 24px;
  }
  .nav-links {
    gap: 14px;
  }
  .brand-sub {
    display: none;
  }
  .post-article {
    padding: 24px 0 36px;
  }
}
