:root {
  color-scheme: light dark;
  --text-color: #444;
  --text-color-more: #778;
  --text-color-less: #aab;
  --link-color: #56a;
  --link-border-color: #dde0ee;
  --link-color-more: #237;
  --link-color-less: #67b;
  --background-color: #fcfbfa;
  --background-color-more: #fdf8f0;
  --border-color: #e0e0dd;
  --border-color-less: #f0f0ee;
  --border-color-more: #d0d0cc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #ccd;
    --text-color-more: #99b;
    --text-color-less: #aab;
    --link-color: #909cd0;
    --link-border-color: #575c77;
    --link-color-more: #56a;
    --link-color-less: #9ad;
    --background-color: #2d3345;
    --background-color-more: #1d2335;
    --border-color: #55596f;
    --border-color-less: #474a5c;
    --border-color-more: #676c87;
  }
  img {
    filter: brightness(.9) contrast(1.1);
  }
}

body {
  background: #fcfbfa;
  background: var(--background-color);
  color: #444;
  color: var(--text-color);
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 1.5em;
  max-width: 40em;
}

@media screen and (min-width: 25em) {

  body {
    margin: 0em 20% 1.5em 8%;
    font-size: 18px;
  }

}

@media screen and (min-width: 45em) {

  body {
    margin: 0em 30% 3em 15%;
  }

}


.post-body img {
  width: 100%;
  display: block;
}

.post-body img + em {
  color: #aab; 
  color: var(--text-color-less);
  font-size: 0.75em;
}

.post-body pre {
  background: #fdf8f0;
  background: var(--background-color-more);
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.05);
  margin-left: -0.5rem;
  overflow: auto;
  padding: 0.5rem;
}

@media screen and (min-width: 25em) {

  .post-body img.small {
    width: auto;
  }
  
  .post-body img.right {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
  }

  .post-body img.wide {
    width: 138.888%;
    margin-left: -11.11%;
  }

}

@media screen and (min-width: 45em) {

  .post-body img.wide {
    width: 181.818%;
    margin-left: -27.272%;
  }

  .post-body .flush-right {
    float: right;
    margin: -1.25em -54.54% 0 1.5em;
    width: 100%;
  }

  .post-body .out-right {
    float: right;
    margin: -1.5em -54.54% 0 1.5em;
    width: 48%;
  }

  .post-body .out-right.book-image {
    margin-top: 0;
  }

  .post-body h2 + .flush-right,
  .post-body h2 + .out-right {
    margin-top: -0.75em;
  }

}


h1, h2, h3, h4, h5, h6 {
  color: #778;
  color: var(--text-color-more);
  font-variant-numeric: lining-nums;
  font-weight: normal;
}

h2 {
  font-size: 1.383rem;
  line-height: 1.914;
}

h3 {
  font-size: 1.276rem;
  line-height: 1.764;
}

p, blockquote, ul, ol {
  margin: 1.5em 0;
}

input[type="password"],
input[type="text"],
select,
textarea {
  border: 1px solid #e0e0dd;
  border-color: var(--border-color);
  font-family: Georgia, serif;
  font-size: 1rem;
  margin: 0 0 0 -0.5em;
  padding: 0.5em;
  resize: vertical;
  width: 100%;
}

input[type="password"]:hover,
input[type="text"]:hover,
textarea:hover {
  border-color: #56a;
  border-color: var(--link-color);
}

button,
input[type="submit"] {
  background: #f0f0ee;
  background-color: var(--border-color-less);
  border: 1px solid #e0e0dd;
  border-color: var(--border-color);
  font-family: Georgia, serif;
  font-size: 1rem;
  padding: 0.5em 3em;
}

button,
input[type="submit"] { -webkit-appearance:none; -webkit-border-radius:0; }

button:hover,
input[type="submit"]:hover {
  background: #56a;
  background: var(--link-color);
  color: #fdf8f0;
  color: var(--background-color-more);
}

label.block {
  display: block;
}

.form-control {
  margin: 1.5em 0
}

a {
  text-decoration: none;
}

.wrapper a {
  color: #56a;
  color: var(--link-color);
  border-bottom: 1px solid #dde0ee;
  border-color: var(--link-border-color)
}

.wrapper a:hover {
  color: #67b;
  color: var(--link-color-less);
  border-bottom: 1px solid #67b;
  border-color: var(--link-color-less);
}

.no-thanks {
  display: none;
}

.header-wrapper,
.footer-wrapper {
  display: block;
  left: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

.header-wrapper {
  height: 8em;
  top: -3.12em;
}

.footer-wrapper {
  margin-top: 1.5em;
  height: 3.5em;
}

.title-wrapper {
  left: -1.22em;
  position: absolute;
}

.header-title {
  font-size: 8em;
  line-height: 1em;
  color: #f0f0ee;
  color: var(--border-color-less);
}

@media screen and (min-width: 25em) {

  .header-title {
    left: -0.15em;
  }

}

.header-title .main {
  color: #e0e0dd;
  color: var(--border-color);
}

a.header-title:hover .main {
  color: #d0d0cc;
  color: var(--border-color-more);
  transition: color 0.5s ease;
}

a.header-title:hover em {
  color: #e0e0dd;
  color: var(--border-color);
  transition: color 0.5s ease;
}

[role="main"] {
  margin-top: 6em;
}

.page-title {
  margin: 0.8em 0 0;
  border: none;
}

.post-container {
  clear: left;
  margin: 3em 0 6em;
}

.post-tags {
  margin-top: 3em;
  font-size: 0.9rem;
}

.post-tags a {
  display: inline-block;
  border: 1px solid #dde0ee;
  border-color: var(--link-border-color);
  padding: 0.25rem 0.50rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-tags a:hover {
  border: 1px solid #67b;
  border-color: var(--link-color-less);
}

.post-date {
  line-height: 1.5rem;
  font-size: 0.777em;
}

.post-permalink,
.post-comment-count {
  line-height: 1.5rem;
  font-size: 0.777em;
}

.post-body h1 {
  margin-top: 0em;
  margin-bottom: 2rem;
  font-size: 1.5em;
  line-height: 2.25rem;
}

.post-body abbr {
  border-bottom: 1px dashed #67b;
  border-color: var(--link-color-less);
  cursor: help;
  text-decoration: none;
}

.post-body blockquote {
  border-left: 0.2em solid #f0f0ee;
  border-color: var(--border-color-less);
  font-style: italic;
  margin-left: 1.15em;
  margin-right: 1.5em;
  padding: 0 0.75em 0 1.15em;
}

.post-body blockquote .source {
  display: block;
  text-align: right;
  color: #778; 
  color: var(--text-color-more);
  font-size: 0.777em;
  line-height: 1.93;
}

.secondary-header {
  border-top: 1px solid currentColor;
  margin-top: 3em;
  color: #aab;
  color: var(--text-color-less);
}

.comments-list {
  list-style-type: none;
  padding: 0;
}

.comments-form {
  margin-top: 3em;
}

.comment-author {
  color: #778;
  color: var(--text-color-more);
}

.comment.verified .comment-author::before {
  content: '\203a';
  position: absolute;
  margin-left: -1em; 
}

.comment-content p:first-child {
  margin-top: 0;
}

.footnotes {
  font-size: 0.8em;
}

.footnotes hr {
  border: 0;
  border-top: 1px dashed #d0d0cc;
  border-color: var(--border-color-more);
}

.footnotes ol {
  padding: 0;
  margin: 0;
}

.footnotes p {
  margin: 0;
}

.footnotes a {
  color: currentColor;
}

a.footnote-ref,
a.footnote-backref {
  color: #778;
  color: var(--text-color-more);
  border: 0;
  padding: 0.2em;
}

a.footnote-backref {
  margin-left: 0.5em;
  padding: 0 0.5em;
}

a.footnote-ref:hover,
a.footnote-backref:hover {
  border: 0;
}



.footer {
  margin-top: 8em;
  border-top: 1px solid #d0d0cc;
  border-color: var(--border-color-more);
  color: #778;
  color: var(--text-color-more);
}

.footer-text {
  font-size: 0.9rem;
  line-height: 1.6667;
}

.footer-menu {
  padding: 0;
  list-style-type: none;
  font-size: 1.383rem;
  line-height: 1.5;
}

.footer-menu li {
  margin-bottom: 1.5rem;
}

@media screen and (min-width: 25em) {

  .footer-menu {
    font-size: 1.276rem;
    line-height: 1.5;
    list-style-type: circle;
  }

  .footer-menu li {
    margin-bottom: 0;
  }

}

.archives-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  grid-gap: 0 1rem;
  margin: -1rem 0 2rem -0.5rem;
}

.archive-link,
.archive-month {
  line-height: 2;
  padding: 0 0.5rem;
}

.archive-link:hover,
.archive-link:focus,
.archive-link:active {
  border: 0;
}

.archive-month {
  color: #aab; 
  color: var(--text-color-less);
}

.nav-jump {
  font-size: 1.276rem;
}

.archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 1rem;
  line-height: 1.875;
  margin-left: -0.5rem;
  width: 66%;
}

.archive-nav a {
  flex: 1;
  max-width: 20rem;
  padding-left: 0.5rem;
}

/* --- books --- */

.book-item.with-cover {
  display: flex;
  gap: 0.5rem 1.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
  align-items: flex-start;
}

.book-item.with-cover img {
  width: 100%;
  max-width: 6rem;
}

.book-item.with-cover div {
  flex: 4;
  min-width: 12rem;
}

.book-item.with-cover h3 {
  margin-top: 0;
}

.book-cover {
  max-width: 15rem;
}

.book-groups h2 {
  margin-bottom: 0rem;
}

.book-groups h3 {
  margin-top: 2.25rem;
  margin-bottom: 0rem;
}

.book-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  grid-gap: 1.5rem 1rem;
}

.book-title {
  line-height: 1.2;
  margin: 0.25rem 0;
}

.book-author {
  color: #778;
  color: var(--text-color-more);
  display: block;
}

.post-container .book-author {
  margin-top: -1.5rem;
}

.photo-group {
  display: grid;
  grid-gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  grid-auto-flow: dense;
  list-style-type: none;
  padding: 0;
  margin-top: 3em;
}

@media screen and (min-width: 45em) {

  .photo-group div:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .photo-group {
    grid-gap: 0.75rem;
  }

}

.photo-group .pg-link {
  display: block;
  padding: 0.06rem;
  border: 0;
}

.photo-group .pg-link:hover {
  background: #67b;
  background: var(--link-color-less);
  border: 0;
}

.photo-group img {
  border: 0.12rem solid #fdf8f0;
  border-color: var(--background-color-more);
  display: block;
  width: 100%;
  box-sizing: border-box;
}


.five-columns ul {
  overflow: hidden;
  list-style-type: none;
  padding: 0;
}

.five-columns em {
  font-size: 2em;
  width: 1em;
  display: inline-block;
  font-style: normal;
}

@media screen and (min-width: 25em) {

  .five-columns li {
    float: left;
    width: 33%;
  }

  .five-columns em {
    display: block;
  }

}

@media screen and (min-width: 45em) {

  .five-columns li {
    width: 20%;
  }

}

.coverstrip {
  display: flex;
  margin-left: -0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
}

.coverstrip:after {
  content: " ";
  background: linear-gradient(to right, transparent, #fcfbfa);
  background: linear-gradient(to right, transparent, var(--background-color));
  pointer-events: none;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: 2rem;
  z-index: 5;
}

.coverstrip-cover {
  background-size: auto 100%;
  display: block;
  height: 100px;
  transform: perspective(200px) rotate3d(0,1,0,20deg) scale(0.8);
  transition: margin ease-in-out 0.2s;
  width: 2.4rem;
}

.coverstrip-cover + .coverstrip-cover {
  margin-left: -1.6rem;
}

/* override global link borders */
a.coverstrip-cover,
a.coverstrip-cover:focus,
a.coverstrip-cover:hover {
  border-bottom: 0;
}

.coverstrip-cover:focus,
.coverstrip-cover:hover {
  box-shadow: 0 0 5px #e0e0dd;
  box-shadow: 0 0 5px var(--border-color);
  margin-top: -0.2rem;
  margin-bottom: 0.2rem;
  transform: rotate3d(0,0,0,20deg);
  transition: margin ease-in-out 0.1s;
  transition: transform ease-in-out 0.1s;
  z-index: 10;
}
