/* Inserts the styles required by various options
on the services page of the dashboard */
{{{appCSS}}}

/* Will be replaced with the @font-face rules required
to load which font is selected as the main body font */
{{{body_font.styles}}}
{{{coding_font.styles}}}
{{{syntax_highlighter.styles}}}

html {
  {{#body_font}}
  font-family: {{{stack}}};
  font-size: {{{font_size}}}px;
  line-height: {{{line_height}}};
  {{/body_font}}
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-variant-ligatures: common-ligatures;
  font-feature-settings: "liga";
  background: {{background_color}};
  color: {{text_color}};
  word-wrap: break-word;
  margin: 0 auto;
  max-width: {{body_width}}%;
}

/* Navigation */

.navigation-container {
  {{#sticky_navigation}}
  position: fixed;
  {{/sticky_navigation}}
  {{^sticky_navigation}}
  position: absolute;
  {{/sticky_navigation}}
  top: 0;
  width: {{navigation_width}}px;
  height: 100vh;
  padding: {{spacing}}rem;
}

body.position-right {
  padding-right: calc({{spacing}}rem + {{navigation_width}}px);
}

body.position-right .navigation-container {
  right: 0;
}

body.position-left {
  padding-left: calc({{spacing}}rem + {{navigation_width}}px);
}

body.position-left .navigation-container {
  left: 0;
}

.navigation-container.align-right {
  text-align: right;
}

.navigation-container.align-center {
  text-align: center;
}

.navigation {
  flex-grow: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.navigation a.index-link {
  font-weight: 600;
  flex-shrink: 0;
  flex-grow: 0;
}

.navigation > * {
  flex-shrink: 0
}

.navigation .shrink {
  flex-shrink: 1;
  overflow: hidden;
}

.navigation a {
  display: block;
  text-indent: calc({{spacing}} * -0.5rem);
  padding-left: calc({{spacing}} * 0.5rem);
  color: inherit;
  text-decoration: none;
  transition: color 0.1s;
}

.navigation a:hover,
.navigation a:focus,
.navigation a.light {
  color: rgba({{#rgb}}{{text_color}}{{/rgb}}, 0.5);
}
.navigation a.active {
  color: inherit;
  font-weight: 500;
}


.clip-7 > :nth-child(n+12) {
  display: none;
}

.clip-5 > :nth-child(n+6) {
  display: none;
}
/* We never want to show these links on the 
   portfolio theme since they don't make sense */
.menu a[href="/feed.rss"],
.menu a[href="/search"] {
  display: none !important;
}

input[name="toggle"] {
  display: none;
}


label[for="toggle"] {
  line-height: 0.333;
  cursor: pointer;
  display: block;
  float: right;
  -webkit-touch-callout: none;
  /* iOS Safari */
  -webkit-user-select: none;
  /* Safari */
  -khtml-user-select: none;
  /* Konqueror HTML */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
  /* Non-prefixed version, currently
                                  supported by Chrome and Opera */

}



@media screen and (min-width: 800px) {
  label[for="toggle"] {
    display: none;
  }
}


@media screen and (max-width: 800px) {

  .navigation {
    max-width: 100%;
    flex-grow: 1;
  }

  body {
    padding-top: 4rem /* height of index link */ 
  }

  body.position-left {
    padding-left: 0
  }

  body.position-right {
    padding-right: 0
  }

  .navigation-container {
    width: 100%;
    height: auto;
    display: flex;
    box-sizing: border-box;
    z-index: 1;
    background: {{background_color}};
  }

  .navigation {
        height: 2rem; /* height of index link */
  }

  input[name="toggle"]:checked+.navigation {
    min-height: 100vh;
  }

  input[name="toggle"]+.navigation>*:not(.index-link) {
    display: none;
  }

  input[name="toggle"]:checked+.navigation>*:not(.index-link) {
    display: block;
  }

}







.pagination {
  padding: {{spacing}}rem;
  display: flex;
  flex-wrap: wrap;
}

@media screen and (max-width: 800px) {
  .pagination {
    padding: 1.3rem 1.35rem;
  }
}

.pagination .spacer {
  border-right: 1px solid rgb(0, 0, 0, 0.1);
  height: 22px;
  margin-left: 1.3em;
  margin-right: 1.3em;
}

.pagination a,
.nav a {
  opacity: 0.15;
}


.pagination a[href],
.nav a[href] {
  opacity: 1;
}

.navigation a.light:hover,
.pagination a[href]:hover {
  opacity: 0.85
}




.pagination a {
  text-decoration: none;
  color: inherit;
}

.pagination>* {
  margin: 0.65em 0
}

.pagination a+a {
  margin-left: 1.3em;
  margin-right: 2.6rem
}






.pre-loaded {
  visibility: hidden;
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.3s, visibility 0.3s;
}

.loaded {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s, visibility 0.3s;
}





.pagination,
.post.text .date,
.archives a .date,
.nav a[href] {
  color: {{navigation_link_color}};
}

.entry a {
  color: {{text_link_color}}
}

.entry .caption {display: block;margin:1em 0;}
.entry a:visited {
  color: {{text_link_visited_color}}
}




.post.text .title {
  color: {{text_color}};
}

.post.text:hover {
  border-color: {{text_color}}
}




.posts {
  display: flex;
  flex-wrap: wrap;
  padding: calc({{spacing}}rem * 2 / 3);
}

.post {
  margin: calc({{spacing}}rem * 1 / 3);
  position: relative;
  text-decoration: none;
  color: inherit;  
}

.post.photo {
  cursor: zoom-in;
}

.post.text {
  border: 2px solid rgba(0, 0, 0, .1);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-decoration: none;
  padding: 3.9rem 2.6rem;
}

.post.photo .title {
  font-size: .875em;
  text-align: left;
  display: block;
  margin: calc({{spacing}}rem/4) 0 calc({{spacing}}rem/2);
}

.post.text .title {
  font-size: 1.375em;
  max-width: 15em;
  text-align: center;
  margin: 0.65rem 0 0.15rem;
}

.post.text .date {
  font-size: 0.875em;
}

/* When navigation is collapsed into toggle */
@media screen and (max-width: 800px) {
  .posts {
    padding: 0 1.35rem;
  }

  .post {
    margin: 1rem 0.65rem;
  }
}

/*.posts::after {
  content: '';
  flex-grow: 999999999;
}*/


.post:hover {
  opacity: 0.93
}

.post:active {
  opacity: 0.87
}

.post i {
  display: block;
}

.post img {
  position: absolute;
  top: 0;
  width: 100%;
  vertical-align: bottom;
}

.icon-holder {
  border: 1px solid;
  display: inline-block;
  border-radius: 100%;
  width: 1.25em;
  line-height: 1.25;
  height: 1.25em;
  text-align: center;
  position: relative;
  top: 0px
}

.icon-holder.margin-right {
  margin-right: 0.5rem
}

.icon-holder.margin-left {
  margin-left: 0.5rem
}

.entry {display: flex;min-height: 100vh}

.entry .contents {
  padding: {{spacing}}rem;
  /*  flex-grow: 1;
*/
  margin: 0;
}

.entry hr {
  margin: 2.6em 0;
  border: none;
  border-top: 2px solid #f2f2f2;
}

.entry h1 {
  font-size: 2em;
  margin: 0em 0 {{spacing}}rem;
}

.entry p {
  margin: 1.3em 0
}



.entry .videoContainer {
  position: relative;
}

.entry iframe {
  width: 100%;
}

.entry > * {
  /*max-width: 40em*/
}


blockquote {
  padding-left: 2.6em;
  box-sizing: border-box;
}


.footnotes,
blockquote {
  opacity: 0.85;
  color: inherit;
}

.footnotes {
  font-size: 1.125em
}

@media screen and (max-width: 800px) {
  .entry {
    padding: 0 0;
  }
}

.entry img {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  height: auto;
  width: auto;
}

body.position-left .nav:first-of-type > a:first-of-type {
  visibility: hidden;
}

body.position-right .nav:last-of-type > a:first-of-type {
  visibility: hidden;
}

.nav {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.nav svg {
  width:calc({{body_font.font_size}}px * 2.5);
  height: calc({{body_font.font_size}}px * 2.5);
  stroke:{{text_color}};
  stroke-width:calc({{body_font.font_size}}px * 0.14);
  stroke-linecap: square;
}
@media screen and (max-width: 800px) {
.nav:last-of-type > a:first-of-type {
  visibility: hidden;
}
}

.nav >* {
  display: block;
  padding: {{spacing}}rem;
}

.nav a { text-decoration: none; }

.nav a[href]:hover {
  opacity: 0.85
}

.nav a[href]:focus {
  opacity: 0.6
}

.entries h1 {
  padding: 0 {{spacing}}rem;
  margin: calc({{spacing}} * 0.6667rem) 0 0 0;
}

.archives {
  display: flex;flex-wrap:wrap;
}

.archives a {
  padding: 1.3rem;
  width: 220px;
  box-sizing:border-box;
  display: flex;
  flex-direction:column;
  align-items:center;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.archives a .thumbnail {
  width: 80px;height: 80px;
  display: flex;
  align-items:center;
}

.archives a .date {display: block;}
.archives a:hover {opacity: 0.8}

.archives a:active {opacity: 0.7}

.archives a img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin-left: auto;
  margin-right: auto
}

.date {display:none!important}
