*,
*::after,
*::before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  --text-color: #fff;
  --background-color: #363dc2;
  --background-color-2: #282faf;
  --background-color-3: #202692;
  --link-color: #03b9f1;
  --link-hover-color: #fff;
  font-family: "Roboto Mono", monospace;
  font-weight: 500;
  color: #fff;
  color: var(--text-color);
  background-color: #363dc2;
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* Page Loader */
.js .loading::before {
  content: "";
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-color);
}

.js .loading::after {
  content: "";
  position: fixed;
  z-index: 10000;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 10px solid var(--background-color-2);
  border-left-color: var(--text-color);
  animation: loaderAnim 0.8s linear infinite forwards;
}

@keyframes loaderAnim {
  to {
    transform: rotate(360deg);
  }
}

main {
  position: relative;
  width: 100%;
  overflow: hidden;
}

a {
  text-decoration: none;
  color: var(--link-color);
  outline: none;
}

a:hover,
a:focus {
  color: var(--link-hover-color);
  outline: none;
}

.hidden {
  position: absolute;
  overflow: hidden;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Icons */
.icon {
  display: block;
  width: 1.5em;
  height: 1.5em;
  margin: 0 auto;
  fill: currentColor;
}

/* Deco Shape */
.decoshape {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  fill: #ff9900;
}
.menu:hover .decoshape {
  fill: #ed4014;
}

/* SVG Morph */
.morph-wrap {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.morph {
  position: relative;
  height: 100%;
  fill: var(--background-color-2);
  flex: none;
}

.content-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  pointer-events: none;
}

.content {
  position: relative;
  display: grid;
}

.content--fixed {
  width: 100%;
  padding: 1.5em;
}

.content--fixed a {
  pointer-events: auto;
}

.content--layout {
  pointer-events: auto;
  justify-content: center;
  align-content: center;
  grid-template-columns: 150px 150px 150px 150px;
  grid-template-rows: 150px 75px 75px;
  grid-template-areas:
    "... title title title"
    "author ... desc desc"
    "author ... link link";
}

.content--related {
  text-align: center;
  align-content: center;
  justify-content: center;
  padding: 0 2em;
  min-height: 600px;
  height: 100vh;
  font-size: 0.85em;
}

.content__img {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  opacity: 0.8;
  width: 300px;
  height: 300px;
}

.content__title {
  grid-area: title;
  font-family: "nexa_boldregular", sans-serif;
  letter-spacing: -0.025em;
  font-size: 8em;
  line-height: 160px;
  margin: 0;
  text-transform: lowercase;
  z-index: 10;
  cursor: default;
}

.content__author {
  grid-area: author;
  margin: 0;
  -webkit-writing-mode: vertical-lr;
  writing-mode: vertical-lr;
  padding: 1em;
  text-align: right;
  z-index: 10;
  cursor: default;
  white-space: nowrap;
}

.content__desc {
  grid-area: desc;
  margin: 0;
  z-index: 10;
  padding: 0 1em;
  cursor: default;
}

.content__img,
.content__title,
.content__author,
.content__desc {
  transition: transform 0.3s ease-out;
}

.content__link {
  pointer-events: auto;
  grid-area: link;
  align-self: end;
  justify-self: start;
  z-index: 10;
  padding: 0 1em 0.15em;
}

.content__info {
  grid-column: 1 / 3;
  text-align: left;
  font-size: 65px;
  font-weight: 800;
}

.content__related-item {
  padding: 1em;
  transition: color 0.3s;
}

.content__related-img {
  max-width: 100%;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.content__related-item:hover .content__related-img,
.content__related-item:focus .content__related-img {
  opacity: 1;
}

.content__related-title {
  font-size: 1em;
  margin: 0;
  padding: 0.5em;
}

/* Different layouts */

/* layout-2 */
.content--layout-2 {
  grid-template-areas:
    "... title title title"
    "desc desc ... author"
    "link link ... author";
}

.content--layout-2 .content__img {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
}

.content--layout-2 .content__desc {
  text-align: right;
}

.content--layout-2 .content__link {
  justify-self: end;
}

.content--layout-2 .content__author {
  justify-self: end;
}

/* layout-3 */
.content--layout-3 {
  grid-template-rows: 75px 75px 150px;
  grid-template-areas:
    "... ... desc desc"
    "author title title title"
    "author ... link link";
}

.content--layout-3 .content__img {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.content--layout-3 .content__desc {
  align-self: end;
}

/* layout-4 */

.content--layout-4 {
  grid-template-areas:
    "title title title desc"
    "... author ... desc"
    "... author ... link";
}

.content--layout-4 .content__img {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.content--layout-4 .content__author {
  justify-self: start;
}

/* Header */
.codrops-header {
  align-items: center;
  flex-direction: column;
}

.codrops-header__title {
  font-size: 40px;
  font-weight: 800;
  margin: auto;
  font-weight: 800;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 360px;
}
.codrops-header__title .content {
  line-height: 1;
  padding: 15px;
  width: 100%;
  z-index: 1;
  position: relative;
  background: hsl(237, 56%, 49%);
  box-shadow: 0 0 5px 2px hsl(237, 56%, 39%);
  border-radius: 0 0 10px 10px;
  text-align: center;
}
.codrops-header__title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  bottom: 15%;
  border-radius: 10px;
  background: hsl(237, 56%, 20%);
  box-shadow: 0 0 20px 15px hsl(237, 56%, 20%);
  transform: translate(0, -20%) rotate(-5deg);
  transform-origin: center center;
  z-index: -1;
  opacity: 0.4;
}
.codrops-header__title::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  bottom: 15%;
  border-radius: 10px;
  background: hsl(237, 56%, 20%);
  box-shadow: 0 0 20px 15px hsl(237, 56%, 20%);
  transform: translate(0, -20%) rotate(5deg);
  transform-origin: center center;
  z-index: -1;
  opacity: 0.4;
}
/* Demos */
.menus {
  text-align: center;
  padding: 60px;
}

.menu {
  display: inline-block;
  position: relative;
  font-size: 0.85em;
  margin: 0 0.25em 0.5em 0;
  padding: 1em;
  cursor: pointer;
}

.menu .decoshape {
  display: none;
}

.menu--current {
  color: white;
  border-color: currentColor;
  z-index: 1;
}

.menu--current .decoshape {
  display: block;
  z-index: -1;
}

/* Deco elements */
.deco {
  pointer-events: none;
}

.deco--title {
  grid-area: decotitle;
  -webkit-writing-mode: vertical-lr;
  writing-mode: vertical-lr;
  text-align: right;
  align-self: end;
  justify-self: end;
}

/* Top Navigation Style */
.codrops-links {
  position: relative;
  justify-content: space-between;
  align-items: center;
  margin: 0 1em 0 0;
  text-align: center;
  white-space: nowrap;
}
.codrops-links img {
  width: 120px;
  height: 120px;
}

/*footer*/
.footer_box {
  position: fixed;
  bottom: 0;
  z-index: 999;
  width: 300px;
  margin: auto;
  left: 0;
  right: 0;
}
.footer_box * {
  line-height: 1;
}
.footer_box .content {
  width: 100%;
  height: 100%;
  text-align: center;
  background: hsl(237, 56%, 49%);
  box-shadow: 0 0 5px 2px hsl(237, 56%, 39%);
  border-radius: 10px 10px 0 0;
  padding: 15px;
}
.footer_box .text {
  margin-bottom: 10px;
}
.footer_box::before,
.footer_box::after {
  content: "";
  position: absolute;
  border-radius: 10px;
  background: hsl(237, 56%, 20%);
  box-shadow: 0 0 10px 7px hsl(237, 56%, 20%);
  z-index: -1;
  opacity: 0.2;
}
.footer_box::before {
  top: 15%;
  bottom: 20%;
  left: 90%;
  right: 5%;
  transform: translate(105%, 10%) rotate(15deg);
  transform-origin: center center;
}
.footer_box::after {
  top: 15%;
  bottom: 20%;
  left: 5%;
  right: 90%;
  transform: translate(-105%, 10%) rotate(-15deg);
  transform-origin: center center;
}

@media screen and (max-width: 50em) {
  .content--fixed {
    height: auto;
    min-height: 0;
    display: block;
    z-index: 1000;
    position: absolute;
  }
  .deco--title {
    display: none;
  }
  .demos {
    text-align: center;
  }
}

@media screen and (max-width: 40em) {
  .content--layout {
    transform: scale3d(0.8, 0.8, 1);
  }
}

@media screen and (max-width: 36em) {
  .content--layout {
    transform: scale3d(0.7, 0.7, 1);
  }
}

@media screen and (max-width: 32em) {
  .content--layout {
    transform: scale3d(0.6, 0.6, 1);
  }
  .content__author,
  .content__desc,
  .content__link {
    font-size: 1.35em;
  }
}

@media screen and (max-width: 28em) {
  .content--layout {
    transform: scale3d(0.5, 0.5, 1);
  }
}
