/* =======================================================
   Helping AI to Create New Knowledge — James Campbell
   Clean modern stylesheet for GitHub Pages publication
   ======================================================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 2rem auto;
  max-width: 820px;
  line-height: 1.6;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  color: #111;
  background-color: #fff;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2.2rem;
  color: #111;
}

h1 {
  font-size: 1.9rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.3rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.8rem;
}

p {
  margin: 1rem 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  border-left: 4px solid #c5d9f0;
  background: #f9fbfd;
  color: #333;
  font-style: italic;
}

/* ---------- Lists ---------- */
ul, ol {
  margin: 1rem 0 1rem 2rem;
}

li {
  margin: 0.4rem 0;
}

/* ---------- Tables ---------- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f7f7f7;
  font-weight: 600;
}

/* ---------- Images ---------- */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

/* ---------- Code ---------- */
pre, code {
  background: #f7f7f7;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- Links ---------- */
a {
  color: #0645AD;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header / Footer ---------- */
header, footer {
  color: #666;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 2rem;
}

footer a {
  color: #666;
}

footer {
  border-top: 1px solid #e5e5e5;
  padding-top: 1rem;
  margin-top: 3rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body {
    margin: 1.5rem;
    font-size: 15px;
  }

  h1 {
    font-size: 1.6rem;
  }
}
/* Table cleanup */
.normal-table {
  border-collapse: collapse;
  width: 100%;
}

.normal-table th,
.normal-table td {
  border: 1px solid #ddd;
  padding: 8px;
}
/* ===== Title & Subtitle overrides ===== */

/* Option A (class-based — most reliable) */
.page-title {
  font-size: 2.25rem;      /* ~36px */
  line-height: 1.2;
  color: #0F4761;          /* original teal */
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-top: 0;
  margin-bottom: 0.25rem;
  border: none;            /* cancel global h1 border */
  padding-bottom: 0;
}

.subtitle {
  font-size: 1.1rem;       /* ~17–18px */
  color: #595959;          /* original gray */
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

/* Option B (no classes — uses first visible h1) */
main h1:first-of-type {
  font-size: 2.25rem;
  line-height: 1.2;
  color: #0F4761;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-top: 0;
  margin-bottom: 0.25rem;
  border: none;
  padding-bottom: 0;
}

/* Make section headings closer to the old palette */
h2 { color: #0F4761; font-weight: 600; }
h3 { color: #0F4761; font-weight: 600; }
