:root {
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-code: #1e293b;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --border: #e2e8f0;
  --python: #3b82f6;
  --python-yellow: #fbbf24;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

/* ── Navbar (index) ── */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center;
  height: 56px; position: sticky; top: 0; z-index: 100; gap: 2rem;
}
.navbar-brand { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1rem; }
.navbar-nav { display: flex; gap: 1.25rem; list-style: none; }
.navbar-nav a { color: var(--text-muted); text-decoration: none; font-size: .875rem; transition: color .15s; }
.navbar-nav a:hover { color: var(--accent); }

/* ── Index layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 2.5rem 2rem; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.4rem; font-weight: 600; margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }
p { margin-bottom: 1rem; }
ul, ol { margin: .5rem 0 1rem 1.5rem; }
li { margin-bottom: .35rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.hero .subtitle { color: var(--text-muted); margin-top: .5rem; font-size: 1.05rem; }

.callout { border-left: 4px solid; padding: .9rem 1.25rem; border-radius: 0 6px 6px 0; margin: 1rem 0; font-size: .9rem; }
.callout .callout-title { font-weight: 700; margin-bottom: .3rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.callout-info { border-color: var(--accent); background: var(--accent-light); }
.callout-info .callout-title { color: #1d4ed8; }

.course-list { list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.course-list li { border: 1px solid var(--border); border-radius: 10px; transition: box-shadow .2s, border-color .2s; }
.course-list li:hover { box-shadow: 0 4px 16px rgba(37,99,235,.08); border-color: #93c5fd; }
.course-list a { display: block; padding: 1.1rem 1.4rem; text-decoration: none; color: inherit; }
.lesson-num { font-size: .72rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .15rem; }
.lesson-title { font-weight: 700; font-size: 1rem; color: var(--accent); }
.lesson-desc { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.5; }

footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: .825rem; border-top: 1px solid var(--border); margin-top: 3rem; }
