/* STYLING */
:root {
  --background-color: rgb(134, 255, 136);
  --nav-background-color: rgb(255, 132, 220);
  --nav-text-color: rgb(134, 255, 136);
  --nav-font: "Tilt Neon", sans-serif;
  --main-text-color: rgb(255, 132, 220);
  --sidebar-font-size: 1rem;
  --text-shadow: 0 0 2px red, 0 0 2px red;
  --border-color: rgb(255, 169, 231);
  --box-shadow: 0 0 5px #ff50d9, 0 0 5px #cc00a0;
  --scrollbar-color: rgb(255, 132, 220) rgb(134, 255, 136); 
  --h3-color: rgb(36, 189, 31);
}

a, a img {
  cursor: url(../images/favicons-pixels/heart_strawberry.gif), auto;
}

body {
  background-color: var(--background-color);
}

h1 {
  font-size: 3em;
  font-weight: bold;
  color: var(--main-text-color);
  text-shadow: var(--text-shadow);
  padding: 1em 0 1em 0;
  text-align: center;
}

h3 {
  font-size: 1.2em;
  font-style: italic;
  text-shadow: 0px 0px 1px #0e5600;
  color: var(--h3-color);
  padding: 0 1em 0 1em;
  text-align: center;
  margin: 0 6rem 0 6rem;
}

p {
  font-weight: bold;
}

* {
  margin: 0;
  padding: 0;
  outline: 0;
  scrollbar-color: var(--scrollbar-color);
  font-family: "Tilt Neon", sans-serif;
  font-weight: 400;
  font-style: normal;
  cursor: url(../images/images-per-page/library-page/cursor_book.gif), auto;
}

/* STYLING END */

/* important for gallery box positioning */
img {
  max-inline-size: 100%;
}

/* Grid for page layout */
.main-grid-box {
  display: grid; 
  grid-template: 
    "sidebar main"
    / 200px 1fr;
}

.title {
  display: flex;
  justify-content: center;
  margin-bottom: -1.5rem;
}

.title > img {
  object-fit: contain;
  scale: 50%;
}

.info {
  display: flex;
  justify-content: center;
}

/* Left Sidebar */
.nav-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 1rem;
}

nav {
  grid-area: sidebar;
  position: sticky;
  min-height: 100vh;
  max-width: 170px;
  top: 0;
  background-color: var(--nav-background-color);
  color: var(--nav-text-color);
  font-family: var(--nav-font);
  /* border from broider @ https://maxbittker.github.io/broider/ */
  border-image:  url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAYAAAAcaxDBAAAAAXNSR0IArs4c6QAAAnFJREFUeF7tnEGSwjAMBJP/PxpqjzFUeqc0sg3MXhXLUmskjEnteeTPSuC0eouzI0DNIgjQADUTMLuLQgPUTMDsLgrdDejjOB53MZ2HdpIY/Y3ryU583PGO+5UV6g6QgJE9QAcCBIzsARqgVwLU8m9mzGXMqOtJgTRz1fX0/PQZGqBiSVSFVRVE4VX9q6eSKBQq0g5UVWC3gnbzLys0QK/ISMF4sA/QAJ16LNuu5ceA1I6gFlT9qTM6QIlY8RSwfIZGoc0VVlv041q+qiD66kn16b5dov2pYPIMDVDtghxnaIAG6EUD6kyujihZoTRzft0eoGYFBGiAmgmY3ckKpSGvntvM+cju3PkEqPlFjQANULmrbxdMb3nakNLbbaZ254Mt3x0AFcRt784nQMWKUccF6Gygq2+bxHxfHu9u8Y+7Dw3Q4o9cVYCrOwpn6OoAq4C3a/nZAVUB0vrufFCh3QEQALe9O58AFSuWc+gAbLlC1Q8lqqAoiPbHCbCaD7Z8gC7+GVmtaLsEYYMo1FyB5UDN+XydO3mGfh0Bc0IBGqBmAmZ3skJpiFN86ikg74ear+8CNECpSa/2tPw9L5yhVYDj9jRD1f3c/khetF+AEsHBHqDw7pLI8++m5FaEUahIdHug6syk/Kv/0UH1/+Yz4t7FpyfcHX+AkgSL5+jlM7RbQd3+ZYVSQdWAZ8+4anyUf4AWW5oAY8uTg6oC1PUUT7UD6Fj0j/3pEe8poJowRVv1vz1QNUC6riM7AaeOUOOdPkPVAAkY2QN0IEDAyB6gAUoa+G17+dj02/hesw9QsyICNEDNBMzuotAANRMwu4tCzUCfR95QZDgBLZUAAAAASUVORK5CYII=') 28 /  28px / 0 round;
    border-width:  28px;
    border-style:  solid; 
  border-radius: 25px;
}

nav a img:hover {
  transform: scale(1.1);
  filter: drop-shadow(1px 1px 1px #ff675c); 
}

/* Book Image Gallery */
main {
  grid-area: main;
  color: var(--main-text-color);
  font-family: var(--main-font);
  }

.scale-image:hover img,
.scale-image:focus img {
  filter: brightness(1);
  transform: scale(1.1);
}

/* summary and detail styling */
/* this removes the default triangle */

summary {
  display: block;
  font-style: italic; 
  color: red; 
  font-size: var(--sidebar-font-size);
}

/* this creates a new custom triangle on the right side */
summary::after {
  color: red;
  display: inline-block;
  content: '➯';
  transition: 0.2s;
}

details > summary {
  cursor: url(../images/favicons-pixels/heart_strawberry.gif), auto;
}

.past-years-reading-toggle {  
  justify-content: center;
  background-color: var(--nav-background-color);
}

.past-years-reading-toggle > p {
  color: rgb(219, 22, 22);
  font-size: 12px;
}

.past-years-reading-toggle > summary > h3 {
  color: rgb(248, 245, 245);
  font-style: italic;
  font-weight: bold;
}

/* Book Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: 
    repeat(auto-fit, minmax(150px, 150px));
    justify-content: center;
  gap: 20px;
  padding: 50px;
  align-items: stretch;
  margin-top: -25px;
}

.gallery img {
  border: 3px dotted var(--border-color);
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  object-fit: cover;
  vertical-align: middle;
  object-fit: cover;
  max-width: 100%;
  grid-area: 1 / 1 / -1 / -1;
}

ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 1em;
  list-style: none;
}

li {
  text-align: center;
  font-size: var(--sidebar-font-size);
  padding: 7px;
}


/* Links and Hover Effects */

li a:hover {
    font-size: 1.05rem;
    transform: scale(1.1);
    filter: brightness(105%);
}

a img:hover {
    transform: scale(1.2);
    filter: drop-shadow(2px 2px 2px rgb(36, 189, 31)) brightness(105%);
}

a:hover {
  color: rgb(50, 155, 2);
  animation: rainbow 2s linear 0s infinite;
}

a:link {
  color: var(--nav-text-color); 
}

a:visited {
  color: red;
  text-decoration: none;
}

@keyframes rainbow {
  from {
    color: #0feb1d;
  text-shadow:
    0 0 3px hsl(124, 100%, 40%);
  }
  10% {
    color: #33ff41;
  text-shadow:
    0 0 3px #1dbf28;
  }
  50% {
    color: #1aff29;
  text-shadow:
    0 0 3px #4dd155;
  }
  75% {
    color: #2bff39;
  text-shadow:
    0 0 3px #1dbc28;
  }
  100% {
    color: #00e40f;
  text-shadow:
    0 0 3px #00b50c;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: auto !important;
  }

  h3 {
    margin: 0 1rem 0 1rem;
  }

  .title img {
    display: none;
  }

  nav {
    min-height: 100vh;
    height: 100%;
    z-index: 1;
  }

    aside {
        display: none;
    }
}
