@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&family=Big+Shoulders+Display:wght@700&display=swap');

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

body {
  background-color: #f4ecd8;
  color: #1c1828;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
  padding: 0;
}

/* ── Toggle button ── */

.nav-toggle {
  position: fixed;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 200;
  background: #f4ecd8;
  border: 1px solid rgba(0, 0, 0, 0.18);
  padding: 0.3rem 0.65rem;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 0.78rem;
  color: #3a1a08;
  cursor: pointer;
  line-height: 1.4;
}

.nav-toggle:hover {
  background: #ede4cc;
}

/* ── Layout ── */

.layout {
  /* no grid — sidebar is fixed, main stays centered */
}

/* ── Sidebar ── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 0;
  overflow: hidden;
  transition: width 0.22s ease;
  z-index: 50;
}

.sidebar-inner {
  width: 230px;
  height: 100%;
  overflow-y: auto;
  padding: 3.2rem 1rem 2rem 1.25rem;
  background: #f4ecd8;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.sidebar.open {
  width: 230px;
}

.nav-home {
  display: block;
  font-size: 0.75rem;
  color: #5a3a18;
  text-decoration: none;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.nav-home:hover {
  color: #0f2040;
  text-decoration: underline;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.nav-list > li {
  margin-bottom: 0.45rem;
}

.nav-list a {
  color: #3a1a08;
  text-decoration: none;
}

.nav-list a:hover {
  color: #0f2040;
  text-decoration: underline;
}

.nav-sub {
  list-style: none;
  padding-left: 0.75rem;
  margin: 0.35rem 0 0.1rem;
  border-left: 2px solid rgba(0, 0, 0, 0.13);
}

.nav-sub li {
  margin-bottom: 0.3rem;
}

.nav-sub a {
  color: #5a3a18;
}

/* ── Main content ── */

main {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 3.5rem 6rem 3rem;
}

section {
  scroll-margin-top: 1.5rem;
}

/* ── Page header ── */

.page-header {
  margin-bottom: 3rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 1.5rem;
}

h1 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #0f2040;
  line-height: 1.1;
  margin: 0 0 0.4rem;
}

.subtitle {
  font-style: italic;
  color: #5a3a18;
  font-size: 1.05rem;
  margin: 0;
}

/* ── Headings ── */

h2 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: #0f2040;
  margin: 3rem 0 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

h3 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #3a1a08;
  margin: 2rem 0 0.5rem;
}

h4 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: #1c1828;
  margin: 1.5rem 0 0.4rem;
}

/* ── Body text ── */

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ── Links ── */

a {
  color: #1a4a7a;
  text-decoration: none;
}

a:hover {
  color: #0f2040;
  text-decoration: underline;
}

.pdf-link {
  font-size: 0.8rem;
  color: #5a3a18;
  margin-left: 0.35em;
}

.pdf-link:hover {
  color: #0f2040;
}

/* ── Images ── */

figure {
  margin: 1.75rem 0;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

figcaption {
  font-size: 0.8rem;
  font-style: italic;
  color: #5a3a18;
  margin-top: 0.4rem;
}

/* ── Note callout ── */

.note {
  font-style: italic;
  font-size: 0.9rem;
  color: #5a3a18;
}

/* ── About section ── */

.about-section {
  border-top: 2px solid rgba(0, 0, 0, 0.15);
  margin-top: 3rem;
  padding-top: 1.5rem;
}

/* ── Mobile ── */

@media (max-width: 800px) {
  main {
    padding: 1.5rem 1.25rem 4rem;
  }
}
