html{
    background: #000;
}

body{
    margin: 0; padding: 0;
    font-family: Arial, sans-serif;
    font-size: 12pt;
}

article{
    padding: 50px 0 50px 0;
}

article header{
    background: #151515;
    color: #FFF;
    padding: 5px 0 5px 0;
    border-bottom: 3px solid #0088EE;
    text-align: justify;
    position: relative;
    z-index: 2;
}

article header>div{
    margin: 0 auto 0 auto;
    max-width: 700px;
}

article header #author-avatar{
    float: left;
    border: 3px solid #0088EE;
    background: #000;
    margin: 0 10px 0 -80px;
    width: 96px;
    height: 96px;
}

article header #author-avatar img{
    width: 100%;
    height: 100%;
}

article header h1{
    display: block;
    vertical-align: middle;
    margin: 0; padding: 0;
    font-size: 24pt;
    text-align: left;
}

article header h1 a{
    color: #FFF;
    text-decoration: none;
}

article header .date{
    float: right;
}

article header #tags{
    text-align: left;
}

article header #tags::before{
    content: "Tags:";
}

article header #tags ul{
    padding: 0; margin: 0;
    list-style: none;
    display: inline;
}

article header #tags ul li{
    display: inline;
}

article header #tags ul li a{
    display: inline-block;
    color: #FFF;
    text-decoration: none;
    background-color: #0088EE;
    padding: 2px 5px 2px 5px;
    font-size: 0.8em;
    margin: 2px 2px 2px 2px;
    border: none;
    cursor: pointer;
}

article header #tags ul li a:hover{
    background-color: #004499;
}

article header div div{
    display: block;
    overflow: hidden;
}

article header h1 input{
    background: none;
    border: 1px solid #333;
    font-size: 24pt;
    color: #FFF;
    box-sizing: border-box;
    width: 100%;
}

article header #taginput{
    background: none;
    border: 1px solid #333;
    width: 100%;
    color: #FFF;
    box-sizing: border-box;
}

article header #index-link{
    position: absolute;
    left: 0px;
    top: -25px;
    display: inline-block;
    color: #FFF;
    background: #0088EE;
    text-decoration: none;
    text-align: center;
    padding: 5px 5px 5px 85px;
}

article header #rss-link{
    background: #0088EE;
    color: #FFF;
    padding: 0.1em;
    text-decoration: none;
    display: inline-block;
    float: right;
    font-size: 1.2em;
}

article header #rss-link:hover{
    background: #0099FF;
}

/* Font stuff */
#article-body,#writer-body,#writer-body textarea,#generic-body{
    text-align: justify;
    color: #444;
    background: #FFF;
    font-family: Georgia,Serif;
    font-size: 12pt;
    line-height: 120%;
    text-rendering: optimizeLegibility;
    -moz-font-feature-settings: "kern" 1, "liga" 1;
    -ms-font-feature-settings: "kern" 1, "liga" 1; 
    -o-font-feature-settings: "kern" 1, "liga" 1; 
    -webkit-font-feature-settings: "kern" 1, "liga" 1; 
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

#article-body,#writer-body,#generic-body{
    max-width: 800px;
    margin: 0 auto 0 auto;
    padding: 5px 150px 10px 20px;
    box-sizing: border-box;
    border: 1px solid #0088EE;
    border-top: none;
    border-bottom: none;
    position: relative;
}

#article-body .series{
    text-align: center;
    background: #333;
    color: #FFF;
    font-family: Arial, sans-serif;
    padding: 5px;
    position: relative;
    margin-top: 10px;
}

#article-body .series::before{
    content: "";
    position: absolute;
    left: -40px; top: 0; bottom: 0;
    width: 40px;
    background: #333;
}

#article-body .series::after{
    content: "";
    position: absolute;
    left: -40px; bottom: -10px;
    border-style: solid;
    border-width: 0 19px 10px 0;
    border-color: transparent #151515 transparent transparent;
}
    
#article-body .series .description{
    margin-bottom: 5px;
}

#article-body .series .description .series-title{
    font-weight: bold;
}

#article-body .series a{
    display: inline-block;
    padding: 0 10px 0 10px;
    margin: 2px 0 0 0;
    color: #FFF;
    background: #151515;
    text-decoration: none;
}

#article-body .series a:hover{
    background: #0088EE;
}

#article-body .series .first:before{content: "First: ";}
#article-body .series .prev:before{content: "Previous: ";}
#article-body .series .next:before{content: "Next: ";}

#article-body h1{
    font-size: 22pt;
}

#article-body img{
    max-width: 100%;
    max-height: 100%;
    padding: 5px;
    box-sizing: border-box;
}

#article-body img.left{
    float:left;
    max-width: 30%;
}

#article-body img.right{
    float:right;
    max-width: 30%;
}

#article-body img.side{
    position: absolute;
    right: 0;
    max-width: 180px;
}

#article-body code{
    font-family: Consolas, Iconsolata, monospace;
    display: inline-block;
    background: #FFF;
    padding: 0 3px 0 3px;
    word-break: normal;
    -ms-word-break: keep-all;
    word-break: keep-all;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    hyphens: none;
}

#article-body pre code{
    display: block;
    border: 1px solid #0088EE;
    border-left: none;
    border-right: none;
    font-size: 0.8em;
    overflow-x: auto;
    margin-right: -120px;
}

#article-body code .code{background:#FFF;}
#article-body code .comment{color:#555;}
#article-body code .symbol{color:#000;text-decoration: none;}
#article-body code i .symbol{color:#880000;font-style: normal;}
#article-body code .keyword{color:#2222AA;}
#article-body code .string{color:#CCAA00;}

#article-body .left{float: left;}
#article-body .right{float: right;}
#article-body img.left,#article-body img.right{max-width: 50%;}
#article-body .full{width:100%;}

#writer-body textarea{
    max-width: 100%;
    min-width: 100%;
    min-height: 500px;
    box-sizing: border-box;
    border: 1px solid #DDD;
}

#writer-body #buttons input{
    border: none;
    background: #0088EE;
    color: #FFF;
    font-weight: bold;
    cursor: pointer;
}

#writer-body #buttons input.save{
    font-size: 14pt;
}

#writer-body #buttons input.delete{
    background: #880000;
    float: right;
}

#writer-body #message{
    font-size: 14pt;
    font-family: Arial, sans-serif;
    border: 3px solid #0088EE;
    background: #FFF;
    padding: 5px;
}

#writer-body #message::before{content: "Note: ";}

#generic-body{
    padding: 5px 20px 10px 20px;
}

.article-listing{
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-listing article{
    margin: 0 0 20px 0;
    padding: 0;
    clear: both;
}

.article-listing article header{
    padding: 10px;
    text-align: right;
}

.article-listing article header h2{
    margin: 0px;
    float: left;
    text-align: left;
}

.article-listing article header h2 a{
    color: #FFF;
    font-family: Arial;
    text-decoration: none;
}

.article-listing article header .date{
    float: none;
}

.article-listing article blockquote{
    margin: 5px;
}

.article-listing article blockquote img{
    float: right;
    max-width: 33%;
    margin-left: 10px;
}

article footer{
    background: #151515;
    color: #FFF;
    max-width: 800px;
    margin: 0 auto 0 auto;
    padding: 5px;
    box-sizing: border-box;
    border-top: 3px solid #111;
}

article footer #default-linkage ul{
    margin: 0; padding: 0;
    margin-top: 5px;
    list-style: none;
    text-align: center;
}

article footer #default-linkage ul li{
    display: inline;
}

article footer #default-linkage ul li a{
    display: inline-block;
    color: #AAA;
    background: #101010;
    border: 1px solid #1F1F1F;
    text-decoration: none;
    padding: 2px 5px 2px 5px;
}

article footer #default-linkage ul li a:hover{
    color: #FFF;
    background: #555;
}

article footer #move{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

article footer #move a{
    color: #FFF;
    text-decoration: none;
    display: inline-block;
    padding: 5px;
    font-weight: bold;
    flex-grow: 1;
}

article footer #move .prev{
    text-align: left;
    background: -moz-linear-gradient(left,  rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,1)), color-stop(100%,rgba(0,0,0,0)));
    background: -webkit-linear-gradient(left,  rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%);
    background: -o-linear-gradient(left,  rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%);
    background: -ms-linear-gradient(left,  rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%);
    background: linear-gradient(to right,  rgba(0,0,0,1) 0%,rgba(0,0,0,0) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000',GradientType=1 );
}

article footer #move .next{
    text-align: right;
    background: -moz-linear-gradient(left,  rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1)));
    background: -webkit-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%);
    background: -o-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%);
    background: -ms-linear-gradient(left,  rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%);
    background: linear-gradient(to right,  rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=1 );
}

@media (max-width: 800px){
    article{
        padding: 24px 0 0 0;
    }
    
    article header{
        padding: 5px;
    }

    article header>div{
        max-width: none;
        margin: 0;
    }

    article header #author-avatar{
        margin: 0 5px 0 0;
        border: none;
        width: 64px;
        height: 64px;
    }

    article header #index-link{
        left: 0; right: 0;
        bottom: auto;
        top: -24px;
        height: 20px;
        padding: 2px;
        font-weight: bold;
    }
    
    #article-body,#writer-body,#generic-body{
        max-width: none;
        margin: 0;
        padding: 5px;
        border: none;
    }

    #article-body{padding-top: 0;}

    #article-body .series{
        margin: 0 -5px 0 -5px;
        padding: 2px;
        font-size: 10pt;
    }

    #article-body .series .description{
        margin: 0;
        font-size: 10pt;
    }

    #article-body .series .links{
        display: flex;
        flex-wrap: wrap;
    }

    #article-body .series .links a{
        flex-grow: 1;
        text-align: center;
        margin: 2px;
    }

    #article-body .series:after{
        content:none;
    }

    #article-body .series:before{
        content:none;
    }

    #article-body blockquote{
        margin: 0;
    }
    
    #article-body img.side{
        display: none;
    }

    #writer-body textarea{
        min-height: 70vh;
    }
    
    #article-body pre code{
        margin-right: 0;
    }

    article footer{
        max-width: none;
    }
}

@media (min-width: 1200px){
    
    body{
        font-size: 16pt;
    }
    
    article header h1{
        font-size: 30pt;
    }
    
    article header>div{
        max-width: 900px;
    }

    #article-body,#writer-body,#writer-body textarea,#generic-body{
        font-size: 16pt;
    }
    
    #article-body,#writer-body,#generic-body,article footer{
        max-width: 1000px;
    }
}
