html,
body {
	margin: 0;
	padding: 0;
	background-color: black;
}

html {
	font-size: 14px;
	font-family: -apple-system, "Helvetica", sans-serif;
}

body {
	position: relative;
	overflow-y: auto;
}

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


::-webkit-scrollbar {
    width: 20px;
    background-color: transparent;
}

::-webkit-scrollbar-track {
	background-color: transparent;
}

::-webkit-scrollbar-thumb {
    height: 6px;
    border: 4px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
    border-radius: 10px;
    background-image: linear-gradient(to bottom, rgba(105, 45, 216, .5) -50%, rgba(186, 54, 98, .5) 200%);
}

::-webkit-scrollbar-button {
    width: 0;
    height: 0;
    display: none;
}

::-webkit-scrollbar-corner {
    background-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	padding: 0;
	font-weight: normal;
}

#under-construction {
	display: none;
	height: 3rem;
	font-weight: bold;
	--display: flex;
	justify-content: center;
	align-items: center;
	text-transform: uppercase;
	position: fixed;
	background-color: yellow;
	z-index: 99;
	width: 30rem;
    right: 4rem;
    top: 4rem;
    transform: translateX(50%) rotate(45deg);
	box-shadow: rgba(0, 0, 0, .37) 0 0 20px,
				inset rgba(0, 0, 0, .37) 0 0 1rem;
}

.page {
	width: 100%;
	position: relative;
}

.page .page-title {
/*	font-size: 3rem;
    
    margin: 4rem 0 0 4rem;*/
    font-weight: bold;
    color: white;
    font-size: 2rem;
    margin: 4rem 0 3rem 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.page .content {
	flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

#pages {
	position: relative;
}


/*** MAIN PAGE ***/

#page-main #language {
	top: 0.5rem;
	right: 1rem;
	font-size: 1.2rem;
	color: rgba(255, 255, 255, .9);
	font-weight: bold;
	position: absolute;
	border-bottom: dashed 1px rgba(255, 255, 255, .5);
	padding: 0.4rem 0;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
}

#page-main {
	display: flex;
	flex-direction: column;
	justify-content: center;
	--background: radial-gradient(farthest-corner at 0 25%, #692dd8 30%, black 120%);
	height: 100vh;
}

#page-main .main-content {
	flex-direction: column;
	display: inline-flex;
	position: relative;
	top: -3rem;
	margin-left: 10vw;
}

#page-main #arrow {
	/* Safari workaround */
	font-size: 1rem;
	right: 1rem;
	bottom: 0rem;
	position: absolute;
	width: 8rem;
	height: 8rem;
	animation: ease-out arrow 3s infinite;
	cursor: pointer;
	--distance: -25vh;
	will-change: transform;
}

/*@keyframes arrow {
	0% {
		transform: translateY(-2em);
	}

	60% {
		transform: translateY(-2em);
	}

	70% {
		transform: translateY(0px);
	}

	100% {
		transform: translateY(-2em);
	}
}*/

@keyframes arrow {
	0% {
		transform: translateY(var(--distance));
		opacity: 0;
	}

	45% {
		transform: translateY(var(--distance));
		opacity: 0;
	}

	49% {
		opacity: 1;
	}

	70% {
		transform: translateY(0px);
		opacity: 0;
	}

	100% {
		transform: translateY(var(--distance));
		opacity: 0;
	}
}

#page-main .main-content .photo {
	width: 15rem;
	height: 15rem;
	border-radius: 50%;
	background-color: #202020;
	background-image: url(../images/profile-picture.jpg);
	background-position: center;
	background-size: contain;
	box-shadow: rgba(0, 0, 0, .18) 0 0 4px;
	will-change: transform, border-radius, box-shadow;

	animation-name: photoin;
	animation-duration: 2s;
	animation-fill-mode: forwards;
	animation-play-state: paused;
}


#page-main .main-content .title {
	color: rgba(255, 255, 255, .87);
	font-size: 4rem;
	margin-top: 1rem;
	text-shadow: rgba(0, 0, 0, .18) 0 0 4px;
	font-weight: 600;
}

#page-main .main-content .subtitle {
	color: rgba(255, 255, 255, .5);
	font-weight: bold;
	margin-top: 0.2rem;
	font-size: 1.4rem;
	font-weight: 300;
}



/*** ABOUT PAGE ***/

#page-about {
	--background-color: white;
	display: flex;
	flex-direction: column;
	padding: 3rem 0 3rem 0;
}

#page-about .content {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

/*.about-container {
	background-color: white;
    width: 23rem;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 0.6rem 0.6rem #ffffff40;
    position: relative;
    --top: -5rem;
    margin-left: 10vw;
    color: black;
}*/

.about-container {
	width: 80vw;
	max-width: 900px;
	--height: 50vh;
	background-color: white;
	display: grid;
	overflow: hidden;
	border-radius: 0.7rem;
	box-shadow: rgba(0, 0, 0, .18) 0 5px 10px;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	grid-template-columns: auto 40%;
	grid-template-rows: 50% 50%;
}

.about-title {
	font-weight: bold;
    font-size: 3rem;
}

.about-text {
	font-size: 1.2rem;
    margin: 1rem 0;
}


.about-container > div {
	background-color: white;
	color: black;
	--item-height: 5rem;
	border: solid 1px #eaeaea;
}

#page-about .degrees {
	grid-column: 2;
	grid-row: 2;
	border-left: none;
	border-right: none;
	border-bottom: none;
	overflow: hidden;
}

#page-about .jobs {
	grid-column: 2;
	grid-row: 1;
	border: none;
	overflow: hidden;
}

#page-about .about {
	grid-column: 1;
	grid-row-start: 1;
	grid-row-end: row2-end;
	border-top: none;
	border-left: none;
	border-bottom: none;
	display: flex;
    flex-direction: column;
}

#page-about .about .text {
	padding: 0 0.5rem 1rem 1rem;
	flex: 1;
    --overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#page-about .about .text p {
	margin: 0 0 1rem 0;
	padding: 0;
	line-height: 1.7rem;
	font-size: 1rem;
}


.about-container > div > .title {
	font-size: 1.6rem;
	font-weight: bold;
	padding: 1.2rem 0.5rem 1rem 1rem;
}

#page-about .row {
	display: flex;
	height: var(--item-height);
	position: relative;
}

#page-about .row:after {
	content: '';
	display: block;
	position: absolute;
	width: 70%;
	margin-left: 15%;
	height: 1px;
	top: var(--item-height);
	background-color: #eaeaea;
}

#page-about .row:last-child:after {
	display: none;
}

#page-about .row .icon {
	width: var(--item-height);
	height: var(--item-height);
	background-size: 60%;
	background-repeat: no-repeat;
	background-position: center;
}

#page-about .row .info {
	flex: 1;
	padding: 1rem 1rem 1rem 0.25rem;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
}

#page-about .row .info-2 {
	display: flex;
	flex-direction: row;
	margin-top: 0.2rem;
}

#page-about .row .institution,
#page-about .row .years {
	font-size: 0.9rem;
	color: #888;
	display: inline-block;
}


#page-about .row .institution:after {
	content: '∙';
	display: inline-block;
	margin: 0 0.4rem;
}

#page-about .row .title {
	font-weight: bold;
}



/*** PROJECTS PAGE ***/

#page-projects {
    display: flex;
    flex-direction: column;

    --card-max-width: 750px;
}

#page-projects .cards {	
	/* Workaround for "Content wider than screen" */
    overflow-x: hidden;
    display: none;

    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
    --margin-center: 15%;
    --margin: 5vw;
}

#page-projects .cards.show {
	display: flex;
	overflow-x: scroll;
}

#page-projects .card {
	width: 70%;
	height: 50vh;
	background-color: white;
	display: flex;
	overflow: hidden;
	border-radius: 0.7rem;
	box-shadow: rgba(0, 0, 0, .18) 0 5px 10px;
	max-width: var(--card-max-width);
	flex: 0 0 auto;
	margin: 0 var(--margin) 0 0;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
}

#page-projects .card:first-child {
	margin: 0 var(--margin) 0 var(--margin-center);
}

#page-projects .card:last-child {
	margin: 0;
}

#page-projects .cards:last-child::after {
  content: "";
  flex: 0 0 var(--margin-center);
}

@media screen and (min-width: 975px) {
	#page-projects .cards {
		--margin-center: calc((100vw - var(--card-max-width)) / 2);
	}
}

/*#page-projects .card:nth-child(2) {
	margin-left: -5rem;
}*/

#page-projects .cards::-webkit-scrollbar-track
{
    background-color: transparent;
}

#page-projects .cards::-webkit-scrollbar
{
    width: 0.4rem;
    background-color: transparent;
}

#page-projects .cards::-webkit-scrollbar-thumb
{
    border-radius: 10px;
    background-color: rgba(0, 0, 0, .18);
    background-image: none;
}


#page-projects .card-content {
	flex: 5;
	display: flex;
	flex-direction: column;
	color: black;
	padding: 2rem 1rem 2rem 1.5rem;
}

#page-projects .card .title {
	font-size: 2rem;
	margin-bottom: 2.5rem;
	font-weight: bold;
}

#page-projects .card .text {
	flex: 1;
    font-size: 1.2rem;
    line-height: 1.9rem;
    overflow-y: auto;
}

#page-projects .card .image {
	flex: 4;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	border-right: solid 1px #f0f0f0;
	border-bottom: solid 0px #f0f0f0;
}

#page-projects .card .links {
    padding-top: 0.5rem;
}

#page-projects .card .links a {
	font-size: 1rem;
	font-weight: bold;
	text-decoration: none;
	color: #682CD6;
	border-bottom: dashed 1px #682CD6;
	display: inline-block;
	margin-right: 1rem;
	padding-bottom: 0.3rem;
}


/*** CONTACT PAGE ***/

#page-contact {
	display: flex;
	flex-direction: column;
	height: 100vh;
}

#page-contact .content {
    flex-direction: column;
    padding: 0 5vw;
    text-align: center;
    line-height: 1.5rem;
}

#page-contact .content .title {
    font-weight: bold;
    font-size: 1.5rem;
}

#page-contact .content .text {
	font-size: 1rem;
	margin-top: 1rem;
}

#page-contact .content .text a,
#page-contact .content .text .mail {
	text-decoration: none;
	background: linear-gradient(to right, #ff8a00, #da1b60);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-weight: bold;
}

/*** BACKGROUNDS ***/
#backgrounds-container {
    position: absolute;
    top: 0;
    left: 0;
    /* background-color: red; */
    width: 100%;
    height: 100%;
}

#backgrounds-container .background {
    width: 100%;
    height: 100%;
    position: absolute;
    will-change: opacity;
    opacity: 0;
}

#background-page-main {
	--background: radial-gradient(100vmax at 0 0, rgb(105, 45, 216) 30%, transparent 110%);
}

#background-page-about {
	--background: radial-gradient(100vh at 0 150vh, rgb(255, 28, 114), transparent);
}

#background-page-projects {
	--background: radial-gradient(100vmax at 100vw 300vh, rgb(186, 54, 98) 30%, transparent 120%),
				radial-gradient(150vmax at 0 200vh, rgb(105, 45, 216) 30%, transparent 120%);
}

#background-page-contact {
	--background: radial-gradient(100vmax at 100vw 300vh, rgba(186, 54, 98, 0.75) 30%, transparent 120%);
}


@media screen and (max-height: 800px) {
	/*html {
		font-size: 1.75vh;
	}*/
}

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

	/*** MAIN PAGE ***/

	#page-main .main-content {
		margin-left: 0;
		align-items: center;
	}

	#page-main .main-content .title {
		margin-top: 3rem;
		font-size: 3rem;
	}

	#page-main .main-content .subtitle {
		text-align: center;
		font-size: 1rem;
	}

	#page-main #arrow {
		width: 6rem;
		height: 6rem;
	}


	/*** ABOUT PAGE ***/

	#page-about .content {
		justify-content: center;
	}

	#page-about .about-container {
		width: 90vw;
		height: auto;
		max-height: 90%;
		display: flex;
		flex-direction: column;
		padding: 1rem 0;
	}

	#page-about .about-container > div {
		border: solid 1px #f0f0f0;
		border-right: none;
		border-left: none;
		border-bottom: none;
	}

	#page-about .about-container > div:first-child {
		border: none;
	}




	/*** PROJECTS PAGE ***/

	#page-projects .card {
		flex-direction: column;
		height: 70vh;
	}

	#page-projects .card-content {
		padding: 1rem 0.5rem 1rem 1rem;
	}

	#page-projects .card .title {
		font-size: 1.6rem;
		margin-bottom: .5rem;
	}

	#page-projects .card .text {
		font-size: 1rem;
		line-height: 1.6rem;
	}

	#page-projects .card .image {
		border-right-width: 0;
		border-bottom-width: 1px;
	}


}
