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

:root {
  --color-bg: #fdfbf7;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #3b7dd8;
  --color-accent-soft: #e8f1fc;
  --color-teacher: #fff9eb;
  --color-teacher-border: #e8c84a;
  --color-task: #f0f9f2;
  --color-task-border: #4caf7d;
  --color-activity: #f0f4ff;
  --color-activity-border: #7ba4e0;
  --color-border: #e8e4de;
  --color-footer: #94918c;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
  --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}

nav h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
}

.lang-switch a {
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.lang-switch a.active {
  background: var(--color-accent);
  color: #fff;
}

.lang-switch a:hover:not(.active) {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* ─── Main Layout ─── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(160deg, var(--color-accent-soft) 0%, #fef9e7 100%);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ─── Overview ─── */
.overview {
  background: var(--color-surface);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.overview p {
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.overview ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.2rem;
}

.overview li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.overview a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.overview a:hover {
  border-bottom-color: var(--color-accent);
}

/* ─── Lessons ─── */
.lesson {
  margin-bottom: 3.5rem;
}

.lesson > h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}

/* ─── Teacher Box ─── */
.teacher-box {
  background: var(--color-teacher);
  border: 1px solid rgba(232, 200, 74, 0.3);
  border-left: 3px solid var(--color-teacher-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.teacher-box h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #7a5d00;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.teacher-box ul {
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
}

.teacher-box li {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #4a3d00;
}

.teacher-box p {
  font-size: 0.92rem;
  color: #4a3d00;
  margin-bottom: 0.4rem;
}

.teacher-box a {
  color: var(--color-accent);
  text-decoration: none;
}

.teacher-box a:hover {
  text-decoration: underline;
}

/* ─── Articles ─── */
article {
  margin-bottom: 2.25rem;
}

article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

article p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

article a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

article a:hover {
  border-bottom-color: var(--color-accent);
}

/* ─── Examples List ─── */
.examples {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
}

.examples li {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  font-size: 0.93rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.examples li:hover {
  box-shadow: var(--shadow-sm);
}

/* ─── Activity Box ─── */
.activity-box {
  background: var(--color-activity);
  border: 1px solid rgba(123, 164, 224, 0.25);
  border-left: 3px solid var(--color-activity-border);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  margin: 1.25rem 0;
}

.activity-box h4 {
  color: #2c5ea0;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-box p {
  font-size: 0.92rem;
  color: #3a5f8a;
}

/* ─── Task Box ─── */
.task-box {
  background: var(--color-task);
  border: 1px solid rgba(76, 175, 125, 0.2);
  border-left: 3px solid var(--color-task-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.25rem 0;
}

.task-box h4 {
  color: #1b6b3a;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.task-box p {
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  color: #2d4d36;
}

/* ─── Conclusion ─── */
.conclusion {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

.conclusion h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.conclusion p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Footer ─── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--color-footer);
  font-size: 0.82rem;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  nav {
    padding: 0.75rem 1rem;
  }

  nav h1 {
    font-size: 1rem;
  }

  main {
    padding: 2rem 1rem 3rem;
  }

  .hero {
    padding: 2rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .overview {
    padding: 1.25rem 1.25rem;
  }

  .teacher-box,
  .task-box,
  .activity-box {
    padding: 1rem 1.1rem;
  }

  .examples li {
    padding: 0.6rem;
  }
}
