
body {
	--color-text: #4800d4;
    --color-bg: #e8e8e8;
    --color-link: #ec1752;
    --color-link-hover: #eb1851;
    --color-info: #272526;
    --grid-item-bg: rgba(0,0,0,.8);
    --color-close: #ec1752;
	min-height: 100vh;
}

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

main {
	position: relative;
}

.frame {
	position: relative;
	padding: 1.5rem 2.5rem;
}

.frame a:hover {
	color: #4c33f7;
}

/* Header */
.codrops-header {
	position: relative;
	z-index: 100;
	text-align: center;
	font-size: 1rem;
}

.codrops-header__title {
	font-size: 1rem;
	font-weight: normal;
	margin: 0;
	padding: 0;
}

.info {
	margin: 0 0 0 1.25em;
	color: var(--color-info);
}

.github {
	display: block;
	margin: 0.15em 0.15em 0.15em 0.5em;
	padding: 0.25em;
}

.title {
	text-align: center;
}

.title__name,
.title__sub {
	font-weight: normal;
	margin: 0;
	font-size: 1rem;
}

.title__sub {
	position: relative;
	margin: 0;
}

/* Top Navigation Style */
.codrops-links {
	position: relative;
	display: flex;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
}

.codrops-icon {
	display: inline-block;
	margin: 0.15em;
	padding: 0.25em;
}

.grid-wrap {
	position: relative;
	/*max-width: 1100px;*/
	width: calc(100% - 2rem);
	margin: 0 auto;
	padding: 6rem 1rem 0;
	text-align: center;
}

.grid-wrap--hidden {
	height: 0;
	overflow: hidden;
}

.grid {
	margin: 0 auto;
	position: relative;
	display: none;
}

.js .grid {
	display: block;
	width: 100%!important;
	height: auto!important;
}

.grid__item {
	width: calc(100% - 80px);
	max-width: 350px;
	display: inline-block;
	position: relative!important;
	padding: 20px;
	margin: 40px;
	margin-bottom: 5rem;
	top:unset!important;
	left: unset!important;
}

.grid__item-wrap {
	position: relative;
}

.grid__item-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 90%;
	height: 90%;
	/*background: rgba(0,0,0,.5);
	background: var(--grid-item-bg);
	background-image: url(../fondo_imgs.svg);
	background-position: center;
	background-size: 150%;
	background-repeat: no-repeat;*/
	background-color: rgba(255,255,255,.2);
}

.grid__item-img {
	pointer-events: none;
	position: relative;
	max-width: 100%;
	margin: 0 auto;
	display: block;
	outline: 1px solid transparent;
	transition: all cubic-bezier( 0.165, 0.84, 0.44, 1 ) .5s;
}
.grid__item-wrap:hover .grid__item-img{
	scale:1.1;
	transform: rotate3d(0, 0, 0, 0deg)!important;
	transition: all cubic-bezier( 0.165, 0.84, 0.44, 1 ) .5s;
}

.grid__item:nth-child(even) .grid__item-img {
	transform: rotate3d(0,0,1,4deg);
}

.grid__item:nth-child(odd) .grid__item-img {
	transform: rotate3d(0,0,1,-4deg);
}

.grid__item-title {
	font-weight: normal;
	position: absolute;
	left: 0;
	top: 0;
	margin: 0 0 0 1rem;
	-webkit-writing-mode: vertical-rl;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	transform-origin: 0 50%;
}

.grid__item-number {
	font-weight: bold;
	position: absolute;
	right: 0;
	bottom: 0;
	font-size: 2.65rem;
	margin: 0 0 0.15rem;
}

.grid__item-number > span {
	display: inline-block;
}

.content {
	margin: 0 auto;
	grid-template-columns: 100%;
	grid-template-rows: 100%;
	align-items: center;
	pointer-events: none;
}

.js .content {
	position: fixed;
	top: 0;
	left:0;
	width: 100%;
	z-index: 1000;

	display: grid;
	height: 100vh;
}

.content__item {
	padding: 10rem 5vw 10rem;
	grid-area: 1 / 1 / 1 / 1;
}

.js .content__item {
	height: 0;
	opacity: 0;
	overflow: hidden;
	padding: 0;
	pointer-events: none;
	color:white;
}

.js .content__item--current {
	height: fit-content;
	opacity: 1;
	margin: auto;
	pointer-events: auto;
	width: fit-content;
}

.content__item-intro {
	position: relative;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: 100%;
	align-items: center;
	overflow: auto;
}

.content__item-img {
	position: relative;
	height: auto;
	max-width: 90vw;
	display: block;
	margin: 0 auto;
	grid-area: 1 / 1 / 1 / 1;
}

.js .content__item-img {
	visibility: hidden;
}

.content__item-title {
	position: fixed;
	font-size: 16px;
	line-height: 1;
	text-align: center;
	margin: 0 auto;
	padding: 0;
	white-space: nowrap;
	grid-area: 1 / 1 / 1 / 1;
	top: 12px;
}

.content__item-title > span {
	white-space: pre;
	display: inline-block;
}

.content__item-subtitle {
	text-align: center;
	font-size: 1.25rem;
	font-weight: normal;
	margin: 3rem auto;
}

.content__item-text {
	text-align: justify;
	max-width: 800px;
	margin: 0 auto;
}

.content__item-text p {
	margin: 0;
}

.content__close {
	position: absolute;
	width: 100vw;
	height: 100vh;
	top: 0;
	left: 0;
	z-index: -10;
	/*transform: translateX(-50%);*/
	transform: unset!important;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	cursor: pointer;
	/*color: var(--color-text);*/
	color:white;
	font-family: "PT Sans", Helvetica, sans-serif;
	font-size: 30px;
	font-weight: bold;
	text-align: right;
    padding-bottom: calc(100vh - 45px);
    padding-right: 15px;
}

.content__close:focus {
	outline: none;
}

.content__item--current ~ .content__close {
	pointer-events: auto;
}

.content__indicator {
	position: absolute;
	top: calc(100vh - 6rem);
	left: calc(50% - 0.75rem);
	display: none;
}

.js .content__item-title > span,
.js .content__item-subtitle,
.js .content__item-text,
.content__close,
.content__indicator {
	opacity: 0;
}

@media screen and (min-width: 55em) {
	.frame {
		display: grid;
		align-items: start;
		justify-items: start;
		grid-template-columns: 40% 60%;
		grid-template-areas: 'title header';
	}
	.codrops-header {
		grid-area: header;
		justify-self: end;
		display: flex;
		flex-direction: row;
		align-items: flex-start;
		align-items: center;
		text-align: left;
	}
	.codrops-links {
		margin: 0 0 0 1.5rem;
	}
	.title {
		grid-area: title;
		display: flex;
		text-align: left;
	}
	.title__sub {
		position: relative;
		padding: 0 0 0 5rem;
		margin: 0 0 0 1rem;
	}
	.title__sub::before {
		content: '';
		height: 1px;
		width: 4rem;
		background: currentColor;
		position: absolute;
		top: 0.65rem;
		left: 0;
	}
	.title__sub-works {
		display: block;
	}
	.grid__item-number {
		right: -2.45rem;
	}
	.grid__item-title {
		margin-left: -0.25rem;
	}
	.content__item-subtitle {
		font-size: 3vw;
	}
	.content__item-text {
  		column-count: 2;
  		column-gap: 20px;
  	}
	.content__item-img {
		max-width: calc(100vw - 6rem);
		max-height: calc(100vh - 6rem);
	}
	.content__item-subtitle {
		max-width: 50%;
	}
	.content__indicator {
		display: block;
	}
}
