/* http://www.google.com/fonts#ReviewPlace:refine/Collection:Rambla|Dosis|Signika */

html {
  height: 100%;
}

body {
  margin: 0px;
  background-image: url(images/chinacat.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left top;
  background-attachment: fixed;
}

@media (max-width: 1000px) {
  body {
    background-image: url(images/chinacat_mid.jpg);
  }
}

@media (max-width: 420px) and (max-height: 750px) {
  body {
    background-image: url(images/chinacat_small.jpg);
  }
}

#topcontainer {
  font-family: 'Dosis', sans-serif;
  position: relative;
}

#topcontainer.firstvisit {
  animation-name: slidedown;
  animation-delay: 0.5s;
  animation-duration: 0.5s;
  animation-fill-mode: both;
}

.overlay {
  background: rgba(255,255,255,0.85);
}

#pagetitle {
  font-weight: 800;
  font-size: 46px;
  cursor: default;
}

#linkbar {
  font-weight: 400;
  font-size: 20px;
  padding: 3px 20px 3px 20px;
}

@media (max-width: 619px) {
  @keyframes slidedown {
    0% { top: -105px; }
    100% { top: 0px; }
  }

  #topcontainer {
    width: 320px;
    margin: auto;
  }

  #pagetitle {
    padding: 5px 20px 8px 20px;
    text-align: center;
  }

  #linkbar {
    border-radius: 0px 0px 5px 5px;
    vertical-align: top;
    height: 50%;
    text-align: center;
    font-size: 18px;
  }
}

@media (min-width: 620px) {
  @keyframes slidedown {
    0% { top: -72px; }
    100% { top: 0px; }
  }

  #pagetitle {
    float: left;
    padding: 5px 20px 8px 20px;
    border-radius: 0px 0px 5px 0px;
  }

  #linkbar {
    float: right;
    border-radius: 0px 0px 0px 5px;
    vertical-align: top;
    height: 50%;
    text-align: right;
  }
}

#topcontainer a {
  outline: 0;
  color: black;
  text-decoration: none;
}

#linkbar a {
  padding-left: 20px;
}

#linkbar a:first-child {
  padding-left: 0px;
}

#linkbar a:hover {
  color: rgb(96,184,255);
}

#linkbar .fa {
  color: rgb(90,90,90);
}

#linkbar .fa:hover {
  color: rgb(96,184,255);
}

#fixedcontent {
  position: absolute;
  width: 100%;
  top: 150px; /* Fallback if CSS animations aren't supported. */
  height: 1px; /* see http://bit.ly/1SsT7j7 */
  min-height: calc(100% - 150px);
}

#fixedcontent.firstvisit {
  animation-name: slideup;
  animation-delay: 0s;
  animation-duration: 1s;
  animation-fill-mode: both;
}

#topcontainer.firstvisit ~ #fixedcontent.firstvisit {
  animation-delay: 1s;
}

@keyframes slideup {
  0% { top: 100%; }
  100% { top: 150px; }
}

#contentpane {
  font-family: 'Alegreya', serif;
  font-size: 14pt;
  background: rgba(240,240,240, 0.95); /* Mimic the effective color of the translucent bar at the top */
  position: relative; /* Use an explicit non-static position so that the absolutely-positioned div inside
                         will be positioned relative to us. */
  border-radius: 5px 5px 0px 0px;
  margin-left: auto;
  margin-right: auto;
  min-width: 320px;
  width: 70%;
  min-height: 100%;
}

@media (max-width: 1000px) { #contentpane { width: 90%; } }

#contentpane-body {
  padding: 20px 20px 20px 20px;
}

/* Deal with the effects of implicit <p> margins. */
#contentpane-body p:first-child {
  margin-top: 0px;
}
#contentpane-body p:last-child {
  margin-bottom: 0px;
}

/* Center images in posts. */
#contentpane-body p img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Prevent overflow of images in the content. */
#contentpane-body img {
  max-width: 100%;
}

/*
 * contentpane-header is an optional mix-in that sits above contentpane-body.
 */

#contentpane-header {
  height: 60px;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

#contentpane-header-left {
  margin-top: 15px;
  min-width: 0;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

#contentpane-header-left h1 {
  font-size: 24px;
  padding-left: 20px;
  margin-top: 0px;
  margin-bottom: 0px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: default;
}

@media (max-width: 600px) { #contentpane-header-left h1 { font-size: 14pt; font-weight: normal; line-height: 26px; } }

.posttitle a {
  font-size: 30px;
  vertical-align: 10%;
  visibility: hidden;
  opacity: 0;
  text-decoration: none;
  outline: 0;
  color: black;
  margin-left: 14px;
  -webkit-transition: visibility 0.5s, opacity 0.5s;
  transition: visibility 0.5s, opacity 0.5s;
}

@media (min-width: 601px) {
  .posttitle:hover a {
    opacity: 1;
    visibility: visible;
  }
}

#contentpane-header-right {
  margin-top: 15px;
}

#contentpane-header-right > * {
  padding-right: 20px;
}

#contentpane-header-right .fa {
  /* Make the arrows line up with text. */
  padding-top: 4px;
}

#contentpane-header-right a {
  text-decoration: none;
  outline: 0;
  color: black;
}

#contentpane-header-right a:hover {
  color: rgb(96,184,255);
}

/*
 * AdblockPlus blocks social media icons. :-(
 */
.fa-linkedinnoadblock:before {
  content:"\f08c";
}

.fa-twitternoadblock:before {
  content:"\f099";
}

.fa-youtubenoadblock:before {
  content:"\f16a";
}
