:root {
	--background-color: #001429;
	--background-color-hover: #002952;
	--accent-color: #EDE9E9;
	--accent-color1: #E8B321;
}

body {
	background-color: var(--background-color);
	display: flex;
	flex-direction: row;
	height: 100vh;
	margin: 0;
	overflow: hidden;
	/* width: 100%;
	max-width: 1600px;
	margin: 0 auto; */
}

* {
	box-sizing: border-box;
}

h1, h2, h3 {
	font-family: 'Fugaz One', cursive;
	font-weight: 400;
	margin: 0;
}

p, a, span {
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	line-height: 150%;
	font-weight: 400;
	color: var(--accent-color);
	margin: 0;
}

p {
	padding-bottom: 10px;
}

a {
	text-decoration: none;
	cursor: pointer;
}

a:hover {
	color: var(--accent-color1);
	text-decoration: underline;
}



#profile {
	width: calc(100% * (1/4));
	display: flex;
	flex-direction: column;
}

#profile section {
	padding: 2em;
}

#profile h1 {
	font-size: 26px;
	line-height: 25px;
	color: var(--accent-color1);
}

#profile section span {
	font-style: italic;
	color: var(--accent-color1);
}

#profile .contact-section {
	display: flex;
	flex-direction: column;
	height: 100%;
	align-items: center;
	justify-content: flex-end;
	position: relative;
}

#profile .profile-container {
	position: relative;
	width: 250px;
}

#profile .profile-image {
	overflow: hidden;
	border-radius: 50%;
	width: 150px;
	height: 150px;
	position: relative;
	left: 0px;
	bottom: 0px;
	border: 4px solid var(--background-color-hover);
	animation: switch-image-out .6s ease;
	animation-iteration-count: 1;
}

#profile .profile-image img {
	display: block;
	width: 350px;
	height: auto;
	position: relative;
	left: -115px;
	top: -40px;
}

#profile .profile-title {
	position: absolute;
	bottom: 0px;
	right: 0px;
	width: 190px;
	height: 190px;
	border-radius: 50%;
	background-color: var(--background-color-hover);
	animation: switch-title-out .6s ease;
	animation-iteration-count: 1;
}

#profile .profile-title h1 {
	text-align: center;
	line-height: 115%;
	margin-top: 45px;
}

@keyframes switch-image {

	0% { left: 0px; bottom: 0px; z-index: 1;}
	50% { left: -50px; bottom: -40px; z-index: -1;}
	100% { left: 0px; bottom: 0px; z-index: -1;}

}

@keyframes switch-image-out {

	0% { left: 0px; bottom: 0px; z-index: -1;}
	50% { left: -50px; bottom: -40px; z-index: -1;}
	100% { left: 0px; bottom: 0px; z-index: 1;}

}

@keyframes switch-title {

	0% { right: 0px; bottom: 0px; z-index: -1;}
	50% { right: -50px; bottom: 40px; z-index: 1;}
	100% { right: 0px; bottom: 0px; z-index: 1;}

}

@keyframes switch-title-out {

	0% { right: 0px; bottom: 0px; z-index: 1;}
	50% { right: -50px; bottom: 40px; z-index: 1;}
	100% { right: 0px; bottom: 0px; z-index: -1;}

}

#profile .profile-container:hover .profile-image {
	animation: switch-image .4s ease;
	animation-iteration-count: 1;
	animation-fill-mode: forwards;
}

#profile .profile-container:hover .profile-title {
	animation: switch-title .4s ease;
	animation-iteration-count: 1;
	animation-fill-mode: forwards;
}

.contact-section .icons {
	display: flex;
	width: 80%;
	justify-content: center;
	padding-top: 2em;
}

.contact-section .icons a {
	width: 100%;
	text-align: center;
	font-size: 18px;
	border-right: 2px solid var(--background-color-hover);
	padding: 6px 0;
	transition: all .3s ease;
}

.contact-section .icons i {
	padding-top: 6px;
	
}

.contact-section .icons a:first-child {
	border-top-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

.contact-section .icons a:last-child {
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
}

.contact-section .icons a:last-child {
	border-right: none;
}

.contact-section .icons a:hover {
	background-color: var(--background-color-hover);
}


#portfolio {
	width: calc(100% * (3/4));
	padding: 1em;
}

#portfolio section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2em;
	background-color: var(--accent-color);
	width: 100%;
	height: 100%;
	border-radius: 6px;
	padding: 2em;
	overflow-y: scroll;
	scrollbar-width: none;
}

#portfolio section::-webkit-scrollbar {
	display: none;
}

.projects {
	border-bottom: thin solid var(--background-color-hover);
	margin-bottom: 2em;
	padding-bottom: 2em;
	width: 100%;
	display: flex;
	flex-direction: column;
}

.projects h1 {
	color: var(--background-color-hover);
}

.projects p {
	font-size: 16px;
	color: var(--background-color);
	margin-bottom: 2em;
}

.projects > div:first-child {
	width: 100%;
	height: 30vh;
	margin-bottom: 1em;
	box-shadow: rgba(99, 99, 99, 0.1) 0px 2px 8px 0px;
}

.project1 > div:first-child {
	background-image: url(../img/covers/futura.png);
	background-size: 130%;
	background-position: left;
	background-repeat: no-repeat;
}

.project2 > div:first-child {
	background-image: url(../img/covers/publications.png);
	background-size: 120%;
	background-position: center;
	background-repeat: no-repeat;
}

.project3 > div:first-child {
	background-image: url(../img/covers/webdesign.png);
	background-size: 100%;
	background-position: center;
	background-repeat: no-repeat;
}

.project4 > div:first-child {
	background-image: url(../img/covers/orrery.png);
	background-size: 100%;
	background-position: bottom;
	background-repeat: no-repeat;
}

.projects .skills {
	margin-bottom: 1em;
}

.projects .skill-tags {
	display: inline-block;
		font-size: 12px;
		color: var(--background-color-hover);
		margin-top: 1em;
		margin-right: .5em;
		padding: .35em 1.25em;
		border: 1px solid var(--background-color-hover);
		border-radius: 1em;
}

.projects .button-container {
	display: flex;
	align-items: flex-end;
	flex-grow: 1;
}

.projects .button {
	display: inline-block;
	font-family: 'Roboto', sans-serif;
	padding: .5em 1.5em .5em 3.5em;
	border: thin solid var(--background-color);
	border-radius: 4px;
	font-size: 16px;
	color: var(--background-color);
	z-index: 1;
	position: relative;
	overflow: hidden;
	transition: all .3s ease;
	background-color: var(--accent-color);
}

.projects .button:hover {
	color: var(--accent-color);
	padding: .5em 3.5em .5em 1.5em;
}

.projects .button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -140px;
	width: 180px;
	height: 100%;
	background-color: var(--background-color-hover);
	z-index: -1;
	transition: left .3s ease;
}

.projects .button:hover::before {
	left: 0px;
}

.projects .button i {
	position: absolute;
	left: 12px;
	top: 10px;
	color: var(--accent-color);
	font-size: 16px;
	transition: all .3s ease;
}

.projects .button:hover i {
	left: 140px;
	color: var(--accent-color);
}


/* Responsive */

@media screen and (max-width: 1150px) {

	body {
		display: flex;
		flex-direction: column;
		height: auto;
		margin: 0;
		overflow: auto;
		scrollbar-width: none;
	}

	body::-webkit-scrollbar {
		display: none;
	}
		
	#profile {
		width: 60%;
		display: flex;
		flex-direction: row;
		align-self: center;
	}

	.contact-section .icons {
		width: 100%;
	}

	#portfolio {
		width: 100%;
		padding: 1em;
	}

	#profile .profile-container {
		padding-top: 2em;
	}

}

@media screen and (max-width: 1000px) {

	#profile {
		width: 90%;
	}

}

@media screen and (max-width: 800px) {

	#profile {
		width: 100%;
		flex-direction: column;
	}

	#profile section:first-child {
		padding-bottom: 0;
	}

	#profile .contact-section {
		padding-top: 1em;
	}

	#profile .profile-container {
		margin-top: 1em;
		order: 3;
	}

	#profile .profile-image {
		top: 0;
	}

	#profile .profile-title {
		top: 0;
	}

	.contact-section .icons {
		padding-top: 0;
		order: 1;
		width: 100%;
	}

	#portfolio section {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0em;
	}

	#portfolio .projects:last-child {
		margin-bottom: 0;
		border: none;
		padding-bottom: 0;
	}

	.project4 > div:first-child {
		background-position: center;
	}

}

@media screen and (min-width: 800px) {

	#portfolio section .projects:nth-last-child(-n + 2) {
		border-bottom: none;
		margin-bottom: 0;
		padding-bottom: 0;
	}

}