::selection {
  background: lightyellow;
  color: rgba(0, 0, 0, 0.99);
}

* {
  /* font-size: inherit;
  line-height: inherit;
  text-decoration: inherit;
  color: inherit; */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* list-style: none; */
}

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

html {
  box-sizing: border-box;
  counter-reset: sidenote-counter figure-counter figuretxt-counter;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: white;
  font-size:13px;
  font-family:Regular;
}

i, em {
  font-family:Narrow;
  font-style:italic;
}

a, a:visited {
  color:inherit;
  text-decoration:none;
}

a:hover {
  opacity:0.5;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
  font-weight: normal;
  overflow-wrap: break-word;
  font-size:1rem;
}

h1 {
  font-size: 3rem;
  text-align: center;
  height: 25vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family:Narrow;
  flex-direction: column;
  line-height:1.2;
}

.middle-column p {
    font-size: 1.4rem;
    text-indent: 4rem;
    line-height:1.3;
    text-align: justify;
}

.middle-column > p:nth-child(2) {
  text-indent:0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  user-select:none;
}

#header {
  width: 50vw;
  min-height:100vh;
  padding: 2rem 0;
  margin: 0 auto;
  display: grid;
  /* justify-content: center; */
  align-content: center;
    font-weight: bold;
    text-transform: uppercase;
}

#header h1 {
  height:auto;
}

h1:hover {
  cursor:crosshair;
}

h1, .figure-side, .figure-large, .sidenote {
  user-select:none;
}

.toc {
  position: fixed;
  padding: 0 2rem;
  top: 0;
  left: 25%;
  width: 50vw;
  z-index: 1;
  color: white;
  text-align: center;
  min-height: 32px;
  display: flex;
  justify-content: center;
  user-select: none;
  font-family:Narrow;
  cursor:crosshair !important;
}

.toc .title:before {
  content: "Contents";
    display: inline-block;
    background-image: url(icons/archive.png);
    background-size: contain;
    background-repeat: no-repeat;
    padding-left: 21px;
    height: 16px;
    background-position: left;
    image-rendering: pixelated;
    line-height:1rem;
    font-family: Wide;
    font-size: 0.9rem;
}

.toc-content {
  display: none;
}

.toc-content.open {
  display:block;
}

.toc .title {
  font-family:Wide;
  font-size:0.9rem;
  padding:0 1ch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
}

.toc p {
  height:32px;
  background:black;
  line-height: 1.8;
}

.toc p:hover, .toc-content a.active p {
  color:black;
  background:white;
}

.toc-content p sup {
  margin-right: 1ch;
  vertical-align: baseline;
}

.toc-content a:hover {
  opacity:1;
}

.middle-column {
  background: white;
  padding: 0 25% 4rem 25%;
  clear: both;
    overflow: hidden;
}

img {
  width: 100%;
}

@keyframes moving {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}



label.sidenote-number {
    display: inline;
    max-height: 0.4rem;
    margin-left: 2px;
    cursor:pointer;
}
label.sidenote-number.active, .figure-indication.active {
  opacity:0.5;
}

.sidenote-number {
    counter-increment: sidenote-counter 1;
}
.sidenote-number::after {
    content: counter(sidenote-counter);
    vertical-align: super;
    font-size: 60%;
    font-family: Wide;
}

input.margin-toggle {
    display: none;
}

div.sidenote-wrapper, div.sidenote{
  display: inline;
  margin-bottom: 2rem;
}

.sidenote, .marginnote {
  float: right;
  clear: right;
  margin-right: -50%;
  /* margin-top: -2.6vh; */
  vertical-align: baseline;
  position: relative;
}

.sidenote {
    text-align: justify;
    hyphens: auto;
    text-indent:0;
    width: 25vw;
    right: 0;
    padding: 0 2rem;
    margin-bottom: .5rem;
    font-size:1rem;
    font-family:Narrow;
    cursor:pointer;
}

.sidenote:before {
  content: "Note " counter(sidenote-counter) ".";
  margin-right: 1rem;
    display: inline-block;
    background-image: url(icons/txt.png);
    background-size: contain;
    background-repeat: no-repeat;
    padding-left: 21px;
    height: 16px;
    background-position: left;
    image-rendering: pixelated;
    line-height:1rem;
    font-family: Wide;
    font-size: 0.9rem;
}

label.margin-toggle:not(.sidenote-number) {
        display: inline;
}

.sidenote-content {
  line-height: 0;
  display:none;
}

.sidenote-content.active {
  display:inline;
}

#chapter1, #bibliography, .header-column {
background:black;
}

.figure-large {
  margin:2rem 0;
  cursor:pointer;
}

.interaction{
  position: relative;
  left:50%;
  transform:translateX(-50%);
}

.figure-large:before {
  counter-increment: figure-counter;
  content: "Figure " counter(figure-counter) ".";
    display: inline-block;
    background-image: url(icons/jpeg.png);
    background-size: contain;
    background-repeat: no-repeat;
    padding-left: 21px;
    height: 16px;
    background-position: left;
    image-rendering: pixelated;
    line-height:1rem;    
    font-family: Wide;
    font-size: 0.9rem;
}

.figure-large-image, .figure-side-image {
  border:1px solid black;
}

.figure-large-image img {
  opacity:1;
}

.figure-large p, .figure-side p {
  font-size:1rem;
  text-indent:0;
  font-family:Narrow;
}

.figure-large .info, .figure-side .info {
  text-align:left;
  display:inline;
  font-family: Wide;
    font-size: 0.9rem;
}

.figure-side:before, .figure-large:before {
  margin-right: 1ch;
}

.figure-side {
  width: 25vw;
  padding: 0 2rem;
  margin-bottom: 2rem;
  cursor: pointer;
  clear: left;
  vertical-align: baseline;
  position: relative;
}

.figure-side:before {
  counter-increment: figure-counter;
  content: "Figure " counter(figure-counter) ".";
    display: inline-block;
    background-image: url(icons/jpeg.png);
    background-size: contain;
    background-repeat: no-repeat;
    padding-left: 21px;
    height: 16px;
    background-position: left;
    image-rendering: pixelated;
    line-height:1rem;    
    font-family: Wide;
    font-size: 0.9rem;
}

.figure-indication {
  max-height: 0.4rem;
    margin-left: 2px;
    cursor: pointer;
    font-size: 60%;
    font-family: Wide;
    white-space:nowrap;
}

.figure-indication:after {
  counter-increment:figuretxt-counter;
  content: "(Fig. " counter(figuretxt-counter) ")";
}

.figure-content img, .figure-content .caption {
  opacity: 1;
}

.figure-content.active > .figure-side-image img,
.figure-content.active .caption,
.figure-large.active .figure-large-image img {
  opacity: 0;
  /* filter:grayscale(0); */
}

.figure-side-container {
  float:left;
  margin-left:-50%;
}


#chapter1 h1, #chapter1 p, #chapter1 .sidenote, #chapter1 .figure-side, #chapter1 .figure-large,
#bibliography h1, #bibliography p, .header-column {
  color:white;
}

#chapter1 .figure-large-image, #chapter1 .figure-side-image {
  border-color:white;
}

.biblio-list p {
  text-align: left;
  opacity: 1;
}

.biblio-list:hover p {
  opacity: 0.5; /* Reduce opacity for all paragraphs when the parent is hovered */
  cursor:default;
}

.biblio-list p:hover {
  opacity: 1; /* Maintain full opacity for the hovered paragraph */
}

#credits {
  min-height:25vh;
  display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top:1rem;
    padding-bottom:1rem;
    cursor:default;
}

#credits p {
  text-align:center;
  text-indent:0;
  font-size:1rem;
}

#credits img {
  width:88px;
  margin-left:auto;
  margin-right:auto;
  image-rendering: pixelated;
}


#chapter2, #introduction {
  background:rgb(200, 200, 200);
}
#chapter3, #credits {
  background:rgb(220, 220, 220);
}
#abstract {
  background:rgb(245, 245, 245);
}

p.noindent {
  text-indent: 0;
}

span.chapter {
  text-transform: uppercase;
  font-size: 60%;
}




@media only screen and (max-width: 820px) {
  html, body {
    font-size:12px;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  h1 {
    word-break:keep-all;
  }
#header {
  width: 100%;
  padding: 24px;
}
.middle-column {
  padding: 0 24px 4rem 24px;
}
.figure-side-container {
  float: none;
  margin-left: 0;
}
.figure-side {
  padding: 0;
    width: 100%;
    margin-top: 2rem;
}
.figure-content .caption {
  opacity:1;
}
.sidenote {
  width: 100%;
    padding: 0;
    float: none;
    display: block;
    margin: 1rem 0;
    display: none;
}
.sidenote.active {
  display:block;
}
.sidenote:before, .figure-side:before, .figure-large:before {
  height:12px;
  padding-left:2ch;
}
.toc {
  min-height: 24px;
    padding: 0;
}
.toc .title {
  width: 50vw;
    padding: 0;
}
.toc .title:before {
  height:13px;
}
.toc p {
  height: calc(24px*2);
  display: flex;
  justify-content: center;
  align-items:center;
}
.toc p.title {
  height:24px;
}
p.noindent {
  text-indent: 4rem;
}
p.noindentmob {
  text-indent:0;
}
}