/* ==========
z-index, from high to low
borders > * >intro
=============*/

/* ==========
deep blue: #003049
red:       #D62828
orange:    #F77F00
yellow:    #FCBF49
lemon:     #EAE2B7
=============*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

html {
  scroll-behavior: smooth;
}

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

h3 {
  font-size: 18pt;
  text-transform: capitalize;
  margin-bottom: 0.8rem;
}

p {
  font-size: 13pt;
  font-weight: 600;
  color: #222222;
  font-family: "Raleway", sans-serif;
}

header {
  height: 100vh;
  position: absolute;
}

.page-container {
  width: 100%;
}

.text-wraper {
  padding-bottom: 80px;
}

.padding {
  padding: 20vh 20vw 8vh 20vw;
}

/* page borders */
.borders > * {
  position: fixed;
  width: 50px;
  height: 50px;
  z-index: 100;
}

.border-top {
  background-color: rgb(255, 255, 255);
  width: 100%;
  top: 0;
  left: 0;
}
.border-bottom {
  background-color: rgb(255, 255, 255);
  width: 100%;
  bottom: 0;
  left: 0;
}
.border-left {
  background-color: rgb(255, 255, 255);
  height: 100%;
  top: 0;
  left: 0;
}
.border-right {
  background-color: rgb(255, 255, 255);
  height: 100%;
  top: 0;
  right: 0;
}

/* corner decos */
.corners > div > * {
  /* width: calc(100% - 80px);
  height: calc(100% - 80px); */
  width: 70px;
  height: 70px;
  position: fixed;
  z-index: 100;
  border: solid 2px white;
}
/* top left corner */
.corners .tl > * {
  top: 0px;
  left: 0px;
}

.corners .tl .r2 {
  transform: translate(10px, -10px);
}

.corners .tl .r3 {
  transform: translate(-10px, 10px);
}

/* bottom left corner */
.corners .bl > * {
  bottom: 0px;
  left: 0px;
}

.corners .bl .r2 {
  transform: translate(10px, 10px);
}

.corners .bl .r3 {
  transform: translate(-10px, -10px);
}
/* top right corner */
.corners .tr > * {
  top: 0px;
  right: 0px;
}

.corners .tr .r2 {
  transform: translate(10px, 10px);
}

.corners .tr .r3 {
  transform: translate(-10px, -10px);
}
/* bottom right corner */
.corners .br > * {
  bottom: 0px;
  right: 0px;
}

.corners .br .r2 {
  transform: translate(10px, -10px);
}

.corners .br .r3 {
  transform: translate(-10px, 10px);
}

/* all sections */
.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.full-moon {
  position: absolute;
  top: 200px;
  left: 20vw;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  z-index: -1;
  transform: translate(-50%, -50%);
}

/* ============
  intro section
===============*/

#intro {
  width: 100vw;
  height: 100vh;
  background-color: #fcbf49;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
}

#intro .padding {
  position: relative;
}

#intro .name {
  position: absolute;
  top: 40vh;
  left: 35vw;
  z-index: 200;
}

#intro .name h1 {
  font-size: 70px;
  font-family: "Karla", sans-serif;
}

#intro .name h3 {
  font-size: 40px;
  font-family: "Satisfy", cursive;
}

#intro .word {
  opacity: 0;
  position: fixed;
  z-index: 100;
  left: 12%;
  bottom: 16%;
}

.word p {
  color: black;
  font-size: 1.2rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.word > div {
  margin-top: 0.5rem;
}

.word > div > p {
  color: white;
  font-size: 1.1rem;
}

#intro .moon-container {
  position: absolute;
  z-index: 1;
  top: 40vh;
  left: 35vw;
}

#intro .moon {
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: #ffd684;
}

.name-text {
  height: 120px;
  width: 320px;
  transform: translate(0, -15px);
}

.name-text > text {
  font-size: 70px;
  font-family: "Karla", sans-serif;
}

.red-dot {
  fill: #f77f00;
}

/* ============
  shadow section
===============*/

section.shadow {
  height: 200vh;
  background-color: #f0f0f0;
}

/* ============
  passions section
===============*/

#passions {
  background-color: #f8f8f8;
  position: relative;
  z-index: 5;
  min-height: 100vh;
  overflow: hidden;
}

#passions h1 {
  color: #003049;
}

#passions h1 span {
  color: #2883ad;
}

#pa-moon {
  background-color: #e6f5fc;
}

#passions .text-wraper p {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: #003049;
}

#passions .text-wraper p::before {
  content: "";
  width: 15px;
  height: 15px;
  background-color: #e26f9b;
  position: absolute;
  left: 0;
  top: 5px;
  transform: rotate(45deg);
}

.bullet-row {
  display: flex;
  justify-content: space-between;
  align-items: top;
  flex-flow: wrap;
}

.bullet {
  width: 20%;
  height: width;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bullet + .bullet {
  margin-left: 20px;
}

.new-moon {
  position: relative;
  width: 100%;
}

.new-moon:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.new-moon div:nth-child(1) {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
}

.fas {
  color: #e26f9b;
  margin: 0 auto;
}

.new-moon div:nth-child(2) {
  width: 100%;
  height: 100%;
  background-color: #7cb5cf;
  border-radius: 50%;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: -1;
}

.bullet-des {
  text-align: center;
  padding-top: 30px;
}

.bullet-des h3 {
  color: #e26f9b;
  font-family: "Tillana", cursive;
  text-decoration: underline;
}

/* ============
  projects section
===============*/

#projects {
  background-color: #f8f8f8;
  position: relative;
  z-index: 5;
  overflow: hidden;
}

#p-moon {
  background-color: #ffe9e9;
}

#projects h1 {
  color: #d62828;
}

#projects h1 span {
  color: #e59595;
}

.photo-credit a {
  color: inherit;
  text-decoration: none;
}

.project-links {
  display: flex;
}

.project-link {
  margin-top: 10px;
  margin-right: 20px;
}

.project-link span {
  color: #d62828;
  margin-right: 5px;
}

.project-link a {
  font-family: "Satisfy", cursive;
  color: #d62828;
}

.project-wraper {
  display: flex;
  margin-bottom: 3rem;
  box-shadow: 5px 5px 10px #c9c9c9;
}

.project-wraper:nth-child(even) {
  flex-direction: row-reverse;
}

.project-wraper:nth-child(even) > .project-description {
  padding-left: 0px;
  padding-right: 20px;
}

.p-info {
  padding-top: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.photo-credit {
  color: #4b4b4b;
  padding: 20px 20px 10px 20px;
  font-size: 11pt;
}

.project-image-container {
  float: right;
  height: 300px;
  background-color: rgb(255, 91, 91);
}

.project-image-container > img {
  width: 300px;
  height: 300px;
  object-fit: none;
}

.project-description {
  padding-left: 20px;
  padding-right: 20px;
}

.stacks {
  display: flex;
  margin-top: 10px;
  flex-flow: wrap;
}

.stack {
  background-color: #d62828;
  font-size: 11pt;
  color: white;
  padding: 3px 10px;
  margin-top: 10px;
  margin-right: 10px;
  border-radius: 4px;
}

/* ============
  skills section
===============*/

#skills {
  background-color: #e2e9ba;
  position: relative;
  z-index: 5;
  overflow: hidden;
}

#skills h1 {
  color: #da7000;
  margin-bottom: 0.8rem;
}

#skills h1 span {
  color: #b96001;
}

#sk-moon {
  background-color: #fffcec;
}

.text-cloud-container {
  position: relative;
}

.text-cloud {
  background-color: #fffcec;
  padding: 20px 40px;
  border-radius: 90px;
  position: relative;
}

.cloud-shadow {
  content: "";
  width: 80vw;
  height: 70px;
  border-radius: 60px;
  background-color: #ffffff;
  position: absolute;
  bottom: -25px;
  left: -30vw;
  z-index: -1;
}

.text-cloud p {
  color: #3e505c;
}

.text-cloud > p + p {
  margin-top: 5px;
}

/* skill progress bar */
.clouds p {
  font-size: 11pt;
}

.cloud {
  width: 80%;
  height: 30px;
  border-radius: 20px;
  margin: 11px auto 42px auto;
  background-color: #ffffff;
  color: #242424;
  padding-right: 20px;
  text-align: right;
  position: relative;
}

.cloud > p {
  line-height: 30px;
}

.progress {
  width: 80%;
  background-color: #f77f00;
  height: 36px;
  border-radius: 36px;
  position: absolute;
  top: -25px;
  left: -20px;
  padding-right: 20px;
}

.progress p {
  line-height: 36px;
}

/* ============
  history section
===============*/
#history {
  background-color: #f8f8f8;
  position: relative;
  z-index: 5;
}

#hi-moon {
  background-color: #daf3ff;
}

.softskills {
  justify-content: space-between;
}

.softskills .stack {
  background-color: rgb(224, 168, 63);
}

.ap-wraper {
  display: flex;
  justify-content: space-between;
  flex-flow: wrap;
}

.ap-wraper li {
  width: 32%;
  list-style: none;
}

.ap-wraper img {
  width: 100%;
  object-fit: none;
  border-radius: 10%;
}

/* ============
  footer
===============*/
footer {
  height: 15vh;
  background-color: #ffffff;
  color: rgb(36, 36, 36);
  text-align: center;
  position: relative;
}

footer p {
  line-height: 100px;
}

/* ============
  scroll down & toTop pointer
===============*/
.arrow {
  position: relative;
  z-index: 105;
}

.arrow .scroll-down {
  position: fixed;
  left: -10px;
  top: 90vh;
  transform: rotate(90deg);
  display: flex;
  justify-content: center;
  color: rgb(88, 88, 88);
}

.scroll-down p {
  transform: translate(0, -6px) rotate(180deg);
  font-size: 10pt;
}

.to-top p {
  transform: translate(0, 3px) rotate(180deg);
  font-size: 10pt;
}

.arrow .to-top {
  position: fixed;
  right: -10px;
  top: 90vh;
  transform: rotate(90deg);
  display: flex;
  justify-content: center;
  color: rgb(88, 88, 88);
}

.scroll-down svg {
  width: 20px;
  fill: rgb(88, 88, 88);
  margin-left: 10px;
  animation: downward-arrow 1s infinite alternate ease-in;
}

.to-top svg {
  width: 20px;
  fill: rgb(88, 88, 88);
  margin-left: 10px;
  animation: upward-arrow 1s infinite alternate ease-in;
}

.to-top a {
  text-decoration: none;
  color: inherit;
}

@keyframes downward-arrow {
  from {
    transform: rotate(180deg) translateX(0);
  }
  to {
    transform: rotate(180deg) translateX(-20px);
  }
}

@keyframes upward-arrow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(20px);
  }
}

/* ============
  nav bar on big screen
===============*/
.nav-bar {
  position: fixed;
  z-index: 105;
}

.nav-bar ul {
  position: relative;
  left: 50px;
  display: flex;
}

.nav-bar li:nth-child(1) {
  list-style: none;
  font-weight: bold;
}

.nav-bar li {
  line-height: 50px;
  margin-right: 40px;
}

.nav-bar a {
  text-decoration: none;
  color: inherit;
}

.nav-bar a:hover {
  color: white;
  background-color: black;
}

/* ============
  social media bar on big screen
===============*/
.social-media-bar {
  position: fixed;
  top: 50%;
  right: 20px;
  z-index: 105;
  transform: translate(15%, -50%);
}

.social-media-bar li {
  list-style: none;
  margin-top: 10px;
}

.fab {
  color: #7c7c7c;
}

@media only screen and (max-width: 1080px) {
  .padding {
    padding-top: 15vh;
  }

  /* skills cloud */
  .cloud p {
    font-size: 10pt;
  }
  /* passion flex */
  .bullet {
    width: 32%;
    margin: 0 40px 20px 20px;
  }

  /* project card */
  .project-wraper {
    flex-direction: column;
  }
  .project-wraper:nth-child(even) {
    flex-direction: column;
  }
  .project-wraper img {
    width: 100%;
    object-fit: none;
  }
  .p-info {
    padding-top: 20px;
    padding-bottom: 10px;
  }

  /* the past */
  .ap-wraper {
    flex-direction: column;
  }
  .ap-wraper li {
    width: 100%;
    height: 40vh;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 5vh;
  }
  .ap-wraper img {
    width: 240%;
    object-fit: cover;
    transform: translate(-27%, -10%);
  }
}

@media only screen and (max-width: 768px) {
  /* remove borders */
  .borders,
  .corners {
    display: none;
  }

  /* add fixed nav bar */
  .nav-bar {
    position: fixed;
    height: 40px;
    width: 100%;
    top: 0;
    background-color: #fcbf49;
  }

  .nav-bar li {
    line-height: 40px;
  }

  /* intro */
  #intro {
    position: relative;
    height: 150vh;
  }

  #intro .name {
    position: absolute;
    top: 40vh;
    left: 12%;
    z-index: 200;
  }

  .name-text > text:nth-child(3) {
    display: none;
  }

  #intro .moon-container {
    position: absolute;
    z-index: 1;
    top: 50vh;
    left: 30vw;
  }

  #intro .moon {
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: #ffd684;
  }

  #intro .word {
    opacity: 0;
    position: absolute;
    z-index: 100;
    left: 12%;
    bottom: 16%;
  }

  .name-text {
    height: 120px;
    width: 320px;
    transform: translate(0, -30px);
  }

  .name-text > text {
    font-size: 50px;
    font-family: "Karla", sans-serif;
  }

  .name-text > text:nth-child(2) {
    font-size: 50px;
    font-family: "Karla", sans-serif;
    transform: translate(0, -10px);
  }

  /* disable shadow section on mobile */
  section.shadow {
    display: none;
  }

  /* project */
  .project-wraper {
    margin-bottom: 50px;
  }

  /* social medias put back to footer */
  .social-media-bar {
    position: relative;
    top: 0;
    right: 0;
    transform: none;
    padding: 10px 20vw;
  }

  .social-media-bar ul {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 10px auto;
  }

  .fab {
    color: rgb(53, 53, 53);
  }

  footer p {
    line-height: 20px;
    padding-top: 15px;
    padding-bottom: 60px;
  }
}

@media only screen and (max-width: 640px) {
  h1 {
    font-size: 2.2rem;
  }

  p {
    font-size: 11pt;
  }

  .nav-bar ul {
    position: relative;
    left: 12vw;
    display: flex;
  }

  .nav-bar li {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 25px;
  }

  .nav-s::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #e26f9b;
    top: 50%;
    left: -10px;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-s {
    font-size: 11pt;
  }

  .padding {
    padding: 25vh 12vw 12vh 12vw;
  }

  #passions .text-wraper p {
    font-weight: 400;
    font-size: 12pt;
  }

  /* intro */
  #intro {
    overflow: hidden;
  }

  #intro .word {
    width: 70vw;
    bottom: 10vh;
  }

  /* passion flex */
  .bullet-row {
    justify-content: center;
  }

  .bullet {
    width: 50%;
  }
  .bullet-row .bullet + .bullet {
    margin: 40px 40px 0 40px;
  }

  /* project card */
  .project-wraper {
    flex-direction: column;
  }
  .project-wraper:nth-child(even) {
    flex-direction: column;
  }
  .project-wraper img {
    width: 100%;
    object-fit: none;
  }
  .p-info {
    padding-top: 20px;
    padding-bottom: 10px;
  }

  /* skills */
  .text-cloud p:nth-child(2) {
    display: none;
  }
}
