/* =========================
   Cantonese History Palette
   ========================= */

:root {
  /* Backgrounds */
  --bg-main: #f6f4f1;          /* archival paper */
  --bg-soft: #ffffff;
  --bg-accent: #eef1ed;        /* porcelain gray */

  /* Text */
  --text-main: #2b2b2b;        /* ink black */
  --text-muted: #6b6b6b;       /* annotation gray */
  --text-light: #8a8a8a;

  /* Accents */
  --accent-primary: #8f6f5c;   /* tea brown */
  --accent-secondary: #6f8f85; /* muted jade */
  --accent-tertiary: #c7b8a0;  /* parchment gold */

  /* Borders & UI */
  --border-light: #e2ded8;
  --border-medium: #d4cec6;

  --radius: 14px;
  --max-width: 960px;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
}

/* ===== Header ===== */
header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
}

/* ===== Navigation ===== */
nav a {
  text-decoration: none;
  color: var(--text-muted);
  margin-left: 14px;
  font-size: 14px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* ===== Main Content ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

h1 {
  font-size: 40px;
  font-weight: 500;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 36px;
}

/* ===== Sections ===== */
section {
  background: var(--bg-soft);
  padding: 28px 30px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

h2 {
  font-size: 20px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--accent-primary);
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-accent);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-medium);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent-secondary);
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* ===== Footer ===== */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 10px;
  }

  h1 {
    font-size: 32px;
  }
}


