
body {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(https://kryogenix.org/images/frontpage/background-binary-tile.png);
  background-size: 100%, 16.66%;
  padding: 0;
  margin: 0;
  font-family: "Roboto";
  font-weight: 300;
}

h1, #oldlinkslink {
  padding-left: 125px;
}

header, #content {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}

.book .reviews {
    flex: 1 1 auto;
    padding: 0 0 0 2em;
}

.book .reviews h2 {
  font-size: 0.8em;
  text-decoration: underline;
  margin: 0;
}

.book .reviews p {
  margin: 0;
  font-weight: 400;
}

.book p.meta {
  padding-top: 10px;
  clear: both;
}

a { font-family: Roboto; }

.book {
    perspective: 150px;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: flex-start;
    padding: 2em 2em 2em 1em;
}
.book:nth-child(2n) {
    background: rgba(255,255,255,0.6);
    color: black;
}
.book:nth-child(2n) a {
  color: #882d0d;
}

.book::before {
  content: "author";
  text-transform: uppercase;
  align-self: top;
  transform: rotate(90deg) translateY(-100%);
  color: #555;
  font-size: 1.5em;
  font-family: Roboto;
  width: 70px;
  transform-origin: 0 0;
  font-weight: 500;
}
.book.contributed::before { content: "chapter"; }
.book.article::before { content: "article"; }
.book.audio::before { content: "audio"; }
.book:nth-child(2n)::before {
  color: #777;
}
.book .bookwrap {
    transform: rotateY(-5deg);
    position: relative;
    transform-style: preserve-3d;
    z-index: 0;
    flex: 0 1 auto;
}
.book .bookwrap img {
    box-shadow: 0px 0px 15px 2px rgba(0,0,0,0.4), inset 10px 0 0 0 red;
    z-index: -1;
    transform: translateY(4px);
    max-height: 200px;
}

.book.mine .bookwrap::after, .book.contributed .bookwrap::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #366;
    transform: translateZ(-10px);
    z-index: -1;
    box-shadow: 0px 0px 15px 2px rgba(0,0,0,0.4);
    border-radius: 2px;
}
.book.mine .bookwrap::before, .book.contributed .bookwrap::before {
    content: "";
    position: absolute;
    top: 8px; right: 9px; bottom: 5px; width: 10px;
    transform-origin: 100% 50%;
    transform: translateZ(-10px) rotateY(90deg);
    background: #f4f4e9;
}

.book .reviews h2 {
  text-decoration: none;
  color: #666;
  margin-bottom: 1em;
  font-weight: 500;
}

.book h2 em {
  display: block;
  font-size: 2vw;
  color: white;
  font-weight: 300;
}
.book:nth-child(2n) h2 em {
  color: black;
}

.book.article .bookwrap, .book.audio .bookwrap {
    transform: scaleX(0.6) rotateY(5deg);
    transform-origin: 50% 50%;
}
.book.article .bookwrap img {
    box-shadow: 2px 2px 5px 2px rgba(0,0,0,0.4), 5px 5px 0 0 #f1f1e9, 5px 5px 5px 2px rgba(0,0,0,0.4), 10px 10px 0 0 #f1f1e9;
}

blockquote {
    position: relative;
    padding: 0 60px;
    margin: 1em 0;
}
blockquote::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    background-image: url("quotes-white.png");
    background-size: contain;
    background-repeat: no-repeat;
    height: 100%;
    width: 45px;
}
.book:nth-child(2n) blockquote::before {
    background-image: url("quotes-black.png");
}

p.topline {
  font-weight: bold;
  margin: 1em 125px;
}

@media screen and (max-width: 640px) {
  .book {
    display: block;
    padding: 0em 1em 2em;
    overflow: auto;
  }
  .book .bookwrap {
    float: right;
    width: 25%;
    margin: 30px;
  }
  .book .bookwrap, .book .bookwrap img {
    transform: none !important;
    max-height: 150px;
  }
  .book::before {
    display: inline-block;
    transform-origin: 0 100%;
    transform: rotate(90deg) translateY(50%);
  }

  .book h2 em {
    font-size: 5vw;
  }

  h1, #oldlinkslink {
    padding: 0 25px;
  }

  .book .bookwrap::before, .book .bookwrap::after {
    display: none;
  }

  blockquote {
    padding: 0 10px;
  }
  blockquote::before {
    left: -20px;
    width: 25px;
  }

  p.topline {
    font-weight: bold;
    margin: 1em 25px;
  }

}
