/* Fonts */

@font-face {
    font-family: "Computer Modern";
    src: url('../webfonts/Computer_Modern/cmunrm.ttf') format('truetype');
}

@font-face {
    font-family: "Ledger";
    src: url('../webfonts/Ledger/Ledger-Regular.ttf') format('truetype');
}

@font-face {
    font-family: "Crimson Text";
    src: url('../webfonts/Crimson_Text/CrimsonText-BoldItalic.ttf') format('truetype');
	font-weight: 700;
	font-style: italic;
}

@font-face {
    font-family: "Crimson Text";
	src: url('../webfonts/Crimson_Text/CrimsonText-Italic.ttf') format('truetype');
	font-weight: 400;
	font-style: italic;
}

@font-face {
    font-family: "Crimson Text";
    src: url('../webfonts/Crimson_Text/CrimsonText-SemiBold.ttf') format('truetype');
    font-weight: 600;
}


/* Card */

.card {
	background-size: cover;
	position: relative;
	height: 100%;
}

.card__title {
	font-size: 1.6vw;
	line-height: 1.2;
	padding: 2% 6%;
	position: relative;
}

.card__title p{
	position: relative;
	display: block;
	color: #FFFFFF;
    text-shadow: 2px 2px 2px #000000;
	margin: 0;
	padding:0;
}

.card__subtitle {
	font-style: italic;
	word-spacing: 1px;
	font-weight: 500;
	font-size: .75em;
	line-height: 1;
	padding: 2% 6%;
	color: #FFFFFF;
	text-shadow: 2px 2px 2px #000000;
	visibility: hidden;
}

.card__tags {
	font-size: 1vw;
    font-weight: 900;
	line-height: 1.5;
	text-align: right;
	color: #f5f5f5;
}

a:hover .card div {
	visibility: visible;
}

.card__tags div {
    padding: 0.2em 1em;
    background-color: #00000080;
    display: inline-block;
    margin-left: 5px;
}

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

	div.sidebar {
		display: flex;
	}

	div.sidebar_mobile{
		display: none;
	}

	.header {
		padding: 3em 10% 4em;
	}

	.header h1 {
		font-size: 2.4em;
	}

	.header span {
		font-size: 1em;
	}

	.container {
		margin-left: 20%;
		position: relative;
		float: left;
		width: 80%;
	}

	.wrapper {
		grid-template-columns: 1fr 1fr 1fr;
		grid-gap: 15% 5%;
	}

}

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

	div.sidebar {
		display: none;
	}

	div.sidebar_mobile{
		display: flex;
	}

	.header {
		padding: 0 10% 2em;
	}

	.header h1 {
		font-size: 9.0vw;
	}

	.header span {
		font-size: 5vw;
	}

	.container {
		margin-left: 0%;
		position: relative;
		width: 100%;
	}

	.wrapper {
		grid-template-columns: 1fr;
		grid-gap: 2% 0;
	}
}


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

.clearfix:before,
.clearfix:after {
	content: '';
	display: table;
}

.clearfix:after {
	clear: both;
}

body {
	font-family: 'Ledger', serif;
	line-height: 1.5;
	color: #3b393d;
	background: #f0f0f0;
	background-size: cover;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow: auto;
}

body.body--hidden {
	overflow: hidden;
}

body.body--hidden .header, body.body--hidden .sidebar {
	opacity: 0;
}

.header{
	-webkit-transition: opacity 300ms ease-in-out;
	transition: opacity 300ms ease-in-out;
	text-align: center;
}

a {
	text-decoration: none;
	outline: none;
}

a:hover,
a:focus {
	color: #3b393d;
}

h1 {
	font-family: 'Crimson Text', serif;
	font-weight: 600;
}

h2, h3, h4, h5, h6 {
	font-family: 'Ledger', serif;
	font-weight: 400;
}

.body {
	background: #acaad1;
}

/* Header */

.header h1 {
	font-weight: 600;
	line-height: 1.2;
	margin: .5em;
	color:#3b393d;
	display: inline-block;
	text-align: center;
	width: max-content;
}

.header span {
	font-size: 1em;
	display: contents;
	color: #4f4c4c;
}

.header img {
	display: inline-block;
    width: 0.9em;
}

/* Sidebar */

div.sidebar {
	position: fixed;
	top: 0px;
	left: 0px;
	bottom: 0px;
	width: 20%;
	flex-direction: column;
	align-items: stretch;
	background-color: #333333;
}

div.sidebar *{
	color: #FFFFFF;
}

div.sidebar nav.top {
	flex-shrink: 0;
	flex-grow: 0;
}

div.sidebar nav.links {
	padding-bottom: 10%;
	margin: 1em 0 0;
	text-align: center;
}

div.sidebar nav.links div {
	display: inline;
	margin: 0 auto;
	text-align: left;
}

div.sidebar nav.links a {
	display: inline-block;
	margin: 0.5vw;
	font-size: 0.8vw;
}

div.sidebar nav.middle {
	flex-shrink: 0;
	flex-grow: 0;
	padding: 5%;
	border-top: solid 2px #FFFFFF;
}

div.sidebar nav.categories {
	flex-shrink: 1;
	flex-grow: 1;
	width: -webkit-fill-available;
	margin: 0 5%;
    padding: 1% 0;
    overflow-y: auto;
    bottom: 0;
}

div.sidebar nav.bottom {
	flex-shrink: 0;
	flex-grow: 0;
    height: 5%;
}

nav.middle h2 {
	font-size: 2.0vw;
	padding-top: 5% 0;
	margin: 0;
	text-align: center;
}

nav.categories ul {
	list-style-type: none;
	font-size: 1.4vw;
	font-weight: 400;
	width: 100%;
	margin: 0;
	padding: 5% 0;
}

nav.categories li {
	display: block;
	text-align: left;
}

nav.categories li a {
	padding-left: 0.5em;
    display: block;
}

nav.categories li a:hover {
	background-color: #606060;
}

img#profile_photo {
    width: 30%;
    height: auto;
    border-radius: 50%;
}

#button-cv .cv-active {
	color: #AA3939;
}

#button-cv span {
	font-size: 1.0em;
	padding: 0;
	margin: 0;
}

h4#name {
	font-family: 'Ledger';
	font-size: 1.6vw;
	font-weight: 400;
	text-align: center;
	margin: 5% 0 0;
}

h6#description {
	margin: 0;
	padding: 1em;
    font-size: 1.0vw;
	font-weight: 100;
	font-family: 'Crimson Text';
	font-style: italic;
    line-height: 1.3;
    text-align: center;
}

/* Sidebar Mobile */

div.sidebar_mobile {
	align-items: stretch;
	justify-content: space-evenly;
	background-color: #333333;
}

div.sidebar_mobile *{
	color: #FFFFFF;
}

div.sidebar_mobile a {
	display: inline-block;
	margin: 0.5vw;
	font-size: 3vw;
}

/* Content */
embed#cv {
	padding-left: 20%;
	width: 100%;
	height: -webkit-fill-available;
	display: none;
}

/* Top Navigation Style */

/* cards wrapper and close btn */

.content {
    padding: 2%;
}

.wrapper {
	width: 95%;
	margin: 0 auto;
	display: grid;
	grid-auto-rows: 12em;
}

/* PATTERN */

.pattern {
	position: fixed;
	z-index: -1;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: no-repeat center center / cover;
}

.pattern--hidden {
	visibility: hidden;
	opacity: 0;
}

.pattern--hidden .polygon {
	transition-duration: 0ms;
}

.pattern svg {
	width: 100%;
	height: 100%;
}

.polygon {
	transition: -webkit-transform 300ms ease-in-out, opacity 300ms ease-in-out;
	transition: transform 300ms ease-in-out, opacity 300ms ease-in-out;
	-webkit-transform: scale(1);
	transform: scale(1);
	-webkit-transform-origin: center bottom;
	transform-origin: center bottom;
}

.polygon--hidden {
	opacity: 0;
	-webkit-transform: scale(0);
	transform: scale(0);
}
/* disable scale on firefox */

.ff .polygon {
	-webkit-transform: scale(1)!important;
	transform: scale(1)!important;
}
