@import url("https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap");

:root {
	--bg-color-secondary: #04000f;
	--font-color: #555;
	--white: #ffffff;
	--bg-icon: rgba(243, 204, 47, 0.7);

	--red-light: rgb(255, 51, 102);
	--red-dark: rgb(186, 38, 93);
	--red-light-transparent-light: rgba(255, 51, 102, 0.65);
	--red-dark-transparent-light: rgba(186, 38, 92, 0.65);
	--red-light-transparent-dark: rgba(255, 51, 102, 0.85);
	--red-dark-transparent-dark: rgba(186, 38, 92, 0.85);

	--mono-light: rgb(44, 62, 80);
	--mono-dark: rgb(32, 45, 58);
	--mono-light-transparent-light: rgba(44, 62, 80, 0.65);
	--mono-dark-transparent-light: rgba(32, 45, 58, 0.65);
	--mono-light-transparent-dark: rgba(44, 62, 80, 0.85);
	--mono-dark-transparent-dark: rgba(32, 45, 58, 0.85);

	--path1: polygon(64% 0, 100% 12%, 100% 85%, 19% 100%, 0 87%, 4% 20%, 17% 0);
	/* 	--path2: polygon(50% 0%, 75% 10%, 100% 0, 100% 100%, 0 100%, 0 0, 25% 10%); */
}

*,
*::after,
*::before {
	margin: 0;
	padding: 0;
	box-sizing: inherit;
}

html {
	font-size: 62.5%;
}

body {
	font-family: "Urbanist", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	color: var(--font-color);
	display: flex;
	flex-wrap: wrap;
	line-height: 1.45;
	font-size: 14px;
	box-sizing: border-box;
	background-color: var(--bg-color-secondary);
}

a {
	color: inherit;
	text-decoration: none;
}

/* ICONS / LOGOS */
.portfolio-item:nth-child(4) {
	border-radius: 3px;
	display: flex;
	margin: 0 auto;
	align-items: center;
	justify-content: space-between;
}
.portfolio-item i {
	transition: all 0.5s ease-in-out;
	padding: 1rem;
}
.portfolio-item i:hover {
	cursor: pointer;
}
.portfolio-item.small a:nth-child(1):hover {
	color: #3b5998;
}
.portfolio-item.small a:nth-child(2):hover {
	color: #e1306c;
}
.portfolio-item.small a:nth-child(3):hover {
	color: #1da1f2;
}

/* GRID normal 1st */
.content {
	padding: 0.5%;
	flex: 1 1 80%;
	min-height: 100vh;
	max-width: 1500px;
	margin: 0 auto;
	overflow: hidden;
}

.portfolio {
	display: grid;
	height: 100%;
	grid-template-rows: repeat(6, 1fr);
	grid-template-columns: repeat(5, 1fr);
	grid-gap: 15px;
}

.portfolio-item.medium {
	grid-row: span 2;
	grid-column: span 2;
}

.portfolio-item.large {
	grid-row: span 3;
	grid-column: span 3;
}

.portfolio-item.small {
	grid-row: span 1;
	grid-column: span 1;
}

.portfolio-item.tall {
	grid-row: span 3;
	grid-column: span 2;
}

.portfolio-item.wide {
	grid-row: span 2;
	grid-column: span 3;
}

/* GRID tall 2nd */
.portfolio__tall {
	display: grid;
	height: 100%;
	grid-template-rows: repeat(6, 1fr);
	grid-template-columns: repeat(6, 1fr);
	grid-gap: 15px;
}

.portfolio__tall-item {
	background-color: orange;
	color: #222;
	display: flex;
	justify-content: center;
	align-items: center;
}

.portfolio__tall-item.tall--medium {
	grid-row: span 2;
	grid-column: span 3;
}

.portfolio__tall-item.tall--small {
	grid-row: span 1;
	grid-column: span 2;
}

.portfolio__tall-item.tall--tall {
	grid-row: span 4;
	grid-column: span 2;
}

.portfolio__tall-item.tall--mid-tall {
	grid-row: span 3;
	grid-column: span 2;
}

/* GRID wide 3rd */
.portfolio__wide {
	display: grid;
	height: 100%;
	grid-template-rows: repeat(6, 1fr);
	grid-template-columns: repeat(5, 1fr);
	grid-gap: 15px;
}

.portfolio__wide-item {
	background-color: orange;
	color: #222;
	display: flex;
	justify-content: center;
	align-items: center;
}

.portfolio__wide-item.wide--medium {
	grid-row: span 2;
	grid-column: span 2;
}

.portfolio__wide-item.wide--small {
	grid-row: span 1;
	grid-column: span 1;
}

.portfolio__wide-item.wide--wide {
	grid-row: span 2;
	grid-column: span 3;
}

/* PHOTOS */
.photo {
	perspective: 150rem;
	-moz-perspective: 150rem;
	position: relative;
	height: 100%;
	opacity: 0.92;
}
.photo__side {
	height: 100%;
	transition: all 0.8s ease;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	backface-visibility: hidden;
	border-radius: 3px;
	box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.15);
	/*overflow: hidden;  to hide the overlapping image which is not rounded cornered. also cuts the bgackground blend for now. */
}
.photo__side--front {
	background-color: var(--bg-color-secondary);
}
.photo__side--back {
	transform: rotateY(180deg);
	clip-path: var(--path2);
}

/* X */
.photo__side--back-rotatex {
	transform: rotateX(180deg);
}
.photo:hover .photo__side--front-rotatex {
	transform: rotateX(-180deg);
}
.photo:hover .photo__side--back-rotatex {
	transform: rotateX(0);
}
/* Y */
.photo__side--back-rotatey {
	transform: rotateY(180deg);
}
.photo:hover .photo__side--front-rotatey {
	transform: rotateY(-180deg);
}
.photo:hover .photo__side--back-rotatey {
	transform: rotateY(0);
}
.photo__side--back-1 {
	/* background-size: cover; */
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light-transparent-light),
			var(--mono-dark-transparent-light)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-4.png");
	background-size: 100%;
	/* background-repeat: no-repeat; */
	background-blend-mode: normal;
	background-position: top center;
	/* width: 100%; */
	/* height: 100%; */
}
.photo__side--back-2 {
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light-transparent-light),
			var(--mono-dark-transparent-light)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-1.png");
	background-size: 165rem;
	/* background-repeat: no-repeat; */
	background-blend-mode: normal;
	background-position: top center;
	/* width: 100%; */
	/* height: 100%; */
}
.photo__side--back-3 {
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light-transparent-light),
			var(--mono-dark-transparent-light)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-8.png");
	background-size: 65rem;
	/* background-repeat: no-repeat; */
	background-blend-mode: normal;
	/* 	background-position: top center; */
	/* width: 100%; */
	/* height: 100%; */
}
.photo__side--back-4 {
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light-transparent-light),
			var(--mono-dark-transparent-light)
		),
		url("./images/portada.webp");
	background-size: 65rem;
	/* background-repeat: no-repeat; */
	background-blend-mode: normal;
	background-position: top;
	/* width: 100%; */
	/* height: 100%; */
}
.photo__side--back-5 {
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light-transparent-light),
			var(--mono-dark-transparent-light)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-6.png");
	background-size: 85rem;
	/* background-repeat: no-repeat; */
	background-blend-mode: normal;
	background-position: top center;
	/* width: 100%; */
	/* height: 100%; */
	clip-path: var(--path2);
}
.photo__picture {
	background-size: cover;
	background-blend-mode: screen;
	border-top-left-radius: 3px;
	border-top-right-radius: 3px;
}
.photo-picture--medium-first {
	background-position: top center;
	background-size: 55rem;
	height: 100%;
}
.photo-picture--medium {
	background-position: top center;
	background-size: 45rem;
	height: 100%;
}
.photo-picture--large {
	background-position: top center;
	background-size: 72.5rem;
	height: 100%;
}
.photo-picture--tall {
	background-position: top center;
	background-size: 42.5rem;
	height: 100%;
}
.photo-picture--wide {
	background-position: top center;
	background-size: 70rem;
	height: 100%;
}
.photo__picture--1 {
	background-image: linear-gradient(
			to right bottom,
			var(--red-light),
			var(--mono-dark)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-4.png");
	background-size: 65rem;
	/* 	background-position: top -15rem center; */
	background-position: top center;
}
.photo__picture--2 {
	background-image: linear-gradient(
			to right bottom,
			var(--mono-light),
			var(--red-dark)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-1.png");
	background-size: cover;
	background-position: top center;
}
.photo__picture--3 {
	background-image: linear-gradient(
			to right bottom,
			var(--red-light),
			var(--mono-dark)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-8.png");
	background-size: 65rem;
	background-position: top center;
}
.photo__picture--4 {
	background-image: linear-gradient(
			to right bottom,
			var(--red-light),
			var(--mono-dark)
		),
		url("./images/portada.webp");
	background-size: 65rem;
	background-position: center center;
}
.photo__picture--5 {
	background-image: linear-gradient(
			to right bottom,
			var(--red-light),
			var(--mono-dark)
		),
		url("https://assets.codepen.io/1502334/unsplash-girl-6.png");
	background-size: cover;
	background-position: top center;
}
.photo__heading {
	text-transform: uppercase;
	color: #ffffff;
	letter-spacing: 1px;
	position: absolute;
	font-weight: 300;
	font-size: 1.6rem;
}
.photo__heading--medium {
	text-align: right;
	bottom: 2rem;
	right: 2rem;
	width: 75%;
}
.photo__heading--medium-first {
	text-align: left;
	bottom: 2rem;
	left: 2rem;
	width: 75%;
}
.photo__heading--large {
	text-align: right;
	bottom: 2rem;
	right: 2rem;
	width: 75%;
}
.photo__heading--tall {
	text-align: right;
	bottom: 2rem;
	right: 2rem;
	width: 75%;
}
.photo__heading--wide {
	text-align: right;
	bottom: 2rem;
	right: 2rem;
	width: 75%;
}
.photo__heading-span {
	padding: 1rem 1.8rem;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.photo__heading-span--1 {
	background-image: linear-gradient(
		to right bottom,
		var(--mono-light-transparent-dark),
		var(--mono-dark-transparent-dark)
	);
}
.photo__heading-span--2 {
	background-image: linear-gradient(
		to right bottom,
		var(--mono-light-transparent-dark),
		var(--mono-dark-transparent-dark)
	);
}
.photo__heading-span--3 {
	background-image: linear-gradient(
		to right bottom,
		var(--mono-light-transparent-dark),
		var(--mono-dark-transparent-dark)
	);
}
.photo__heading-span--4 {
	background-image: linear-gradient(
		to right bottom,
		var(--mono-light-transparent-dark),
		var(--mono-dark-transparent-dark)
	);
}
.photo__heading-span--5 {
	background-image: linear-gradient(
		to right bottom,
		var(--mono-light-transparent-dark),
		var(--mono-dark-transparent-dark)
	);
}
.photo__details {
	padding: 3rem;
}
.photo__details ul {
	list-style: none;
	width: 80%;
	margin: 0 auto;
}
.photo__details ul li {
	text-align: center;
	font-size: 1.5rem;
	padding: 1rem;
}
.photo__details ul li:not(:last-child) {
	border-bottom: 1px solid #eee;
}
.photo__details-back ul {
	list-style: none;
	width: 80%;
	margin: 0 auto;
}
.photo__details-back ul li {
	text-align: center;
	font-size: 1.5rem;
	padding: 0.5rem;
}
.photo__details-back ul li:not(:last-child) {
	border-bottom: 1px solid #eee;
}
.photo__cta {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	text-align: center;
}

/* BUTTON */
.btn {
	padding: 1rem 2.5rem;
	font-size: 1.8rem;
	font-weight: 500;
	background: transparent;
	outline: none !important;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	display: inline-block;
	text-align: center;
	color: #ffffff;
}

.btn i {
	font-size: 1.2rem;
}

.btn--expand {
	width: 130px;
	height: 40px;
	line-height: 42px;
	padding: 0;
	border: none;
}

.btn--expand span {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
}

.btn--expand:before,
.btn--expand:after {
	position: absolute;
	content: "";
	right: 0;
	top: 0;
	background: #ffffff;
	transition: all 0.5s ease;
}

.btn--expand:before {
	height: 50%;
	width: 2px;
}

.btn--expand:after {
	width: 20%;
	height: 2px;
}

.btn--expand:hover:before {
	height: 100%;
}

.btn--expand:hover:after {
	width: 100%;
}

.btn--expand span:before,
.btn--expand span:after {
	position: absolute;
	content: "";
	left: 0;
	bottom: 0;
	background: #ffffff;
	transition: all 0.5s ease;
}

.btn--expand span:before {
	width: 2px;
	height: 50%;
}

.btn--expand span:after {
	width: 20%;
	height: 2px;
}

.btn--expand span:hover:before {
	height: 100%;
}

.btn--expand span:hover:after {
	width: 100%;
}

/* POPUP */
.popup {
	height: 100%;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 3000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s;
}
.popup i {
	font-size: 2.2rem;
}
.popup__heading {
	text-align: center;
}
.popup:target {
	opacity: 1;
	visibility: visible;
}
.popup:target .popup__content {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}
.popup__close:link,
.popup__close:visited {
	color: #eee;
	position: absolute;
	top: 2.5rem;
	right: 2.5rem;
	font-size: 3rem;
	text-decoration: none;
	display: inline-block;
	transition: all 0.2s;
	line-height: 1;
}
.popup__close:hover {
	color: var(--red-dark-transparent-dark);
}
#dark:hover {
	color: var(--font-color);
}
.popup__content {
	/* padding: .5rem; */
	/* height: 90vh; */
	width: auto;
	box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
	border-radius: 3px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: table;
	overflow: hidden;
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.5);
	transition: all 0.4s 0.2s;
}
.popup__image {
	max-height: 99vh;
	width: auto;
	/* display: table-cell; */
}
.popup__img {
	display: block;
	height: auto;
	width: 99svh;
	max-width: 99svh;
}

/* ANIMATIONS */
.animated-first {
	animation: moveInBottom 1s ease-out 0.8s;
	animation-fill-mode: backwards;
}
.animated-second {
	animation: moveInBottom 1s ease-out 1s;
	animation-fill-mode: backwards;
}
.animated-third {
	animation: moveInBottom 1s ease-out 1.2s;
	animation-fill-mode: backwards;
}
.animated-fourth {
	animation: moveInBottom 1s ease-out 1.4s;
	animation-fill-mode: backwards;
}
.animated-fifth {
	animation: moveInBottom 1s ease-out 1.6s;
	animation-fill-mode: backwards;
}
.animated-sixth {
	animation: moveInBottom 1s ease-out 2s;
	animation-fill-mode: backwards;
}
@keyframes moveInBottom {
	0% {
		opacity: 0;
		transform: translateY(100px);
	}

	75% {
		transform: translateY(-10px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}
