@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Spline+Sans+Mono&display=swap');

@font-face {
  font-family: 'Moms Typewriter';
  src: url(/fonts/momstypewriter.ttf);
}

/* Font: https://ctan.org/pkg/dsserif
 * License: https://ctan.org/license/ofl
*/
@font-face {
  font-family: "Double Struck";
  src: url(/fonts/DSSerif.ttf);
}

@font-face {
  font-family: "DoubleStruckBold";
  src: url(/fonts/DSSerif-Bold.ttf);
}

* {
  box-sizing: border-box;
}

body,
button {
  /* not sure why buttons don't get this by inheritance */
  font-family: 'Lexend', 'Noto Color Emoji', 'Noto Sans Symbols 2', sans-serif;
  /* Match the font names with the ones used in command_gui.js */
  line-height: 1.3;
}

body {
  margin: 0;
}

/* Colors */
:root {
  --black: #222;
  --dark: #444;
  --red: #CA2011;
  --brown: #543B34;
  --transparent-white: rgba(255, 255, 255, 0.8);
  --transparent-brown: rgba(84, 59, 52, 0.1);
  --light-brown: #8A5102;
  --peach: #E8A06B;
  --gold: #E1B202;
  --yellow: #d4c12d;
  --cadmiumlemon: #eefb02;
  --rust: #760A03;
  --white: #eee;
  --light: #c2c2c2;
  --lighter: #e2e2e2;
}

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

figure>p {
  margin: 0;
  padding: 0;
}

figcaption {
  text-align: center;
  font-style: italic;
  margin: 0.5em auto;
}

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

.hidden {
  display: none;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.centerrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.textcenter {
  text-align: center;
  max-width: 750px;
  margin: auto;
}

main article>p {
  width: 750px;
  max-width: 90vw;
}

img.center {
  margin: auto;
  display: block;
}

a {
  color: var(--light-brown);
}

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

blockquote {
  padding: 1em;
  border: 1px dashed #666;
  border-radius: 5px;
  margin: 0.4em;
}

main>article {
  margin: auto;
}

blockquote p {
  margin-bottom: 1em;
}

blockquote:before {
  content: "\201C"
}

blockquote cite {
  margin-top: 0.4em;
  display: block;
}

.split {
  display: flex;
  flex-direction: column;
  margin: auto;
  max-width: 1024px;
}

.split>div {
  padding: 2em;
}

@media screen and (width >=600px) {

  /* On wide enough screens, consume space for the entire body, not just the nav topbar */
  body nav#topbar {
    padding-left: 0;
  }

  body {
    padding-left: 112px;
  }

  body:not(:has(nav#sidebar.vis)) {
    padding-left: 0;
  }
}



details::details-content {
  opacity: 0;
  max-height: 0;
  transition:
    all 600ms,
    content-visibility 600ms allow-discrete;
}

details[open]::details-content {
  opacity: 1;
  max-height: 200vh;
}

/* summary {
  Why did we do this?
  list-style: none;
  height: 75px;
  mask-image: linear-gradient(black 94%, transparent);
} */
summary {
  cursor: pointer;
}

/* Typography */

body,
i {
  font-family: "Lexend", monospace;
}

code,
pre {
  font-family: monospace, 'Noto Color Emoji', 'Noto Sans Symbols 2';
  /* For some reason, just specifying the family doesn't do what I expect; respecifying the size ensures that it stays the same */
  white-space: pre-wrap;
}

.tt {
  font-family: "Moms Typewriter", monospace;
}

.limitbreak {
  max-width: 90vw;
  overflow-wrap: break-word;
}

/**
* DESIGN SPECIALS
*/

.underline {
  text-decoration: underline;
}


main.verticalborders {
  display: flex;
  margin: 0;
  padding: 0;
}

.verticalborders .centermain {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  /* shrink and grow */
  align-items: center;
  justify-content: center;
}

.verticalborders>* {
  flex: none;
}

.verticalborders .centermain table {
  max-width: 80vw;
  height: auto;
  margin: auto;
}


.verticalborders .centermain img {
  max-width: 90%;
  height: auto;
}

/*
 * Flipbook
 */


#flipbook {
  position: relative;
  display: flex;
}

#flipbook blockquote.flex {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
  padding: 0;
  align-items: center;
  width: 100%;
}

#flipbook blockquote.flex:before {
  content: "";
}

#flipbook summary {
  padding: 0.5em;
}

#flipbook h2 {
  text-transform: capitalize;
}

#flipbook .page {
  padding: 1em;
}

#flipbook .page p {
  max-width: 90vw;
}

#flipbook details {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0.5em;
  left: 0.5em;
  background: rgba(150, 150, 150, 0.9);
  border-radius: 5px;
  max-height: calc(100vh - 0.5em);
  overflow-y: auto;
  width: fit-content;
  z-index: 100;
  max-width: 90vw;
}

#flipbook details summary:hover::after {
  content: " [Open]";
  font-family: monospace;
}

#flipbook details:open summary:hover::after {
  content: " [Close]";
}

#flipbook article {
  flex: 1;
  justify-content: center;
  padding: 1em;
}

#flipbook article>div {
  /* space for navigation details/summary */
  padding-top: 2em;
}

#flipbook article>div table {
  width: 100%;
}

#flipbook>details>nav {
  flex: 0;
  padding: 1em;
  margin-top: 1em;
  max-width: 400px;
}


#flipbook>details>nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/*
* 404
*/

.notfound {
  margin: 10px auto;
  max-width: 600px;
  text-align: center;
}

.notfound h1 {
  margin: 30px 0;
  font-size: 4em;
  line-height: 1;
  letter-spacing: -1px;
}

/**
 * TABLES
*/
table.border1,
table.border1 td,
table.border1 th {
  border: 1px solid currentColor;
}



/* Nav */

.menuItem {
  display: block;
  margin: 1rem 4rem;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--brown);
}

.menuItem:hover {
  text-decoration: underline;
  color: var(--light-brown);
}

.hamburger {
  position: fixed;
  z-index: 1100;
  top: 1rem;
  right: 1rem;
  padding: 4px;
  border: none;
  border-radius: 5px;
  background: var(--transparent-white);
  cursor: pointer;
  color: var(--brown);
}

.hamburger span {
  display: none;
}

.hamburger svg line {
  stroke: black;
}

.hamburger svg line:nth-of-type(1),
.hamburger svg line:nth-of-type(2),
.hamburger svg line:nth-of-type(3) {
  opacity: 1;
}

header>input:checked~.hamburger svg line:nth-of-type(1),
header>input:checked~.hamburger svg line:nth-of-type(2),
header>input:checked~.hamburger svg line:nth-of-type(3) {
  opacity: 0;
}

.hamburger svg line:nth-of-type(4),
.hamburger svg line:nth-of-type(5) {
  opacity: 0;
}

header>input:checked~.hamburger svg line:nth-of-type(4),
header>input:checked~.hamburger svg line:nth-of-type(5) {
  opacity: 1;
}

.hamburger svg line {
  transition: all 0.5s linear;
}

header>input:checked~.hamburger svg line:nth-of-type(2) {
  stroke: none;
}

.menu {
  position: fixed;
  transform: translateY(-100%);
  transition: all 0.2s;
  top: -20px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--light);
  color: white;
  list-style: none;
  padding-top: 4rem;
  z-index: 1000;
  font-family: "Special Elite", system-ui;
  font-weight: 400;
  font-style: normal;
  visibility: hidden;
  max-height: calc(100vh + 20px);
  overflow-y: auto;
}

header input:checked~nav ul {
  transform: translateY(0);
  visibility: visible;
  border: 1px solid salmon;
}

nav {
  width: 100%;
}


/**
* FOOTER
*/

footer {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 1em;
  border-top: 1px solid var(--transparent-brown);
  background-color: var(--transparent-brown);
}


footer p {
  text-align: center;
  padding: 1em;
  font-weight: bold;
  max-width: 80vw;
}

footer q {
  font-family: 'Times New Roman', Times, serif;
  font-weight: normal;
}

footer q:before {
  content: "\201C";
}

footer q:after {
  content: "\201D";
}

footer svg#mascothead .mascothead {
  fill: black;
  width: 200px;
  height: auto;
}

footer svg#footerbeaker {
  fill: black;
  width: 150px;
  height: auto;
}

footer svg#mascothead .flashes {
  fill: none;
}

footer svg#mascothead:hover .flashes {
  fill: black;
}


/**
* CONTENTS
*/

body.contents {
  background-color: #E8A06B;
}

#content-tiles {
  display: flex;
  overflow-x: scroll;
  background: var(--peach);
  padding: 1em;
  gap: 4px;
}

#content-tiles a {
  display: flex;
  justify-content: center;
  align-items: center;
}

#content-tiles a img {
  border: none;
}

#content-tiles figcaption {
  color: var(--brown);
  font-size: 1.1rem;
  padding: 0.5em;
  text-align: center;
}

#content-tiles figure {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 1em;
  border: 1px solid var(--light-brown);
  border-radius: 10px;
  width: 200px;
  height: auto;
}

#content-tiles a figure.chosen {
  border: 3px solid var(--brown);
  background-color: #E1B202;
}

#abovefold {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1em;
  margin: auto;
  gap: 2em;
}

.content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: auto;
  gap: 1em;
}

#belowfold {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: auto;
  padding: 1em;
  gap: 1em;
  position: relative;
}

#belowfold a:first-child {
  margin-bottom: -3em;
}


dialog#projectnav {
  background: var(--peach);
}

/**
* Antique
*/

table#stompbox,
table#stompbox tr,
table#stompbox td {
  border: none;
}

#antique-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1em;
  gap: 1em;
  max-width: 500px;
  margin: auto;
}

#projects>div:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1em;
  gap: 1em;
  max-width: 600px;
  margin: auto;
}



/**
* Media Queries
*/

@media only screen and (min-width: 500px) {

  .menuItem {
    font-size: 2rem;
  }

}

@media only screen and (min-width: 768px) {
  .menuItem {
    font-size: 2.2rem;
  }

}



@media only screen and (min-width: 768px) {

  figcaption {
    max-width: 400px;
    margin: 0.5em auto;
  }

  main>article {
    max-width: 800px;
  }

  div#landing {
    flex-direction: row;
    justify-content: space-around;
  }

  .split {
    flex-direction: row;
  }

  .split>div {
    width: 50%;
  }

  figure {
    margin: unset;
  }

  #flipbook article>div {
    /* space for navigation details/summary */
    padding-top: 0.5em;
  }

  #flipbook {
    font-size: 16px;
  }

  .menuItem {
    font-size: 1.8rem;
  }

  img {
    width: unset;
    height: unset;
  }
}

@media only screen and (min-width: 1200px) {

  .menuItem {
    font-size: 1.2rem;
  }
}

@media screen and (orientation:landscape) {

  .menuItem {
    font-size: 1.2rem;
    line-height: 0.5;
  }
}
