:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-soft: #f5efe6;
  --text: #1f242c;
  --muted: #5f6773;
  --border: #e8dfd2;
  --accent: #d96b27;
  --accent-soft: #fff1e5;
  --shadow: 0 10px 30px rgba(31, 36, 44, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --surface: #1d2027;
    --surface-soft: #242832;
    --text: #eef1f6;
    --muted: #9fa8b6;
    --border: #2e3340;
    --accent: #f08a43;
    --accent-soft: rgba(240, 138, 67, 0.14);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 44px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

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

main {
  flex: 1;
}

.hero {
  padding: 44px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3.8vw, 2.2rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
}

.section {
  margin-top: 32px;
}

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

.section h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.section-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.note-summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  display: block;
}

.note-summary::-webkit-details-marker {
  display: none;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.note-summary h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.45;
  transition: color 0.15s ease;
}

.note-summary:hover h3 {
  color: var(--accent);
}

.excerpt {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.note-body {
  padding: 0 22px 20px;
  border-top: 1px dashed var(--border);
  margin-top: 2px;
  padding-top: 16px;
  font-size: 0.96rem;
}

.note-body p {
  margin: 0 0 12px;
}

.note-body p:last-child,
.note-body ul:last-child {
  margin-bottom: 0;
}

.note-body ul {
  margin: 0;
  padding-left: 20px;
}

.note-body li + li {
  margin-top: 6px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.topic-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.topic-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.topic-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.about-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}

.about-box h2 {
  margin-bottom: 8px;
}

.about-box p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 32px 0 22px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .note-summary,
  .note-body,
  .about-box {
    padding-left: 16px;
    padding-right: 16px;
  }
}
