@import 'bourbon/bourbon';
@import 'syntax-highlighting';

$grey-color:       #828282;

.icon {

    > svg {
        display: inline-block;
        width: 16px;
        height: 16px;
        vertical-align: middle;

        path {
            fill: $grey-color;
        }
    }
}

amp-img {
  background-color: grey;
}

.cf {
  @include clearfix;
}

$rs: 16px;

$font-serif: Georgia,Cambria,"Times New Roman",Times,'Lora', serif;
$font-sans: "Helvetica Neue", 'Open Sans', Arial, Helvetica, sans-serif;

@mixin respond-to($breakpoint) {
  @media only screen and (max-width: $breakpoint + px) {
    @content;
  }
}

// Only needed for syntax highlighting
%vertical-rhythm {
  margin-bottom: $rs;
}

main {
  display: block;
}

body {
  background-color: #fff;
  font-family: $font-sans;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-font-feature-settings: "liga=1, dlig=1";
  -ms-font-feature-settings: "liga", "dlig";
  -webkit-font-feature-settings: "liga", "dlig";
  -o-font-feature-settings: "liga", "dlig";
  font-feature-settings: "liga", "dlig";
}

.site-header {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 16px auto 0 auto;
  @include box-sizing(border-box);
  @include respond-to(800) {
    padding: 0 $rs * 1;
  }

  .page-links {
      display: block;
      position: absolute;
      top: 10px;
      right: $rs;
      font-weight: 200;
      font-style: normal;
      font-size: 18px;
      line-height: 30px;

      a {
        text-decoration: none;
        color: #999999;
        &:hover {
          color: #333333;
        }
      }
  }

}

.blog-header {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  padding: 0;
  @include box-sizing(border-box);

  .blog-title {
    margin-bottom: 8px;
    font-size: 50px;
    font-weight: 700;
    letter-spacing: -2px;
    outline: 0;
    line-height: 50px;
    word-break: break-word;
    color: #333333;
  }
  .blog-description {
    font-size: 28px;
    margin: 0 0 20px;
    padding: 0;
    line-height: 1.2;
    color: #666666;
    font-weight: 300;
  }
}

.content {
  width: 100%;
  max-width: 700px;
  margin: 25px auto 0 auto;
  @include box-sizing(border-box);
  @include respond-to(800) {
    padding: 0 $rs * 1;
  }

  article {
    padding: 20px 0;
    border-bottom: 1px solid #f2f2f0;
    &:last-child {
      border-bottom: 0px;
    }
    .post-title {
      letter-spacing: -0.02em;
      font-weight: 700;
      font-style: normal;
      display: block;
      font-size: 36px;
      line-height: 1.15;
      margin: 0 0;
      a {
        text-decoration: none;
        color: #333332;
        &:hover {
          text-decoration: none;
        }
      }
    }
    .post-excerpt {
      letter-spacing: -0.02em;
      font-weight: 300;
      font-style: normal;
      font-size: 20px;
      line-height: 1.59;
      color: #666665;
    }
    .post-meta {
      font-size: 14px;
      color: #b3b3b1;
      line-height: 30px;
      a {
        color: #b3b3b1;
        text-decoration: none;
        &:hover {
          text-decoration: underline;
        }
      }
    }
  }
}

.post-template .content {
  max-width: 700px;
}

.index-headline {
  border-top: 1px solid #dededc;
  margin: 0;
  padding: 16px 0;
  span {
    color: #b3b3b1;
    font-size: $rs / 8 * 5;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
}

.pagination {
  text-align: center;
  padding: $rs * 1 0 0;
  font-size: $rs / 4 * 3;
  a {
    color: #999999;
    text-decoration: none;
    &:hover {
      color: #333333;
    }
  }
}

.site-footer {
  margin: 0 auto;
  padding: $rs * 3 0;
  width: 100%;
  max-width: 700px;
  font-size: $rs / 4 * 3;
  text-align: center;
  color: #999999;
  line-height: $rs * 1.1;
  a {
    color: #666666;
    text-decoration: none;
    &:hover {
      color: #333333;
    }
  }
}

.post {
  .post-meta {
    font-family: $font-sans;
  }
  .post-title {
    font-weight: 700;
    font-style: normal;
    letter-spacing: -0.04em;
    font-size: 50px;
    line-height: 1.1;
    color: #333332;
    margin-bottom: 50px;
  }
  .author-image {
    background-image: url({{ site.baseurl }}{{site.author_image}});
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    margin-right: 8px;
    margin-bottom: -10px;
    float: left;
    background-size: cover;
    border-radius: 100%;
    text-indent: -9999px;
  }
  .post-meta-text {
    color: #b3b3b1;
    letter-spacing: -0.02em;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    overflow: hidden;
    font-family: $font-sans;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .post-content {
    width: 100%;
    font-family: $font-serif;
    color: #333333;
    h1, h2, h3 {
      font-family: $font-sans;
    }
    h3, h4, h5, h6 {
      letter-spacing: -0.02em;
      font-weight: 700;
      font-style: normal;
      font-size: 24px;
      line-height: 1.3;
      margin-top: 50px;
      margin-bottom: 0px;
      font-family: $font-sans;
    }
    h3 {
      font-size: 36px;
    }
    h2, h1 {
      letter-spacing: -0.02em;
      font-weight: 700;
      font-style: normal;
      font-size: 42px;
      line-height: 1.2;
      margin-top: 50px;
      margin-bottom: 0px;
    }
    table {
      border-collapse: collapse;
    }
    table, th, td {
      border: 1px solid black;
      padding: 5px;
      text-align:left;
    }
    p {
      font-weight: 400;
      font-style: normal;
      font-size: 22px;
      line-height: 1.59;
      letter-spacing: -.002em;
      margin-top: 30px;
      margin-bottom: 0;
      color: #333333;
      -webkit-hyphens: auto;
      -moz-hyphens: auto;
      hyphens: auto;
    }
    a {
      color: #333333;
      text-decoration: underline;
    }
    amp-img, amp-youtube {
      margin-top: 30px;
    }
    figure {
      margin: 0;
      padding: 0 0 30px;
    }
    figcaption {
      font-weight: 400;
      font-style: italic;
      font-size: 16px;
      line-height: 1.3;
      color: #666665;
      outline: 0;
      z-index: 300;
      text-align: center;
    }
    hr {
      border: 0;
      padding: 0;
      display: block;
      width: 15%;
      margin: 30px auto;
      border: 0px solid #dddddd;
      border-top: 1px solid #dddddd;
    }
    blockquote {
      margin: 0 0 30px;
      margin-left: -26px;
      border-left: 3px solid #57ad68;
      padding-left: 20px;
      p {
        letter-spacing: 0.01rem;
        font-weight: 400;
        mborder-left: 3px solid #57ad68;
        mpadding-left: 20px;
        mmargin-left: -26px;
        padding-bottom: 3px;
      }
    }
    ul, ol {
      padding: 0 0 30px;
      margin: 0;
    }
    li {
      padding: 0;
      font-weight: 400;
      font-style: normal;
      font-size: 23px;
      line-height: 30px;
      margin-left: 30px;
      margin-bottom: 12px;
      padding-top: 2px;
      p {
        padding: 0 0 golden-ratio(1rem, 1);
      }
    }
    ol li {
      list-style-type: decimal;
    }
  }
  .bottom-teaser {
    padding: 50px 0 0 0;
    font-family: $font-sans;
    hr {
      border: 0;
      padding: 0;
      display: block;
      width: 15%;
      margin: 16px 0 16px 100px;
      border: 0px solid #dddddd;
      border-top: 1px solid #dddddd;
    }
    .isLeft {
      float: left;
      width: 47%;
      @include box-sizing(border-box);
      @include respond-to(800) {
        width: 100%;
        padding-bottom: $rs * 2;
      }
      .bio {
        margin-top: 18px;
        margin-bottom: 18px;
      }
      .username {
        margin-left: 4px;
        margin-right: 18px;
        margin-bottom: 18px;
      }
      .index-headline {
        padding-bottom: 32px;
      }
      a {
        color: black;
        text-decoration: none;
        &:hover {
          color: #333333;
          text-decoration: underline;
        }
      }
      .author-image {
        display: block;
        width: 80px;
        height: 80px;
        float: left;
        background-size: cover;
        border-radius: 100%;
        text-indent: -9999px;
      }
      h4 {
        font-size: 18px;
        line-height: 1.1;
        font-weight: 700;
        padding: 0;
        margin: 0;
        padding-left: 100px;
      }
      p {
        font-size: 14px;
        line-height: 1.3;
        font-weight: 400;
        padding: 0;
        margin: 0;
        padding-left: 100px;
        &.published {
          color: #999999;
        }
      }
    }
    .isRight {
      float: right;
      width: 47%;
      @include box-sizing(border-box);
      @include respond-to(800) {
        width: 100%;
      }

      .index-headline {
        padding-bottom: 32px;
      }
      .site-footer {
        margin: 0;
        padding: 0;
        color: #333333;
        text-align: left;
        font-size: 14px;
        line-height: 1.3;
        color: #999999;
        a {
          color: #333333;
          text-decoration: none;
          &:hover {
            text-decoration: underline;
          }
        }
        .poweredby {
          display: block;
          padding-bottom: 18px;
          font-weight: 700;
          color: #333333;
        }
      }
    }
  }
}

.share {
  text-align: right;
  padding: 20px 0 0;
  a {
    text-decoration: none;
    color: #bbbbbb;
    padding-left: 12px;
    .hidden {
      display: none;
    }
    &:hover {
      color: #333333;
    }
  }
}


pre,
code {
  font-size: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  background-color: #eeeeff;
}

code {
  padding: 1px 5px;
}

pre {
  padding: 8px 12px;
  overflow-x: scroll;
  > code {
    border: 0;
    padding-right: 0;
    padding-left: 0;
  }
}

.pagination .disabled {
    opacity: 0;
}
