---
---

//
// IMPORTS
//

@import "reset";
@import "open-color";
@import "variables";
// Syntax highlighting @import is at the bottom of this file

/**************/
/* BASE RULES */
/**************/

html {
  font-size: $base-font-size;
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

body {
  font-family: $base-font;
  color: $base-color;
  line-height: 1.6;
}

.container {
  margin: 0 auto;
  max-width: 1440px;
  padding: 0 10px;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.7;
  margin: 1em 0 15px;
  padding: 0;

  @include mobile {
    line-height: 1.4;
  }
}

h1, h2, h3, h4, h5 {
  font-weight: bold;
}

h1 {
  font-size: 30px;
  a {
    color: inherit;
  }
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 20px;
}

h6 {
  color: $base-lighten-color;
}

p {
  color: $text-color;
  margin: 15px 0px;
  text-align: justify;
}

a {
  color: $link-color;
  text-decoration: none;
  cursor: pointer;
  &:hover, &:active {
    color: $link-color;
  }
}

figcaption {
  text-align: center;
  font-size: medium;
}

em, i {
  font-style: italic;
}

strong, b {
  font-weight: bold;
}

sub {
  vertical-align: sub;
  font-size: smaller;
}

sup {
  vertical-align: super;
  font-size: smaller;
}

hr {
  border: 0;
  border-top: 2px solid $divider-color;
  margin: 1.5em auto;
}

// Yeun's list style
// https://gist.github.com/yeun/d824fc7b04b756508f4b0143535cec30

ol, ul {
  > li {
    &:before {
      position: absolute;
      width: $li-bullets-width;
      margin-left: -$li-bullets-width;
      display: inline-block;
      box-sizing: border-box;
      text-align: right;
    }
  }
}

ul {
  > li:before {
    content: "\2022";
    padding-right: $ul-bullets-right-space;
    font-family: $ul-bullets-font;
    font-size: $ul-bullets-font-size;
    line-height: $ul-bullets-font-line-height;
  }
}

ol {
  counter-reset: section;

  > li:before {
    counter-increment: section;
    content: counter(section) ".";
    padding-right: $ol-bullets-right-space;
    font-family: $ol-bullets-font;
    font-size: $ol-bullets-font-size;
    line-height: $ol-bullets-font-line-height;
  }
}

ol, ul {
  > li {
    margin: 0 auto $li-bottom-space $li-bullets-width;
    line-height: $li-line-height;

    > ol,
    > ul {
      margin-top: $li-bottom-space;
    }
  }
}

li {
  > ol,
  > ul {
    > li {
      font-size: ($li-child-size-ratio * 1em);
      margin: 0 auto ($li-bottom-space * $li-child-size-ratio) ($li-bullets-width * $li-child-size-ratio);
    }
  }
}

// Definition list
dt {
  float: left;
  width: $dt-width;
  overflow: auto;
  clear: left;
  text-align: right;
  white-space: nowrap;
  font-weight: bold;
  margin-bottom: $li-bottom-space;

  @include mobile {
    width: 120px;
  }
}

dd {
  margin-left: $dd-position;
  margin-bottom: $li-bottom-space;

  @include mobile {
    margin-left: 140px;
  }
}

// Table
table {
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid $table-border-color;
  border-collapse: collapse;
}

td, th {
  padding: .25rem .5rem;
  border: 1px solid $table-border-color;
}

tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: $table-background-color;
}

// Blockquote
blockquote {
  font-weight: 300;
  padding: 0 0 0 1.4rem;
  margin: 0 2.0rem 1rem 0rem;
  border-left: .2em solid $blockquote-border-color;
  text-align: justify;

  p {
    margin-bottom: 0;
    font-family: 'Palatino Linotype','Book Antiqua',Palatino,STKaiti,KaiTi,'楷体',
      SimKai,DFKai-SB,NSimSun,serif
  }
}

// Footnote
a.footnote {
  &,
  .post p &,
  .post ol &,
  .post ul & {
    margin: 0 3px;
    padding: 0 2px;
    font-size: $small-font-size;
    text-align: center;
    border: 1px solid $footnote-link-border-color;
    border-radius: 2px;
    -webkit-text-stroke: 0.25px;
    -webkit-transition: 0.2s ease-out all;
    text-decoration: none;

    &:hover {
      background: $footnote-link-background-over-color;
    }
  }
}

.footnotes {
  border-top: 1px solid $divider-color;
  font-size: $small-font-size;
}

// Image
img {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 5px;
}

.inline{
  display: inline;
  max-width: 100%;
  border-radius: 1px;
  margin-bottom: -3px;
}


// Fixes images in popup boxes from Google Translate
.gmnoprint img {
  max-width: none;
}

// Specify the color of the selection
/*
::-moz-selection {
  color: $selection-color;
  background: $selection-background-color;
}
::selection {
  color: $selection-color;
  background: $selection-background-color;
}
*/

// Nicolas Gallagher's micro clearfix hack
// http://nicolasgallagher.com/micro-clearfix-hack/
.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

// Alignment
.center {
  text-align: center;

  &-image {
    margin: 0 auto;
    display: block;
  }
}

.right {
  text-align: right
}

/*********************/
/* LAYOUT / COLUMNS */
/*********************/
.row::after {
  content: "";
  clear: both;
  display: table;
}

[class*="col-"] {
  float: left;
  padding: 15px;
}

/* For mobile phones: */
@media only screen and (max-width: 600px) {
  [class*="col-"] {
    display: block;
    width: 100%;
  }
}

@media only screen and (min-width: 600px) {
  /* For tablets: */
  .col-s-1 {width: 8.33%;}
  .col-s-2 {width: 16.66%;}
  .col-s-3 {width: 25%;}
  .col-s-4 {width: 33.33%;}
  .col-s-5 {width: 41.66%;}
  .col-s-6 {width: 50%;}
  .col-s-7 {width: 58.33%;}
  .col-s-8 {width: 66.66%;}
  .col-s-9 {width: 75%;}
  .col-s-10 {width: 83.33%;}
  .col-s-11 {width: 91.66%;}
  .col-s-12 {width: 100%;}
}
@media only screen and (min-width: 768px) {
  /* For desktop: */
  .col-1 {width: 8.33%;}
  .col-2 {width: 16.66%;}
  .col-3 {width: 25%;}
  .col-4 {width: 33.33%;}
  .col-5 {width: 41.66%;}
  .col-6 {width: 50%;}
  .col-7 {width: 58.33%;}
  .col-8 {width: 66.66%;}
  .col-9 {width: 75%;}
  .col-10 {width: 83.33%;}
  .col-11 {width: 91.66%;}
  .col-12 {width: 100%;}
}

/*********************/
/* LAYOUT / SECTIONS */
/*********************/

//
// .masthead
//

.wrapper-masthead {
  margin-bottom: 20px;
}

.masthead {
  padding: 20px 0;
  border-bottom: 1px solid $lightGray;

  @include mobile {
    text-align: center;
  }
}

.site-avatar {
  float: left;
  width: 50px;
  height: 50px;
  margin-top: 15px;
  margin-right: 15px;

  @include mobile {
    float: none;
    display: block;
    margin: 0 auto;
  }

  img {
    border-radius: 5px;
  }
}

.site-info {
  float: left;

  @include mobile {
    float: none;
    display: block;
    margin: 0 auto;
  }
}

.site-name {
  margin: 0;
  color: $darkGray;
  cursor: pointer;
  font-family: $helveticaNeue;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 1px;
}

.site-description {
  margin: -5px 0 0 0;
  color: $gray;
  font-size: 16px;

  @include mobile {
    margin: 3px 0;
    text-align: center;
  }
}

nav {
  float: right;
  margin-top: 23px; // @TODO: Vertically middle align
  font-family: $helveticaNeue;
  font-size: 18px;

  @include mobile {
    float: none;
    margin-top: 9px;
    display: block;
    font-size: 16px;
  }

  a {
    margin-left: 20px;
    color: $darkGray;
    text-align: right;
    font-weight: 300;
    letter-spacing: 1px;

    @include mobile {
      margin: 0 10px;
      color: $blue;
    }
  }
}

// Input
.event-description {
  width: 100%;
}

// Posts
.posts > .post {
  padding-bottom: 2em;
  border-bottom: 1px solid $divider-color;
}

.posts > .post:last-child {
  padding-bottom: 1em;
  border-bottom: none;
}

.post {
  h1 {
    margin-bottom: .1em;
  }

  .date {
    font-weight: 300;
    font-size: $small-font-size;
    color: $base-lighten-color;
    margin-right: 3px;
  }

  .tag {
    display: inline;
    font-weight: 300;
    font-size: $small-font-size;

    li:before {
      content: '';
    }

    li {
      display: inline;
      margin: 0;

      > a {
        margin: 3px 3px 3px 0;
        padding: .5px 4px;
        color: $tag-index-label-color;
        background-color: $tag-index-label-background-color;
        border-radius: 3px;
      }
    }
  }

  .comments {
    margin-top: 10px;
    background-color: $tag-index-label-background-color
  }

  .read-more {
    font-size: 15px;
  }
}

.pagination {
  font-weight: 300;
  padding: 1em 0;
  width: 100%;
  display: inline-block;

  @include mobile {
    font-size: $small-font-size;
  }

  > .prev {
    float: left;
    width: 45%;
    a {
      color: $pagination-color;
      &:hover, &:focus {
        color: $pagination-over-color;
      }
    }
  }

  > .next {
    float: right;
    text-align: right;
    width: 45%;
    a {
      color: $pagination-color;
      &:hover, &:focus {
        color: $pagination-over-color;
      }
    }
  }
}

// Archive
.archive {
  a {
    color: $base-color;
  }
  time {
    color: $base-lighten-color;
    font-size: $small-font-size;
    font-weight: 300;
    margin-left: 3px;
  }
}


// Tags
.tags > .label {
  > li:before {
    content: "";
  }

  > li {
    margin: 0;
    font-size: $small-font-size;
    font-weight: 300;
    display: inline;

    > a {
      display: inline-block;
      margin: 1px;
      color: $tag-index-label-color;
      background-color: $tag-index-label-background-color;
      border-radius: 3px;

      span {
        float: left;
        padding: .5px 5px;

        &.count {
          background-color: $tag-index-count-background-color;
          border-radius: 0 3px 3px 0;
        }
      }
    }
  }
}

.tags > .tag {
  a {
    color: $base-color;
  }
  time {
    color: $base-lighten-color;
    font-size: $small-font-size;
    font-weight: 300;
    margin-left: 3px;
  }
}

// Footer
.wrapper-footer {
  margin-top: 50px;
  border-top: 1px solid $footer-border-color;
  border-bottom: 1px solid $footer-border-color;
  background-color: $footer-background-color;
}

footer {
  padding: 20px 0;
  text-align: center;

  p {
    font-size: $small-font-size;
    text-align: center;
  }

  .svg-icon {
    display: block;
    font-size: 0;
    list-style: none;
    margin: 0;
    text-align: center;

    li {
      display: inline-block;
      margin: 10px;
    }

    svg {
      height: 30px;
      width: 30px;
    }

    em {
      font-size: 18px;
      line-height: 1.5;
      margin-top: -.75em;
      position: absolute;
      text-align: center;
      top: 50%;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
}

// Social Share Buttons
.resp-sharing-button__link,
.resp-sharing-button__icon {
  display: inline-block
}

.resp-sharing-button__link {
  text-decoration: none;
  color: #fff;
  margin: 0em
}

.resp-sharing-button {
  border-radius: 7px;
  transition: 25ms ease-out;
  padding: 5px 12px;
  font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
  font-size: 25px;
}

.resp-sharing-button__icon svg {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: top
}

.resp-sharing-button--small svg {
  margin: 0;
  vertical-align: middle
}

/* Non solid icons get a stroke */
.resp-sharing-button__icon {
  stroke: #fff;
  fill: none
}

/* Solid icons get a fill */
.resp-sharing-button__icon--solid,
.resp-sharing-button__icon--solidcircle {
  fill: #fff;
  stroke: none
}

.resp-sharing-button--twitter {
  background-color: #55acee
}

.resp-sharing-button--twitter:hover {
  background-color: #2795e9
}

.resp-sharing-button--pinterest {
  background-color: #bd081c
}

.resp-sharing-button--pinterest:hover {
  background-color: #8c0615
}

.resp-sharing-button--facebook {
  background-color: #3b5998
}

.resp-sharing-button--facebook:hover {
  background-color: #2d4373
}

.resp-sharing-button--tumblr {
  background-color: #35465C
}

.resp-sharing-button--tumblr:hover {
  background-color: #222d3c
}

.resp-sharing-button--reddit {
  background-color: #5f99cf
}

.resp-sharing-button--reddit:hover {
  background-color: #3a80c1
}

.resp-sharing-button--google {
  background-color: #dd4b39
}

.resp-sharing-button--google:hover {
  background-color: #c23321
}

.resp-sharing-button--linkedin {
  background-color: #0077b5
}

.resp-sharing-button--linkedin:hover {
  background-color: #046293
}

.resp-sharing-button--email {
  background-color: #777
}

.resp-sharing-button--email:hover {
  background-color: #5e5e5e
}

.resp-sharing-button--xing {
  background-color: #1a7576
}

.resp-sharing-button--xing:hover {
  background-color: #114c4c
}

.resp-sharing-button--whatsapp {
  background-color: #25D366
}

.resp-sharing-button--whatsapp:hover {
  background-color: #1da851
}

.resp-sharing-button--hackernews {
background-color: #FF6600
}
.resp-sharing-button--hackernews:hover, .resp-sharing-button--hackernews:focus {   background-color: #FB6200 }

.resp-sharing-button--vk {
  background-color: #507299
}

.resp-sharing-button--vk:hover {
  background-color: #43648c
}

.resp-sharing-button--facebook {
  background-color: #3b5998;
  border-color: #3b5998;
}

.resp-sharing-button--facebook:hover,
.resp-sharing-button--facebook:active {
  background-color: #2d4373;
  border-color: #2d4373;
}

.resp-sharing-button--twitter {
  background-color: #55acee;
  border-color: #55acee;
}

.resp-sharing-button--twitter:hover,
.resp-sharing-button--twitter:active {
  background-color: #2795e9;
  border-color: #2795e9;
}

.resp-sharing-button--tumblr {
  background-color: #35465C;
  border-color: #35465C;
}

.resp-sharing-button--tumblr:hover,
.resp-sharing-button--tumblr:active {
  background-color: #222d3c;
  border-color: #222d3c;
}

.resp-sharing-button--email {
  background-color: #777777;
  border-color: #777777;
}

.resp-sharing-button--email:hover,
.resp-sharing-button--email:active {
  background-color: #5e5e5e;
  border-color: #5e5e5e;
}

.resp-sharing-button--reddit {
  background-color: #5f99cf;
  border-color: #5f99cf;
}

.resp-sharing-button--reddit:hover,
.resp-sharing-button--reddit:active {
  background-color: #3a80c1;
  border-color: #3a80c1;
}

.resp-sharing-button--whatsapp {
  background-color: #25D366;
  border-color: #25D366;
}

.resp-sharing-button--whatsapp:hover,
.resp-sharing-button--whatsapp:active {
  background-color: #1DA851;
  border-color: #1DA851;
}

.resp-sharing-button--hackernews {
  background-color: #FF6600;
  border-color: #FF6600;
}

.resp-sharing-button--hackernews:hover
.resp-sharing-button--hackernews:active {
  background-color: #FB6200;
  border-color: #FB6200;
}

.resp-sharing-button--telegram {
  background-color: #54A9EB;
}

.resp-sharing-button--telegram:hover {
  background-color: #4B97D1;}


/* Container holding the image and the text */
.container-post {
 margin: 0 auto;
 max-width: 760px;
 padding: 0 10px;
 width: 100%;
 position: relative;
 text-align: left;
}

.container-div {
 position: relative;
 text-align: center;
 color: black;
}

/* Bottom left text */
.bottom-left {
 position: absolute;
 bottom: 8px;
 left: 16px;
}

/* Top left text */
.top-left {
 position: absolute;
 top: 8px;
 left: 16px;
}

/* Top right text */
.top-right {
 position: absolute;
 top: 8px;
 right: 16px;
}

/* Bottom right text */
.bottom-right {
 position: absolute;
 bottom: 8px;
 right: 16px;
}

/* Centered text */
.centered {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
}

div.sticky {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  bottom: 0;
  z-index: 1;
}

div#banner {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #DDEEEE;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
}

div#banner-content {
   width: 100%;
   margin: 0 auto;
   padding: 0px;
   //color: #4B0082;
   color: #8B0000;
   font-size: 12px;
 }

// Settled on moving the import of syntax highlighting to the bottom of the CSS
// ... Otherwise it really bloats up the top of the CSS file and makes it difficult to find the start
@import "highlights";
