/* ================================================
   loperntu.github.io — Shared Stylesheet
   Typography: Noto Serif TC (body) + Noto Sans TC (headings/nav)
   Palette inspired by language_culture_handout.html
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&family=Noto+Serif+TC:wght@400;500;700&display=swap');

:root {
  --bg:      #f8fafc;
  --paper:   #ffffff;
  --ink:     #1e2d3d;
  --muted:   #6b7280;
  --line:    #e5e7eb;
  --accent:  #0f766e;
  --accent2: #d1fae5;
  --soft:    #f0fdf4;
  --warn:    #fff7ed;
  --radius:  14px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ─────────────────────────────── */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(16px, 5vw, 64px);
}

nav.site-nav .nav-inner {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

nav.site-nav .nav-brand {
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

nav.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

nav.site-nav ul li a {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

nav.site-nav ul li a:hover,
nav.site-nav ul li a.active {
  color: var(--accent);
  background: var(--soft);
}

/* ── Page wrapper ────────────────────────────── */
.page {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 5vw, 40px) 80px;
}

/* ── Headings ────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 0;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; }

/* ── Links ───────────────────────────────────── */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Section divider ─────────────────────────── */
.section-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ── Tags / Pills ────────────────────────────── */
.tag {
  display: inline-block;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent2);
  color: var(--accent);
  border: 1px solid #a7f3d0;
  margin-right: 4px;
  margin-bottom: 4px;
  white-space: nowrap;
}

/* ── Footer ──────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  text-align: center;
  padding: 24px 16px;
}

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

/* ── Responsive nav ──────────────────────────── */
@media (max-width: 600px) {
  nav.site-nav ul li a { padding: 6px 8px; font-size: 0.8rem; }
  nav.site-nav .nav-brand { font-size: 1rem; }
}
