
/******************************************************
 * I copied these styles from markdotto.com, who is
 * the creator of bootstrap, and I also did some
 * modification. Thanks Mark for the beautiful theme,
 * so I reserved the @mdo sign below.
 *****************************************************/

/*
  __
  __                  /\ \
  /'_`\_    ___ ___    \_\ \    ___
  /'/'_` \ /' __` __`\  /'_` \  / __`\
  /\ \ \L\ \/\ \/\ \/\ \/\ \L\ \/\ \L\ \
  \ \ `\__,_\ \_\ \_\ \_\ \___,_\ \____/
  \ `\_____\\/_/\/_/\/_/\/__,_ /\/___/
  `\/_____/

*/


/* Body resets
   -------------------------------------------------- */

/* TODO: Neat the code
 * TODO: separate the animation of stick and show title
 */

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
html {
  font-size: 62.5%;
}
body {
  font-family: Menlo, Monaco, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #fdfde7;
}

#content {
  max-width: 900px;
  margin: 50px auto;
  padding: 0px 40px 0px 40px;
  overflow: hidden;
}

#preamble.sticky + #content {
  padding-top: 70px;
}

p {
  margin: 10px 0px 10px 0px;
}

/* Top Banner */
#top-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  padding: 20px 16px 10px 16px;
  letter-spacing: 3px;
}

#site-name {
  display: block;
  margin: 0 auto 0 auto;
  padding-left: 6px;
  width: auto;
  border-radius: 5px;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  font-size: 30px;
  text-align: center;
  transition: 0.3s;
}

#site-name:hover {
  background-color: transparent;
  text-decoration: none;
  color: #fff;
  background-color: #7e4fa0;
}

#site-name:before {
  content: none;
}

#site-name:after {
  content: none;
}

#at-home {
  padding: 0 3px 0 6px;
  color: #fff;
  background-color: #7e4fa0;
  border-radius: 5px;
}

#banner {
  display: block;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 4px;
  width: 100%;
  margin: auto;
  transition: 0.3s;
  text-align: center;
}

/* Navigation bar */
#top-nav {
  display: block;
  max-width: 900px;
  margin: 20px auto 0 auto;
  padding: 0px 40px 0 40px;
  transition: 0.6s;
  z-index: 197;
}

#top-nav.sticky {
  position: fixed;
  /* Centering the navigation bar even if it with dynamic width */
  top: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 100%;
  max-width: 100%;
  padding: 0;
}

#nav-wrapper {
  padding: 0;
  /* display: flex; */
  /* display: -webkit-flex; */
  /* justify-content: space-between; */
  /* flex: 0 0 auto; */
  /* align-items: stretch; */
  /* flex-wrap: wrap; */
  font-size: 22px;
  height: 50px;
  background-color: #d7e7ff;
  border: 2px solid #b7c7ff;
  border-radius: 10px;
  -webkit-box-shadow: 0 0 0em #888;
  -moz-box-shadow: 0 0 0em #888;
  transition: 0.6s;
}

#nav-wrapper.sticky {
  border-radius: 0;
  border: 0px;
  -webkit-box-shadow: 0 0 0.3em #333;
  -moz-box-shadow: 0 0 0.3em #333;
}

.nav-btn {
  /* 当高度超过字的高度时，文字垂直居中 */
  display: flex;
  align-items: center;
  padding: 5px 10px 5px 10px;
  text-decoration: none;
  border-radius: 10px;
  transition: 0.4s;
  animation-name: fade-in;
  animation-duration: 0.6s;
}

#photo-entry.title-action {
  display: none;
}

#about-entry.title-action {
  display: none;
}

.nav-btn:hover {
  background-color: #b7c7ff;
  text-decoration: none;
  -webkit-box-shadow: 0 0 0.3em #333;
  -moz-box-shadow: 0 0 0.3em #333;
}

.nav-btn:before {
  content: none;
}

.nav-btn:after {
  content: none;
}

#nav-title-wrapper {
  padding-left: 10px;
  display: none;
  word-wrap: break-word;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: 0.6s;
  animation-name: fade-in;
  animation-duration: 0.6s;
}

#nav-title-wrapper.title-action {
  display: block;
}

#nav-title {
  display: block;
  line-height: 30px;
  font-size: 18px;
  font-weight: bold;
  word-wrap: break-word;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#nav-date {
  display: block;
  line-height: 20px;
  font-size: 14px;
}

/* 导航栏中最后的 TOC 要右对齐，因此将左边的元素包在一起 */
#nav-left-wrapper {
  display: flex;
  height: 100%;
}

#toc-wrapper {
  /* toc-wrapper 与其它的 button 有点特殊，不能限制高度 */
  display: flex;
  float: right;
  position: relative;
  right: 0;
  flex-direction: column;
  height: auto;
  max-height: 70vh;
  text-align: center;
  -webkit-box-shadow: 0 0 0em #b9b9b9;
  -moz-box-shadow: 0 0 0em #b9b9b9;
  z-index: 198;
}

#toc-wrapper:hover {
  -webkit-box-shadow: 0 0 0.3em #333;
  -moz-box-shadow: 0 0 0.3em #333;
}

#toc-wrapper:hover #table-of-contents {
  display: block;
}

.vertical-align {
  display: flex;
  align-items: center;
  height: 36px;
}

.archive-item {
  border-radius: 5px;
  display: flex;
  margin: 5px 0 5px 0;
  padding: 0px 5px 0 5px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-end;
}

.archive-title {
  display: block;
  font-size: 18px;
  font-weight: bold;
  /* white-space: nowrap; */
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
  flex-grow: 100;
}

.archive-title a {
  text-decoration: none;
}

.archive-title a:before, .archive-title a:after {
  content: none;
}

.archive-date {
  display: flex;
  align-items: center;
  width: auto;
}

.timestamp {
  color: #999;
  white-space: nowrap;
}

.taglist {
  flex-grow: 0;
}

.post-title {
  flex-grow: 1;
}
h1.title{
  display: block;
  border-bottom: solid 1.5px #acacac;
  padding: 10px;
  margin: 0 0 30px 0;
  text-align: center;
}
h2, h3, h4, .taglist {
  position: relative;
  margin: 30px 0px 10px 0px;
  font-weight: bold;
  line-height: 1.1;
  color: #111;
  text-rendering: optimizeLegibility;
}
h2:before, h3:before, h4:before {
  position: absolute;
  top: auto;
  color: #ccc;
  display: inline;
}
h2:before {
  content: "*";
  left: -1.25em;
}
h3:before {
  content: "**";
  left: -2em;
}
h4:before {
  content: "***";
  left: -2.5em;
}
i, em, b, strong {
  padding-left: .1em;
  padding-right: .1em;
}
b, strong {
  font-weight: bold;
  color: #333;
}
b:before, b:after, strong:before, strong:after {
  content: "*";
}
i:before, i:after, em:before, em:after {
  content: "/";
  color: #ccc;
}
hr {
  margin: 0;
  border: 0;
}
hr:after {
  display: block;
  margin: 20px 0;
  content: "----------------------------------------------------------------";
  color: #ccc;
}
ul, ol {
  padding: 0;
  margin: 0 0 20px;
}
code, pre {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-weight: normal;
}
code {
  color: #d14;
}
code:before, code:after {
  content: "=";
  color: #ccc;
}
pre {
  display: block;
  margin: 0 0 14px;
  padding: 10px 15px 10px 15px;
  border: 2px solid #b7c7ff;
  border-radius: 5px;
  line-height: 24px;
  background-color: #d7e7ff;
  /* Break lines rather than scrollbar */
  /* white-space: pre-wrap; */
  /* word-break: break-all; */
  /* word-wrap: break-word; */
  overflow: auto;
  position: relative;
}
pre:hover {
  overflow: auto;
}

.code-type-flag {
  display: block;
  color: #666;
  background: #b7c7ff;
  position: relative;
  top: 0;
  right: 0;
  text-align: center;
  margin: 0px 0px 5px 0px;
  padding: 0px 5px 0px 5px;
  border: 2px solid #b7c7ff;
  border-radius: 5px;
}

blockquote {
  padding: 10px 10px 10px 18px;
  margin: 0 0 20px 0;
  background: #e7d7ff;
  border: 2px solid #c7b7ff;
  color: #666;
  border-left: 8px solid #a797ff;
  border-radius: 5px;
}
blockquote p:first-child {
  margin: 0;
}

img {
  border: 2px solid #e5e5e5;
  /* Set image in a block and centering */
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  animation-name: fade-in;
  animation-duration: 1s;
  transition: 0.3s;
  cursor: pointer;
}

img:hover {
  -webkit-box-shadow: 0 0 0.3em #333;
  -moz-box-shadow: 0 0 0.3em #333;
}

/* caption of the figures */
figcaption {
  margin-top: 5px;
  text-align: center;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 200; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

/* Modal Content (Image) */
img.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  cursor: initial;
}
img.modal-content:hover {
  opacity: 1;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

/* The Close Button */
span.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

span.close:hover, span.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Style for links */
a {
  font-weight: inherit;
  line-height: inherit;
  color: #000;
  text-decoration: underline;
}
a:before {
  color: #ccc;
  content: "[";
}
a:after {
  color: #ccc;
  content: "]";
}
a:hover {
  text-decoration: underline;
  background-color: lightblue;
}

table {
  background: #e7ffd7;
  border-top: hidden;
  border-bottom: hidden;
  border-radius: 5px;
  border: 2px solid #c7ffb7;
  display: table;
  line-height: 2;
  font-size: 90%;
  /* Horizontal centering */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 15px;
  max-width: 100%;
  /* width: 100%; */
}
table td, table th {
  padding: 0 15px;
}
table th.left, table td.left {
  text-align: left;
}
table th.right, table td.right {
  text-align: right;
}
/******************************************************/
/* body */
.container {
  margin: 0 auto;
  max-width: 770px;
}
/* head */
.masthead {
  color: #888;
}
.masthead:after {
  display: block;
  content: '----------------------------------------------------------------';
  margin: 10px 0;
  color: #ccc;
}
.masthead a {
  color: #333;
}
.masthead ul {
  list-style: none;
}
.masthead li {
  display: inline-block;
}
.masthead li + li:before {
  display: inline-block;
  content: "\00B7 \00a0";
  color: #ccc;
}
/* searchform*/
#searchform {
  position: absolute;
  top: 54px;
  right: 30.4%;
}
#searchform #s {
  background: url("/media/img/search.png") no-repeat 5px 6px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  border-radius: 2px;
  -moz-border-radius: 2px;
  width: 90px;
  height: 30px;
  line-height: 12px;
  padding: 4px 10px 4px 28px;

  -webkit-transition-duration: 400ms;
  -webkit-transition-property: width, background;
  -webkit-transition-timing-function: ease;
  -moz-transition-duration: 400ms;
  -moz-transition-property: width, background;
  -moz-transition-timing-function: ease;
  -o-transition-duration: 400ms;
  -o-transition-property: width, background;
  -o-transition-timing-function: ease;
}
#searchform #s:focus {
  background-color: #f9f9f9;
  width: 160px;
}
.masthead img.avatar {
  position: relative;
  float: right;
  margin-top: -100px;
  margin-bottom: -100%;
  margin-right: 10%;
  width: 200px;
  background-color: #fff;
}
/* post */
.post {
  position: relative;
}
.post:after {
  display: block;
  content: "----------------------------------------------------------------";
  color: #ccc;
}
.post img {
  max-width: 100%;
}
.post li {
  list-style: none outside none;
}
.post ul > li:before {
  content: "- ";
  margin-left: -1.25em;
  color: #ccc;
}
.post ol {
  counter-reset: o-list;
}
.post ol > li:before {
  content: counter(o-list) ") ";
  counter-increment: o-list;
  margin-left: -1.85em;
  color: #ccc;
}

/* special for li in pre */
.post pre li {
  list-style-type: decimal;
}

.post pre li:before {
  display: none;
}

/* meta info */
.post-info {
  display: inline-block;
  margin: -10px 0 -10px;
  color: #999;
}
.post-info + .post-info:before {
  content: "\2223 \00a0";
}
.post-meta:after {
  content: "----------------------------------------------------------------";
  display: block;
  margin-top: -1px;
  color: #ccc;
}

/* table of content */
#table-of-contents {
  display: none;
  text-align: right;
  /* ensure doesn't flow off the screen when expanded */
  max-height: 50%;
  overflow: auto;
  z-index: 199;
  animation-name: fade-in;
  animation-duration: 0.6s;
}

#table-of-contents h2 {
  display: none;
  max-width: 20em;
  font-size: 14px;
  font-weight: normal;
  margin: 1em;
}

#table-of-contents h2:before {
  content: none;
}

#go-top {
  font-weight: bold;
  display: none;
  text-align: center;
}

#toc-wrapper:hover #go-top {
  display: block;
}

#toc-symbol {
  display: none;
}

#table-of-contents ul {
  margin: 0em 1em 1em 1em;
}

#table-of-contents li {
  padding: 0;
  margin: 1px;
  font-size: 18px;
  list-style: none;
}

#table-of-contents ul>:first-child {
  color: blue;
}

#table-of-contents #text-table-of-contents {
  text-align: left;
}

#postamble {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

/* Author information in postamble */
#author-info {
  margin: 0 40px 0 40px;
  padding: 5px 15px 5px 15px;
  border-radius: 5px;
  border: 2px solid #ffc7b7;
  background-color: #ffe7d7;
  font-size: 16px;
  line-height: 2;
}

/* copyright */
#copyright {
  border-top: 1.5px solid #acacac;
  margin: 30px 40px 20px 40px;
  padding-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

/* Set the style for cc icon in copyright */
#copyright img:first-child {
  border: none;
  margin-left: 0px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
}

/* Animations */
@keyframes fade-in {
  0% {opacity:0;}
  100% {opacity:1;}
}

@keyframes fade-out {
  0% {opacity:1;}
  100% {opacity:0;}
}

@keyframes zoom {
  from {transform:scale(0.5)}
  to {transform:scale(1)}
}

/* Responsive
   -------------------------------------------------- */

@media (min-width: 768px) {
  /* Increase body padding and font-sizes */
  #content {
    font-size: 16px;
    line-height: 1.75;
  }
  h1:before, h2:before, h3:before {
    display: inline;
  }
  .modal-content {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  #content {
    font-size: 18px;
  }
  #preabme.sticky + #content {
    padding-top: 70px;
  }
  #top-container  {
    flex-direction: row;
  }
  #site-name {
    text-align: left;
  }
  #banner {
    text-align: right;
  }
  #photo-entry.title-action {
    display: flex;
  }

  #about-entry.title-action {
    display: flex;
  }
  .modal-content {
    width: 100%;
  }
  img {
    max-width: 90%;
  }
  .archive-date {
    display: flex;
  }
}


/* Define org todo faces */
.PROJECT {
  color: red;
}

.TODO {
  color: red;
}

.NEXT {
  color: blue;
}

.STARTED {
  color: blue;
}

.WAITING {
  color: orange;
}

.DELEGATED {
  color: orange;
}

.DONE {
  color: green;
}

.CANCELLED {
  color: green;
}

.REF {
  color: blue;
}

.SOMEDAY {
  color: blue;
}


/* indent items*/
.org-ul {
  margin-right: 10px;
}


/* Pretty printing styles. Used with prettify.js.
 *
 * This version is slight modified based on the original version.
 *
 * Name:    Stanley Ng
 * Email:   stanleyhlng@googlegroups.com
 *
 * Reference:
 * http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.css
 */
.pln {
  color: #bd3613; }

.str {
  color: #269186; }

.kwd {
  color: #859900; }

.com {
  color: #586175;
  font-style: italic; }

.typ {
  color: #b58900; }

.lit {
  color: #2aa198; }

.pun {
  color: #839496; }

.opn {
  color: #839496; }

.clo {
  color: #839496; }

.tag {
  color: #268bd2; }

.atn {
  color: #586175; }

.atv {
  color: #2aa198; }

.dec {
  color: #268bd2; }

.var {
  color: #268bd2; }

.fun {
  color: #FF0000; }

/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
  background-color: #042029;
  padding: 10px;
  border: 1px solid #E1E1E8; }

/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
  color: #4c666c;
  margin: 0 0 0 40px; }

ol.linenums li {
  line-height: 18px;
  padding-left: 12px; }
