:root {
  --color-bg: #fdf8f2;
  --color-surface: #ffffff;
  --color-primary: #d97a3f;
  --color-primary-dark: #b85f2b;
  --color-text: #3a2e26;
  --color-text-muted: #7a6a5d;
  --color-border: #ecdfd0;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.site-title:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  color: var(--color-text);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--color-bg);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-primary-dark);
  background: #fbe9db;
  font-weight: 600;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

.hero p {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.topic-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(180, 120, 70, 0.15);
  text-decoration: none;
}

.topic-card .icon {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 0.5rem;
}

.topic-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--color-text);
}

.topic-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.page-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.page-header p {
  color: var(--color-text-muted);
  margin: 0;
}

.content-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.content-section h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}

.content-section p,
.content-section li {
  color: var(--color-text-muted);
}

.placeholder {
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}
