/********  VERY BASICS  *******/

::-moz-selection {background: #b3d4fc;}
		 ::selection {background: #b3d4fc;}

@font-face {
		font-family: 'XCharterOTF';
		src: url('fonts/Charter-Regular.woff') format('woff');
		font-weight: normal;
		font-style: normal;
}
@font-face {
		font-family: 'XCharterOTF';
		src: url('fonts/Charter-Bold.woff') format('woff');
		font-weight: bold;
		font-style: normal;
}
@font-face {
		font-family: 'XCharterOTF';
		src: url('fonts/Charter-Italic.woff') format('woff');
		font-weight: normal;
		font-style: italic;
}
@font-face {
		font-family: 'XCharterOTF';
		src: url('fonts/Charter-BoldItalic.woff') format('woff');
		font-weight: bold;
		font-style: italic;
}

html {
	box-sizing: border-box;
}
* {
	box-sizing: inherit;
}
body {
	font-family: XCharterOTF;
	font-size: 12pt;
	color: rgb(66,66,66);
	background-color: rgb(66,66,66);
}
a {
	text-decoration: none;
	color: rgb(99,99,99);
}
hr {
	border: none;
	border-top: 1px solid rgb(200,200,200);
}
h2 {
  margin-bottom: 1.5em;
}
small {
	font-size: 70%;
	line-height: normal;
	display: block;
	margin: .3em;
}

/********  FRAMING  *******/

header {
	background-color: rgb(245,245,245);
	overflow: auto;
}
#head-pre {
	display: none;
	visibility: hidden;
}
#head-left-post {
	overflow-x: hidden;
	white-space: nowrap;
}
#head-left-post * {
	display: inline-block;
	vertical-align: top;
}
#head-pre h1, #head-left-post h1 {
	margin-top: .7em;
	margin-right: .6em;
	margin-bottom: .9em;
	margin-left: 1.3em;
	font-size: 200%;
	color: rgb(66,66,66);
}
#head-left-post aside.unicode {
	font-family: Helvetica, sans-serif, Symbola; /* Removing Symbola gives me some differences, sadly some height/spacing issues, too :/ */
	letter-spacing: 0.2em;
	font-size: 90%;
	color: rgb(220,220,220);
	margin-top: 2.5em;
	width: 1000em;
	-webkit-user-select: none; /* Chrome/Safari */        
	-moz-user-select: none; /* Firefox */
	-ms-user-select: none; /* IE10+ */
	-o-user-select: none; /* not implemented in browsers yet */
	user-select: none; /* not implemented in browsers yet */
}
nav {
	float: right;
	font-size: 110%;
	padding: 1em 2em;
	line-height: 3em;
}
nav a {
	margin: 0 1em;
	white-space: nowrap;
	font-weight: bold;
	color: rgb(66,66,66);
}
nav a.currentpage {
	border-bottom: .15em solid rgb(200,200,200);
	padding-bottom: .3em;
}
nav a.currentpage-semi {
	border-bottom: .15em dashed rgb(200,200,200);
	padding-bottom: .3em;
}

footer {
	padding: 1.5em 2em;
	color: rgb(158,158,158);
	overflow: auto;
	font-size: 80%;
}
footer div, footer a {
	display: inline-block;
	color: inherit;
	text-decoration: none;
	font-weight: normal;
	font-family: Helvetica, Arial, sans-serif;
	line-height: 1.5em;
}
footer a.currentpage {
	border-bottom: .15em solid rgb(128,128,128);
	padding-bottom: .3em;
}

/********  CONTENT  *******/

main {
	background-color: rgb(250,250,250);
	overflow: auto;
	min-height: calc(100vh - 8.5em - 2em);
}
article, section {
	max-width: 50em;
	width: calc(100% - 16px);
	margin: 2em auto;
	padding-top:    3em;
	padding-left:   4em;
	padding-right:  4em;
	padding-bottom: 3.5em;
	border-radius: 2px;
	box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
	background-color: rgb(255,255,255);
	font-family: XCharterOTF;
	line-height: 1.5em;
}
section.slimsection {
	padding-top: 1em;
	padding-bottom: 1em;
}

img#avatarpic {
	height: 12em;
	margin-right: 3em;
	margin-top: 1em;
	margin-bottom: 1em;
	float: left;
}

span.cv-timeframe {
	float: right;
	font-style: italic;
	color: rgb(99,99,99);
}

span.blogpostdate {
	font-style: italic;
	color: rgb(158,158,158);
	float: right;
}
span.blogpostdate.unfloat {
	float: none;
}

h2.blogposthead {
	display: inline;
}

td.td-row {
	font-weight: bold;
	padding-right: 1em;
	vertical-align: top;
}

img.fullwidthimg {
	width: 100%;
}

.inlineblock_children {
	text-align: center;
}
.inlineblock_children > * {
	display: inline-block;
	vertical-align: middle;
}

article svg, article img {
	display: block;
	margin: 1.5em auto;
	max-width: 100%;
}

article svg text {
	text-anchor: middle;
	fill: rgb(66,66,66);
	font-size: 1px;
}
article svg line, article svg rect {
	stroke-width: .05px;
}
article svg line {
	stroke: rgb(66,66,66);
}

article p > a {
	text-decoration: underline;
}
.postag {
	font-weight: bold;
}
.tinyhead {
	font-style: italic;
	font-size: 90%;
	display: block;
	margin-top: -1em;
	margin-bottom: -0.2em;
	margin-left: -1.2em;
	color: rgb(128,128,128);
}
.tinyhead > img {
	display: inline;
	height: 1em;
	width: 1em;
	margin-bottom: -.15em;
}

article table {
	margin-left: auto;
	margin-right: auto;
}

ul.paperlist li {
	margin-bottom: 1.5em;
}

.eqnumber {
	padding-left: 2em;
	font-style: italic;
	color: rgb(128,128,128);
}

pre {
	font-size: 70%;
	color: rgb(128,128,128);
	border: 1px solid rgb(210,210,210);
	border-radius: 1em;
	background-color: rgb(245,245,245);
	padding: 1em 2em 1em 2em;
	overflow: auto;
}

pre.code_input {
	border-radius: .5em;
	font-size: 80%;
	padding: .7em 1em .7em 1em;
}
pre.code_output {
	border-radius: .5em;
	font-size: 80%;
	background-color: rgb(250,250,250);
	border: none;
}

/* http://stackoverflow.com/a/1636635 */
ol#footnotes {
	counter-reset: footnote-list;
}
ol#footnotes > li {
	list-style: none;
	position: relative;
	margin-top: 1.5em;
}
ol#footnotes > li:before {
	counter-increment: footnote-list;
	color: rgb(128,128,128);
	content: counter(footnote-list);
	font-size: 80%;
	font-weight: bold;
	position: absolute;
	left: -2em;
}

a.fn-back {
	color: rgb(128,128,128);
	text-decoration: none;
}

/********  Other platforms  ********/

@media screen and (max-width: 70em) {
	article, section {
		margin: .5em auto;
		padding: 1em;
	}
	#head-pre {
		display: block;
		visibility: visible;
	}
	#head-pre h1 {
		font-size: 170%;
		margin-bottom: 0;
	}
	#head-left-post {
		display: none;
		visibility: hidden;
	}
	nav {
		font-size: 80%;
		float: none;
	}
	
	img#avatarpic {
		float: none;
		margin: auto;
	}
	
	.unfloat_mobile {
		float: none !important;
		width: 100% !important;
	}
	
	span.cv-timeframe {
		float: none;
		display: block;
	}
	
	.fullwidth_on_mobile {
		display: block;
		width: 100% !important;
	}
}

@media braille, speech {
	.unicode, #head-left-post {
		display: none;
		visibility: hidden;
		/* I'm actually not sure whether this works on $platforms. But until I try that out, it's better than nothing, I guess. */
	}
}

@media print {
	body {
		background-color: white;
		color: black;
	}
	nav {
		display: none;
	}
	footer {
		background-color: white;
		color: gray;
	}
	main {
		background-color: white;
		overflow: auto;
		min-height: auto;
	}
	article {
		box-shadow: none;
	}
}
