/**
 * Reset some basic elements
 */
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
    margin: 0;
    padding: 0;
}

/* Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }


/* Spacing */
.post h1, h3, h4, h5, p, .post-body ul, #post-list li, pre {
margin-bottom: 20px;
}

/**
 * Basic styling
 */

html, body { height: 100%; }

body {
    font-family: $base-font-family;
    font-size: $base-font-size;
    line-height: $base-line-height;
    color: $text-color;
    background-color: $background-color;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -moz-font-feature-settings: "liga", "kern";
    font-weight: 300;
}

/**
 * Set `margin-bottom` to maintain vertical rhythm
 */
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
    margin-bottom: $spacing-unit / 2;
}


hr {
    background-color: #DFE1E4;
    width: 100px;
    height: 1px;
    border: 0;
    margin: 2rem auto;
}


/**
 * Images
 */
img {
    max-width: 100%;
    vertical-align: middle;
}



/**
 * Figures
 */
figure > img {
    display: block;
}

figcaption {
    font-size: $small-font-size;
}



/**
 * Lists
 */
ul, ol {
    margin-left: $spacing-unit;
}

li {
    list-style-position: inside;
    > ul,
    > ol {
         margin-bottom: 0;
    }
}



/**
 * Headings
 */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
}

h1 {
    font-size: 30px;
    letter-spacing: -1px;
    color: #222;
    font-weight: bold;;
}

// Styling
em {
    font-style: italic;
}

strong {
    font-weight: 600;
}


/**
 * Links
 */
a {
    color: $brand-color;
    text-decoration: none;

    &:visited {
        color: $brand-color;
    }

    &:hover {
        color: $brand-color;
        text-decoration: underline;
    }
}

// Custom colour selection
::selection {
    background-color: $brand-color;
    color: #fff;
}

::-moz-selection {
    background-color: $brand-color;
    color: #fff;
}


/**
 * Blockquotes
 */
blockquote {
    color: $grey-color;
    border-left: 4px solid $grey-color-light;
    padding-left: $spacing-unit / 2;
    font-size: 22px;
    letter-spacing: -1px;
    font-style: italic;

    > :last-child {
        margin-bottom: 0;
    }
}

/**
 * Code formatting
 */

.highlight {
    margin-bottom: 1rem;
    padding: 1rem 0;
    background-color: #f5f5f5;
    border-radius: .15rem;
}

pre,
code {
    font-size: 17px;
    font-family: 'Menlo', 'Monaco', "Courier New", monospace;
    white-space: pre-wrap;
    border-radius: 3px;
    background-color: #F5F5F5;
    color: #AB50C6;
}

code {
    padding: 1px 5px;
}

.lineno {
    font-size: 10px;
    padding-right: 10px;
    color: #aaa;
}

pre {
    padding: 8px 12px;
    // overflow-x: scroll;

    word-wrap: break-word;
    word-break: break-all;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    padding: 16px;
    padding-left: 21px;
    padding-bottom: 14px;
    display: block;
    margin: 0 0 1rem;
    line-height: 1.4;


    > code {
        border: 0;
        padding-right: 0;
        padding-left: 0;
    }
}

/**
 * Wrapper
 */
.wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px 0px;
    @extend %clearfix;

    @include media-query($on-laptop) {
        max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
        max-width:         calc(#{$content-width} - (#{$spacing-unit}));
        padding-right: $spacing-unit / 2;
        padding-left: $spacing-unit / 2;
    }
}



/**
 * Clearfix
 */
%clearfix {

    &:after {
        content: "";
        display: table;
        clear: both;
    }
}



/**
 * Icons
 */
.icon {

    > svg {
        display: inline-block;
        width: 16px;
        height: 16px;
        vertical-align: middle;

        path {
            fill: $grey-color;
        }
    }
}
