/* Fonts */

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

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url('/static/fonts/FiraCode-Bold.woff2') format('woff2'),
       url('/static/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('/static/fonts/roboto-slab-v7-latin-regular.woff2') format('woff2'),
       url('/static/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('/static/fonts/roboto-slab-v7-latin-700.woff2') format('woff2'),
       url('/static/fonts/roboto-slab-v7-latin-700.woff') format('woff');
}

/* General styles */

a, a:hover, a:visited {
  color: rebeccapurple;
  font-weight: bold;
  text-decoration: none;
}

body {
  font-size: 16px;
  line-height: 22px;
  margin: auto;
  max-width: 900px;
  padding: 20px;
}

blockquote {
  background-color: #efefef;
  border-left: 3px solid rebeccapurple;
  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: #f0f0f0;
  border-radius: 2px;
  margin: 0 -1px 0 -1px;
  padding: 0 1px 0 1px;
}

pre {
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: auto;
  padding: 10px;
}

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

pre>code {
  border: none;
}

/* Nav bar and header */

#header {
  text-align: center;
}

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

#nav {
  border-radius: 28px;
  background-color: rebeccapurple;
  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: white;
  display: inline-block;
  margin: 8px;
  padding: 10px 20px 10px 20px;
}

#nav>li>a:hover, #nav>li>a.current {
  background-color: #669f25;
  text-decoration: none;
}

/* Posts */

.comments {
  text-align: center;
}

.comments > p {
  background-color: #e8e8e8;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-style: italic;
  display: inline-block;
  margin: 0 auto;
  padding: 10px;
}

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

.post-content {
  display: flex;
}

.post {
  margin-bottom: 30px;
}

.post-content>.meta {
  color: #666;
  flex: 0 0 auto;
  font-style: italic;
  text-align: right;
  width: 150px;
}

.post-content>.meta abbr {
  text-decoration: none;
  border-bottom: none;
}

.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;
}

.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: #888;
  font-style: italic;
}

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

/* Footer */

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

@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;
  }
}
