/*** theme.css ***/

@import url(https://fonts.googleapis.com/css?family=Fira+Sans:400,300,300italic,400italic,500,500italic,700,700italic);
@import url(http://fonts.googleapis.com/css?family=Nobile:400,400italic,700,700italic);
@import url(http://fonts.googleapis.com/css?family=Inconsolata:400,700);
@import url(https://fonts.googleapis.com/css?family=Kaushan+Script);

/** zero **/

html {
	min-height: 100%;
	background: maroon url('../images/fabric.png');
	background: -webkit-linear-gradient(top, maroon, rgb(96,0,0));
	background: -moz-linear-gradient(bottom, maroon, rgb(96,0,0));
	background: linear-gradient(to bottom, maroon, rgb(96,0,0));
}

body {
	font: .85em Fira Sans, sans-serif;
	color: dimgray;
	margin-top: 0;
}

body > div {
	margin: 0 auto;
	max-width: 75em;
	overflow: hidden;
	box-shadow: 0 0 1em dimgray;
}

#page > header {
	background: linear-gradient(
		to bottom right,
		beige,
		rgb(229,223,182));
}

ul { padding-left: 0; list-style-type: none; }

nav a, footer a { display: block; width: 100%; height: 100%; }

a:link, a:visited {
	text-decoration: none;
	color: seagreen;
}

a:hover, a:focus, a:active { text-decoration: underline; }

/** modulation **/

article { position: relative; }

header,
footer {
	background: beige;
	padding: .1em .5em;
	box-shadow: 0 0 .5em rgb(179,143,82);
}

aside,
footer,
section figcaption { padding: .5em; }

header { padding-left: 2em; }

article { padding: 2em; }

#contact article img, #about article img { display: none; }

footer {
	font-size: .85em;
	font-style: italic;
}

header[role=banner] h1 {
	font-family: Kaushan Script;
	font-weight: normal;
}

/** navigation **/

main nav ul.persistent > * { flex-basis: 100%; }
	
main nav li { border-top: thin solid beige; }

main nav li a { padding-left: 1.5em; }

footer > section { padding-left: 2em; }

footer > p { padding-top: .5em; margin: 0 2em; }

footer li { padding: .5em 0; margin-right: 1.5em; }

footer > p, footer li { border-top: thin solid rgb(229,223,182); }

/** text elements **/

p, li { line-height: 1.55em; }

blockquote { margin-left: 0.5em; }

p a,
blockquote a { display: inline; }

/* form */

fieldset, article textarea, article input[type=email] { border: thin solid rgb(229,223,182); }

article form { max-width: 24em; }

article legend, article input[type=submit] { width: initial; }

input[type=email] { height: 2.2em; }

#contact input[type=email], #contact textarea { margin: .5em 0 1em; border: thin solid beige; }

label:nth-of-type(2) { display: block; }

article legend { font-size: .8em; color: darkkhaki; padding: 0 .5em; }

article textarea { resize: none; }

/* code */

pre, code {
	background-color: beige;
}

pre, header code {
	border-radius: .2em;
}

pre {
	line-height: 1.35em;
	-moz-tab-size: 2;
	-o-tab-size: 2;
	tab-size: 2;
	white-space: pre-wrap;
	padding: .5em;
	border: thin solid lightgray;
	display: inline-block; /* check this */
	margin-top: 0;
	width: 100%;
}

code { padding: .15em; }

p code {
	font-style: normal;
	font-size: 1.1em;
	padding: .2em .25em .1em;
	position: relative;
	top: -.1em;
	border: thin solid gainsboro; border-radius: .2em;
}

pre code { padding: 0; }

/* truncate */

.truncate { min-width: 0; }

.truncate > *:first-child, .truncate > *:first-child * { white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis; }

/** row and wrap **/

.row > *,
.wrap > * {
	padding: .5em;
}

div#page > header { position: relative; }

.footer-anchor {
	border-bottom: thin solid rgb(229,223,182);
	position: absolute;
	bottom: 1.2em;
	right: 2em;
}

/* sotto-voce */

.sotto-voce {
	font-style: italic;
	color: darkgray;
}

.sotto-voce::before { content: "\2039\00a0"; }
.sotto-voce::after { content: "\00a0\203a"; }

/** specifics **/

div#page {
	background: linear-gradient(
      rgba(255,255,240, 0.8), 
      rgba(255,255,240, 0.8)
    ), url('../images/fabric.png');
	border: thin solid darkkhaki;
	position: relative;
}

#site-id a:hover { text-decoration: none; text-shadow: 0 0 .5em darkkhaki; }

/* query me this */

@media screen and (min-width: 40em) {
	
	#contact article img,
	#about article img,
	#projects article img {
		margin: 0 1em .5em;
		width: initial;
		max-width: 40%;
		display: inline;
		float: right;
		box-shadow: 0 0 .5em rgb(179,143,82);
	}
	
	#page footer {
		background: linear-gradient(
			to bottom right,
			beige, 
			rgb(229,223,182)
		);
	}
	
	#contact article img { width: 30%; max-width: 255px; }
	
	#projects section + section { border-top: thin solid beige; }

	body { font-size: .925em; }

	/* modulation */

	main nav li a { padding-left: 0; }
	
	article { padding-top: 0; }
	
	section + section { margin-top: 0; }

	footer > section { padding-left: 0; }

	footer section.thirds {
		display: -webkit-flex; display: flex;
	}
	
	footer div { padding: 0 2em; }
	
/*	footer > p, footer div, footer li { text-align: center; } */
	
	footer > p { text-align: center; margin: 0 2em; }
	
	blockquote { margin-top: .5em; }
	
	/* navigation */

	main nav ul.persistent > * { flex-basis: 25%; }
	
	main nav li { border-top: none; }
	
	main nav li + li { border-left: thin solid rgb(229,223,182); }

	footer li { border-top: none; }
	
	/* row and wrap */

	.row > *,
	.wrap > * {
		text-align: center;
	}
	
	.row:not(.reverse):not(.persistent) > li:nth-child(n) { -webkit-flex-basis: auto; flex-basis: auto; }

	.start > li, .end > li {
		-webkit-flex-basis: auto; flex-basis: auto;
	}
	
	.split:not(.header) { padding-top: 1em; }

	.split.header > *:first-child {
		border-bottom: thin solid beige;
		margin-bottom: 1em;
	}
	
	.split.four { font-size: .85em; }
	
	.split.five { font-size: .75em; }
	
	.footer-anchor { display: none; }

}

@media screen and (min-width: 60em) {

	#page > header, #page > footer {
		background: linear-gradient(
			to bottom,
			beige,
			rgb(209,193,142));
	}
	
	#contact article img { display: none; }

	body { font-size: 1em; }
	
	article { margin-top: 1em; }
	
	main { display: block; }
	
	main nav ul { margin-top: 4.3em; }
	
	footer section { margin-top: 2.8em; }

	footer section.thirds {
		display: block;
	}
	
	footer > p { text-align: left; margin-left: 2em; }
	
	main nav {
		max-width: calc(20% - 2em);
		margin-left: .5em;
		position: absolute;
		top: 6em;
		left: 0;
	}
	
	main nav li { margin-left: 1em; }
	
	main nav li + li { border-left: none; }

	main nav li a { padding-left: 0; }

	aside {
		padding: 0;
		border: none;
	}

	aside .wrap { display: block; }
	
	.row:not(.wide) > *,
	.wrap:not(.wide) > * { text-align: left; flex-basis: 100%; } /* no -webkit- here, breaks in Safari - of course. */
	
	.row > * + * { border-left: none; }
	
}