:root {
  --green: #4c2c73;
  --gray: #f7f7f7;
  --text-dark: #222;
  --text-light: #fff;
  --accent: #222;
}
html, body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth; 
}
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  font-size: 16px;
  color: var(--text-dark);
  background-color: #fff;
  padding-top: 60px;
}
nav {
  background: var(--green);  
  color: var(--text-light);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
nav .container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.menu-toggle {
  display: none;
  font-size: 1.5em;
  cursor: pointer;
  background: none;
  border: none;
  color: #fff;
  margin-right: 10px;
}
ul.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  transition: max-height 0.3s ease;
}
ul.nav-links a {
  display: block;
  padding: 15px 10px;
  text-decoration: none;
  color: #fff;
  opacity: 0.9;
}
ul.nav-links a:hover {
  opacity: 1;
  text-decoration: underline;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
ul.nav-links a.active {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
}
/* Responsive styles for collapsible menu */
@media (max-width: 900px) {
  nav .container {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 20px;
    height: 57px;
  }
  .menu-toggle {
    display: block;
  }
  ul.nav-links {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--green);
    position: absolute;
    left: 0;
    top: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  ul.nav-links.open {
    max-height: 700px;
    transition: max-height 0.3s ease;
  }
  ul.nav-links li {
    width: 100%;
  }
  ul.nav-links a {
    padding: 15px 20px;
  }
}
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
section h1, section h2, section h3 {
  color: var(--green);
  border-bottom: 2px solid var(--green);
  padding-bottom: 5px;
}
section h1 {
  font-size: 2em;
  margin: 0 0 20px 0;
}
section h2 {
  font-size: 1.5em;
  margin: 0 0 15px 0;
}
section h3 {
  font-size: 1.2em;
  margin: 30px 0 10px 0;
}
section p {
  margin: 10px 0;
}
section:nth-of-type(even) {
  background-color: var(--gray);
}
figure {
  margin: 0;
  text-align: center;
}
figcaption {
  font-size: 0.9em;
  font-style: italic;
  color: #666;
  margin-top: 5px;
}
img {
  display: block;
  margin: 0 auto;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
  font-family: monospace;
  font-size: 16px;
  box-sizing: border-box;
}
mjx-container {
  overflow-x: auto;
  max-width: 100%;
  padding: 0.5em 0;
}
mjx-container[jax="CHTML"] {
  text-align: left;  /* prevents math from being centered awkwardly */
}

