html {
    margin: 0;
    padding: 0;
    background: #cccccc;
}

body {
    margin: auto;
    max-width: 940px;
    padding: 0 25px;
}

header, footer, nav, article {
}

article {
    margin: 0;
}

header {
    margin: 3em -15px 0 -15px;
    padding: 0;
}

header hgroup {
    margin: auto;
    height: 128px;
}


header {
    position: relative;
    z-index: 1000;
    background: #282626;
    box-shadow: rgba(0,0,0,0.4) 0 2px 15px;
}

/* Wrap-around triangles */

header:after, header hgroup:after {
    content: '';
    display: block;
    height: 0;
    width: 0;
    position: absolute;
    top: 128px;
    background: transparent;
    z-index: 1;
    border-top: 15px solid #484646;
}

header:after {
    border-left: 15px solid transparent;
    left: 0;
}

header hgroup:after {
    border-right: 15px solid transparent;
    right: 0;
}

header h1 {
    background-image: url(/img/knot-logo.svg);
    background-repeat: no-repeat;
    background-position: center top;
    text-align: center;
    font-family: Imprima, sans-serif;
    font-weight: normal;
    font-size: 28pt;
    color: #efefef;
    margin: 25px 0 0 10px;
    padding: 38px 0 0 0;
    width: 260px;
    float: left;
}

header em {
    font-style: normal;
    color: #ffdd22;
}

header h2 {
    font-family: Gudea, sans-serif;
    font-weight: normal;
    color: #bbb;
    font-size: 28pt;
    margin: 15px 40px 0 0;
    padding: 0;
    float: right;
    width: 280px;
    text-align: right;
}

nav, article {
    position: relative;
    top: -160px;
}


@media screen and (max-width: 620px) {
    header h2 {
        display: none;
    }
}

nav {
    padding-top: 0;
    background: #eee;
}

nav ul {
    height: 32px;
    margin: 0 2.4em;
    padding: 0;
}

nav ul li {
    position: relative;
    top: -4px;
    display: block;
    float: left;
    color: #333;
    font-family: Mako, sans-serif;
    font-size: 12pt;
    margin: 0 4em 0 1em;
}

nav ul li:last-child {
    margin-right: 0;
}

nav a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 10px 10px 10px;
}

nav a:hover {
    background: #883030;
    color: white;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}

article {
    padding-top: 122px;
    padding-bottom: 80px;
    margin-bottom: -160px;
    background: #f3f3f3;
    font-family: Lata, sans-serif;
    font-size: 12pt;
    color: #333;
}

article a {
    z-index: 1000;
}

article h2 {
    font-family: Gudea, sans-serif;
    font-size: 30pt;
    font-weight: normal;
    color: #555;
    margin: 32px 0 0 16px;
}

article section:first-child h2 {
    margin-top: 0.2em;
    font-size: 42pt;
}

article p {
    margin: 0.6em 30px 20px 30px;
    line-height: 1.8em;
}

article a {
    color: #822;
    font-weight: bold;
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

article section p.introduction {
    font-size: 16pt;
    color: #393939;
}

article strong {
    color: #222;
}

article pre {
    margin: 20px;
    font-size: 12pt;
    background: #e6e6e6;
    padding: 5px;
    border-radius: 2px;
    max-height: 300px;
    overflow: scroll;
}

article pre .hljs {
    background: transparent;
}

article figure.highlight {
    margin: 0;
}

code {
    font-family: Inconsolata, monospace;
}

img#portrait {
    width: 168px;
    height: 239px;
    float: right;
    margin: 0 20px 20px 20px;
    border: solid 1px #bbb;
    position: relative;
    top: 15px;
    box-shadow: 1px 1px 6px #888;
}

article ul {
    list-style: square;
    margin-bottom: 2em;
    margin-left: 1em;
    color: #555;
}

article ul li {
    margin: 1em 0 1em 0;
}

article ol li {
    margin: 1em 0 1em 1em;
}

#talks .event {
    width: 290px;
    float: left;
}

article #talks ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 0;
}

#talks ul li a {
    color: #555;
    font-weight: normal;
}

#talks ul li a:hover {
    color: #822;
}

#projects {
    margin-top: 2em;
    clear: both;
}

#projects h2 {
    padding-top: 20px;
}

#projects ul {
    -webkit-column-width: 12em;
    -webkit-column-gap: 0.4em;
    -moz-column-width: 12em;
    -moz-column-gap: 0.4em;
    column-width: 12em;
    column-gap: 0.4em;
    padding-left: 15px;
}

#projects ul li {
    display: block;
    margin: 0em 1em 0.6em 1em;
    color: #666;
}

#projects ul li a {
    color: #666;
    font-weight: normal;
}

#projects ul li a:hover {
    color: #822;
}

article dl {
    margin: 0.6em 30px 20px 30px;
    height: 3em;
}

article dl dt {
    clear: left;
    float: left;
    width: 4em;
    color: #666;
    margin: 0.5em 0;
}

article dl dd {
    float: left;
    margin: 0.5em 0;
    color: #222;
}

footer p {
    font-family: Mako, sans-serif;
    font-size: 10pt;
    text-align: right;
    color: #555;
    margin-right: 0.5em;
}
