/*
  Author : XU Yizhou
  Copyright 2018-2019, XU Yizhou, All rights reserved.
*/

/* font */
@import url('https://fonts.googleapis.com/css?family=Ultra');
@import url('https://fonts.googleapis.com/css?family=Pacifico');
@import url('https://fonts.googleapis.com/css?family=Righteous');

/* palette */
:root {
  --main-color-a: #d81818;
  --main-color-b: #121212;
  --main-color-c: #f9f9f9;
  --main-bg-color: #f9f9f9;
}

/* general configuration */
html, body {
  font-size: 16px;
  font-style: normal;
  line-height: 1;
  height: 100%;
  font-weight: 500;
  padding: 0;
  margin: 0;
}

body {
  background-color: var(--main-bg-color);
}

a {
  color: #ba1515;
  text-decoration: none;
}
a:hover,
a:focus {
  color: #750d0d;
}

.container {
  padding: 0;
  margin: 0;
}

.flex {
  display: -webkit-flex;
  display: flex;
}

.column {
  -webkit-flex-direction: column;
  flex-direction: column;
}

.layout2 {
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  -webkit-align-items: center;
  align-items: center;
}

.layout5 {
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
}

.bg-skulls {
  background-image: url("../img/bg/skulls.png");
  background-repeat: repeat;
}

.bg-food {
  background-image: url("../img/bg/food.png");
}

.bg-brick-wall {
  background-image: url("../img/bg/brick-wall.png");
}

.bg-black {
  background-color: black;
}

.bg-lightgray {
  background-color: lightgray;
}

.button {
  display: block;
  margin: 0.5rem auto;
  padding: 1rem;
  min-width: 16rem;
  text-decoration: none;
  color: var(--main-color-c);
  background-color: var(--main-color-a);
  text-align: center;
  border-radius: 1.5rem;
  transition: all 0.6s ease;
}

.button:hover {
  background-color: var(--main-color-b);
}

a.button:hover, a.button:focus {
  color: var(--main-color-c);
}

.bt-small {
  padding: 0.5rem;
  border-radius: 1rem;
  min-width: 12rem;
}

.bt-large {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: 1.1rem;
  min-width: 18rem;
}

.bt-download {
  cursor: s-resize;
}

.em-color {
  color: var(--main-color-a);
}

.em-color2{
  color: purple;
}

footer {
  margin-top: 0;
  padding-bottom: 1rem;
  text-align: center;
}

.icon404 {
  display: inline-block;
  border-radius: 50%;
  border: 0.9rem solid #ffffff;
  box-shadow: 0 0 0 1.1rem var(--main-color-b),
  0 0 0 1.2rem var(--main-bg-color),
  0 0 0 1.4rem var(--main-color-b);
}

.titleh1 {
  margin-bottom: 2rem;
  font-family: 'Ultra', serif;
  font-weight: 500;
  font-size: 3.6rem;
  text-shadow: -1px -1px 0 var(--main-bg-color), -2px -2px 0 #666;
}
/* side-nav-bar */


/*loading page*/
.loading {
  position:fixed;
  width:100%;
  height:100%;
  background: var(--main-bg-color);
  z-index: 1;
}

.loading ul {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 0.5rem;
  transform: rotate(45deg) translate(-50%, -50%);
}

.loading li {
  list-style-type: none;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 1.5em;
  height: 1.5em;
  background: var(--main-color-b);
  border-radius: 50%;
}

#a {
  animation: a 1s ease-in-out infinite;
  top: -3em;
  left: -3em;
}

#b {
  animation: b 1s ease-in-out infinite;
  top: -3em;
  left: 0px;
}

#c {
  animation: c 1s ease-in-out infinite;
  top: -3em;
  left: 3em;
}

#d {
  animation: d 1s ease-in-out infinite;
  top: 0px;
  left: -3em;
}

#e {
  animation: 0 1s ease-in-out infinite;
  top: 0px;
  left: 0px;
  background-color: var(--main-color-a);
}

#f {
  animation: f 1s ease-in-out infinite;
  top: 0px;
  left: 3em;
}

#g {
  animation: g 1s ease-in-out infinite;
  top: 3em;
  left: -3em;
}

#h {
  animation: h 1s ease-in-out infinite;
  top: 3em;
  left: 0px;
}

#i {
  animation: i 1s ease-in-out infinite;
  top: 3em;
  left: 3em;
}

@keyframes a {
  50% {
    top: 0px;
    left: -3em;
  }
  100% {
    top: 0px;
    left: -3em;
  }
}

@keyframes b {
  50% {
    top: -3em;
    left: -3em;
  }
  100% {
    top: -3em;
    left: -3em;
  }
}

@keyframes c {
  50% {
    top: -3em;
    left: 0px;
  }
  100% {
    top: -3em;
    left: 0px;
  }
}

@keyframes d {
  50% {
    top: 3em;
    left: -3em;
  }
  100% {
    top: 3em;
    left: -3em;
  }
}

@keyframes f {
  50% {
    top: -3em;
    left: 3em;
  }
  100% {
    top: -3em;
    left: 3em;
  }
}

@keyframes g {
  50% {
    top: 3em;
    left: 0px;
  }
  100% {
    top: 3em;
    left: 0px;
  }
}

@keyframes h {
  50% {
    top: 3em;
    left: 3em;
  }
  100% {
    top: 3em;
    left: 3em;
  }
}

@keyframes i {
  50% {
    top: 0px;
    left: 3em;
  }
  100% {
    top: 0px;
    left: 3em;
  }
}


/* homepage style*/
.homepage {
  height: 100%;
}

.homepage h1 {
  margin-top: -2rem;
  margin-bottom: 0;
  font-family: 'Ultra', serif;
  font-size: 6.6rem;
  font-weight: 500;
  color: #000000;
}

.point{
  display: inline-block;
  font-size: 6.6rem;
  line-height: 6.6rem;
  vertical-align: bottom;
  color: #000000;
  position: relative;
  overflow: hidden;
  white-space: pre;
  transition: all 0.6s ease;
}

.point::before{
  position: absolute;
  left: 0;
  top: 0;
  color: var(--main-color-a);
  display: block;
  height: 32%;
  content: attr(data-content);
  overflow: hidden;
  transition: all 0.6s ease;
}

.homepage h1:hover .point{
  transform:rotate(20deg);
}

.homepage h1:hover .point::before{
  text-shadow: 0 0 0.2rem var(--main-color-a);
}

#desc {
  margin-top: 0;
  margin-left: 23rem;
  min-width: 19rem;
  font-size: 1.2rem;
  font-family: 'Pacifico', sans-serif;
  color: #636363;
}

.homepage ul {
  display: flex;
  justify-content: space-around;
  list-style-type: none;
  margin: .2rem 0 0 0;
  padding: 0;
  font-family: 'Righteous', cursive;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.homepage ul li {
  margin: 0 1rem 0 1rem;
  padding: .5rem 1rem .5rem 1rem;
  min-width: 22%;
  color: var(--main-color-c);
  background-color: var(--main-color-a);
  border-radius: 1rem;
  text-align: center;
  transition: all 0.6s ease;
}

.homepage ul li:hover {
  background-color: var(--main-color-b);
}

.homepage ul a {
  text-decoration: none;
  color: var(--main-color-c);
}

/* about */
.cv-container {
  margin-top: 3.6rem;
  margin-bottom: 3rem;
  padding: 3.6rem 2.6rem;
  background-color: var(--main-bg-color);
  width: 60rem;
}

.cv-border {
  border: 0.3rem dotted var(--main-color-a);
  box-shadow: 0 0 0 0.3rem var(--main-bg-color),
              0 0 0 0.6rem var(--main-color-a);
}

#cv-header {
  display: -webkit-flex;
  display: flex;
  justify-content: space-around;
  margin-bottom: 3.6rem;
}

#cv-header h1 {
  margin-bottom: 0.5rem;
  font-family: 'Ultra', serif;
  font-weight: 500;
  font-size: 3.6rem;
  text-shadow: -1px -1px 0 var(--main-bg-color), -2px -2px 0 #666;
}

.avatar {
  border-radius: 50%;
  border: 0.9rem solid #ffffff;
  box-shadow: 0 0 0 1.1rem var(--main-color-b),
              0 0 0 1.2rem var(--main-bg-color),
              0 0 0 1.4rem var(--main-color-b);
}

.avatar-left {
  border-radius: 10% 50%;
}

.avatar-right {
  border-radius: 50% 10%;
}

.cv-content {
  margin: 3rem auto;
  padding: 0;
  display: block;
}
.cv-content h2 {
  color: var(--main-color-b);
  font-size: 1.2rem;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  width: 5rem;
  border-bottom: 0.3rem solid var(--main-color-a);
}

/* timeline style */
#timeline .timeline-item:after, #timeline .timeline-item:before {
  content: '';
  display: block;
  width: 100%;
  clear: both;
}

#timeline *, *:before, *:after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

#timeline {
  width: 100%;
  margin: 3rem auto;
  position: relative;
  padding: 0 0.5rem;
  font-size: 1rem;
  font-family: arial, sans-serif;
  -webkit-transition: all 0.4s ease;
  -moz-transition: all 0.4s ease;
  -ms-transition: all 0.4s ease;
  transition: all 0.4s ease;
}

#timeline:before {
  content: "";
  width: 0.3rem;
  height: 100%;
  background: var(--main-color-a);
  left: 50%;
  top: 0;
  position: absolute;
}

#timeline:after {
  content: "";
  clear: both;
  display: table;
  width: 100%;
}

#timeline .timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

#timeline .timeline-item .timeline-icon {
  background: var(--main-bg-color);
  width: 2rem;
  height: 2rem;
  position: absolute;
  top: 0;
  left: 50%;
  overflow: hidden;
  margin-left: -0.9rem;
  border: 0.3rem double var(--main-color-a);
  -webkit-border-radius: 1rem;
  -moz-border-radius: 1rem;
  -ms-border-radius: 1rem;
  border-radius: 1rem;
}

#timeline .timeline-item .timeline-content {
  width: 45%;
  background: #fff;
  padding: 0.05rem 1rem;
  -webkit-box-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.1);
  -ms-box-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.1);
  -webkit-border-radius: 0.2rem;
  -moz-border-radius: 0.2rem;
  -ms-border-radius: 0.2rem;
  border-radius: 0.2rem;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

#timeline .timeline-item .timeline-content h3 {
  padding: 0.5rem 1rem;
  margin: -0.2rem -1rem 0 -1rem;
  background: var(--main-color-a);
  color: var(--main-color-c);
  font-size: 1rem;
  font-weight: 300;
  -webkit-border-radius: 0.2rem 0.2rem 0 0;
  -moz-border-radius: 0.2rem 0.2rem 0 0;
  -ms-border-radius: 0.2rem 0.2rem 0 0;
  border-radius: 0.2rem 0.2rem 0 0;
  text-align: right;
  text-transform: uppercase;
}

#timeline .timeline-item .timeline-content:before {
  content: '';
  position: absolute;
  left: 45%;
  top: 0.5rem;
  width: 0;
  height: 0;
  border-top: 0.6rem solid transparent;
  border-bottom: 0.6rem solid transparent;
  border-left: 0.6rem solid var(--main-color-a);
}

#timeline .timeline-item .timeline-content.right {
  float: right;
}

#timeline .timeline-item .timeline-content.right h3 {
  text-align: left;
}
#timeline .timeline-item .timeline-content.right:before {
  content: '';
  right: 45%;
  left: inherit;
  border-left: 0;
  border-right: 0.6rem solid var(--main-color-a);
}

#timeline .timeline-item .timeline-content p {
  padding: 0;
  margin: 0.3rem;
  line-height: 1rem;
}

#timeline .timeline-item .timeline-content p:first-of-type {
  margin-top: 1rem;
}

#timeline .timeline-item .timeline-content p:last-of-type {
  margin-bottom: 1rem;
}

#timeline .timeline-item .timeline-content .button {
  padding: 0.3rem;
  font-size: 0.8rem;
  min-width: 0;
  width: 6rem;
  text-transform: uppercase;
  cursor: nesw-resize;
}

#timeline p.degree {
  font-weight: bold;
}

#timeline p.dept {
  font-style: italic;
  color: #666;
}

/* Skills*/
/* radar chart */
.chartContainer {
  padding: auto;
  height: 30rem;
}
/* List */
#skillsList {
  margin-top: 2rem;
}
#skillsList .tab-pane {
  min-height: 30rem;
}
#skillsList .tab-pane h3 {
  text-align: center;
}

#skillsList li ul li {
  line-height: 1.5;
}


/* projects */
.ch-grid {
  margin: 5rem 0 0 0;
  padding: 0;
  list-style: none;
  display: block;
  text-align: center;
  width: 100%;
}

.ch-grid:after,
.ch-item:before {
  content: '';
  display: table;
}

.ch-grid:after {
  clear: both;
}

.ch-grid li {
  width: 16rem;
  height: 16rem;
  display: inline-block;
  margin: 3rem 3rem;
}


/* padding control*/
.pd2 {
  padding: 0 1rem;
}


/* width control */
.w10 {
  width: 10rem;
}

.w15 {
  width: 15rem;
}

.w20 {
  width: 20rem;
}

.w30 {
  width: 30rem;
}

.w40 {
  width: 40rem;
}

.w60 {
  width: 60rem;
}

.f70 {
  max-width: 70rem;
  margin: auto;
  justify-content: center;
  flex-wrap: wrap;
}

/*responsive*/
@media screen and (max-width: 1024px) {
  .cv-container{
    width: 86%;
  }
}

@media screen and (max-width: 900px) {
  html, body {
    font-size: 12px;
  }

  #timeline {
    font-size: 1rem;
    margin: 2rem;
    padding: 0;
    width: 90%;
  }

  #timeline .timeline-item .timeline-icon {
    left: 0;
  }

  #timeline:before {
    left: 0;
  }

  #timeline .timeline-item .timeline-content {
    width: 95%;
    float: right;
  }

  #timeline .timeline-item .timeline-content:before, #timeline .timeline-item .timeline-content.right:before {
    left: 5%;
    margin-left: -0.5rem;
    border-left: 0;
    border-right: 0.5rem solid var(--main-color-a);
  }

  #timeline .timeline-item .timeline-content h3 {
    text-align: left;
  }

}

@media screen and (max-width: 600px) {
  html, body {
    font-size: 8px;
  }
  #cv-header {
    flex-direction: column-reverse;
    -webkit-flex-direction: column-reverse;
  }
  .chartContainer {
    height: 40rem;
    width: 100%;
  }
}

@media screen and (max-width: 450px) {
  html, body {
    font-size: 6px;
  }
  .homepage ul {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 2rem;
    margin-top: 2rem;
    width: 40%;
  }
  .homepage ul li {
    margin-top: 1rem;
    border-radius: 2rem;
  }
}

@media screen and (max-width: 300px) {
  html, body {
    font-size: 4px;
  }
}