/*

    Main dark: #3C553C
    Main light: #94B394
    Main lighter: #C9D9C9
    Complementary #553C55

    White: #F3F3F3
    White-light: #FAFAFA
    White-main: #FAFCFA

*/

body {
    display: flex;
    flex-direction: column;
    background-color: #FAFEFA;
    color: #3C553C;

    padding: 0;
    margin: 0;
    min-height: 100vh;

    font-family: "Quicksand";

    /* @fixme Decide about fonts */
}

code {
    color: #927a39;
}

em {
    color: #326432;
}

strong {
    color: #1a3f1a;
}

a {
    color: #993D33;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background: #F3F3F3;
    padding: 0 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    border-bottom: 1px solid #3C553C;
    z-index: 250;
    height: 35px;
    line-height: 35px;
    font-size: 10pt;
    box-sizing: border-box;
}

header h1 {
    font-variant: small-caps;
    padding: 0;
    margin: 0;
    transition: all 300ms;
    font-size: 15pt;
}

header em {
    padding-left: 15px;
}

section {
    display: flex;
    flex-direction: row;
    background-image: url("../images/background.png");
    flex-grow: 2;
}

/* Nav */

#overlap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: #000000D0;
    z-index: 200;
}

#overlap.hidden {
    display: none;
}

.burger {
    display: none;
    line-height: 35px;
    width: 35px;
    height: 35px;
    text-align: center;
    cursor: pointer;

    justify-content: center;
    align-items: center;
}

nav {
    width: 250px;
    flex-grow: 0;
    color: #F3F3F3;
    background-color: #F3F3F3;
    background-image: url("../images/sidebar_background.png");
    box-shadow: 1px 0 10px #3C553C30;
    z-index: 225;
    transition: max-height 300ms;
}

nav a {
    color: #C3F3C3;
}

nav > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav > div > h3,
nav > div > p {
    margin: 10px 20px;
    line-height: 1.2em;
}

nav > div > h3 {
    margin-top: 30px;
}

nav .about {
    text-align: justify;
    hyphens: manual;
}

nav .about img {
    width: 130px;
    height: 130px;
    margin: auto;
    border-radius: 65px;
    margin: 10px 10px 0 10px;
}

nav .about a {
    font-weight: bold;
}

nav .menu {
    display: flex;
    flex-direction: row;
    background-color: #3C553C;
}

nav .menu a {
    width: 50px;
    height: 50px;
    color: #F3F3F3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 15pt;
}

nav .menu a .title {
    max-height: 0;
    font-size: 9pt;
    text-transform: uppercase;
    transition: all 300ms;
    overflow: hidden;
    font-weight: bold;
}

nav .menu a:hover {
    text-decoration: none;
}

@keyframes rotationX {
    from {
        transform: rotateX(0deg);
    }
    to {
        transform: rotateX(360deg);
    }
}

nav .menu a:hover i {
    animation: rotationX 2s ease-in-out infinite;
}

nav .menu a:hover .title {
    margin-bottom: 4px;
    max-height: 9pt;
    display: block;
}

/* Article */

article {
    flex-grow: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
}

article .article-header {
    background-color: #0e0e0e;
    height: 150px;
    width: 100%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 10px #3C553C30;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

article .article-header h2 {
    color: #F3F3F3;
    font-variant: small-caps;
    font-size: 25pt;
    text-shadow: 1px 1px 0px #0e0e0e, -1px -1px 0px #0e0e0e;
}

article .article-content {
    background-color: #F3F3F3;
    text-align: justify;
    line-height: 1.3em;
    box-sizing: border-box;
    position: relative;
}

article .article-content:nth-child(2) {
    width: 900px;
    padding: 40px 80px;
    margin-bottom: 200px;
    box-shadow: 0 0 60px #3C553C30;
}

article .article-content h2 {
    margin-top: 50px;
}

article .article-content .article-tags {
    display: flex;
    flex-direction: row;
    position: absolute;
    right: 0;
    top: 0;
    height: 30px;
    align-items: center;
}

article .article-content .article-tags .article-tag {
    margin: 0 1px 0 0;
    height: 30px;
    line-height: 30px;
    opacity: 0.6;
    padding: 0 10px;
}

article .article-content .article-tags .article-tag.article-tag-code {
    background: #e6e7e8;
    color: #585c60;
}

article .article-content .article-tags .article-tag.article-tag-3d {
    background: #dfbac9;
    color: #6f334c;
}

article .article-content .article-tags .article-tag.article-tag-impro {
    background: #fffcd5;
    color: #bbad00;
}

article .article-content .article-date {
    margin: -40px -80px 0 -80px;
    background: #F3F7F3;
    padding: 0 20px;
    border-bottom: 1px dotted #553C5530;
    text-align: left;
    color: #553C55;
    height: 30px;
    line-height: 30px;
    font-size: 10pt;
}

article .article-content h2 {
    margin-left: -5px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #94B394;
}

article .article-content h3 {
    margin-left: -3px;
    margin-top: 25px;
    padding-bottom: 3px;
    border-bottom: 1px dotted #94B394;
}

article .article-content h4 {
    margin-top: 25px;
    border-bottom: 1px dotted #C9D9C9;
}

article .article-content p + ul {
    margin-top: -10px;
}

article .article-content p + ul > li {
    margin-top: 5px;
}

article .article-content blockquote {
    min-height: 50px;
    margin: 0 30px 0 30px;
    padding: 10px 0 10px 60px;
    background: url("./images/quotes.png");
    background-repeat: no-repeat;
    background-position: 0 center;
}

article .article-content iframe {
    display: block;
    margin: 5px auto;
    max-width: 100%;
}

article .article-content twitter-widget {
    display: block;
    margin: 5px auto;
    max-width: 100%;
}

article .article-content img {
    display: block;
    margin: 10px auto;
    max-width: 100%;
}

article .article-content img + em {
    display: block;
    text-align: center;
    font-size: 85%;
    line-height: 1em;
    padding-top: 7px;
    margin-top: -5px;
}

article .article-content video {
    display: block;
    margin: 5px auto;
    max-width: 100%;
}

article .article-content video + em {
    display: block;
    text-align: center;
    font-size: 85%;
    line-height: 1em;
    padding-top: 7px;
}

/* Quicklinks */

.quicklinks {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 10px 0;
    margin-top: 20px;
}

.quicklinks a {
    transition: all 300ms;
    cursor: pointer;
}

.quicklinks a:hover {
    transform: scale(1.2);
}

.quicklinks i {
    font-size: 20pt;
    margin: 0 5px;
}

/* Premise */

.premise {
    width: 100%;
    background: url("../images/premise.jpg");
    background-size: cover;
    background-position: center;
    padding: 5px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;

    box-shadow: inset 0 -40px 80px -40px white;
}

.premise p {
    max-width: 800px;
    text-align: center;
    color: #F3F3F3;
}

.premise a {
    color: #D9CED9;
    font-weight: bold;
}

/* Article link */


.article-link {
    display: flex;
    flex-direction: column;
    justify-content: center;

    color: #FAFAFA;
    text-decoration: none;
    transition: all 300ms;
    margin: 3px 0;
    overflow: hidden;
    position: relative;
}

.article-link .article-background {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 300ms;
    filter: blur(1px);
}

.article-link .article-title {
    margin: 0 auto;
    font-variant: small-caps;
    font-weight: bold;
    text-shadow: 1px 1px 0px #0e0e0e, -1px -1px 0px #0e0e0e;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 300ms;
}

.article-link:hover .article-background {
    /* These filters transitions are nice but there is a random flickering Chrome bug... */
    /* filter: blur(0px); */
}

.article-link:hover .article-title {
    transform: translate(-50%, -50%) scale(1.2);
}

nav .article-link {
    height: 100px;
    width: 250px;
    margin: 1px 0;
    border-radius: 0px;
}

nav .article-link .article-title {
    font-size: 15pt;
    width: 190px;
    top: 50px;
}

nav .article-link .article-excerpt {
    display: none;
}


nav .article-link:hover {
    text-decoration: none;
}

.articles-list {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: flex-start;
    margin: 0 auto 200px auto;
}

.articles-list .article-link {
    box-sizing: border-box;
    width: 600px;
    margin: 40px 20px 0 20px;
    border-radius: 10px;
    box-shadow: 0 0 60px #3C553C30;
}

.articles-list .article-link .article-background {
    height: 110px;
    min-height: 110px;
}

.articles-list .article-link .article-excerpt {
    color: #3C553C;
}

.articles-list .article-link .article-excerpt .article-content {
    padding: 15px 20px;
    width: 100%;
}

.articles-list .article-link .article-excerpt .article-content .article-date {
    margin: -15px -20px 0 -20px;
}

.articles-list .article-link .article-title {
    font-size: 20pt;
    width: 260px;
    top: 55px;
}

.articles-list .article-link:hover {
    text-decoration: none;
    box-shadow: 0 0 30px #553C5530;
}

/* Tables */

/* @fixme FORMAT! */
.tg  {border-collapse:collapse;border-spacing:0;border-width:1px;border-style:solid;border-color:#ccc;margin:0px auto;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}
.tg .tg-0pky{border-color:inherit;text-align:center;vertical-align:top}
@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;margin: auto 0px;}}

div.tg-wrap + p em:first-child {
    display: block;
    margin-top: -10px;
    margin-bottom: 20px;
    text-align: center;
    padding: 5px 15px;
    font-size: 85%;
    line-height: 1em;
}


/* Code and legends */

.note {
    padding: 10px 30px;
    font-style: italic;
    background: #e9f8e3;
    border-radius: 30px;
}

.important {
    padding: 10px 30px;
    font-style: italic;
    background: #FACACA;
    border-radius: 30px;
}

pre > code.hljs {
    line-height: 1.4em;
    box-shadow: 2px 2px 10px #002b36;
    padding: 1em;
}

pre + p em:first-child {
    display: block;
    background: #002b36;
    margin-top: -20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 2px 2px 10px #002b36;
    color: #F3F3F3;
    border-top: 1px dotted #F3F3F3;
    padding: 5px 15px;
    font-size: 85%;
    line-height: 1em;
}