body {
  margin: 0;
  padding: 0;
}

.site-header {
  text-align: center;
  padding: 0.5em 1.0em 1.0em; /* top, right/left, bottom */
  max-width: 800px;
  margin: 0 auto;
}

.site-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3em;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.site-header .subtitle {
  display: block;
  font-size: 1.25rem;
  font-weight: 300;
  margin-top: 0.25em;
  color: #555;
}

.main-nav a.active {
  font-weight: 700;
  color: black;
}

.main-nav a.active::after {
  opacity: 1;
  background-color: black;
}

#summary {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
  font-style: italic;
  color: #333;
  margin-left: 25px;
  margin-right: 25px;
}

.index-body {
  background-color: lightgoldenrodyellow;
  font-size: 12pt;
  font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
}

.main-nav {
  width: 100%;
  background-color: #fff;
  font-family: 'Montserrat', sans-serif;
  padding: 1em 0;
  text-align: center;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.main-nav a {
  position: relative;
  display: inline-block;
  margin: 0 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

/* Bottom line on hover (extends past text on each side). */
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px; /* Distance below the text. */
  left: -6px; /* Overhang to the left. */
  right: -6px; /* Overhang to the right. */
  height: 2px;
  background-color: #333;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.main-nav a:hover::after {
  opacity: 1;
}

.responsive-image-wrapper {
  display: flex;
  justify-content: center;

  /* Add horizontal breathing room that shrinks with the screen. */
  padding: 0 1rem;
}

.responsive-image {

  /* Makes the image shrink with the viewport but never overflow. */
  max-width: 100%;

  /* Keeps image aspect ratio intact. */
  height: auto;

  border-radius: 5px; /* Because it looks cool. */
}

/* Hide the (vegetarian) "hamburger" menu toggle on wide screens. */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

/* Hamburger bars. */
.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  transition: all 0.3s ease;
}

/* Transformations when open. */
.menu-toggle.open .top {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open .middle {
  opacity: 0;
}
.menu-toggle.open .bottom {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav defaults. */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: flex; /* Always flex on mobile. */
    flex-direction: column; /* Stack menu items vertically. */
    align-items: center;
    background-color: #fff;
    overflow: hidden;
    max-height: 0; /* We start with menu collapsed. */
    padding: 0; /* No padding until menu is expanded. */


    transition: max-height 0.3s ease-out, padding 0.3s ease-out;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  /* Expands the menu with padding and height. */
  .main-nav.show {

    /* Make sure this allows enough height to fit all menu items. */
    max-height: 300px;

    padding: 1em 0;
  }

  .main-nav a {
    margin: 0.75em 0;
  }
}
