@font-face {
    font-family: 'Open Sans';
    src: url(/fonts/opensans/OpenSans-Regular.ttf);
}

@font-face {
    font-family: 'Montserrat';
    src: url(/fonts/montserrat/Montserrat-Regular.ttf);
}

:root {

    --total-width: 50em;
    --hl-color: steelblue;
    --ter-color: #222233;
    --bg-color: #FEFEFF;
    --snd-bg-color: aliceblue;
}

html {
    background: white;
    color: #222;
    font-family: "Open Sans", sans-serif;
    box-sizing: border-box;
    text-rendering: geometricPrecision;
}

html {
    background: var(--bg-color);
    color: var(--ter-color);
}

p, li, dl {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow-wrap: break-word;
}

hr {
    border: 0 solid var(--ter-color);
    border-bottom-width: 1px;
    clear: both;
    margin: 32px 0;
}

a {
    text-decoration: none;
    color: var(--hl-color);
}

header > aside > nav > a > img {
    width: 24px;
    border-width: 0;
    padding: 3px 12px 0 12px;
    filter: saturate(0) invert(0.2);
}

header > aside > nav > a > img:hover {
    filter: unset;
}

header div.highlight {
    padding: 0.75em;
    border-radius: 0.5em;
    border: 1px solid var(--hl-color);
    background: var(--snd-bg-color);
    min-width: 80%;
    display: table;
    margin: 0em auto 0.5em auto;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    margin: 1em 0;
    color: var(--hl-color);
}

header > h1 {
    letter-spacing: 4px;
    margin: 1em 0 1em 0;
    text-align: center;
}

header > main > h2 {
    font-size: 110%;
}

header > main > p:first-of-type {
    margin-top: 0;
}

section > article > ol {
    display: flex;
    flex-wrap: wrap;
    flex-basis: content;
    margin: 0;
    padding: 0 0 1em 0;
}

section > article > ol > li > figure {
    width: 100%;
    margin: 0;
}

section figure > figcaption {
    text-align: center;
    font-weight: bold;
    padding-top: 16px;
}

section > article > ol > li {
    list-style: none;
}

dt {
    padding-top: 12px;
    font-weight: bold;
}

th {
    text-align: left;
}

picture, picture > img {
    display: table;
}

picture > img {
    width: 100%;
    max-width: 100vw;
}


/* desktop/regular */
@media (min-width: 60em) {
    body {
	width: var(--total-width);
	line-height: 1.33;
	font-size: 1.20em;
	margin: 0 auto 1.5em auto;
	padding: 0;
	max-width: 56em;
    }

    picture {
	max-width: 100%;
	border: 1px solid slategray;
	box-sizing: border-box;
    }

    aside.right {
	float: right;
	margin-left: 32px;
    }

    /* about and links */

    header > aside {
	float: left;
	width: calc(var(--total-width) / 3);
    }

    header > aside > nav {
	margin: 0.5em 0;
	text-align: center;
    }

    header > aside > nav > a {
	text-decoration: none;
    }

    header > main {
	float: left;
	margin-left: 1.5em;
	width: calc((var(--total-width) / 3 * 2) - 1.5em);
    }

    header > main > * {
	max-width: 100%;
    }

    /* portfolio & courses */

    section > article > ol > li {
	width: 20%;
	margin: 2.5%;
    }

    section > picture#courses {
	float: right;
	margin: 0 0 1em 1em;
	width: 360px;
    }

    section > figure {
	width: 50%;
	margin: 32px auto 32px auto;
    }

    /* footer */

    footer > blockquote {
	font-size: 80%;
	opacity: 0.9;
	font-style: italic;
	margin: 1em 10%;
    }

    footer > blockquote > span:last-child {
	float: right;
	font-style: normal;
    }

    footer > aside#portrait > * {
	display: inline-block;
    }

    footer > aside#portrait > p {
	text-align: bottom;
	padding: 0 0.5em;
	font-size: 80%;
    }

    footer > aside#portrait > picture {
	width: 140px;
    }
}

/* mobile */
@media (max-width: 60em) {
    html, body {
	width: calc(100%-1em);
	margin: 0 0 1em 0;
	padding: 0 0.5em;
    }

    header > aside > picture {
	display: none;
    }

    header > main {
	background: rgba(255, 255, 255, 0.9);
    }

    /* section > h2 { */
    /*	border-bottom: 1px solid var(--hl-color); */
    /*	margin-bottom: 16px; */
    /*	padding-bottom: 32px; */
    /* } */

    section > article > ol {
	overflow-x: wrap;
    }

    section > article > ol > li {
	max-width: 1em;
    }

    section > article > ol > li > picture {
	width: 5em;
    }

    header > aside > nav {
	padding: 1em;
	text-align: center;
    }

    header > aside > nav > a > picture {
	width: 24px;
	border-width: 0;
    }

    footer > aside#portrait > p#portrait-note {
	display: none;
    }

    section figure > picture > picture {
	border: 1px solid gray;
    }

    section figure > picture > * {
	max-width: 100%;
    }

    section > picture,
    footer > aside > picture {
	max-height: 200px;
	max-width: 90%;
	margin: 0 auto;
	display: block;
	border: 1px solid gray;
    }
}
