/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

@font-face {
  font-family: "Doodle Touch";
  src: url(/assets/fonts/doodle-touch/doodle-touch.otf);
}

:root {
  /* Fonts */
  --font-header: "Doodle Touch";
  --font-body: Verdana;
  --body-size: 16px;
  --h1-size: 40px;
  --h2-size: 32px;
  --h3-size: 24px;
  --h4-size: 20px;
  --h5-size: 16px;
  --h6-size: 12px;

  /* Palette */
  --color-bg: white;
  --color-text: black;
}

html {
  scroll-behavior: smooth;
  font-size: var(--body-size);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
}

#main-content {
  width: min(1000px, 100%);
  margin: 10px 5%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-header);
}

h1 {
  font-size: var(--h1-size);
  font-weight: bold;
}

h2 {
  font-size: var(--h2-size);
  font-weight: normal;
}

h3 {
  font-size: var(--h3-size);
  font-weight: normal;
}

h4 {
  font-size: var(--h4-size);
  font-weight: normal;
}

h5 {
  font-size: var(--h5-size);
  font-weight: normal;
}

h6 {
  font-size: var(--h6-size);
  font-weight: normal;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color: inherit;
}

.breadcrumb {
  padding: 0 0.5rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: end;
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb li:not(:last-child)::after {
  display: inline-block;
  margin: 0 0.25rem;
  content: ">";
}

/* Title + Subtitle (should be paired)*/
.title {
  margin-bottom: 10px;
}

.subtitle {
  margin-top: 0px;
  margin-bottom: 30px;
  font-style: italic;
}

.nav-title a {
  text-decoration: none;
}

.asterisk {
  text-decoration: none;
  color: inherit;
}

.entry-list a {
  color: inherit;
}

.monospace {
  font-family: Monospace;
}

.ascii-art {
  font-family: Monospace;
  overflow: auto;
  white-space: nowrap;
  text-align: center;
}

#wastepaper-basket-container {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

#wastepaper-basket-container a {
  text-decoration: none;
  color: inherit;
}

.credits {
  margin-top: 40px;
  font-size: 0.8em;
  font-style: italic;
}

.citation-list {
  font-size: 0.8em;
}

sup {
  font-size: 0.6em;
}

/* Accordion */

.accordion {
  --transition-time: 0.2s;
  --border-width: 3px;
  margin: 5px 0;
}

.accordion.active {
  margin-bottom: 20px;
}

.accordion-header {
  transition: var(--transition-time);
  cursor: pointer;
  padding-bottom: 5px;
  border: solid var(--color-text);
  border-width: 0;
}

.active > .accordion-header,
.accordion-header:hover {
  border-width: 0 0 var(--border-width) 0;
}

.accordion-header > .title {
  margin: 0;
  font-size: var(--body-size);
  transition: var(--transition-time);
}

.active > .accordion-header > .title {
  font-size: var(--h4-size);
}

.accordion-header > .title:before {
  content: ">";
  display: inline-block;
  margin: 0 5px 0 0;
  transition: var(--transition-time);
}

.active > .accordion-header > .title:before {
  rotate: 90deg;
}

.accordion-header > .subtitle {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition-time);
}

.active .accordion-header > .subtitle {
  margin: 10px 0 0 0;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-time) ease-out;
}

/* Faux accordion */

.faux-accordion {
  margin: 5px 0;
}

.faux-accordion-header {
  padding-bottom: 5px;
}

.faux-accordion-header > .title {
  margin: 0;
  font-size: 1rem;
}

.faux-accordion-header > .title:before {
  content: "X";
  display: inline-block;
  margin: 0 5px 0 0;
}

@media (hover: none) {
  /* the font size transition breaks mobile for some reason */
  .accordion-header > .title {
    transition: unset;
    text-decoration: underline;
  }
  
  .active > .accordion-header > .title {
    text-decoration: none;
  }
  
  .accordion-header:hover {
    border-width: 0;
  }
  
  .active > .accordion-header {
    border-width: 0 0 var(--border-width) 0;
  }
}
