/* =========================================================
   RESET — this is what fixes the black gap permanently
   ========================================================= */

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

html, body{
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* =========================================================
   FONTS — Computer Modern
   ========================================================= */

@font-face{
  font-family: "Computer Modern";
  src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf");
}
@font-face{
  font-family: "Computer Modern";
  src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunsx.otf");
  font-weight: bold;
}
@font-face{
  font-family: "Computer Modern";
  src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunsi.otf");
  font-style: italic;
}
@font-face{
  font-family: "Computer Modern";
  src: url("http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunbxo.otf");
  font-weight: bold;
  font-style: italic;
}

/* =========================================================
   BODY / TYPOGRAPHY
   ========================================================= */

body{
  font-family: "Computer Modern", sans-serif;
  background-color: rgb(225,225,225);
  color: #111;
  line-height: 1.6;
}

/* =========================================================
   NAVBAR — GUARANTEED NO TOP GAP
   ========================================================= */

.topnav{
  position: fixed;        /* fixed avoids initial sticky jump */
  top: 0;
  left: 0;
  width: 100%;
  background-color: #333;
  z-index: 1000;
}

/* inner alignment */
.topnav-inner{
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

/* navbar links */
.topnav a{
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 16px 16px;
  text-decoration: none;
  font-size: 16px;
}

.topnav a:hover{
  background-color: #ddd;
  color: black;
}

.topnav a.active{
  background-color: #0b7a57;
  color: white;
}

/* mobile icon */
.topnav .icon{
  display: none;
}

/* =========================================================
   PAGE CONTENT
   ========================================================= */

/* Push content below fixed navbar */
main{
  padding-top: 56px;   /* MUST match navbar height */
}

.centering{
  max-width: 900px;
  margin: 24px auto;
  padding: 24px 18px;
}

/* card look */
section.centering{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* =========================================================
   TEXT
   ========================================================= */

p, li{
  font-size: 18px;
}

h1, h2, h3{
  margin-top: 28px;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

/* =========================================================
   LINKS
   ========================================================= */

a{
  color: #0b57d0;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

/* =========================================================
   IMAGES
   ========================================================= */

img{
  max-width: 100%;
  height: auto;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer{
  background-color: black;
  color: white;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  margin-top: 30px;
}

/* =========================================================
   RESPONSIVE NAVBAR
   ========================================================= */

@media screen and (max-width: 600px){
  .topnav-inner{
    flex-wrap: wrap;
  }

  .topnav a:not(:first-child){
    display: none;
  }

  .topnav a.icon{
    display: block;
    margin-left: auto;
  }

  .topnav.responsive a{
    display: block;
    width: 100%;
    text-align: left;
  }

  main{
    padding-top: 56px;
  }
}

/* =========================
   RESPONSIVE NAVBAR (FIXED)
   ========================= */

@media screen and (max-width: 600px){

  /* hide all links except the first one and the hamburger icon */
  .topnav-inner a:not(:first-child){
    display: none;
  }

  /* show the hamburger icon */
  .topnav-inner a.icon{
    display: block;
    margin-left: auto;
  }

  /* when responsive class is added, show links as a vertical list */
  .topnav.responsive .topnav-inner{
    flex-direction: column;
    align-items: stretch;
  }

  .topnav.responsive .topnav-inner a{
    display: block;
    width: 100%;
    text-align: left;
  }

  /* keep the hamburger on top-right even in responsive mode */
  .topnav.responsive .topnav-inner a.icon{
    align-self: flex-end;
    width: auto;
    text-align: right;
  }
}

/* Prevent MathJax display equations from overflowing on small screens */
mjx-container[jax="CHTML"][display="true"]{
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 6px; /* avoids cutting off descenders */
}

/* Keep inline math from forcing weird wrapping */
mjx-container{
  max-width: 100%;
}


