@import url("pygment-monokai.css");

/*override bootstrap style*/

h1,h2,h3,h4,h5,h6 {
    font-family: 微软雅黑, 'PingFang SC';
    font-weight: bold;
}

h4 {
    font-size: 20px;
}

h5 {
    font-size: 18px;
}

h6 {
    font-size: 16px;
}

td, th {
    padding-right: 5px;
}

div {
    text-align: justify;
    word-wrap: break-word;
}

.label, .btn {
    border-radius: 0;
    margin: 1px;
    white-space: normal;
}

.badge {
    color: black;
    background-color: white;
    border-radius: 50%;
}
a {
    /*solve the problem of long url not wrapping*/
    /*word-break: break-all*/
}

code {
    /*code.less uses white-space: pre-wrap;*/ 
    white-space: pre !important;

    /*the same as above*/
    /*word-break: break-all*/
}

a:focus,a:link {
    text-decoration: none;
}

pre {
    color: inherit;
    background-color: transparent;

    /*on safari, pre code blocks don't support horizontal scrollable
    http://stackoverflow.com/questions/10374171/how-to-make-twitter-bootstraps-pre-blocks-scroll-horizontally*/
    word-wrap: normal;
}

img {
    max-width: 100%;
}

article {
    font-size: 16px;
    font-family: Helvetica, arial, sans-serif;
    line-height: 1.8;
}
/*
article .entry-content img {
    display: block;
}
*/

/*toc*/
.toc {
    background-color: #eee;
    overflow-x: scroll;
    white-space: nowrap;
}

.toctitle {
    font-size: 30px;
    font-weight: bold;
}


/*scroll-up-button*/
.scrollToTop{
    width:50px;
    height:50px;
    text-decoration: none;
    position:fixed;
    bottom:30px;
    right:20px;
    display:none;
    background: url('../images/icons/scroll-up.png') no-repeat 0px 0px;
}
.scrollToTop:hover{
    text-decoration:none;
}


/*back icon*/
.icon-back
{
    width: 50px ; 
    height: 50px;
    background-size: 50px 50px;
    background-image: url("../images/icons/back.svg");
    display:inline-block;
    text-decoration:none;
}

.publish-tag {
    font-variant: small-caps;
    color: #aaa;
    padding-bottom: 10px;
}

.image-center {
    margin: 0 auto;
}


/*tile*/
.tile {
	width: 100%;
    height: 160px;
	display: inline-block;
	box-sizing: border-box;
    border: 1px solid #fff;
	padding: 20px;
	margin-bottom: 30px;
}

.mtile {
    width: 100%;
    height: 75px;
    display: inline-block;
    box-sizing: border-box;
    border: 1px solid #fff;
}

.tile .title {
    margin-top: 0;
    /**/
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile a {
    color: white;
}

/*navigation bar*/
@media (min-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding-right: 0;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content.*/ 
  }
}

.left-nav {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    margin-left: -30px;
}

.left-nav-item {
    font-size: 18px;
    text-indent: 85px;
    line-height: 50px;
}

.left-nav-item a{
    display: block;
    text-decoration: none;
    color:#fff;
}


/*search style*/
@font-face 
{
  font-family: 'iconFont';
  src: url('../fonts/fontawesome-webfont.woff') format('woff');
}

.search-box
{
    position: relative;
    margin-left: -15px;
}

.navbar-collapse>.search-box
{
    margin:0 -15px;
}

.search-input
{
    border: none;
    border-bottom: 1px #bababa solid;
    width:100%;
    padding: 6px 32px 6px 6px;
    outline: 0px;
    line-height: 20px;
    box-sizing: border-box;
    color: black;
}
.search-input:focus
{
    border-color: #000;
}

.search-btn
{
    background: #fff; 
    top: 1px;
    width: 30px !important; 
    height: 30px !important;
    cursor: pointer;
    color: #000;
    position: absolute;
    right: 2px;
    border: 1px #fff solid;
    padding: 0;
    outline: 0px;
}
.search-btn:before 
{
  font-family: iconFont;
  font-size: 20px;
  content: "\f002";
}
.search-btn:hover
{
  background: #d9d9d9;
}
.search-btn:active
{
  background-color: #000;
}
.search-btn:active:before
{
  color: #fff;
}


/*mathjax equations*/
.MJXc-display {
  /*text-align: left !important; not working for some equations; better to use MathJax's displayAlign config*/
  overflow-x: scroll;
  overflow-y: hidden;
}


figure {
    text-align: center;
}
/* if I apply margin-bottom for all figures, the margin of the last figure
   does not collapse with the parent's margin for inline-block elements*/
p figure:not(:last-child) {
    margin-bottom: 10px;
}


/*table*/
table.pretty-table {
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    max-width: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.pretty-table th, .pretty-table td {
    padding: 12px 15px;
}

.pretty-table thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;
}

.pretty-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.pretty-table tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

.pretty-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.pretty-table tbody tr:hover {
    color: #009879;
}


/*color theme*/
.purple, .blue, .red, .orange, .green, .black, .fb-theme, .blueDark {
    color: #fff;
}

.purple {
    background: #5133AB;
}

.red {
    background: #AC193D;
}

.green {
    background: #00A600;
}

.blue {
    background: #007fff;
}

.orange {
    background: #DC572E;
}

.black
{
    background: #252525;
}

.blueDark
{
    background: #1f0068;
}

.fb-theme
{
    background: #315795;
}

.purple .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #4D2488;
}
.red .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #8B162B;
}
.green .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #007700;
}
.blue .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #0062C4;
}
.orange .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #C53E10;
}

.blueDark .left-nav-item a:hover{
    text-decoration: none;
    color: #fff;
    background: #1B0D3D;
}

.purple .left-nav-selected {
  background: #4D2488;
}

.red .left-nav-selected {
  background: #8B162B;
}

.green .left-nav-selected {
    background: #007700;
}
.blue .left-nav-selected {
    background: #0062C4;
}
.orange .left-nav-selected {
    background: #C53E10;
}

.blueDark .left-nav-selected {
    background: #1B0D3D;
}

.alink {
    font-size: 18px;
}

li.purple > a,
li.purple > a:hover,
li.purple > a:focus {
    color: #fff;
    background: #5133AB;
    text-decoration: none;
}

li.blue > a,
li.blue > a:hover,
li.blue > a:focus {
    color: #fff;
    background: #007fff;
    text-decoration: none;
}

li.red > a,
li.red > a:hover,
li.red > a:focus {
    color: #fff;
    background: #AC193D;
    text-decoration: none;
}

li.orange > a,
li.orange > a:hover,
li.orange > a:focus {
    color: #fff;
    background: #DC572E;
    text-decoration: none;
}

li.green > a,
li.green > a:hover,
li.green > a:focus {
    color: #fff;
    background: #00A600;
    text-decoration: none;
}

li.blueDark > a,
li.blueDark > a:hover,
li.blueDark > a:focus {
    color: #fff;
    background: #1f0068;
    text-decoration: none;
}

a.purple-link,
a.purple-link:hover,
a.purple-link:focus{
    color: #5133AB;
}

a.red-link,
a.red-link:hover,
a.red-link:focus {
    color: #AC193D;
}

a.green-link,
a.green-link:hover,
a.green-link:focus {
    color: #00A600;
}

a.blue-link,
a.blue-link:hover,
a.blue-link:focus {
    color: #007fff;
}

a.orange-link,
a.orange-link:hover,
a.orange-link:focus {
    color: #DC572E;
}

a.blueDark-link,
a.blueDark-link:hover,
a.blueDark-link:focus {
    color: #1f0068;
}


/*timeline for archives*/
.timeline {
    position: relative;
    padding: 20px 0;
    max-width: 800px;
}

/* continuous vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 105px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-year {
    display: flex;
    align-items: center;
    margin: 30px 0 15px 0;
    position: relative;
    background: linear-gradient(to right, #00A600, transparent);
}

.timeline-year:first-child {
    margin-top: 0;
}

.timeline-year-left {
    width: 100px;
    text-align: right;
    padding-right: 15px;
    flex-shrink: 0;
}

.year-marker {
    display: inline-block;
    color: #fff;
    padding: 6px 14px;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

.timeline-item-left {
    width: 100px;
    text-align: right;
    padding-right: 15px;
    flex-shrink: 0;
}

.timeline-date {
    color: #888;
    font-size: 14px;
    font-family: monospace;
}

.timeline-node {
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #00A600;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-node {
    background: #00A600;
    transform: scale(1.3);
}

.timeline-item-right {
    flex: 1;
    padding-left: 20px;
}

.timeline-item-right a {
    font-size: 16px;
    line-height: 1.5;
}

.timeline-item-right a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .timeline::before {
        left: 75px;
    }

    .timeline-item-left,
    .timeline-year-left {
        width: 70px;
        padding-right: 12px;
    }

    .year-marker {
        font-size: 16px;
        padding: 5px 10px;
    }

    .timeline-item-right {
        padding-left: 15px;
    }

    .timeline-node {
        width: 10px;
        height: 10px;
    }
}
