
/* Base */
/* ----------------------------------------------------------*/
:root {
  --background: #e3f0f8;
  --layered-background: #f2f6fc;
  --highlight: #3b82f6;
  --link: #003eaa;
  --off-dark: #525252;
  --serif: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif;
  --sans-serif: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  --handwritten: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
  --max-width: 50rem;
  --header-height: 3.5rem;
  --footer-height: 3.5rem;
}

* {
  margin: 0;
  padding: 0;
}

html, body { height: 100%; }

body {
  font-family: var(--sans-serif);
  font-weight: normal;
  font-size: 1.1rem;
  line-height: 1.7;
  list-style-position: inside;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  line-height: 1;
  margin: 1rem 0;
}

strong { font-weight: bold; }

a         { text-decoration: none; color: var(--link); }
a:hover   { text-decoration: underline; }
a:visited { color: var(--link); }

table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
}
thead { background: var(--highlight); }
th {
  height: 36px;
  color: white;
  text-align: left;
}
th, td { padding: 5px; }
tbody tr:nth-child(even) { background-color: #eee; }

/* Utility */
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
}

/* Page Content styles */
.posts {
  list-style-type: none;

  li {
    display: flex;
    margin-bottom: 1.2rem;

    div {
      display: flex;
      flex-direction: column;
    }
  }
}

.post-date {
  font-size: 1rem;
  margin-right: 1.2rem;
  color: var(--off-dark);
}

.post-link {
  font-size: 1.5rem;
  line-height: 1.8rem;
  font-family: var(--serif);
}

.post-summary {
  font-size: 1rem;
}

@media screen and (min-width: 501px) {
  .post-date {
    min-width: 18ch;
    text-align: right;
  }
}

@media screen and (max-width: 500px) {
  .posts li { flex-direction: column; }
  .post-date { text-align: left; }
}

.button {
  display: inline-block;
  border: 1px solid #34465D;
  padding: 4px 8px;
  background: var(--highlight);
  color: white;
  text-decoration: none;

  &:hover, &:visited {
    color: white;
    text-decoration: none;
  }
}

.site-header {
  min-height: var(--header-height);
  padding: 0 1.875rem;
  font-size: 1.5rem;
  letter-spacing: -1px;
  font-family: var(--serif);

  .site-nav {
    display: inline-block;
    line-height: var(--header-height);

    @media screen and (max-width: 750px) {
      margin: 0 auto;
      text-align: center;
    }

    .page-link {
      margin-left: 1rem;
    }

    .page-link:first-child {
      margin-left: 0;
    }
  }

  @media screen and (max-width: 430px) {
      font-size: 1.2rem;
      padding: 0 0.8rem;

      .page-link {
        margin-left: 0.8rem;
      }
  }
}

.site-footer {
  min-height: var(--footer-height);
  display: flex;
  flex-direction: row;
  padding: 0 1.875rem;
  background-color: #f2f3f3;
  border-top: 1px solid #383E42;

  @media screen and (max-width: 750px) {
    flex-direction: column;
  }

  a {
    color: black;

    &:hover, &:visited {
      text-decoration: none;
    }
  }

  .footer-heading {
    font-size: 1.125rem;
    font-weight: 300;
    display: inline-block;
    font-family: var(--serif);
    line-height: var(--footer-height);
    margin: 0;
    margin-right: 1.25rem;
  }

  ul {
    flex: 1;
    list-style: none;
    line-height: var(--footer-height);
  }

  li {
    display: inline-block;
    font-size: 1rem;
    letter-spacing: -.3px;
    color: #828282;
    margin-right: 30px;
  }
}

code {
	font-family: var(--monospace);
	color: #2B91AF;
	font-size: .9em;
}

/**
 * VS theme by Andrew Lock (https://andrewlock.net)
 * Inspired by Visual Studio syntax coloring
 */
 code[class*="language-"],
 pre[class*="language-"] {
	 color: #393A34;
	 font-family: var(--monospace);
	 direction: ltr;
	 text-align: left;
	 white-space: pre;
	 word-spacing: normal;
	 word-break: normal;
	 font-size: .9em;
	 line-height: 1.2em;
 
	 -moz-tab-size: 4;
	 -o-tab-size: 4;
	 tab-size: 4;
 
	 -webkit-hyphens: none;
	 -moz-hyphens: none;
	 -ms-hyphens: none;
	 hyphens: none;
 }
 
 pre > code[class*="language-"] {
	 font-size: 1em;
 }
 
 pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
 code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	 background: #C1DEF1;
 }
 
 pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
 code[class*="language-"]::selection, code[class*="language-"] ::selection {
	 background: #C1DEF1;
 }
 
 /* Code blocks */
 pre[class*="language-"] {
	 padding: 1em;
	 margin: .5em 0;
	 overflow: auto;
	 border: 1px solid #dddddd;
	 background-color: white;
 }
 
 /* Inline code */
 :not(pre) > code[class*="language-"] {
	 padding: .2em;
	 padding-top: 1px;
	 padding-bottom: 1px;
	 background: #f8f8f8;
	 border: 1px solid #dddddd;
 }
 
 .token.comment,
 .token.prolog,
 .token.doctype,
 .token.cdata {
	 color: #008000;
	 font-style: italic;
 }
 
 .token.namespace {
	 opacity: .7;
 }
 
 .token.string {
	 color: #A31515;
 }
 
 .token.punctuation,
 .token.operator {
	 color: #393A34; /* no highlight */
 }
 
 .token.url,
 .token.symbol,
 .token.number,
 .token.boolean,
 .token.variable,
 .token.constant,
 .token.inserted {
	 color: #36acaa;
 }
 
 .token.atrule,
 .token.keyword,
 .token.attr-value,
 .language-autohotkey .token.selector,
 .language-json .token.boolean,
 .language-json .token.number,
 code[class*="language-css"] {
	 color: #0000ff;
 }
 
 .token.function {
	 color: #393A34;
 }
 
 .token.deleted,
 .language-autohotkey .token.tag {
	 color: #9a050f;
 }
 
 .token.selector,
 .language-autohotkey .token.keyword {
	 color: #00009f;
 }
 
 .token.important {
	 color: #e90;
 }
 
 .token.important,
 .token.bold {
	 font-weight: bold;
 }
 
 .token.italic {
	 font-style: italic;
 }
 
 .token.class-name,
 .language-json .token.property {
	 color: #2B91AF;
 }
 
 .token.tag,
 .token.selector {
	 color: #800000;
 }
 
 .token.attr-name,
 .token.property,
 .token.regex,
 .token.entity {
	 color: #ff0000;
 }
 
 .token.directive.tag .tag {
	 background: #ffff00;
	 color: #393A34;
 }
 
 /* overrides color-values for the Line Numbers plugin
	* http://prismjs.com/plugins/line-numbers/
	*/
 .line-numbers.line-numbers .line-numbers-rows {
	 border-right-color: #a5a5a5;
 }
 
 .line-numbers .line-numbers-rows > span:before {
	 color: #2B91AF;
 }
 
 /* overrides color-values for the Line Highlight plugin
 * http://prismjs.com/plugins/line-highlight/
 */
 .line-highlight.line-highlight {
	 background: rgba(193, 222, 241, 0.2);
	 background: -webkit-linear-gradient(left, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0));
	 background: linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0));
 }
 
.heading {
  background: var(--background);
  border-bottom: 1px solid #383E42;
  border-top: 1px solid #383E42;

  padding: 1rem;
  font-family: var(--serif);
  display: flex;
  align-items: center;
}

.me {
  display: flex;
  align-items: center;
  margin-right: 1.2rem;

  h1 {
    margin: 0;
    font-weight: bold;
    font-size: 2.5rem;
    color: #1c273d;
  }

  img {
    margin-right: 0.8rem;
    border-radius: 25%;
  }
}

.columns {
  display: flex;
}

section {
  padding: 0 24px;
  margin: 0 auto;

  h2 {
    font-family: var(--serif);
    font-size: 1.75rem;
    padding: 0.2rem 0.6rem;
    border-bottom: 1px solid var(--off-dark);
  }
}

.projects .imggrid { max-width: 628px; }

@media screen and (min-width: 1301px) {
  .projects .imggrid { min-width: 628px; }
}

@media screen and (min-width: 901px) {
  .blog { flex: 1; }
  .projects { flex: 0; }
}

@media screen and (max-width: 900px) {
  .heading {
    padding: 0 24px;
    flex-direction: column;
  }
  .me {
    margin-right: 0;
    margin-bottom: 0.8rem;
  }
  section {
    margin: 0;
  }
  .intro { font-size: 0.8rem; }
  .columns { flex-direction: column; }
}

.post-header > div, .post-content, .post-footer {
  max-width: var(--max-width);
}

.post-header {
  padding: 1.5rem;
  background: var(--background);
  border-bottom: 1px solid #383E42;
  border-top: 1px solid #383E42;

  h1 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1;
    font-family: var(--serif);
  }

  .meta {    
    margin-top: 0.5rem;
  }

  div {
    margin: 0 auto;
  }
}

.post-content {
  margin: 1rem auto;

  h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    margin-top: 3rem;
  }

  p { margin: 1rem 0; }
  ul, ol { margin: 1rem; }

  blockquote {
    border-left: 4px solid #4A6B8A;
    padding-left: 20px;
    margin: 30px 0;
    font-family: var(--serif);
  }

  blockquote ol ul, blockquote ol ol,
  blockquote ul ul, blockquote ul ol {
    padding-left: 20px;
  }
}

.rss-subscribe {
  border: 1px solid #a4d4ff;
  padding: 1em;
  background-color: aliceblue;
  margin: 1em auto;

  h3 { margin: 0; }
}

.tag {
  margin-right: 8px;
  font-size: 1rem;
  color: var(--off-dark);
}

@media screen and (max-width: 750px) {
  .post-content {
    padding: 0 1rem;
  }
}

@media screen and (max-width: 600px) {
  .post-header h1 { font-size: 2.25rem; }
  .post-content h2 { font-size: 1.75rem; }
  .post-content h3 { font-size: 1.375rem; }
  .post-content h4 { font-size: 1.125rem; }
  .post-content blockquote { padding-left: 10px; }
  .post-content ul,
  .post-content ol { padding-left: 10px; }
}

.crosspost, .callout {
  border: 1px solid #34465d;
  background: var(--highlight);
  color: white;
  padding: 10px 20px;

  a {
    color: white;
    font-weight: bold;
  }
}

.imggrid {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;

    li {
        margin-bottom: 12px;
        margin-right: 12px;
    }
}

@media screen and (max-width: 640px) {
    .imggrid li { margin-right: 0; }
}

.img-box {
    border: 1px solid #ccc;
    width: 300px;
    overflow: hidden;
    border-radius: 4px;

    a {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        text-align: center;
    }

    img {
        width: 100%;
        height: auto;
        display: block;
    }

    span {
        font-variant: small-caps;
        padding: 12px;
    }

    &:hover {
        border-color: var(--link);

        span {
            text-decoration: underline;
        }
    }
}
.icon {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  width: 1em;
  height: 1em;
}

.emoji {
  font-size: 1.5rem;
}
.sticky {
  background-color: #FFC;
  padding: 1rem;
  height: 10rem;
  width: 10rem;
  box-shadow: 5px 5px 7px rgba(33,33,33,.7);
  font-family: var(--handwritten);

  h1, h2, h3 {
    text-align: center;
    text-decoration: underline;
    font-weight: bold;
    font-size: 140%;
    margin: 0 0 1rem 0;
  }
}
