.header-artificial-space {
	min-height: 52px;
}

header {
	position: fixed;
	display: grid;
	grid-template-areas: "logo title nav user";
	grid-template-rows: 52px;
	grid-template-columns: 78px 250px 1fr 1fr;
	align-items: center;
	text-align: center;
	box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28);
	top: 0;
	width: 100%;
	z-index: 1000;
	background-image: url("/static/images/hexagon.jpg");
	background-color: #E6E6E6;
	background-position-x: 100vw;
}

header h1 {
	grid-area: title;
	text-align:left;
	font-weight: normal;
	font-size: 28px;
	font-family: 'Whitney SC 6r';
	color: #ddd;
	white-space:nowrap;
}

nav {
	margin-left: calc(46vw - 460px);
	grid-area: nav;
	display: flex;
	justify-content: center;
	align-items: center;
	align-content: center;
	height: 46px;
}

nav > a {
	white-space:nowrap;
	transition: text-shadow 0.4s ease-in;
	text-shadow: 0 0 1px rgba(200, 200, 200, 0.2);
	margin: 0 2px;
	color: #ccc;
	text-decoration: none;
	padding: 5px 10px;
	font-family: 'Whitney Regular';
}

nav > a:visited, nav > a.visited {
	color: hsla(200, 18%, 60%, 1);
}

nav > a:focus, nav > a.focus {
	color: #eee;
}

nav > a:hover, nav > a.selected {
	border: 1px solid;
	border-top: none;
	border-right: none;
	border-left: none;
	text-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
	padding-bottom: 4px;
	cursor: pointer;
	color: #ddd;
}

nav > a.selected {
	cursor: default;
}

header .user-icons {
	grid-area: user;
	text-align: right;
	color: #ccc;
}

header .user-icons .icon {
	font: normal normal normal 48px/1 'Material Icons';
	margin: 2px 20px 2px 0;
	cursor: pointer;
	font-style: normal;
}

header .username-wrapper {
	color: #333;
	flex-grow: 1;
	height: 26px;
}

header .username {
	margin-left: 10px;
	display: inline-block;
	max-width: 16px;
	overflow: hidden;
	padding: 5px 4px 5px 12px;
	border-radius: 4px;
	border-top-right-radius: 0px;
	border-bottom-right-radius: 0px;
	font-family: 'Whitney SC 6r';
	font-size: 14px;
	transition: max-width 0.4s, 0.5s padding;
	background-color: #ccc;
	white-space: nowrap !important;
	margin-right: -10px;
}

.user-hover:hover .username {
	padding: 5px 8px 5px 8px;
	white-space: nowrap;
	max-height: 26px;
	/* line-height: 26px; */
	max-width: 130px;
	transition: 0.7s max-width, 0.4s padding ease-in-out;
}


header .popup-wrapper {
	height: 0;
	flex-basis: 100%;
	text-align: left;
	transition: opacity 1s ease-in-out;
}

header .popup-wrapper .popup {
	background-image: url("/static/images/hexagon.jpg");
	transition: max-height 0.3s cubic-bezier(0.8, 0.03, 0.2, 0.99);
	background-position-x: -199px;
	background-position-y: -52px;
	box-shadow: -2px 4px 4px rgba(0,0,0,.08), -2px 4px 8px rgba(0,0,0,.2);
	border-bottom-left-radius: 9px;
	height: 50vw;
	font-family: 'Whitney Regular';
	text-align: center;
	max-height: 0;
}

.width-limitter .popup-content {
	opacity: 0;
	transition: opacity 0.5s ease-out;
}
.user-hover:hover .popup-content {
	opacity: 1;
}
.popup-content a {
	color: #DDD;
}
.width-limitter {
	max-width: 200px;
	display: flex;
	justify-content: right;
	flex-wrap: wrap;
	align-items: center;
	margin-left: auto;
}

.user-hover:hover .popup {
	max-height: 26px;
}

.logo {
	color: #ddd;
	grid-area: logo;
	font: normal normal normal 48px/1 'Material Icons';
}

.logo .icon span {
	margin-right:-48px;
	filter:blur(0.5px);
}
.logo .icon span:nth-child(2) {
	filter: blur(3px);
	color: black;
	text-shadow: 0px 0px 3px black;
}
.logo .icon span:nth-child(3) {
	margin-right:0;filter:blur(0px);
}

@media screen and (max-width: 850px) {
	header {
		grid-template-areas: "logo title title null" "logo nav nav user";
		grid-template-columns: 1fr 1fr 1fr auto;
		grid-template-rows: 52px 1fr;
	}
	header > .logo {
		font-size: 64px;
	}
	header .icon > span:nth-child(1), header  .icon > span:nth-child(2) {
		margin-right: -64px;
	}
	header > h1 {
		text-align: center;
	}
	header > nav {
		margin-left: 0;
	}
	header .popup-wrapper .popup {
		background-position-y: -104px;
	}
	.user-hover .username {
		padding: 5px 8px 5px 8px;
		max-width: 130px;
		transition: 0.7s max-width, 0.4s padding ease-in-out;
	}
	header .popup-wrapper {
		display: none;
	}
	header .user-icons .icon {
		margin-top: 0;
		margin-bottom: 0;
	}
	.header-artificial-space {
		min-height: 100px;
	}
	body > .wrapper {
		min-height: calc(100vh - 100px);
	}
}

@media screen and (max-width: 570px) {
	header {
		position: inherit;
		grid-template-areas: "logo user" "nav nav";
		grid-template-columns: 1fr auto;
		grid-template-rows: 72px 46px;
	}
	header > h1 {
		display: none;
	}
	header .popup-wrapper .popup {
		background-position-y: -54px;
	}
	.header-artificial-space {
		display: none;
	}
	body > .wrapper {
		display: flex;
		min-height: auto;
		padding: 0;
		align-items: flex-start;
		/* min-height: calc(100vh - 118px); */
	}
}