/* Typography */

/* reset inspired by  http://meyerweb.com/eric/tools/css/reset/ */
html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strong,
sub,
sup,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border-style: none;
	border-width: 0;
	font-size: 1;
	font: inherit;
}

strong {
	margin: 0;
	padding: 0;
	border-style: none;
	border-width: 0;
	font-size: 1;
	font-weight: bold;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
	display: block;
}

body {
	font-family: serif;
	font-size: 16px;
	line-height: 1.3;
	color: #3F3F3F;
	box-sizing: border-box;
}

h1 {
	font-weight: bold;
	font-size: 1.6rem;
}

h2 {
	font-weight: bold;
	font-size: 1.4rem;
}

h3 {
	font-weight: bold;
	font-size: 1.2rem;
}

h4 {
	font-weight: bold;
	font-size: 1.1rem;
}

h5 {
	font-weight: normal;
	font-style: italic;
	font-size: 1rem;
}

h6 {
	font-weight: normal;
	font-size: 1rem;
}



ol,
ul {
	margin-left: 2.5rem;
}

ol {
	list-style-type: decimal;
	/*list-style-type: decimal-leading-zero;*/
}

ul {
	list-style-type: circle;
}

h1,
h2,
h3,
h4,
h5,
h6,
table,
ul,
ol,
img,
p,
blockquote,
pre {
	margin-bottom: 0.8rem;
}

ul ul,
ol ol,
ul ol,
ol ul {
	margin-bottom: 0;
}

blockquote,
q {
	quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

th,
td {
	vertical-align: top;
}

img {
	border-style: none;
	border-width: 0;
}

a,
a:link {
	text-decoration: underline;
	color: #6ca2d8;
}

a:visited {
	color: #a26cd8;
}

code,
pre {
	font-family: monospace;
	font-size: 0.8rem;
	background-color: #CCCCCC;
	padding: 0.1rem;
	border-radius: 0.1rem;
}

pre {
	padding: 0.5rem;
}

q {
	font-style: italic;
}

blockquote {
	font-style: italic;
	border-style: none none none solid;
	border-width: 0.3rem;
	border-color: #CCCCCC;
	padding-left: 0.8rem;
}

/* Layout */

body {
	width: 90%;
	margin: auto;
}

header {
	/*box-shadow: 0 8px 8px -6px rgba(0, 0, 0, 0.4);*/
	margin-bottom: 3rem;
	position: sticky;
	top: 0;
	background-color: #ececec;
	text-align: center;
}

.gray-box {
	background-color: #ececec;
	/* White background for the box */
	padding: 5px 10px;
}

@media screen and (min-width: 600px) {
	.blog header {
		margin: 0;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}

nav ul {
	margin: 0;
	padding-bottom: 0.3rem;
}

nav li {
	display: inline;
	padding: 0 0.5rem;
}

nav li:first-child,
nav li:last-child {
	padding: 0;
}

body>header h1 {
	font-size: 2rem;
	margin-bottom: 0;
}

@media screen and (min-width: 600px) {
	body>header h1 {
		font-size: 2.2rem;
		margin-bottom: 0;
	}

	body.blog>header h1 {
		font-size: 4.6rem;
	}

	main header {
		/* the difference between site-heading (2.2rem x 1.3) and page-heading (1.8rem x 1.3) */
		padding-bottom: calc(0.4rem * 1.3);
		margin-bottom: 0.8rem;
	}
}

main header h1 {
	/*display: inline;
	padding-right: 0.5rem;*/
	margin: 0;
}

body>header a,
body>header a:link,
body>header a:visited,
main.blog a,
main.blog a:link,
main.blog a:visited {
	text-decoration: none;
	color: #3F3F3F;
}

body>header nav a:hover,
body>header nav .active a,
.blog main a:hover {
	/*text-decoration: underline;*/
	color: #AAA;
}

@media screen and (min-width: 600px) {
	.blog main.blog {
		position: absolute;
		top: 85%;
		height: 15%;
		width: 90%;
		max-width: 800px;
		overflow: scroll;
	}
}

main.blog ul {
	margin-left: 0;
	list-style-type: none;
}

main.blog a {
	text-decoration: none;
	font-weight: bold;
}

/*** UTILITIES ***/

.align-left {
	text-align: left;
}

.align-center {
	text-align: center;
}

.align-right {
	text-align: right;
}

.align-justify {
	text-align: justify;
}

.image {
	display: block;
	margin: 0 auto;
}

.image.xsmall {
	width: 20%;
}

.image.small {
	width: 40%;
}

.image.large {
	width: 60%;
}

.image.xlarge {
	width: 80%;
}

.image.float-left {
	float: left;
	margin: 1em 2em 1em 0;
}

.image.float-right {
	float: right;
	margin: 1em 0 1em 2em;
}

.image img {
	display: block;
	width: 100%;
}

@media (max-width: 767px) {
	.image.xsmall {
		width: 60%;
	}

	.image.small {
		width: 80%;
	}

	.image.large,
	.image.xlarge {
		width: 100%;
	}

	.image.float-left,
	.image.float-right {
		float: none;
		margin: 0 auto;
	}
}

@media (min-width: 768px) {
	.fig1 {
		width: 170px;
		height: 170px;
	}

	.fig2 {
		width: 245px;
		height: 170px;
	}

	.fig3 {
		width: 416px;
		height: 170px;
	}
}

@media (min-width: 992px) {
	.fig1 {
		width: 220px;
		height: 220px;
	}

	.fig2 {
		width: 320px;
		height: 220px;
	}

	.fig3 {
		width: 538px;
		height: 220px;
	}
}

@media (min-width: 1200px) {
	.fig1 {
		width: 290px;
		height: 290px;
	}

	.fig2 {
		width: 423px;
		height: 290px;
	}

	.fig3 {
		width: 710px;
		height: 290px;
	}
}
