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

/* 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;
	outline: none;
}

a:hover,
a:focus {
	outline: 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: var(--background-color-3);
}

/* SVG Morph */
.morph-wrap {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 0;
	transform: scale(1.5);
	will-change: transform, position;
}

.morph-wrap.absolute {
	position: absolute;
	bottom: initial;
}

.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-content: center;
	width: 100%;.
	height: 100vh;
	min-height: 700px;
}

.content {
	position: relative;
}

.content--fixed {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	min-height: 600px;
	z-index: 100;
	pointer-events: none;
	padding: 1.5em;
	grid-template-columns: 50% 50%; 
	grid-template-rows: auto auto 4em;
	grid-template-areas:	"header ..."
							"... decotitle"
							"demos decotitle";
}

.content--fixed a {
	pointer-events: auto;
}

.content--layout {
	pointer-events: auto;
	justify-content: center;
	align-content: center;
}

.content--related {
	text-align: center;
	align-content: center;
	justify-content: center;
	padding: 0 2em;
	min-height: 600px;
	height: 100vh;
	font-size: 0.85em;
	display: none;
}

.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;
}

.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 cubic-bezier(0.19, 1, 0.22, 1);
}

.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;
}

.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 */


/* Header */
.codrops-header {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	z-index: 100;
	grid-area: header;
	align-self: start;
	justify-self: start;
}

.codrops-header__title {
	font-size: 1em;
	padding: 0.75em 0;
	margin: 0;
	font-weight: 500;
}

/* Demos */
.demos {
	grid-area: demos;
	align-self: end;
}

.demo {
	display: inline-block;
	position: relative;
	font-size: 0.85em;
	margin: 0 0.25em 0.5em 0;
	padding: 1em;
}

.demo .decoshape {
	display: none;
}

.demo--current {
	color: var(--link-hover-color);
	border-color: currentColor;
}

.demo--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;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 1em 0 0;
    text-align: center;
    white-space: nowrap;
}

.codrops-icon {
	position: relative;
	display: inline-block;
	padding: 0.75em 0.75em 1em;
}

@media(max-width: 1024px) {
	.morph-wrap.absolute {
		position: fixed;
	}
}

@media(max-width: 968px) {
	.morph-wrap {
		transform: scale(3.2);
	}
}
