:root {
  /* --main-theme-color: #8baf16; */
  --main-theme-color: #2f23b1;
}
html {
  color: #fff;

  /* Acts as a fallback if the `background-image` doesn't load */
  background-color: #f0e6e0;
  /* https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient */
  background-image: linear-gradient(to bottom right, #2f23b1, #f0e6e0);
  /* background-image: linear-gradient(to bottom right, #180cac, #f0e6e0); */

  font-family: "Karla", Verdana, sans-serif;
  font-size: 16px;
  text-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);

  line-height: 1.5; /* 1.5 * 16px = 24px */
  min-height: 100vh;
  min-width: 300px;

  /* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x */
  overflow-x: hidden;

  /* https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth */
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

a {
  color: currentColor; /* use the `color` values provided by `html` (in our case!) */
  cursor: pointer;
  text-decoration: none;
}

/* Responsive design */

/* For small screen */

@media screen and (max-width: 799px) {
  .content {
    flex-direction: column; /* changed from default 'row' to 'column' (vertical) */
    justify-content: center; /* makes the content centered on the "main axis" */
    align-items: center; /* makes the content centered on the "cross axis" */
    padding: 5rem 3rem;
  }

  .side {
    margin-bottom: 3rem; /* keep some space from the `.content` */
    width: 100%;
  }
  .credits {
    display:flex;
    /* position:relative; */
    margin: auto;
    /* padding-top: 2rem; */
    padding-bottom: 2rem;
    text-align: center;
    /* flex:1; */
    /* height: 20rem; */
    /* flex-direction: co lumn; */
    /* flex-wrap: wrap; */
  
  }
  .credits a {
    color: currentColor; /* use the `color` values provided by `html` (in our case!) */
    cursor: pointer;
    text-decoration: underline;
    /* flex-direction: column; */
  }
}

/* For bigger screen */

@media screen and (min-width: 800px) {
  .content {
    align-items: center;
    justify-content: space-around; /* as a fallback to 'space-evenly' */
    justify-content: space-evenly; /* this val isn't available in all browsers */
    padding: 4rem;
  }

  .side {
    /* Check this out https://bit.ly/2BuiLEM (on freeCodeCamp) */
    flex-grow: 0;
    flex-shrink: 0;
    height: 20rem;
    width: 20rem;
    margin-left: 4rem;
    order: 2;
  }

  .about {
    flex-grow: 1;
    flex-shrink: 1;
  }

  .credits {
    display:flex;
    /* position:relative; */
    padding: 2%;
    margin: auto;
    text-align: center;

    /* animation */
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box; 
    vertical-align: middle;
    /* flex:1; */
    /* height: 20rem; */
    /* flex-direction: column; */
    /* flex-wrap: wrap; */
  
  }
  .credits a {
    font-size: 16px;
    color: currentColor; /* use the `color` values provided by `html` (in our case!) */
    cursor: pointer;
    text-decoration: underline;

    /* animation */
    transition-property: font-size;
    transition-duration: 300ms;
    /* flex-direction: column; */
  }
  
  .credits a:hover {
    color: #473eb3; /* use the `color` values provided by `html` (in our case!) */
    font-weight:bold;
    text-decoration: underline;

    /* animation  */
    font-size: 17px;
    /* padding: 2% - 1px; */
  }
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* make sure `.content` covers the whole page */
}

/* General rules */

.wallpaper,
.picture-shadow,
.picture-image {
  display: block;
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
}

.job,
.button {
  width: 9em;
  font-family: Rubik;
  text-align: center;
  /* letter-spacing: 0.2em; */
  text-transform: uppercase;
}

.button,
.social a {
  transform-origin: center;
  transition-duration: 300ms;
}

.social {
  display: flex;
  margin-top: 1.5rem;
}

.codeforces-logo i.fa { display: none; }

/* Specific */

.wallpaper {
  /* use `img` or CSS: https://stackoverflow.com/a/1469139/6273859 */
  background-position: center;
  background-size: cover;

  opacity: 0.2;
  position: fixed;
}

.content {
  display: flex; /* now the `.side` and `.about` are both flexbox items */
  position: relative; /* allows `.content` to appear above `.wallpaper` */
  /* min-height: 100vh; make sure `.content` covers the whole page */
  flex:1;
}

.side {
  max-height: 20rem;
  max-width: 20rem;
}

.about {
  max-width: 26rem;
  flex:1;
}

.picture {
  padding-top: 100%;
  position: relative;
  width: 100%;
}

.picture-image {
  border-radius: 9999px; /* to ensure it to be rounded (other args supported) */
  position: absolute;
}

.picture-shadow {
  border-radius: 9999px; /* to ensure it to be rounded (other args supported) */
  background-image: radial-gradient(#000 0%, rgba(0, 0, 0, 0) 70%);
  position: absolute;
  top: 10%;
}

.name {
  /*
    Tips (try NOT to misuse)
    1. line-height is to define the height of each line
    2. margin-x    is to define the space between each line
   */
  line-height: 1.125;
  margin-bottom: 0.5rem;

  font-size: 2.25rem;
  /* font-style: italic; */
}

.job {
  width: 100%;  
  text-align: left;
  color: #ffe479;
  font-size: 0.75em;

}

.hr {
  background-color: #fc0000;
  border: none;
  content: "";
  height: 1px;
  margin-bottom: 2rem;
  margin-top: 1.5rem;
  transform-origin: center left;
  width: 100%;
}

.description {
  font-size: 1.3rem;
}

.credits a:hover {
  color: #473eb3; /* use the `color` values provided by `html` (in our case!) */
  font-weight:bold;
  text-decoration: underline;
}
.contact {
  color: 180cac;
  display: inline-block;
  margin-top: 1.5rem;
  vertical-align: top;
}

.button {
  color: #180cac;
  background-color: #fff;

  border-radius: 999999px;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);

  font-size: 0.875rem;
  text-shadow: none;
  line-height: 1em;
  padding: 1.25em 2em;
  display: inline-block;
  white-space: nowrap;
  vertical-align: top;

  /* https://developer.mozilla.org/en-US/docs/Web/CSS/user-select */
  user-select: none;

  transition-property: box-shadow, transform;
  will-change: box-shadow, transform;
}

.button:hover {
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.2);
  transform: scale(1.03) translateY(-4px);
}

.button:active {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  transform: scale(0.97) translateY(-2px);
}

.social li {
  height: 2rem;
  margin-right: 0.5rem;
  text-align: center;
  width: 2rem;
}

.social a {
  display: flex;
  opacity: 0.5;

  height: 2rem;
  width: 2rem;
  font-size: 1.5rem; /* the icons are actually text, so you can use this */

  align-items: center;
  justify-content: center;

  transition-property: opacity, transform;
  will-change: opacity, transform;
}

.social a:hover {
  opacity: 1;
  transform: scale(1.25);
}

.social a:active {
  opacity: 1;
  transform: scale(1.1);
}


/* Animation stuff */

.wallpaper,
.picture-shadow,
.picture-image,
.name,
.job,
.hr,
.description,
.contact,
.social li {
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(0, 0.5, 0, 1);
  animation-fill-mode: both;
}

.wallpaper,
.picture-shadow,
.picture-image {
  opacity: 0;
}

.picture-shadow,
.picture-image {
  animation-duration: 750ms;
  animation-timing-function: cubic-bezier(0, 0.5, 0.25, 1.25);
}

.wallpaper {
  animation-timing-function: ease-out;
}

.wallpaper.is-loaded {
  animation-delay: 1s;
  animation-name: zoomOut;
}

.picture.is-loaded,
/* .picture-shadow {
  animation-name: picShadow;
} */

.picture.is-loaded,
.picture-image {
  animation-name: picImage;
}

.name {
  animation-name: slideDown;
}

.job {
  animation-name: slideUp;
}

.hr {
  animation: fillUp;
}

.description {
  animation-name: slideUp;
}

.contact {
  animation-name: bounceIn;
}

.social li {
  animation-duration: 500ms;
  animation-name: slideUp;
  animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1.5);
}

.name {
  animation-delay: 100ms;
}

.job {
  animation-delay: 200ms;
}

.hr {
  animation-delay: 300ms;
}

.description {
  animation-delay: 400ms;
}

.picture-image {
  animation-delay: 500ms;
}

.picture-shadow {
  animation-delay: 500ms;
}

.contact {
  animation-delay: 600ms;
}

.social li:nth-child(1) {
  animation-delay: 800ms;
}

.social li:nth-child(2) {
  animation-delay: 900ms;
}

.social li:nth-child(3) {
  animation-delay: 1000ms;
}

.social li:nth-child(4) {
  animation-delay: 1100ms;
}

.social li:nth-child(5) {
  animation-delay: 1200ms;
}
