::selection {
  background-color: var(--selection-bg);
  color: var(--selection-fg);
}

body {
  margin: 0;
  padding: 0;

  padding-top: var(--nav-bar-height);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Libre Baskerville", serif;
  font-weight: normal;
  line-height: 1;

  color: var(--heading-color);

  text-box-trim: trim-both;

  margin: 0;
  padding: 0;
}

h1 {
  font-size: var(--h1-font-size);
}
h2 {
  font-size: var(--h2-font-size);
}
h3 {
  font-size: var(--h3-font-size);
}
h4 {
  font-size: var(--h4-font-size);
}
h5 {
  font-size: var(--h5-font-size);
}
h6 {
  font-size: var(--h6-font-size);
}

p {
    font-family: "Libre Baskerville", serif;
    font-size: var(--text-font-size);

    color: var(--text-color);

    margin: 0;
    padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;

  margin: 0;
  padding: 0;
}

.subtext {
  font-family: "Libre Baskerville", serif;
  font-size: var(--subtext-font-size);
  
  color: var(--subtext-color);

  margin: 0;
  margin-bottom: 0;
  padding: 0;
}

.page {
  padding-top: var(--nav-bar-height);

  background-color: var(--bg-color);
}

.page.main-bg-image {
  background-image: var(--bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center calc(var(--nav-bar-height)); /* move the background image down by the nav bar height */
}

.nav-bar {
  display: flex;
  justify-content: space-evenly;
  align-items: center;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--nav-bar-height);
  z-index: 1000;

  background-color: var(--nav-bar-bg-color);
}


.nav-bar a {
  color: var(--nav-bar-font-color);
  font-size: var(--nav-bar-font-size);
  font-family: var(--nav-bar-font-family);
  text-decoration: none;
  display: block;

  margin: 0;
  padding: 0;
}

.central-panel {
  display: block;

  background-color: var(--central-panel-bg-color);

  width: 100%;
  position: relative;

  box-sizing: border-box;

  margin: 0;
  padding: 10%;
  padding-top: 0;
  padding-bottom: 160px;
}

/* === desktop === */

/* === tablet === */
@media (max-width: 1080px) {
  h1 {
    font-size: calc(var(--h1-font-size) * 0.9);
  }
  h2 {
    font-size: calc(var(--h2-font-size) * 0.9);
  }
  h3 {
    font-size: calc(var(--h3-font-size) * 0.9);
  }
  h4 {
    font-size: calc(var(--h4-font-size) * 0.9);
  }
  h5 {
    font-size: calc(var(--h5-font-size) * 0.9);
  }
  h6 {
    font-size: calc(var(--h6-font-size) * 0.9);
  }

  .nav-bar a {
    font-size: calc(var(--nav-bar-font-size) * 0.9);
  }
}

/* === phone === */
@media (max-width: 600px) {
  h1 {
    font-size: calc(var(--h1-font-size) * 0.9);
  }
  h2 {
    font-size: calc(var(--h2-font-size) * 0.9);
  }
  h3 {
    font-size: calc(var(--h3-font-size) * 0.9);
  }
  h4 {
    font-size: calc(var(--h4-font-size) * 0.9);
  }
  h5 {
    font-size: calc(var(--h5-font-size) * 0.9);
  }
  h6 {
    font-size: calc(var(--h6-font-size) * 0.9);
  }

  p {
    font-size: calc(var(--text-font-size) * 0.9);
  }

  .subtext {
    font-size: calc(var(--subtext-font-size) * 0.9);
  }

  .nav-bar a {
    font-size: calc(var(--nav-bar-font-size) * 0.9);
  }
}