:root {
  --bg: #f4f0e8;
  --paper: #fffaf2;
  --ink: #1f1a17;
  --muted: #63594f;
  --line: #d9cdbd;
  --accent: #8a1e12;
  --accent-2: #b03a2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, #efe2d0 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, #f5dfcf 0%, transparent 35%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border-bottom: 1px solid var(--line);
}

.logo {
  text-decoration: none;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 16px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

nav a.active,
nav a:hover {
  color: var(--accent);
}

main {
  width: min(1100px, 92%);
  margin: 0 auto;
  flex: 1;
}

.hero {
  margin: 64px 0 36px;
  padding: 36px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(130deg, #fff9ee 0%, #fce8d8 70%);
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 6vw, 56px);
}

.hero p {
  max-width: 760px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.btn:hover {
  background: var(--accent-2);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.page-main {
  margin-top: 24px;
}

.page-head h1 {
  font-family: "Noto Serif SC", serif;
  margin-bottom: 8px;
}

.page-head h2 {
  font-family: "Noto Serif SC", serif;
  margin-bottom: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 20px 0 24px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 16px;
}

.stat strong {
  display: block;
  font-size: 24px;
  color: var(--accent);
}

.toolbar {
  margin: 16px 0 22px;
}

input[type="search"] {
  width: min(560px, 100%);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffef9;
  font-size: 16px;
}

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 40px;
}

.card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  background: #f2ebdf;
}

.card h3 {
  margin: 0 0 8px;
  font-family: "Noto Serif SC", serif;
}

.meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.back-link {
  color: var(--accent);
  text-decoration: none;
}

.person-article {
  margin: 10px 0 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 26px;
}

.person-article h1 {
  margin-top: 0;
  font-family: "Noto Serif SC", serif;
}

.person-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.person-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f2ebdf;
  flex-shrink: 0;
}

.markdown-body {
  font-family: "Noto Serif SC", serif;
  line-height: 1.9;
}

.markdown-body h2,
.markdown-body h3 {
  margin-top: 1.8em;
}

.markdown-body a {
  color: var(--accent);
}

.prose {
  max-width: 780px;
  line-height: 1.85;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 10px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 24px;
  }

  .person-header {
    align-items: flex-start;
  }
}
