@font-face {
  font-family: 'tiempos-text';
  src: url('/font/tiempos-text-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'tiempos-text';
  src: url('/font/tiempos-text-regular-italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
  font-display: block;
}
@font-face {
  font-family: 'tiempos-text';
  src: url('/font/tiempos-headline-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: block;
}


/* Variables
======================================== */

:root {
  --font-body: 'tiempos-text', serif;
  --font-heading: var(--font-body);
  --font-sub: system-ui, sans-serif;
}


.orange {
  --red: #c43d3d;
  --light-red: #e89393;
  --orange: #ff711f;
  --pale-orange: #fecb92;
  --dark-orange: #d84f00;
  --yellow: #ffd559;


  --bg: #fff1e2;
  --bg-light: #fffcf8;
  --bg-dark: #fde4d1;
  --text: #3a2515;
  --text-faint: #864322;

  --highlight: var(--yellow);
  --highlight-subtle: #ffd6a0;
  --link: var(--text);
  --border: var(--pale-orange);
  --border-subtle: #ecd4b7;
}



:root {
  --width-measure: 55ch;
  --width-container: 1100px;

  --border-radius: 24px;
  --border-radius-inner: 12px;
  --sp-sm: clamp(1rem, 3vw, 2rem);
  --sp: clamp(2rem, 6vw, 4rem);
  --sp-lg: clamp(4rem, 8vw, 6rem);
  --sp-xl: clamp(6rem, 10vw, 8rem);
  --sp-md: 5rem;
  --sp-xs: 1.25rem;  
  
  --sp-gap: clamp(0.5rem, 4vw, 1.5rem);
  --sp-edge: clamp(1rem, 4vw, 1.5rem);
  --sp-hairline: 5px;

  --font-size: clamp(18px, 4vw, 22px);
  --font-size-sm: .9em;
  --font-size-xs: .8em;
}



body {
  background: var(--bg);
  
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: 1.5;

  box-sizing: border-box;

  position: relative;
  margin: 0;
  padding-inline: var(--sp-edge);
}

* {
  position: relative;
}
::selection {
  background: var(--highlight);
  color: var(--text);
}
mark {
  background: var(--highlight-subtle);
  color: var(--text);
}
a {
  color: var(--link);
  text-decoration-color: var(--pale-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  transition: .2s ease-in-out;
}
a:hover {
  text-decoration-color: var(--orange);
}
img {
  max-width: 100%;
}

.spoiler {
  background: var(--text);
  transition: .1s ease-in-out;
}
.spoiler:hover {
  background: none;
}



/* Nav 
================================== */

nav {
  max-width: var(--width-container);
  margin-left: auto;
  margin-right: auto;
  padding-block: var(--sp);

  display: flex;
  gap: 1em;
}
nav a {
  color: var(--text-faint);
  transition: .2s ease-in-out;
}
nav a:hover {
  color: var(--pale-yellow);
}





.books-wrapper {
  width: 100%;
  max-width: var(--width-container);
  margin-inline: auto;
}



.books__icon {
  grid-column: 2 / 3;
  width: 2em;
  place-self: center;
}



/* Header 
================================== */

.page-header {

}

.page__title {
  line-height: 1;
  margin-block: 0;
}




/* Currently Reading
================================== */

.current {
  margin-block: var(--sp-sm);
  max-width: var(--width-measure);
}
.current__heading {
  font-size: 1em;
  margin-block: 0;
}
.current__list {
  margin-block: .5em 0;
}
.current__item-title {
  /*font-weight: bold;*/
  font-style: italic;
}
.current__item-date {
  color: var(--text-faint);
}






/* Filters
================================== */

#reading {
  grid-column: 2 / 3;
  width: 100%;
}

.books-controls {
  margin-bottom: 1em;
  width: 100%;

  font-size: var(--font-size-sm);
}

.books-controls__heading {
  color: var(--text-faint);
  margin: 0 0 .5em;
}

button.pill {
  background: var(--bg-dark);
  border-radius: 4px;
  border: none;
  box-sizing: border-box;
  margin: 0 .1em .5em 0;
  outline: none;
  padding: .3em .5em .3em;

  color: var(--pale-yellow);
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1;

  cursor: pointer;
  transition: .2s ease-in-out;
}
button.pill:hover {
  background: var(--pale-orange);
}
button.pill:active {
  transform: translateY(1px);
}

button.pill--active {
  background: var(--yellow);
}
button.pill--active:hover {
  background: var(--yellow);
}

button.pill--outline {
  /* border: 1px solid var(--bg-light); */
  background: none;
}
button.pill--outline:hover {
  background: var(--bg-light);
}



/* Books
================================== */


.book {
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: clamp(60px, 10vw, 100px) 1fr 2fr .5fr;
  grid-row-gap: .5em;
  grid-column-gap: var(--sp-gap);
  
  border-bottom: 2px solid var(--border-subtle);
  padding-block: 1em;
}




.book__cover {
  grid-row: 1 / -1;
  grid-column: 1 / 2;
}
.book__cover > img {
  display: block;
  border: 1px solid var(--border-subtle);
}


.book__info {
  align-self: baseline;
}
.book__info--lg {
  grid-column: span 2;
}



.book__title {
  grid-column: 2 / 3;
  margin: 0;

  font-family: var(--font-heading);
  font-size: 1.15em;
  font-weight: bold;
  line-height: 1.1;
}
.book__title > a {
  color: var(--text);
}
.book__title > a:hover {
  color: var(--accent);
}
.book__title--dnf {
  color: var(--text-faint);
  text-decoration-line: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--red);
  text-decoration-inset: -.15em;
}

.book__author {
  grid-column: 2 / 3;
  margin: .15em 0 0;

  color: var(--text-faint);
  font-size: var(--font-size-sm);
  line-height: 1.25;
}

.book__audiobook {
  margin-top: .15em;
}

.book__content {
  align-self: baseline;
}



.book__date {
  align-self: baseline;
  color: var(--text-faint);
  font-family: var(--font-sub);
  font-size: var(--font-size-xs);
  line-height: 1.35;
  text-align: right;

  list-style-type: none;
  margin: 0;
  padding: 0;
}

.book__rating {
  color: var(--red);
  font-family: system-ui;
}


.icon {
  width: 1em;
}
.icon > path {
  fill: var(--red);
}
.icon--audiobook {
  width: var(--font-size-xs);
}
.icon--reread {
  transform: translateY(0.2em); /* optical adjustment */
}



.book__review + .book__excerpts {
  margin-top: 1em;
}
.book__excerpts {
  font-size: var(--font-size-sm);
}

.book__excerpt + .book__excerpt {
  margin-top: 2em;
}
.book__excerpt-text {
  border-left: 2px solid var(--border);
  margin: 0;
  padding-left: 1em;
}



@media screen and (max-width: 800px) {
  .book {
    display: block;
    grid-row-gap: var(--sp-sm);
    grid-template-columns: clamp(60px, 10vw, 120px) 1fr;
  }
  .book::after {
    content: "";
    clear: both;
    display: table;
  }
  .book__cover {
    float: left;
    margin-right: 1em;
    margin-bottom: .5em;
    width: clamp(80px, 10vw, 120px);
  }
  .book__author {
    margin-top: .25em;
  }
  .book__content {
    margin-block:.5em;
  }
  .book__date {
    margin-top: 1em;
    text-align: left;

    display: flex;
    flex-wrap: wrap;
    column-gap: 1em;

  }
}



.page-footer {
  font-size: var(--font-sm);
  padding: var(--sp-lg) var(--sp-edge);
  text-align: center;
}
.page-footer ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
}
.page-footer li {
  margin: 0 .5em;
}