.container {
  /*position: relative;*/
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.container article {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* For iPhone */
@media (min-width: 320px) {
  .container {
    width: 85%;
    padding: 0;
  }

  header {
    height: 35px;
    margin-top: 20px;
  }

  footer {
    margin-bottom: 20px;
  }

  header h1 {
    font-size: 1.5em;
  }

  header h2 {
    font-size: 1em;
    line-height: 2.18em;
  }

  article {
    margin-top: 50px;
  }

  footer {
    margin: 30px auto 0 auto;
  }

  nav {
    display: none;
  }

  nav.index {
    display: block;
    clear: none;
    float: left;
  }

  nav.index ul {
    margin: 0;
  }

}

/* For devices larger than 550px */
@media (min-width: 550px) {
  .container { width: 80%; }
}

body {
  font-family: Helvetica, sans-serif;
}

@media (min-width: 550px) {
  body {
    padding-top: 50px;
    padding-bottom: 50px;
    transition: 0.5s;
  }
  nav {
    height: 20px;
    display: block;
  }

  article p,
  article h1,
  article h2,
  article h3,
  article blockquote,
  article aside,
  article iframe,
  article ul,
  article .MathJax_Display,
  article pre,
  article ol {
    width: 100%;
    margin-top: 0;
    margin-bottom: 20px;
  }

  article video {
    max-height: 800px;
    margin-top: 0;
    margin-bottom: 20px;
  }
  header h1 {
    font-size: 2em;
  }

  header h2 {
    font-size: 1.25em;
    line-height: 2.45em;
  }

  nav.index {
    display: block;
    clear: both;
    float: none;
  }

  nav.index ul {
    margin: inherit;
  }
}

article .thumbnail {
  transition: 0.5s;
}

@media (min-width: 100px) {
  article .thumbnail {
    width: 100%;
    height: 100%;
  }
}

@media (min-width: 700px) {
  article .thumbnail {
    width: 23%;
    height: 23%;
  }
}

@media (min-width: 953px) {
  article .thumbnail {
    width: 32%;
    height: 32%;
  }
}

@media (min-width: 1220px) {
  body {
    padding-top: 100px;
    padding-bottom: 100px;
    transition: 0.5s;
  }
  article {
    margin-top: 100px;
    max-width: 960px;
  }

  article .thumbnail {
    width: 310px;
    height: 310px;
  }

  nav {
    height: 20px;
  }

  footer {
    margin: 60px auto 0 auto;
  }

  article p,
  article h1,
  article h2,
  article h3,
  article blockquote,
  article aside,
  article video,
  article iframe,
  article ul,
  article .MathJax_Display,
  article pre,
  article ol {
    margin-top: 0;
    margin-bottom: 40px;
  }
}

.thumbnail {
  width: 310px;
  height: 310px;
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 10px;

  float: left;
}

header h1 {
  font-family: 'Roboto', sans-serif;
  float: left;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
}

header h2 {
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  color: #bbb;
  float: left;
  margin: 0;
  margin-left: 0.5em;
}

header h2:lang(ar) {
  font-family: 'Amiri', serif;
}

nav {
  clear: both;
}

nav ul {
  clear: both;
  list-style: none;
  padding: 0;
}

nav ul li {
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  float: left;
  margin-right: 1em;
  height: 1.2em;
}

nav a,
header h1 a {
  display: block;
  text-decoration: none;
  color: #333;
  transition: 0.1s;
}

header h1 a::before {
  content: "←";
  opacity: 0;
  transition: 0.1s;
}

header h1 a:hover::before {
  opacity: 1;
  transition: 0.1s;
}

header h1 a {
  margin-left: -1em;
}

nav li:hover a {
  color: black;
  height: 1.6em;
  margin-top: -5px;
  transition: 0.1s;
}

article {
  font-size: 1.5em;
  font-family: Georgia, serif;
  clear: both;
}

article p {
  line-height: 1.5em;
}

article aside {
  text-align: center;
  font-size: 1.75em;
}

article h1 {
  font-family: 'Roboto', sans-serif;
  font-size: 3em;
}

article h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 2em;
}

article table.blog {
  font-family: 'Roboto', sans-serif;
}

article table.blog tr {
  height: 1.75em;
}

article table.blog td.date {
  color: #bbb;
  padding-right: 0.25em;
}

article table.blog td.title {
  font-weight: 700;
}

article h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 1.5em;
}

article blockquote {
  font-size: 1.2em;
  line-height: 1.5em;
  border-left: 3px solid black;
  padding-left: 2em;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
}

article blockquote cite::before {
  content: "— ";
}

article blockquote cite {
  padding-top: 1em;
  display: block;
}

@media(min-width: 0px) {
  .columns {
    margin-top: 0;
    margin-bottom: 2em;
  }

  .columns * {
    margin-bottom: 0;
  }

  /*article .row p {*/
    /*margin-top: 0;*/
  /*}*/
}

@media(min-width: 550px) {
  .row {
    margin-top: 0;
    margin-bottom: 2em;
  }

  .row * {
    margin-bottom: 0;
  }
}

article video,
article iframe {
  border: 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

div.highlighter-rouge {
  width: 100%;
}

/*
  https://github.com/apex/apex-syntax/blob/master/styles/open-color.less
  #f8f9fa, #f1f3f5, #e9ecef, #dee2e6, #ced4da, #adb5bd, #868e96, #495057, #343a40, #212529;
*/

article pre {
  background: #f8f9fa;
  padding: 1em;
  overflow: auto;
  width: calc(100% - 2em);
}

article pre code {
  white-space: wrap;
  color: #343a40;
  background: none;
  font-size: 0.9em;
  line-height: 1.5em;
}

.highlighter-rouge .c1 {
  color: #adb5bd;
}

.highlighter-rouge .p
{
  color: #868e96;
}

.highlighter-rouge .s,
.highlighter-rouge .s2,
.highlighter-rouge .no,
.highlighter-rouge .mi
{
  color: #212529;
}

.highlighter-rouge .n,
.highlighter-rouge .c1 {
  font-style: italic;
}

.highlighter-rouge .k,
.highlighter-rouge .kd {
  font-weight: bold;
}

/*
.highlighter-rouge .c1 {
  color: #ccc;
  font-style: italic;
}

.highlighter-rouge .s,
.highlighter-rouge .mi {
  color: #000;
}

.highlighter-rouge .p {
  color: #aaa;
}

.highlighter-rouge .k {
  font-weight: bold;
}

.highlighter-rouge .no {
  color: #555;
}

.highlighter-rouge .nb,
.highlighter-rouge .nf {
  font-weight: bold;
}

.highlighter-rouge .n {
  font-style: italic;
} */

article h1 {
  font-size: 1.5em;
  margin-top: 0.5em;
  margin-bottom: 0.25em;
}

article code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9em;
  white-space: pre;
  background: #fafafa;

  color: #333;
  padding: 2px;
}

article hr {
  display: block;
  height: 50px;
  width: 100%;
  border: none;
}

article img {
  display: block;
  margin: auto;
  max-width: 100%;
}

article sup {
  vertical-align: top;
  position: relative; top: -0.7em;
}

article img.noscale {
  /*display: block;*/
  width: auto;
}

article sup a[href] {
  color: #bbb;
  border: none;
}

article sup a[name] {
  color: #bbb;
  border: none;
}

article sup a[href]:hover {
  color: black;
  border: none;
}

article a[href] {
  color: #000;
  text-decoration: none;
  border-bottom: 1px dotted #000;
}

article a[href] code {
  color: #000;
  text-decoration: none;
  border-bottom: 1px dotted #000;
}

article a.noline {
  text-decoration: none;
  border-bottom: none;
}

article a[href]:hover {
  color: #000;
  border-bottom: 1px solid #000;
}

article a[href]:hover code {
  color: #000;
  border-bottom: 1px solid #000;
}

article a.noline:hover {
  color: #000;
  border-bottom: none;
}

article .awards {
  width: 100%;
  display: flex;
  justify-content: center;
}

article .awards a {
  margin-right: 1em;
}

footer {
  font-size: 0.5em;
  color: #eee;
  text-align: center;
  width: 100%;
  display: inline-block;
  clear: both;
}

footer div {
  border-top: 1px solid #eee;
  padding-top: 1em;
  margin: 0 auto;
  width: 50%;
}
