/* STYLING */
:root {
  /* change colors and fonts here */
  --nav-background-color: rgb(255, 255, 255);
  --nav-background-color-hover: rgb(255, 131, 189);
  --nav-text-color: rgb(102, 61, 250);
  --nav-font: "Tilt Neon", sans-serif;
  --sidebar-font-size: 16px;
}

a, a img {
  cursor: url(../images/favicons-pixels/heart_rainbowpulsing.gif), auto;
}

h1 {
  font-size: 3em;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px #ffffff, 0 0 5px #0000FF;
  padding: 1em;
  text-align: center;
}

h2 {
  font-size: 1em;
  font-weight: bold;
  color: black;
}

h3 {
  font-size: 1em;
  font-style: italic;
  color: white;
  text-shadow: 0 0 5px #ffffff, 0 0 5px #0000FF;
  padding: 1em;
  text-align: center;
}

p {
  font-weight: bold;
}

* {
  margin: 0;
  padding: 0;
  outline: 0;
  scrollbar-color: rgb(248, 245, 247) rgb(59, 7, 149);
  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"
    / 170px 1fr;
}

.title {
  display: flex;
  justify-content: center;
  margin-bottom: -1.5rem;
}

.title > img {
  object-fit: contain;
}

.info {
  display: flex;
  justify-content: center;
}

/* Left Sidebar */
.nav-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

nav {
  grid-area: sidebar;
  position: -webkit-sticky;
  position: sticky;
  min-height: 100vh;
  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,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAABBklEQVR4AeyWjQ7DIAiE173/O29AQoI3lRltLIbFH46rbnw1a9+vIJ+QP/RDcB/bQxK9iKjtJKXZnI3FpMHmbEyWNJuzsZhmsB7HanF8hSSqFegslaigWc8vhdJW+7JpaziCqEcQi0fCoz5eX+gjiHqEiopJ4B2gVNE8v7gYxRFERwl4d8DzEWKhjyA6RaDAsUCEJopnE/UCPuNbhCSK5Dw9jmViRUiiE/XevzQkUe9/0/NvxRqSqBJBcqy5q79lDk1UiTFF7qq3zkcQ3UoQvzyJIpFZnURnCeL6JIpEKrr1vlvNJ9EKwVaKn369LuuSqGD4b9Az2ZpllyQqGPpD71z+eGGIfgEAAP//1KFviAAAAAZJREFUAwD/qlBVHTJNBgAAAABJRU5ErkJggg==') 14 /  14px / 0 round;
  border-width:  14px;
  border-style:  solid; 
}

nav a img:hover {
  transform: scale(1.1);
  filter: drop-shadow(1px 1px 1px rgb(107, 64, 247)); 
}

/* Book Image Gallery */
main {
  grid-area: main;
  background-image: url(../images/backgrounds/purple_sparkle.gif);
  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;
}

/* this creates a new custom triangle on the right side */
summary::after {
  color: black;
  display: inline-block;
  content: '➯';
  transition: 0.2s;
}

details > summary {
  cursor: url(../images/favicons-pixels/heart_rainbowpulsing.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 rgb(252, 251, 251) dotted;
  box-shadow: 0 0 8px 2px rgb(107, 64, 247);
  object-fit: cover;
  vertical-align: middle;
  object-fit: cover;
  max-width: 100%;
  grid-area: 1 / 1 / -1 / -1;
}


/* Individual Element Styles */

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 */

a:hover {
  color: rgb(155, 142, 2);
  animation: rainbow 2s linear 0s infinite;
}

a:link {
  color: var(--nav-text-color); 
}

a:visited {
  color: rgb(207, 6, 6);
  text-decoration: none;
}

@keyframes rainbow {
  from {
    color: #be73ff;
  text-shadow:
    0 0 3px #be73ff;
  }
  10% {
    color: #76e75a;
  text-shadow:
    0 0 3px #76e75a;
  }
  50% {
    color: #fbac36;
  text-shadow:
    0 0 3px #fbac36;
  }
  75% {
    color: #ff97e1;
  text-shadow:
    0 0 3px #ff97e1;
  }
  100% {
    color: #be73ff;
  text-shadow:
    0 0 3px #be73ff;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: auto !important;
    background-image: url(../images/backgrounds/purple_sparkle.gif);
  }

  .title {
    z-index: -1;
  }

  .title img {
    display: none;
  }

  h3 {
    margin: 0 1.5rem 0 1.5rem;
  }

  nav {
    min-height: 100vh;
    height: 100%;
  }

    aside {
        display: none;
    }
}
