*,
*::after,
*::before {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}



.loading::before,
.loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
}

.loading::after {
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 8px solid #383a41;
	border-bottom-color: #565963;
	border-radius: 50%;
	animation: animLoader 0.8s linear infinite forwards;
}

@keyframes animLoader {
	to { transform: rotate(360deg); }
}

a {
	text-decoration: none;
	color: #f2f2f2;
	outline: none;
}

a:hover,
a:focus {
	color: #e6629a;
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}

main {
	display: flex;
	flex-wrap: wrap;
}

/* Icons */
.icon {
	display: block;
	width: 1.5em;
	height: 1.5em;
	margin: 0 auto;
	fill: currentColor;
}

.content--side {
	position: relative;
	z-index: 100;
	width: 15vw;
	min-width: 130px;
	max-height: 100vh;
	padding: 0 1em;
	order: 2;
}

.content--center {
	flex: 1;
	max-width: calc(100vw - 260px);
	order: 3;
}

.content--right {
	order: 4;
}

.content--related {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
	padding: 8em 1em 3em;
	text-align: center;
	order: 5;
}

.media-related {
	width: 100%;
}

.media-item {
	padding: 1em;
}

.media-item__img {
	max-width: 100%;
	opacity: 0.7;
	transition: opacity 0.3s;
}

.media-item:hover .media-item__img,
.media-item:focus .media-item__img {
	opacity: 1;
}

.media-item__title {
	font-size: 1em;
	max-width: 220px;
	padding: 0.5em;
	margin: 0 auto;
}


/* Grid */

@media (max-width: 1200px){
	.grid {
		position: relative;
		z-index: 2;
		display: block;
		margin: 0 auto;		
	}
}

@media (min-width: 1200px){
.grid {
	position: relative;
	z-index: 2;
	display: block;
	margin: 0 auto;
}
}

.grid--hidden {
	position: fixed !important;
	z-index: 1;
	top: 0;
	left: 0;
	width: 100%;
	pointer-events: none;
	opacity: 0;
}

.grid--loading::before,
.grid--loading::after {
	content: '';
	z-index: 1000;
}

.grid--loading::before {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: transparent;
}

.grid--loading::after {
	position: absolute;
	top: calc(25vh - 20px);
	left: 50%;
	width: 40px;
	height: 40px;
	margin: 0 0 0 -20px;
	border: 8px solid #383a41;
	border-bottom-color: #565963;
	border-radius: 50%;
	animation: animLoader 0.8s linear forwards infinite;
}

.grid__sizer {
	margin-bottom: 0 !important;
}

.grid__link,
.grid__img {
	display: block;
}

.grid__img {
	width: 100%;
	
}
.grid__link {
	position: relative;
}

.grid__item {
	overflow:hidden;
}

.grid__link img {
	transition: all 0.8s;
}

.grid__link:hover img {	
	transform: scale(1.12)
}


.grid__deco {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

.grid__deco path {
	fill: none;
	stroke: #fff;
	stroke-width: 2px;
}

.grid__reveal {
	position: absolute;
	z-index: 50;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0;
	background-color: #2c2d31;
}

@media screen and (max-width: 576px) {
	.grid .grid__item,
	.grid .grid__sizer {
		width: 100%;
		height: auto;
		margin: 10px auto;
	}
	}
@media screen and (min-width: 576px) {
.grid .grid__item,
.grid .grid__sizer {
	width: calc(50% - 20px);
	margin: 0 10px 20px;
}
}

@media screen and (min-width: 768px) {
	.grid .grid__item,
	.grid .grid__sizer {
		width: calc((100% / 3) - 26px);
		margin: 0 13px 26px;
	}
}

/* @media screen and (min-width: 1200px) {
	.grid .grid__item,
	.grid .grid__sizer {
		width: calc(25% - 30px);
		margin: 0 15px 30px;
	}
	/* Grid types 
	.grid--type-b .grid__item,
	.grid--type-b .grid__sizer {
		width: calc(20% - 20px);
		margin: 0 10px 20px;
	}

	.grid--type-c .grid__item,
	.grid--type-c .grid__sizer {
		width: calc(25% - 16px);
		margin: 0 8px 16px;
	}
} */

@media screen and (max-width: 50em) {
	main {
		display: block;
	}
	.codrops-header {
		padding: 1em;
		flex-wrap: wrap;
	}
	.codrops-links {
		margin: 0;
	}
	.codrops-header__title {
		width: 100%;
		text-align: left;
		flex: none;
		margin: 1em 0;
	}
	.content--side {
		width: 100%;
	}
	.content--right {
		order: 3;
	}
	.content--center {
		max-width: 100vw;
	}
	.control {
		margin: 0 0 1em;
		text-align: left;
	}
	.control__item,
	.control__btn {
		display: inline-block;
	}
	.control__btn {
		width: auto;
	}
}
