/* FONT IMPORTS */
@font-face {
  font-family: snail scrawl;
  src: url(/fonts/snail-scrawl-regular.otf);
}

@font-face {
  font-family: atkinson hyperlegible;
  src: url(/fonts/AtkinsonHyperlegible-Regular.ttf);
}

:root {
  --accent-1: #ffaecd;
  --accent-2: #c4bfff;
  --bg: #FAF8EC;
  --txt: #1f0833;
  --highlight: #e5ccf5;
}

/* GENERAL STYLES */
html {
  background: 
    url(/images/noise.svg),
    linear-gradient(var(--accent-1), var(--accent-2));
  background-position: center;
  background-attachment: fixed;
  color: var(--txt);
  font-size: 17px;
  line-height: 1.5;
  font-family: "atkinson hyperlegible", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, system-ui;
  scroll-behavior: smooth;
}

html, body {
  padding: 0;
  margin: 0;
}

body {
  max-width: 700px;
  margin: auto;
  padding: 4rem .5rem;
}

header > img {
  box-sizing: border-box;
  border-bottom: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  display: block;
  box-shadow: .25rem .0 1rem #8400ff5b;
}

nav {
  box-sizing: border-box;
  border-top: 0;
  background-color: var(--bg);
  border-radius: 0 0 1.5rem 1.5rem;
  padding: 1rem 2.5rem;
  box-shadow: .25rem .0 1rem #8400ff5b;
}

a, a:visited {
  color: #2f40d8;
  text-decoration: none;
  font-weight: bold;
  transition: color .5s;
}

a:hover, a:active, summary:hover, summary:active {
  color: #d12eae;
  text-decoration: underline;
  text-decoration-style: dotted;
}

summary {
  color: #612fd8;
}

.nav-bar {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
}

.btn, .btn:visited {
  background: 
    url(/images/noise.svg),
    radial-gradient(ellipse 100% 100% at top, rgba(255, 255, 255, 0.5) 45%, transparent 50%),
    radial-gradient(ellipse 100% 100%, #4203f1 15%, transparent 50%),
    linear-gradient(to bottom right, #ff70a7, #9288ff);
  padding: .5rem 1rem;
  border-radius: 2rem;
  transition: filter .5s;
  margin: 5px;
}

.btn:hover {
  filter: hue-rotate(40DEG);
}

.btn > a {
  color: var(--bg);
  display: block;
  width: 100%;
  height: 100%;
}

main, footer {
  background-color: var(--bg);
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 4rem 0;
  box-shadow: .25rem .0 1rem #8400ff5b;
}

section {
  padding: 1.5rem 1rem;
}

footer {
  font-style: italic;
}

footer p {
  margin: 0;
  text-align: center;
}

h1, h2 {
  font-family: "snail scrawl", "Comic Sans MS", sans-serif;
}

h2 {
  padding: 0;
  margin: 0;
  border-bottom: 5px solid #e5ccf5;
  border-radius: 5px;
}

h3 {
  border-bottom: 1px solid #e5ccf5;
}

dl {
  background-color: #e5ccf54f;
  padding: 1rem 1.5rem;
  border-radius: .5rem;
}

hr {
  padding-top: 1ch;
  border: none;
}

img {
  width: 100%;
  border-radius: .5rem;
}

figure {
  margin: 0;
  margin-bottom: 2ch;
}

figcaption {
  color: var(--secondary);
  margin-top: 0;
  text-align: center;
}

ul {
  padding-left: 3ch;
}

dt {
  font-weight: bold;
}

dd {
  font-style: italic;
  margin-bottom: 2ch;
  margin-left: 3ch;
}

#changelog {
  list-style-type: none;
  max-height: 400px;
  overflow: auto;
  padding-left: 0;
}

#changelog > li {
  margin-bottom: 2ch;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
}

.category {
  width: 100%;
  margin-bottom: 1rem;
}

.shelf-item {
  flex-basis: 50%;
  padding: 5px;
  box-sizing: border-box;
}

.shelf-item > img {
  border-radius: .5rem;
  display: block;
  transition: filter .5s;
}

.shelf-item > img:hover {
  filter: brightness(75%) saturate(150%);
}

/* custom text highlight */
::-moz-selection, ::selection {
  color: black;
  background: var(--highlight);
}

/* custom scrollbar (firefox styles are in html,body) */
/* width */
::-webkit-scrollbar {
  width: 15px;
}

@media (max-width: 600px) {
  .shelf-item {
    flex-basis: 100%;
  }

  .nav-bar {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  
  section {
    padding: .5rem .5rem;
  }
  
  nav {
    padding: 1rem 1.25rem;
  }
}