:root {
  --bg: #faf7f2;
  --bg-alt: #f1ece3;
  --surface: #ffffff;
  --text: #2b2b2b;
  --muted: #6f6a63;
  --accent: #c0392b;
  --accent-contrast: #ffffff;
  --border: #e3ddd2;
  --radius: 12px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a;
    --bg-alt: #1f1f23;
    --surface: #26262b;
    --text: #ececec;
    --muted: #a5a29c;
    --accent: #e0645a;
    --accent-contrast: #17171a;
    --border: #36363c;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

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

a { color: var(--accent); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.nav-menu { display: flex; gap: 20px; }
.nav-menu a { color: var(--text); text-decoration: none; }
.nav-menu a:hover { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: 0; font-size: 1.4rem;
  color: var(--text); cursor: pointer; padding: 8px;
}

/* Hero */
.hero { padding: 96px 0 80px; text-align: center; }
.eyebrow { color: var(--muted); letter-spacing: .08em; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.25rem); margin: 0 0 12px; line-height: 1.2; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 28px; }
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 999px;
  background: var(--accent); color: var(--accent-contrast);
  text-decoration: none; font-weight: 600;
}
.btn:hover { opacity: .9; }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 1.6rem; margin: 0 0 24px; }
h3 { margin: 0 0 4px; font-size: 1.1rem; }
p { margin: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline li {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
}
.day {
  flex: none; font-weight: 700; color: var(--accent);
  min-width: 56px;
}
.timeline p { color: var(--muted); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card p { color: var(--muted); }
.card-img {
  font-size: 2.5rem; height: 120px; display: grid; place-items: center;
  background: var(--bg-alt); border-radius: 8px; margin-bottom: 14px;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { background: var(--bg-alt); }
tbody tr:last-child td { border-bottom: 0; }
tfoot th { border-top: 2px solid var(--border); border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { padding: 32px 0; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 14px 16px; border-top: 1px solid var(--border); }
  .hero { padding: 64px 0 56px; }
  .section { padding: 48px 0; }
  .timeline li { flex-direction: column; gap: 4px; }
}
