:root {
  --ncsu-red: #cc0000;
  --ncsu-dk-red: #990000;
  --ncsu-white: #ffffff;
  --ncsu-gray: #999999;
  --ncsu-dk-gray: #333333;
  --ncsu-black: #000000;

  --text: var(--ncsu-black);
  --subtext: var(--ncsu-gray);
  --background: var(--ncsu-white);
  --link: var(--ncsu-red);
  --link-hover: var(--ncsu-dk-red);
  --accent: var(--ncsu-red);
  --accent-dim: var(--ncsu-dk-red);

  --inverted-text: var(--ncsu-white);
  --inverted-background: var(--ncsu-black);
  --inverted-link: var(--ncsu-white);
  --inverted-link-hover: var(--ncsu-gray);

  --header-background: var(--ncsu-red);
  --header-text: var(--ncsu-white);
  --header-subtext: var(--ncsu-white);
  --dropdown-background: var(--ncsu-dk-red);
  --dropdown-border: var(--ncsu-white);

  --footer-background: var(--ncsu-dk-gray);

  color-scheme: light;

  /* chapter-list.css */
  --media-border: #cccccc;
}

@font-face { font-family: "Roboto"; font-display: swap; font-weight: 400; font-style: normal; src: url("font/Roboto-Regular.ttf")     format("truetype"); }
@font-face { font-family: "Roboto"; font-display: swap; font-weight: 400; font-style: italic; src: url("font/Roboto-Italic.ttf")      format("truetype"); }
@font-face { font-family: "Roboto"; font-display: swap; font-weight: 700; font-style: normal; src: url("font/Roboto-Bold.ttf")        format("truetype"); }
@font-face { font-family: "Roboto"; font-display: swap; font-weight: 700; font-style: italic; src: url("font/Roboto-BoldItalic.ttf")  format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-display: swap; font-weight: 400; font-style: normal; src: url("font/RobotoCondensed-Regular.ttf")     format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-display: swap; font-weight: 400; font-style: italic; src: url("font/RobotoCondensed-Italic.ttf")      format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-display: swap; font-weight: 700; font-style: normal; src: url("font/RobotoCondensed-Bold.ttf")        format("truetype"); }
@font-face { font-family: "Roboto Condensed"; font-display: swap; font-weight: 700; font-style: italic; src: url("font/RobotoCondensed-BoldItalic.ttf")  format("truetype"); }

body {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--background);
  background-size: 20px 20px;
  background-repeat: repeat;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

a.plain,
a.plain:hover {
  color: var(--text);
  text-decoration: none;
}

a.header-plain,
a.header-plain:hover {
  color: var(--header-text);
  text-decoration: none;
}

.subtext,
a.subtext,
a.subtext:hover {
  color: var(--subtext);
}

small {
  color: var(--ncsu-gray);
}

header {
  background-color: var(--header-background);
  color: var(--header-text);
  height: 143px;
}

header nav {
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 1500px;
  max-width: 80vw;
  height: 143px;
}

header nav > * {
  max-height: 143px;
}

.header-image img {
  height: 130px;
  padding-top: 13px;
}

.header-image.logo svg {
  width: 100px;
  fill: var(--header-text);
}

.header-title {
  text-transform: uppercase;
  font-size: 24px;
  color: var(--header-subtext);
}

.header-title h1 {
  font-family: "Roboto Condensed";
  font-weight: 700;
  font-size: 32px;
  margin: 0;
  color: var(--header-text);
}

.header-nav:not(.header-dropdown) {
  text-transform: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  font-size: 16px;
  gap: 15px;
  padding-top: 15px;
  padding-left: 10px;
}

.header-nav a {
  text-decoration: none;
  padding-bottom: 10px;
  color: var(--inverted-link);
}

.header-nav a[href="#"] {
  font-weight: 700;
}

.header-nav a:active {
  color: var(--inverted-link-hover);
}

.header-spacing {
  flex: 1;
}

#dropdown {
  position: absolute;
  left: 0px;
  top: 140px;
  background-color: var(--dropdown-background);
  display: inline-block;
  list-style: none;
  text-align: left;
  margin: 0;
  padding: 20px 25px;
  padding-bottom: 30px;
  width: calc(100vw - 50px);
  display: none;
  z-index: 999;
}

#dropdown.active {
  display: block;
}

#dropdown li {
  border-bottom: 1px solid var(--dropdown-border);
}

#dropdown li a {
  text-decoration: none;
  display: block;
  padding: 5px 0;
}

#dropdown li:last-child {
  border-bottom: none;
}

#hamburger {
  cursor: pointer;
  vertical-align: middle;
  display: flex;
  flex-direction: column;
}

#hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: var(--header-text);
  margin: 3px 0px;
}

footer {
  color: var(--ncsu-white);
  background-color: var(--footer-background);
}

footer nav {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  width: 1500px;
  max-width: 80vw;
  min-height: 102px;
  align-items: center;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.8em;
}

footer > * {
  min-height: 50px;
}

.footer-image {
  width: 100px;
}

.footer-title {
  font-weight: 700;
  font-size: 18px;
}

.footer-spacing {
  flex: 1;
}

.footer-author {
  color: var(--subtext);
  display: inline-block;
  padding: 10px 0;
  padding-left: 20px;
}

.footer-author:first-child {
  padding-left: 0;
}

.footer-author-name {
  color: var(--ncsu-white);
  font-weight: 700;
  padding-bottom: 5px;
  font-size: 18px;
}

#content {
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: calc(
    100vh - 143px - 102px
  ); /*    header  footer */
}

.button {
  background-color: var(--inverted-background);
  color: var(--inverted-text);
  border: 1px solid var(--inverted-text);
  border-radius: 2px;
  font-style: italic;
  text-transform: uppercase;
  font-size: 16px;
  cursor: pointer;
}

.button.inverted {
  background-color: var(--background);
  color: var(--text);
  border-color: var(--text);
}

.button::after {
  content: "";
  height: 0;
  width: 2px;
  display: inline-block;
}

.card {
  margin: 0 auto;
  max-width: 1250px;
  width: calc(95vw - 60px);
  padding: 20px 40px;
  text-align: left;
}

.card h2 {
  color: var(--ncsu-black);
  font-size: 32px;
}

.fake-hidden {
  opacity: 0;
  pointer-events: none;
  user-select: none;
  height: 0;
}

.title-image {
  height: 32px;
}

.middle-hidden {
  display: none;
}

@media screen and (max-width: 1000px) {
  .large-only {
    display: none !important;
  }

}

@media screen and (min-width: 1001px) {
  .large-hidden {
    display: none !important;
  }

  .header-image.logo svg {
    width: 175px;
  }

  .middle-hidden {
    display: inline-block;
  }
}

@media screen and (min-width: 651px) {
  .mobile-only {
    display: none !important;
  }

  header nav table tr:first-child {
    height: 100px;
  }

  header nav table tr:last-child {
    height: 40px;
    vertical-align: top;
  }
}

@media screen and (max-width: 650px) {
  .mobile-hidden {
    display: none !important;
  }

  .middle-hidden {
    display: inline-block;
  }

  .header-title {
    font-size: 14px;
  }

  .header-title h1 {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 0;
  }

  header nav table {
    height: 140px;
  }

  header nav table tr:first-child {
    height: 80px;
    vertical-align: bottom;
  }

  footer {
    padding: 20px;
    width: calc(100vw - 40px);
  }

  .card {
    padding-left: 20px;
    padding-right: 20px;
  }
}
