/* ---------------------- */
/* Base page typography   */
/* ---------------------- */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;          /* fully justified */
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1200px;
}

/* ---------------------- */
/* Sidebar / TOC          */
/* ---------------------- */

nav#TOC::before {
  content: "Benjamin M. Kent";    /* <-- change this to your title */
  display: block;
  font-weight: bold;
  font-size: 1.1em;
  color: #e30b5d;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
}

nav#TOC {
  position: fixed;
  width: 200px;
  padding: 2rem 1.5rem;
  border-right: 1px solid #333;
  overflow-y: auto;
  box-sizing: border-box;
  text-align: right;
}

nav#TOC ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav#TOC li {
  margin: 0.3rem 0;
}

nav#TOC a {
  text-decoration: none;
  color: #111;
}

nav#TOC a:hover {
  text-decoration: underline;
}

/* ---------------------- */
/* Main content           */
/* ---------------------- */
body > section, h1 {
  max-width: 700px;          /* readable column */
  margin: 2rem auto;         /* horizontally centered */
  padding: 0 2rem;
  box-sizing: border-box;
}

/* Offset content for sidebar on large screens */
@media screen and (min-width: 900px) {
  body > section, h1 {
    margin-left: 240px;
  }
}

/* ---------------------- */
/* Headings               */
/* ---------------------- */
h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  border-top: 1px dotted #000000;
  padding-top: 0.4rem;
  padding-bottom: 0.2rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ---------------------- */
/* Sections spacing       */
/* ---------------------- */
section.level2 {
  margin-top: 2rem;
}

section.level3 {
  margin-top: 1rem;
}

/* ---------------------- */
/* Paragraphs & lists     */
/* ---------------------- */
p {
  margin: 1rem 0;
  text-align: justify;
}

/* ==========================
   Lists
========================== */
/* Top-level lists: flush with content, no marker */
ul, ol {
  list-style: square;        /* remove bullets/numbers for top-level */
  padding-left: 0;         /* flush with main content */
  margin: 0 0 0.5rem;        /* vertical spacing for the list */
  line-height: 1.6;        /* line spacing */
}

/* Nested lists: indented with markers and proper wrapping */
ul ul, ul ol, ol ul, ol ol {
  list-style-position: inside;  /* wrapped lines align under text */
  padding-left: 1.5rem;         /* indentation for nested lists */
  margin-top: 0.5rem;           /* vertical spacing above nested list */
  margin-bottom: 0.5rem;        /* vertical spacing below nested list */
  line-height: 1.6;             /* line spacing inside nested items */
}

/* List items */
li {
  margin: 0 0 0.5rem 0;             /* spacing between bullets */
  padding: 0;
}

/* Nested list markers */
ol ol { list-style-type: lower-roman; }/* i, ii, iii for nested */
ul ol { list-style-type: decimal; }    /* numbers for nested */
ol ul { list-style-type: circle; }     /* hollow bullets */



/* ==========================
   Code blocks
========================== */
pre, code {
  font-family: SFMono-Regular, Consolas, Menlo, "Liberation Mono", monospace;
  background: #f7f7f7;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}
pre {
  padding: 1rem;
  overflow-x: auto;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

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


/* ==========================
   Links
========================== */
body a {
  color: #000;                        /* black text */
  text-decoration: underline dashed;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: all 0.2s ease;
}

body a:hover {
  color: #e30b5d;                     /* Swiss red */
  text-decoration: underline solid;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}


/* ---------------------- */
/* Responsive design      */
/* ---------------------- */
/* Hide sidebar TOC on small screens */
@media screen and (max-width: 900px) {
  nav#TOC {
    display: none;
  }

  /* Center content fully when TOC is hidden */
  body > div {
    margin-left: auto;
    margin-right: auto;
    max-width: 95%;
  }
}