$base03:    #002b36;
$base02:    #073642;
$base01:    #586e75;
$base00:    #657b83;
$base0:     #839496;
$base1:     #93a1a1;
$base2:     #eee8d5;
$base3:     #fdf6e3;
$yellow:    #b58900;
$orange:    #cb4b16;
$red:       #d30102;
$magenta:   #d33682;
$violet:    #6c71c4;
$blue:      #268bd2;
$cyan:      #2aa198;
$green:     #859900;
@mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3) 
{   
    background-color:$rebase03;
    color:$rebase0;
    * { color:$rebase0; }
    h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; }
    a, a:active, a:visited { color: $rebase1; }
}
@mixin accentize($accent1, $accent2) {
    a, a:active, a:visited, a:hover, code.url, a > em { color: $accent1; }
    h1,h2,h3,h4,h5,h6 {color:$accent1;} 
    code {color:$accent2;}
    .quote h1 { color: $accent2; }
    
}
@mixin solarized-light-code {
    /*Original Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>*/

    pre code {
    display: block; padding: 0.5em;
    background: #fdf6e3; color: #657b83;
    }

    pre .comment,
    pre .template_comment,
    pre .diff .header,
    pre .doctype,
    pre .pi,
    pre .lisp .string,
    pre .javadoc {
    color: #93a1a1;
    font-style: italic;
    }

    pre .keyword,
    pre .winutils,
    pre .method,
    pre .addition,
    pre .css .tag,
    pre .request,
    pre .status,
    pre .nginx .title {
    color: #859900;
    }

    pre .number,
    pre .command,
    pre .string,
    pre .tag .value,
    pre .phpdoc,
    pre .tex .formula,
    pre .regexp,
    pre .hexcolor {
    color: #2aa198;
    }

    pre .title,
    pre .localvars,
    pre .chunk,
    pre .decorator,
    pre .built_in,
    pre .identifier,
    pre .vhdl .literal,
    pre .id {
    color: #268bd2;
    }

    pre .attribute,
    pre .variable,
    pre .lisp .body,
    pre .smalltalk .number,
    pre .constant,
    pre .class .title,
    pre .parent,
    pre .haskell .type {
    color: #b58900;
    }

    pre .preprocessor,
    pre .preprocessor .keyword,
    pre .shebang,
    pre .symbol,
    pre .symbol .string,
    pre .diff .change,
    pre .special,
    pre .attr_selector,
    pre .important,
    pre .subst,
    pre .cdata,
    pre .clojure .title {
    color: #cb4b16;
    }

    pre .deletion {
    color: #dc322f;
    }

    pre .tex .formula {
    background: #eee8d5;
    }
}

@mixin solarized-dark-code {
    pre code {
    display: block; padding: 0.5em;
    background: #002b36; color: #839496;
    }

    pre .comment,
    pre .template_comment,
    pre .diff .header,
    pre .doctype,
    pre .pi,
    pre .lisp .string,
    pre .javadoc {
    color: #586e75;
    font-style: italic;
    }

    pre .keyword,
    pre .winutils,
    pre .method,
    pre .addition,
    pre .css .tag,
    pre .request,
    pre .status,
    pre .nginx .title {
    color: #859900;
    }

    pre .number,
    pre .command,
    pre .string,
    pre .tag .value,
    pre .phpdoc,
    pre .tex .formula,
    pre .regexp,
    pre .hexcolor {
    color: #2aa198;
    }

    pre .title,
    pre .localvars,
    pre .chunk,
    pre .decorator,
    pre .built_in,
    pre .identifier,
    pre .vhdl .literal,
    pre .id {
    color: #268bd2;
    }

    pre .attribute,
    pre .variable,
    pre .lisp .body,
    pre .smalltalk .number,
    pre .constant,
    pre .class .title,
    pre .parent,
    pre .haskell .type {
    color: #b58900;
    }

    pre .preprocessor,
    pre .preprocessor .keyword,
    pre .shebang,
    pre .symbol,
    pre .symbol .string,
    pre .diff .change,
    pre .special,
    pre .attr_selector,
    pre .important,
    pre .subst,
    pre .cdata,
    pre .clojure .title {
    color: #cb4b16;
    }

    pre .deletion {
    color: #dc322f;
    }

    pre .tex .formula {
    background: #073642;
    } 
}
    /* light is default mode, so pair with general html definition */
    html, .light { 
        @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)
}

html, .light { @include solarized-light-code }

.dark  {
    @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)
}

.dark { @include accentize($cyan, $yellow); }

.dark { @include solarized-dark-code }

html * {
    @include accentize($red, $blue);
    color-profile: sRGB;
    rendering-intent: auto;
}
