/*** 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: 0;
}

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

/** ids and big blocks **/

body > div {
	background: linear-gradient(
      rgba(255,255,240, 0.8), 
      rgba(255,255,240, 0.8)
    ), url('../images/fabric.png');
	border: thin solid darkkhaki;
	margin: 0 auto;
	max-width: 75em;
/*	overflow: hidden;*/
	box-shadow: 0 0 1em dimgray;
	position: relative;
}

#page > header {
	background: linear-gradient(
		to bottom right,
		beige,
		rgb(229,223,182)
	);
/*	margin-left: 0;*/
	width: 100%;
	position: fixed !important;
	left: 0;
	z-index: 99;
}

#site-id {
	font-family: Kaushan Script;
	font-weight: normal;
}

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

main > article h2 {
	margin-top: 4em;
}

#home > section:first-of-type {
	margin-top: 6em;
}

#about img,
#contact img {
	max-width: 255px;
	margin: 0 auto;
}

div.squish {
	display: none;
}

#projects section + section {
	border-top: thin solid beige;
	margin-top: 1em;
}

section p:last-child { margin-bottom: 0; }

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

/** navigation **/

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

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

#dominique ul {
	list-style: disc;
}

/* select menu for handheld */

nav#main select {
	-webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /*
	-webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;*/
    -webkit-user-select: none;
    -moz-user-select: none;
	font-family: Nobile;
	font-size: .85em;
	padding-right: .5em;
	color: #8d7357;
	cursor: pointer;
	background-color: rgb(229,213,162);
	background: linear-gradient(
		to bottom right,
		rgb(229,223,182),
		rgb(229,213,162)
	);
	padding: .25em .5em 0;
	border: thin solid rgb(229,203,162);
	border-radius: .25em;
	box-shadow: 0 0 .5em rgba(179,143,82,.3);
	width: 9em;
	height: 3em;
	position: fixed;
	top: 2em;
	right: 2em;
	z-index: 100;
}

/* hacky hacky... */

select::-ms-expand {
	display: none;
}

/* get rid of FF's stupid dotted border: */

@-moz-document url-prefix() {
	select, select:-moz-focusring, select::-moz-focus-inner {
		color: transparent !important;
		text-shadow: 0 0 0 #000 !important;
/*		background-image: none !important;*/
		border:0;
	}
}

/* options */

nav#main option {
	cursor: pointer;
	padding: .75em .5em .25em;
	background: rgb(229,203,162);
	border: none;
	border-bottom: thin solid rgb(229,223,182);
}

nav#main option:first-of-type {
	display: none;
}

nav#main option[selected] {
	color: rgb(229,223,182);
	text-shadow: none;
}

/* links */

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; }

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

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

/** text elements **/

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); }

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: 100%; }

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

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

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

#contact button {
	width: auto;
}

#form-messages {
	color: green;
	margin-bottom: 1em;
}

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

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

article textarea {
	height: 100px;
	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; }

/** classes **/

/* 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;
}

/* sotto-voce */

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

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

.tagline { display: none; }

.squish {
	height: 22em;
	overflow: hidden;
}

/* query me this */

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

	body { font-size: .925em; }

	div.squish {
		display: block;
	}

	#home > section:first-of-type {
		margin-top: 8em;
	}
	
	#page footer {
		background: linear-gradient(
			to bottom right,
			beige, 
			rgb(229,223,182)
		);
	}
	
	#projects img {
		margin: 0 0 1em 2em;
		height: auto;
		width: 40%;
		float: right;
	}
	
	/* modulation */

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

	main > article h2 {
		margin-top: 6em;
	}
	
	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 **/
	
	nav#main {
		width: 30em;
		position: fixed;
		top: 1em;
		right: 2em;
		z-index: 100;
	}
	
	nav#main select { display: none; }

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

	footer li { border-top: none; }
	
	article form {
		max-width: calc(100% - 255px - 2em);
	}
	
	#ajax-contact label,
	#ajax-contact input,
	#ajax-contact textarea {
		display: inline-block;
	}
	
	#ajax-contact label {
		width: 50px;
	}
	
	input[type=email],
	input[type=text] {
		max-width: 30em;
	}
	
	/** classes **/
	
	/* 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;
	}
	
	.squish {
		margin-left: 2em;
		height: auto;
		width: auto;
		float: right;
	}

}

@media screen and (min-width: 60em) {
	
	nav#main {
		width: 40em;
	}
	
	nav#main li {
		text-align: center;
	}

	#contact article img { display: none; }

	body { font-size: 1em; }
	
	article { margin-top: 1em; }
	
	main { display: block; }

	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; }
	
}


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

	.tagline { display: block; float: right; margin-top: -3.5em; margin-right: 2em; }

	main > article {
		width: calc(100% - 17.5em);
	}
	
	nav#main {
		top: 8em;
		left: calc(50% + 20em);
	}
	
	nav#main li {
		text-align: left;
		padding-left: 2em;
	}
	
	nav#main li + li {
		border-left: none;
	}
	
	nav#main {
		height: 20em;
		border-left: thin solid rgb(229,223,182);
	}
	
}