---
---

body {
    font: 14px/1.5 jaf-bernino-sans, 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Geneva, Verdana, sans-serif;
}

.page-header {
    width: 1200px;
    margin: 0 auto;
    height: 60px;
    position: relative;
    .logo {
        background: url(/public/images/logo.svg) no-repeat center center;
        width: 125px;
        height: 50px;
        margin-top: 10px;
        margin-left: 14px;
    }
    .rss {
        position: absolute;
        right: 0;
        top: 54px;
        background: url(/public/images/rss.png) no-repeat 0 0;
        width: 60px;
        height: 60px;
    }
    .page-nav {
        position: absolute;
        left: 320px;
        top: 10px;
        margin: 0;
        padding: 0;
        li {
            float: left;
            list-style: none;
            margin: 0;
            padding: 0;
            a {
                display: block;
                padding: 0 18px;
                line-height: 46px;
                font-size: 14px;
                text-align: center;
                color: #5a5a5a;
                &:hover {
                    color: #5a5a5a;
                }
            }
            &:hover {
                border-bottom: 1px solid #5a5a5a;
            }
        }
    }
    .page-navi-index li:nth-child(1),
    .page-navi-articles li:nth-child(2),
    .page-navi-code li:nth-child(3),
    .page-navi-weekly li:nth-child(3),
    .page-navi-needyou li:nth-child(4) {
        border-bottom: 1px solid #ff4200;
    }
}

.banner {
    text-align: center;
    a {
        display: block;
        height: 100%;
        width: 100%;
    }
}

.container {
    padding: 30px 0 10px;
    width: 1200px;
    margin: 0 auto;
    zoom: 1;
    &:after {
        content: ".";
        display: block;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        clear: both;
    }
}

.page-sidebar {
    float: right;
    width: 280px;
    .github-projects {
        margin: 0;
        padding: 0;
        li {
            margin: 0 0 5px 0;
            padding: 0;
            list-style: none;
            border: 1px solid #dddddd;
            background: white url(/public/images/github.png) no-repeat 0 -2px;
            padding: 10px 0 9px 50px;
            a {
                display: block;
                font-size: 12px;
                color: #5a5a5a;
            }
        }
    }
}

.articles {
    float: left;
    width: 900px;
}

article {
    float: left;
    width: 900px;
    background: #ffffff;
    width: 860px;
    padding: 20px;
    margin: 0 0 30px 0;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    p, h1, h2, h3, h4, h5, a {
        font-family: Museo, Segoe, "Segoe UI", Helvetica, Arial, sans-serif;
    }
    p {
        margin: 10px 0;
    }
    a {
        &:link, &:visited, &:link:hover, &:visited:hover {
            color: #ea3e0a;
            margin: 0 2px;
            overflow-wrap: break-word;
        }
        &:hover {
            color: #ea3e0a;
            margin: 0 2px;
            text-decoration: underline;
        }
    }
    .article-info img {
        float: left;
        width: 60px;
        height: 60px;
        border-radius: 33px;
        border: 3px solid #fafafa;
        margin: 0 12px 0 0;
        box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.2);
    }
    .title {
        font-size: 26px;
        color: #333333;
        line-height: 40px;
        margin: 5px 0;
        padding: 0;
        font-family: Palatino, "Palatino Linotype", 'OFL Sorts Mill Goudy', 'OFL Sorts Mill Goudy TT', Georgia, serif;
    }
    .author {
        color: #999999;
        font-size: 12px;
        padding: 0 2px;
    }
    .content {
        padding: 10px 6px 30px;
        font-size: 14px;
        line-height: 22px;
        h2 {
            margin: 60px 0 10px;
            padding: 0 0 0 20px;
            font-size: 18px;
            border-left: 3px solid #dddddd;
        }
        h3 {
            margin: 40px 0 10px;
            font-size: 14px;
            border-bottom: 2px solid #dadada;
        }
        p {
            line-height: 22px;
            margin: 15px 0;
            color: #333333;
        }
        img {
            border: 1px solid #bababa;
            box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
            max-width: 840px;
        }
        table {
            cell-spacing: 0;
            border: 1px solid #dadada;
            margin: 20px 0;
            width: 100%;
            th, td {
                padding: 6px 10px;
                border-bottom: 1px solid #eaeaea;
                border-right: 1px solid #dadada;
                color: #333;
                line-height: 18px;
            }
            &.border-less {
                th, td {
                    border-right: none;
                    border-left: none;
                }
            }
            th {
                font-size: 16px;
                line-height: 28px;
                font-weight: bold;
                color: #333;
            }
            tbody tr:nth-child(even) {
                background: #fafafa;
            }
        }
    }
    .highlight {
        background: #fefefe;
        border: 1px solid #dadada;
        padding: 0 10px;
        &:hover {
            border-color: #ff6136;
        }
        code {
            font-size: 12px;
            line-height: 14px;
            font-family: Menlo, Consolas, "Liberation Mono", Courier, monospace;
        }
    }
    #comment {
        margin: 20px 5px;
        border-top: 1px solid #dadada;
        padding: 10px 0;
    }
    blockquote {
        background: #f9f9f9;
        border-left: 10px solid #ccc;
        margin: 1.5em 10px;
        padding: 0.5em 10px;
        position: relative;
        quotes: "\201C" "\201D" "\2018" "\2019";
        &:before {
            color: #ccc;
            content: open-quote;
            font-size: 2em;
            position: absolute;
        }
        p {
            text-indent: 1.5em;
            margin: 0 !important;
        }
    }
}

.getmore {
    margin: 0 0 0 14px;
    a {
        display: block;
        border: 1px solid #dddddd;
        border-radius: 2px;
        height: 30px;
        line-height: 30px;
        color: #666666;
        background: #f3f3f3;
        text-align: center;
        &:hover {
            background: #dddddd;
            color: #ff6136;
        }
    }
}

.pagination {
    font-size: 12px;
    text-align: center;
    clear: both;
    a {
        display: inline-block;
        border: 1px solid #dddddd;
        border-radius: 2px;
        min-width: 24px;
        height: 24px;
        line-height: 24px;
        &:hover {
            background: #dddddd;
            color: #ff6136;
        }
        &.disabled {
            color: #999999;
            cursor: default;
            &:hover {
                background: none;
                color: #999999;
            }
        }
    }
}

.post-lists {
    width: 900px;
    float: left;
}

.post-list {
    margin: 0;
    padding: 0;
    &::after {
        content: "";
        display: table;
        clear: both;
        height: 0;
        overflow: hidden;
        font-size: 0;
    }
    li {
        list-style: none;
        float: left;
        margin: -3px 0 40px 14px;
        // add padding
        padding-bottom: 19px;
        width: 280px;
        // remove designated height
        // height: 230px;
        border: 3px solid #f8f8f8;
        background: #ffffff;
        .bnwrap {
            width: 100%;
            height: 150px;
            overflow: hidden;
            img {
                width: 100%;
                height: auto;
            }
        }
        p {
            line-height: 30px;
            color: #5a5a5a;
            margin: 5px 0;
            padding: 0 10px;
            // prevent overflow related bugs
            text-overflow: ellipsis;
            width: 80%;
            white-space: nowrap;
            overflow: hidden;
        }
        .date {
            font-size: 10px;
            color: #999999;
            padding: 0 10px;
        }
        &:hover {
            border: 3px solid #ff6136;
            p {
                color: #ff6136;
            }
        }
    }
}

.page-footer {
    border-top: 1px solid #d9d8d8;
    background: #f0f0f0;
    .foot-inner {
        width: 1200px;
        margin: 10px auto;
        padding: 0 0 30px;
        zoom: 1;
        &:after {
            content: ".";
            display: block;
            visibility: hidden;
            height: 0;
            overflow: hidden;
            clear: both;
        }
    }
    dl {
        float: left;
        color: #4a4a4a;
        width: 30%;
        margin: 0;
        font-size: 12px;
        dt {
            font-size: 18px;
            padding: 10px 0;
        }
        dd {
            margin: 0;
            padding: 0;
            list-style: none;
            ul {
                margin: 0;
                padding: 0;
                list-style: none;
            }
            li {
                margin: 0;
                padding: 0;
                list-style: none;
                float: left;
                width: 48%;
            }
            p {
                margin: 0 0 10px;
            }
            a {
                font-size: 12px;
                color: #4a4a4a;
                line-height: 24px;
            }
            &:after {
                content: ".";
                display: block;
                visibility: hidden;
                height: 0;
                overflow: hidden;
                clear: both;
            }
        }
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 0;
        .post-list {
            float: none;
            width: 100%;
            li {
                box-sizing: border-box;
                // specified height removed no need for clear float
                // float: none;
                // switch width from 'auto' to '96%' which won't make too much shitty feeling
                // width: auto;
                width: 94%;
                display: block;
                margin: 0 3% 20px;
                .bnwrap { height: auto; }
            }
        }
    }
}
@media (min-width: 480px) and (max-width: 640px) {
    .container {
        padding: 10px 0;
        .post-list {
            float: none;
            width: 100%;
            li {
                box-sizing: border-box;
                // specified height removed no need for clear float
                // float: none;
                // switch width from 'auto' to '96%' which won't make too much shitty feeling
                // width: auto;
                width: 48%;
                display: block;
                margin: 0 1% 20px;
            }
        }
    }
}
@media (max-width: 640px) {
    html {
        overflow-x: hidden;
    }
    .page-header, .page-footer, .container, .articles, article, .post-lists {
        width: 100%;
    }
    .page-nav li:nth-child(2) {
        display: none;
    }
    .page-nav li:nth-child(5) {
        display: none;
    }
    .page-nav li:nth-child(6) {
        display: none;
    }
    .page-nav li:nth-child(7) {
        display: none;
    }
    .page-header {
        height: 60px;
        .logo, .rss {
            display: none;
        }
        .page-nav {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            li {
                width: 23%;
                a {
                    white-space: nowrap;
                    padding: 0;
                }
                &:nth-child(5) {
                    display: none;
                }
            }
        }
    }
    .banner {
        display: none;
    }
    .container {
        padding: 10px 0;
        // .post-list {
        //     float: none;
        //     width: 100%;
        //     li {
        //         box-sizing: border-box;
        //         // specified height removed no need for clear float
        //         // float: none;
        //         // switch width from 'auto' to '96%' which won't make too much shitty feeling
        //         // width: auto;
        //         width: 46%;
        //         display: block;
        //         margin: 0 2% 20px;
        //     }
        // }
        .page-sidebar {
            display: none;
        }
        article {
            width: auto;
            box-sizing: border-box;
            box-shadow: none;
            float: none;
            .title {
                font-size: 18px;
            }
            ul {
                margin: 0;
                padding: 0 0 0 15px;
            }
            img {
                max-width: 100% !important;
            }
        }
    }
    .page-footer .foot-inner {
        width: 100%;
        dl {
            float: none;
            display: block;
            width: auto;
            margin: 0 20px 30px;
            clear: both;
            dd li {
                width: 33.3%;
                a {
                    display: block;
                    border: 1px solid #dcdcdc;
                    margin: 5px 0 5px 5px;
                    padding: 5px;
                    background: #fafafa;
                }
            }
        }
    }
}
