@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
   font-family: 'Avenir Next';
   src: url(https://takaio.neocities.org/.well-known/AvenirNextCyr-Bold.woff2) format('woff2');
   font-weight: bold;
   font-style: normal;
 }
 
 @font-face {
  font-family: 'Cedarville Cursive';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(https://takaio.neocities.org/.well-known/CedarvilleCursive-Regular.ttf) format('truetype');
}
 
 html {
  scroll-behavior: smooth;
  scrollbar-color: rgb(255 255 255 / 50%) rgb(0 0 0 / 25%);
  scrollbar-gutter: stable;
  font-family: 'DM Sans';
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

:root {
  font-family: 'Cedarville Cursive';
  font-kerning: normal;
}

.toggle {
  font-family: 'DM Sans';
}

/* HEADER */ 
header {
  background: purple;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-family: 'DM Sans';
  padding: 2% 0;
}

header a, header a:visited {
  text-decoration: none;
  color: white;
  transition: all .3s ease-in-out;
}

header a:hover {
  color: rgb(247, 235, 217);
  transition: all .3s ease-in-out;
}

body {
  width: auto;
  overflow-y: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2% 10%;
  height: 100%;
  background: rgb(46 17 17);
}

p {
  margin: 0;
  font-size: 1.2em;
}

h1 {
  margin: 0;
  text-align: center;
  width: 100%;
}

main {
  background: blue;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0% 10%;
  box-sizing: border-box;
}

#toggle {
  display: flex;
  height: fit-content;
  width: fit-content;
  flex-direction: column;
  justify-content: center;
  background: rgb(247, 235, 217);
  padding: 10px;
  border: solid 2px black;
  color: black;
  font-family: 'DM Sans';
  text-align: right;
  cursor: pointer;
  transition: all .3s ease-in-out;
}

#toggle:hover {
  box-shadow: rgb(255 252 244 / 50%) 0px 0 15px;
  background: rgb(255 252 244);
}

#title {
  background-image: url('https://takaio.neocities.org/images/wiki/rippedPaper1.webp');
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  width: fit-content;
  min-width: 350px;
  height: 75px;
  padding: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(-3deg);
  user-select: none;
  
  overflow: hidden;
  word-wrap: break-word;
  line-height: 2em;
  
  position: relative;
  top: -10px;
  left: -100px;
}

section {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

/* LEFT SIDE */ 

.photos {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  user-select: none;
}

article {
  max-height: 400px;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.p-one {
  position: relative;
  right: -30%;
  transform: rotate(2deg);
  
  user-select: none;
}
.p-two {
  position: relative;
  top: -1%;
  transform: rotate(-3deg);
  
  user-select: none;
}

#item {
  width: 100%;
  max-height: 300px;
  max-width: 300px;
  background: rgb(247, 235, 217);
  border: 2px solid black;
  box-sizing: border-box;
  transition: all .3s ease-in-out;
  transform-origin: 50% 20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  top: -30px;
  padding: 3%;
  
  user-select: text;
}

.image {
  background: green;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 2px solid black;
  box-sizing: border-box;
  display: flex;
}

article img {
  object-fit: contain;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  
  user-select: none;
}

article::before, article::after, #item::before, #item::after {
  box-sizing: border-box;
}

.pin {
  height: 75px;
  width: 75px;
  position: relative;
  top: 3px;
  left: -35px;
  z-index: 1;
  user-select: none;
}

.pin img {
  pointer-events: none;
}

/* RIGHT SIDE */ 

.pages {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-sizing: border-box;
  padding: 0% 2%;
}

#page {
  width: 100%;
  max-width: 650px;
  height: 850px;
  padding: 43px 30px 40px 60px;

  background-image: url('https://takaio.neocities.org/images/wiki/paper.webp');
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  
  box-sizing: border-box;
}
.one {
  transform: rotate(.5deg);
  align-self: flex-end;
}
.two {
  transform: rotate(-1.5deg);
  align-self: flex-start;
}

#page p {
  text-indent: 2em;
  word-wrap: break-word;
}

.textbox {
  height: 100%;
  width: 100%;
  word-wrap: break-word;
  line-height: 1.52em;
  font-size: 1.25em;
}

/* Modal Shit */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99;
  backdrop-filter: brightness(0.5);
  visibility: hidden;
  opacity: 1;
  transition: opacity .3s;
  cursor: default;
  
  user-select: none;
}

.modal:link, .modal:visited {
  color: inherit;
  text-decoration: none;
}

.modal:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 101;
}
 
/* Displaying Modal */

.modal:target {
    visibility: visible;
    opacity: 1;
}

.modal .modal-container, .modal .modal-photo-container{
  display: flex;
  flex-direction: column;
  width: 300px;
  z-index: 105;
  background: #fff;
  padding: 1em;
  gap: 1em;
  justify-content: center;
  font-family: 'DM Sans';
  border: 2px solid black;
}

.modal .modal-photo-container {
  width: 35%;
  max-height: 85%;
  font-family: 'Cedarville Cursive';
  font-size: 1.2em;
  line-height: 1em;
}

.modal .modal-photo-image {
  background: green;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid black;
}

.modal .modal-photo-image img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.modal .modal-header {
  min-height: fit-content;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.modal-header h3 {
  margin: 0px;
}

.modal .modal-body {
  min-height: fit-content;
  max-height: calc(100vh - 100px);
  text-align: center;
}

.modal .modal-body p {
  margin: 0px;
}

.modal:after {
  user-select: none;
}

/* footer */ 

footer {
  margin: 20px 0px 0px 0px;
  width: 100%;
  position: relative;
  bottom: 0%;
  display: flex;
  justify-content: space-evenly;
  font-family: 'DM Sans';
  text-decoration: none;
}

footer p, footer a, footer a:visited {
  color: rgb(255 255 255 / 35%);
  text-decoration: none;
  transition-duration: .2s;
  width: 150px;
  display: flex;
  justify-content: center;
  text-decoration: none;
}

footer p:hover {
  color: rgb(255 255 255 / 75%);
  text-shadow: rgb(255 252 244 / 50%);
  transition-duration: .2s;
}