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

/* ---------- Layout ---------- */
body {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  color: #222;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 880px;
  padding: 0 1.5rem 3rem;
}

/* ---------- Header ---------- */
header {
  text-align: center;
  padding: 2rem 0 1.2rem;
  border-bottom: 3px solid #3b82f6;
  margin-bottom: 1rem;
}

header h1 {
  font-size: 2.1rem;
  letter-spacing: 0.5px;
  color: #0f172a;
  font-weight: 700;
}

nav {
  margin-top: 0.8rem;
}

nav a {
  color: #2563eb;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #1d4ed8;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  color: #111;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

p, li {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.25rem;
}

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* ---------- Figures ---------- */
figure {
  margin: 2rem auto;
  text-align: center;
}

figure img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

figcaption {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

/* ---------- Code & Preformatted ---------- */
pre, code {
  background-color: #f1f5f9;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 2.5rem;
  padding-top: 1rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}
