/* Fonts */

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("/fonts/FiraCode-Regular.woff2") format('woff2'),
    url("/fonts/FiraCode-Regular.woff") format('woff');
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url("/fonts/FiraCode-Bold.woff2") format('woff2'),
    url("/fonts/FiraCode-Bold.woff") format('woff');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'),
    url("/fonts/roboto-slab-v7-latin-regular.woff2") format('woff2'),
    url("/fonts/roboto-slab-v7-latin-regular.woff") format('woff');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'),
    url("/fonts/roboto-slab-v7-latin-700.woff2") format('woff2'),
    url("/fonts/roboto-slab-v7-latin-700.woff") format('woff');
}

/* General styles */

:root {
  --link-color: rebeccapurple;
  --accent-color: rebeccapurple;
  --puke-color: #669f25;
  --background-color: #fff;

  --white: #efefef;
  --edgy-white: #e8e8e8;
  --gray: #ccc;
  --grayer-gray: #888;
  --satan-gray: #666;
  --black: #000;
}

a,
a:hover,
a:visited {
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
}

body {
  color: var(--black);
  background-color: var(--background-color);
  font-size: 16px;
  line-height: 22px;
  margin: auto;
  max-width: 900px;
  padding: 20px;
}

blockquote {
  background-color: var(--white);
  border-left: 3px solid var(--accent-color);
  font-style: italic;
  padding: 4px;
}

blockquote em {
  font-style: normal;
}

blockquote>p:first-of-type {
  margin-top: 0;
}

blockquote>p:last-of-type {
  margin-bottom: 0;
}

code {
  background-color: var(--white);
  border-radius: 2px;
  margin: 0 -1px 0 -1px;
  padding: 0 1px 0 1px;
}

pre {
  background-color: var(--white);
  border-radius: 10px;
  overflow: auto;
  padding: 10px;
}

pre,
code {
  font-family: 'Fira Code', monospace;
}

pre>code {
  border: none;
}

/* Nav bar and header */

body>header {
  text-align: center;
}

#logo {
  margin: 22px auto;
  width: 600px;
  max-width: 100%;
}

#nav {
  border-radius: 28px;
  background-color: var(--accent-color);
  width: 100%;
  margin: 0;
  margin-bottom: 40px;
  padding: 0;
}

#nav>li {
  display: inline;
  font-size: 14px;
  font-weight: bold;
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav>li>a {
  border-radius: 28px;
  color: var(--white);
  display: inline-block;
  margin: 8px;
  padding: 10px 20px 10px 20px;
}

#nav>li>a:hover,
#nav>li>a.current {
  background-color: var(--puke-color);
  text-decoration: none;
}

/* Posts */

.comments {
  text-align: center;
}

.comments>p {
  background-color: var(--edgy-white);
  border: 1px solid var(--gray);
  border-radius: 5px;
  font-style: italic;
  display: inline-block;
  margin: 0 auto;
  padding: 10px;
}

.story-title {
  border-bottom: 1px solid var(--grayer-gray);
  font-family: 'Roboto Slab';
  /* next calc is meta width plus body */
  margin-left: calc(150px + 20px);
  padding-bottom: 5px;
  padding-left: 0;
}

.post-content {
  display: flex;
}

article {
  margin-bottom: 30px;
}

.post-content>.meta {
  color: var(--satan-gray);
  flex: 0 0 auto;
  font-style: italic;
  text-align: right;
  width: 150px;
}

.publish-date {
  display: block;
}

.publish-time {
  padding-left: 10px;
}

.post-content>.body {
  flex: 1 auto;
  margin: auto;
  padding-left: 10px;
  min-width: 0;
  max-width: 730px;
}

.post-content>.body>p:first-of-type {
  margin-top: 0;
}

.entry-categories {
  font-size: 90%;
  font-style: italic;
  list-style: none;
}

/* Semistatics */

.semistatic {
  font-size: 18px;
  line-height: 27px;
  max-width: 800px;
  margin: auto;
}

/* Archive/list pages */

#post-summaries {
  margin: auto;
  max-width: 800px;
}

.post-summary {
  margin-bottom: 30px;
}

.summary-story-title {
  font-size: 16px;
  margin-bottom: 0;
}

.summary-meta {
  color: var(--grayer-gray);
  font-style: italic;
}

.summary-body {
  font-style: italic;
  padding-left: 25px;
}

/* Footer */

footer {
  font-size: 90%;
  text-align: center;
}

/* Responsive time */

@media screen and (max-width: 729px) {
  #nav>li>a {
    margin: 4px;
  }

  .story-title {
    margin-left: 0;
    line-height: 30px;
  }

  .post-content {
    flex-flow: column;
  }

  .post-content>.meta {
    padding-left: 10px;
    text-align: left;
    width: auto;
  }

  .post-content>.body {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .entry-categories {
    padding-left: 0;
  }

  .entry-categories>li {
    display: inline-block;
    margin-right: 3px;
  }

  .entry-categories>li::after {
    content: ", ";
  }

  .entry-categories>li:last-child::after {
    content: "";
  }

  .publish-date {
    display: inline-block;
  }
}
