@import url('//fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display+SC:wght@400;900&display=swap');
 
/* general */
:root {
  --bg-color: #fafafa;
  --code-bg-color: #f4f4f4;
  --text-color: #212121;
  --secondary-color: #808080;
  --tertiary-color: #b0b0b0;
  --link-color: #b5c8cf;
  --link-hover-color: #618794;
  --link-bg-color: #dae4e7;
  --selection-color: #dae4e7;
  --body-stack: "Lora", "Georgia", "Times New Roman", serif;
  --secondary-stack: "Lato", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Verdana", sans-serif;
  --title-stack: "Playfair Display SC", "Georgia", serif;
}

html {
  height: 100%;
}
 
body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--body-stack);
  font-size: 16px;
  font-size: clamp(16px, 2.4vw, 21px);
  margin: auto;
  min-height: 100%;
  position: relative;
  width: 100%;
}
 
/* wrapper */
#wrapper {
  background: none;
  border: none;
  box-sizing: border-box;
  display: block;
  margin: 3rem auto 10rem auto;
  max-width: 100%;
  padding: 1em;
  width: 32em;
}
 
@media all and (max-width:760px) {#wrapper {margin-top: 3rem;}}
@media all and (max-width:520px) {#wrapper {margin-top: 1rem;}}
 
/* header */
#header {
  border-bottom: solid 1px var(--secondary-color);
  line-height: 0.6em;
  padding: 0.25em 0;
}
 
#title {
  font-family: var(--title-stack);
  font-size: 2em;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin: 1em 0;
  text-align: center;
}

#header nav {
  margin: 2em 0;
  text-align: center;
}

.nav-link, .nav-spacer, .article-more-link {
  font-family: var(--secondary-stack);
  color: var(--secondary-color);
}

.nav-spacer {
  margin: 0 0.5em;
}

/* posts */
.article {
  border-bottom: solid 1px var(--secondary-color);
  margin: 2em 0;
  padding-bottom: 1em;
}

.article-header {
  margin-bottom: 1.75em;
  text-align: center;
}
 
.article-title {
  font-family: var(--title-stack);
  font-size: 2em;
  font-weight: normal;
  letter-spacing: 0.05em;
  margin-bottom: .25em;
}

.article-entry {
  line-height: 1.5;
  margin-bottom: 1em;
  overflow: visible;
}

.article-category {
  line-height: 1.5;
}
 
.article-meta, .archive-article-date, .article-nav, .page-nav, .article-footer, .archive-article-word-count {
  color: var(--secondary-color);
  font-family: var(--secondary-stack);
  font-size: 0.9em;
  height: auto;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

@media all and (max-width:760px) {
  .article-meta, .archive-article-date, .article-nav, .page-nav, .article-footer, .archive-article-word-count {
    font-size: 1em;
  }
}

/* archive */
.archives-wrap {
  margin: 0.25rem 0;
  position: relative;
  top: 0.5rem;
}

@media all and (max-width:620px) {
  .archives-wrap {
    margin-left: 1rem;
  }
}

.month {
  color: var(--secondary-color);
  cursor: pointer;
  font-family: var(--secondary-stack);
}

.hidden, .hidden-input {
  display: none;
  margin-bottom: 1em;
}

.hidden-input ~ .month::before {
  content: "+ ";
  position: absolute;
  left: -1em;
}

.hidden-input:checked ~ .month::before {
  content: "– ";
}

.hidden-input:checked ~ .hidden {
  display: block;
}

.archive-article {
  margin: 0.25em 0;
  position: relative;
}

.archive-article-header {
  align-items: center;
  display: inline-flex;
}

.archive-article-date {
  position: absolute;
  right: calc(100% - 1.5em);
}

.archive-article-title {
  margin-right: 0.5em;
}

.archive-article-title {
  font: inherit;
  left: 2em;
  letter-spacing: 0;
  margin: 0;
  max-width: calc(100vw - 6rem);
  position: relative;
  text-align: left;
  text-decoration: none;
  text-transform: none;
}

.article-nav {
  display: flex;
  margin: 2em 0;
}

#article-nav-older, #article-nav-newer {
  flex-basis: 50%;
}

#article-nav-newer {
  order: 1;
  text-align: right;
}

/* pagination */
.page-nav {
  margin: 1em 0;
  text-align: center;
}

.page-number, .space, .extend {
  font-size: 1.3em;
  margin: 0 0.4em;
}

.current {
  color: var(--text-color);
}
 
/* typography */
a {
  color: inherit;
  text-decoration: none;
}

p, ul, ol, h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
}

ul, ol {
  padding-left: 1em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
}

h1, h2 {
  font-size: 2em;
  letter-spacing: 0;
  margin-top: 2rem;
}

h2 {
  font-size: 1.5em;
}

h3, h4, h5, h6 {
  font-size: 1em;
  font-weight: bold;
  margin-top: 1.5rem;
  text-transform: uppercase;
}

h4, h5, h6 {
  font-size: 0.9em;
  margin-top: 1rem;
}

blockquote {
  display: block;
  margin: 0 0 1em;
  padding-left: .75rem;
  border-left: 1px solid var(--tertiary-color);
}

.article .article-entry blockquote footer, .caption {
  color: var(--secondary-color);
  display: block;
  text-align: center;
}

.article .article-entry blockquote footer cite:before {
  content: " — ";
}

.pullquote {
  border: 0;
  color: var(--secondary-color);
  font-size: 1.2em;
  font-family: var(--secondary-stack);
  margin: 0;
  width: 40%;
}

.pullquote p {
  margin: 0;
}

.pullquote.left {
  float: left;
  padding: 1em 1em 1em 0;
  text-align: left;
}

.pullquote.right {
  float: right;
  padding: 0 1em 1em 1em;
  text-align: right;
}

.caption {
  color: #aeb4b9;
  display: block;
  font-size: 0.8em;
  text-align: center;
}

.katex {
  font-size: 1.1em;
}

.article-entry a {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border-bottom;
  border-bottom: 3px solid var(--link-color);
  transition-duration: .3s;
  transition-property: border-bottom;
}
 
.article-entry a:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border-bottom;
  border-bottom: 3px solid var(--link-hover-color);
  transition-duration: .3s;
  transition-property: border-bottom;
}

#title a, .article-title a, a.nav-link, .archive-article-title a, .article-nav a, a.page-number, a.extend, .month, .article-footer a, .article-category a, .article-tag a, .article-more-link a {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: background;
  transition-duration: .3s;
  transition-property: background;
}
 
#title a:hover, .article-title a:hover, a.nav-link:hover, .archive-article-title a:hover, .article-nav a:hover, a.page-number:hover, a.extend:hover, .month:hover, .article-footer a:hover, .article-category a:hover, .article-tag a:hover, .article-more-link a:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: background;
  background: var(--link-bg-color) !important;
  transition-duration: .3s;
  transition-property: background;
}

.article-category, .article-tag {
  color: var(--secondary-color);
  font-family: var( --secondary-stack);
  margin-top: 2em;
}

.article-more-link {
  font-size: 0.9em;
  letter-spacing: 0.1em;
  margin-bottom: 1.1em;
  text-align: center;
  text-transform: uppercase;
}
 
/* miscellaneous */
img {
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

a img {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border;
  border: 3px solid var(--bg-color);
  transition-duration: .3s;
  transition-property: border;
}

a img:hover {
  -webkit-transition-duration: .3s;
  -webkit-transition-property: border;
  border: 3px solid var(--secondary-color);
  transition-duration: .3s;
  transition-property: border;
}

.article-gallery img, table {
  margin: 1em auto;
}

td, th, table caption, table td, table th {
  border-bottom: 1px solid var(--tertiary-color);
  padding: 0.25em;
}

.video-container {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 1em;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-top: 0;
}
 
::selection {
  background-color: var(--selection-color);
}

#settings-container {
  background: var(--tertiary-color);
  bottom: 0;
  position: fixed;
  right: 0;
}

#sans-font, #dark-mode {
  cursor: pointer;
  float: right;
  padding: 0.5em;
}
