/*
	Name: Smashing HTML5
	Date: July 2009
	Description: Sample layout for HTML5 and CSS3 goodness.
	Version: 1.0
	License: MIT <http://opensource.org/licenses/MIT>
	Licensed by: Smashing Media GmbH <http://www.smashingmagazine.com/>
	Original author: Enrique Ramírez <http://enrique-ramirez.com/>
	Customized for this blog by: Roy
*/

/* Imports */
@import url("reset.css");
@import url("pygment.css");
@import url("typogrify.css");
@import url("fonts.css");

/***** Global *****/
/* Body */
body {
    background: #ffffff;
    color: #1a1a1a;
    font-size: 100%;
    font-family: "Inter", "Google Sans Flex", system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    text-align: left;
}

code {
    font-size: 90%;
    font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

/* Headings */
h1 {
    font-size: 1.5em;
}
.entry-content h1 {
    text-decoration: underline;
    font-weight: bold;
}
h2 {
    font-size: 1.3em;
}
h3 {
    font-size: 1.2em;
}
h4 {
    font-size: 1.1em;
}
h5 {
    font-size: 1.1em;
}
h6 {
    font-size: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.8em;
    font-family: "Inter", "Google Sans Flex", system-ui, -apple-system, sans-serif;
}

h3,
h4,
h5,
h6 {
    margin-top: 0.8em;
}

hr {
    border: 1px solid #eeeeee;
}

/* Anchors */
a {
    outline: 0;
}
a img {
    border: 0px;
    text-decoration: none;
}
a:link,
a:visited {
    color: #c0392b;
    padding: 0 1px;
    text-decoration: underline;
}
a:hover,
a:active {
    color: #c0392b;
    text-decoration: underline;
    text-shadow: none;
}

h1 a:hover {
    background: none;
    color: #c0392b;
    text-decoration: underline;
    text-shadow: none;
}

/* Paragraphs */
div.line-block,
p {
    margin-top: 1em;
    margin-bottom: 1em;
}

strong,
b {
    font-weight: 600;
}
em,
i {
    font-style: italic;
}

/* Lists */
ul {
    list-style: outside disc;
    margin: 0em 0 0 1.5em;
}

ol {
    list-style: outside decimal;
    margin: 0em 0 0 1.5em;
}

li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.post-info {
    float: right;
    margin: 10px;
    padding: 5px;
}

.post-info p {
    margin-top: 1px;
    margin-bottom: 1px;
}

.readmore {
    float: right;
}

dl {
    margin: 0 0 1.5em 0;
}
dt {
    font-weight: 600;
}
dd {
    margin-left: 1.5em;
}

pre {
    background-color: #f5f5f5;
    padding: 10px;
    margin: 10px 0;
    overflow-x: auto;
    border-radius: 4px;
}

/* Quotes */
blockquote {
    margin: 20px 0;
    border-left: 3px solid #ccc;
    padding-left: 1em;
    color: #555;
}

div.note {
    float: right;
    margin: 5px;
    font-size: 85%;
    max-width: 300px;
}

/* Tables */
table {
    margin: 0.5em auto 1.5em auto;
    width: 98%;
}

thead th {
    padding: 0.5em 0.4em;
    text-align: left;
}

tbody td {
    padding: 0.5em 0.4em;
}

/* HTML5 tags */
header,
section,
footer,
aside,
nav,
article,
figure {
    display: block;
}

/***** Layout *****/
.body {
    clear: both;
    margin: 0 auto;
    max-width: 760px;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}
img.right,
figure.right {
    float: right;
    margin: 0 0 2em 2em;
}
img.left,
figure.left {
    float: left;
    margin: 0 2em 2em 0;
}

/*
	Header
*****************/
#banner {
    margin: 0 auto;
    padding: 2em 1rem 0;
    text-align: center;
    max-width: 760px;
    box-sizing: border-box;
}

/* Banner */
#banner h1 {
    font-size: 1.7em;
}
#banner h1 a:link,
#banner h1 a:visited {
    color: #1a1a1a;
    display: block;
    font-weight: 700;
    margin: 0 0 0 0.2em;
    text-decoration: none;
}
#banner h1 a:hover,
#banner h1 a:active {
    background: none;
    color: #c0392b;
    text-shadow: none;
}

#banner h1 strong {
    font-size: 0.36em;
    font-weight: 400;
}

/* Main Nav */
#banner nav {
    background: white;
    font-size: 1em;
    margin: 0.5em auto 0;
    padding: 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

#banner nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
#banner nav li {
    display: inline;
    margin: 0;
}

#banner nav a:link,
#banner nav a:visited {
    color: #333;
    display: inline-block;
    padding: 8px 1.2em;
    text-decoration: none;
    font-weight: 500;
}
#banner nav a:hover,
#banner nav a:active,
#banner nav .active a:link,
#banner nav .active a:visited {
    color: #c0392b;
    text-decoration: underline;
    text-shadow: none !important;
}

/*
	Featured
*****************/
#featured {
    background: #fff;
    margin: 0 auto 2em;
    overflow: hidden;
    padding: 20px;
    max-width: 760px;
    box-sizing: border-box;
}

#featured figure {
    border: 1px solid #eee;
    float: right;
    margin: 0.786em 2em 0 5em;
    width: 248px;
}
#featured figure img {
    display: block;
    float: right;
}

#featured h2 {
    color: #c0392b;
    font-size: 1.714em;
    margin-bottom: 0.333em;
}
#featured h3 {
    font-size: 1.429em;
    margin-bottom: 0.5em;
}

#featured h3 a:link,
#featured h3 a:visited {
    color: #1a1a1a;
    text-decoration: none;
}
#featured h3 a:hover,
#featured h3 a:active {
    background: none;
    color: #c0392b;
    text-shadow: none;
}

/*
	Body
*****************/
#content {
    background: #fff;
    margin: 0 auto 2em;
    overflow: hidden;
    padding: 20px;
    max-width: 760px;
    box-sizing: border-box;
}

/*
	Extras
*****************/
#extras {
    margin: 0 auto;
    padding: 20px 1rem;
    overflow: hidden;
    max-width: 760px;
    box-sizing: border-box;
}

#extras ul {
    list-style: none;
    margin: 0;
}
#extras h2 {
    color: #c0392b;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0.25em;
    padding: 0 3px;
}

#extras a:link,
#extras a:visited {
    color: #444;
    display: block;
    text-decoration: none;
}

#extras a:hover,
#extras a:active {
    text-decoration: underline;
    background: none;
    color: #c0392b;
    text-shadow: none;
}

/* Blogroll */
#extras .blogroll {
    float: left;
    width: 55%;
}

#extras .blogroll li {
    float: left;
    margin: 0 20px 0 0;
}

/* Social */
#extras .social {
    float: right;
    width: 40%;
}

#extras div[class="social"] a {
    background-repeat: no-repeat;
    background-position: 3px 6px;
    padding-left: 25px;
}

/* Icons */
.social a[href*="about.me"] {
    background-image: url("../images/icons/aboutme.png");
}
.social a[href*="bitbucket.org"] {
    background-image: url("../images/icons/bitbucket.png");
}
.social a[href*="delicious.com"] {
    background-image: url("../images/icons/delicious.png");
}
.social a[href*="digg.com"] {
    background-image: url("../images/icons/digg.png");
}
.social a[href*="facebook.com"] {
    background-image: url("../images/icons/facebook.png");
}
.social a[href*="gitorious.org"] {
    background-image: url("../images/icons/gitorious.png");
}
.social a[href*="github.com"],
.social a[href*="git.io"] {
    background-image: url("../images/icons/github.png");
    background-size: 16px 16px;
}
.social a[href*="gittip.com"] {
    background-image: url("../images/icons/gittip.png");
}
.social a[href*="plus.google.com"] {
    background-image: url("../images/icons/google-plus.png");
}
.social a[href*="groups.google.com"] {
    background-image: url("../images/icons/google-groups.png");
}
.social a[href*="news.ycombinator.com"],
.social a[href*="hackernewsers.com"] {
    background-image: url("../images/icons/hackernews.png");
}
.social a[href*="last.fm"],
.social a[href*="lastfm."] {
    background-image: url("../images/icons/lastfm.png");
}
.social a[href*="linkedin.com"] {
    background-image: url("../images/icons/linkedin.png");
}
.social a[href*="reddit.com"] {
    background-image: url("../images/icons/reddit.png");
}
.social a[type$="atom+xml"],
.social a[type$="rss+xml"] {
    background-image: url("../images/icons/rss.png");
}
.social a[href*="slideshare.net"] {
    background-image: url("../images/icons/slideshare.png");
}
.social a[href*="speakerdeck.com"] {
    background-image: url("../images/icons/speakerdeck.png");
}
.social a[href*="stackoverflow.com"] {
    background-image: url("../images/icons/stackoverflow.png");
}
.social a[href*="twitter.com"] {
    background-image: url("../images/icons/icons/x-logo-black.png");
}
.social a[href*="x.com"] {
    background-image: url("../images/icons/icons/x-logo-black.png");
}
.social a[href*="vimeo.com"] {
    background-image: url("../images/icons/vimeo.png");
}
.social a[href*="youtube.com"] {
    background-image: url("../images/icons/youtube.png");
}

/*
	About
*****************/
#about {
    background: #fff;
    font-style: normal;
    margin: 0 auto 2em;
    overflow: hidden;
    padding: 20px;
    max-width: 760px;
    text-align: left;
    box-sizing: border-box;
}

#about .primary {
    float: left;
    width: 165px;
}
#about .primary strong {
    color: #c0392b;
    display: block;
    font-size: 1.286em;
}
#about .photo {
    float: left;
    margin: 5px 20px;
}

#about .url:link,
#about .url:visited {
    text-decoration: none;
}

#about .bio {
    float: right;
    width: 500px;
}

/*
	Footer
*****************/
#contentinfo {
    padding-bottom: 2em;
    text-align: right;
}

/***** Sections *****/
/* Blog */
.hentry {
    display: block;
    clear: both;
    border-bottom: 1px solid #eee;
    padding: 1.5em 0;
}
li:last-child .hentry,
#content > .hentry {
    border: 0;
    margin: 0;
}
#content > .hentry {
    padding: 1em 0;
}
.hentry img {
    display: none;
}
.entry-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    margin-top: 0;
}
.entry-title a:link,
.entry-title a:visited {
    text-decoration: none;
    color: #222;
}
.entry-title a:visited {
    background-color: #fff;
}

.hentry .post-info * {
    font-style: normal;
}

/* Content */
.hentry footer {
    margin-bottom: 2em;
}
.hentry footer address {
    display: inline;
}
#posts-list footer address {
    display: block;
}

/* Blog Index */
#posts-list {
    list-style: none;
    margin: 0;
}
#posts-list .hentry {
    padding-left: 10px;
    position: relative;
}

#posts-list footer {
    left: 10px;
    position: relative;
    float: left;
    top: 0.5em;
    width: 190px;
}

/* About the Author */
#about-author {
    background: #f9f9f9;
    clear: both;
    font-style: normal;
    margin: 2em 0;
    padding: 10px 20px 15px 20px;
    border-radius: 4px;
}

#about-author strong {
    color: #c0392b;
    clear: both;
    display: block;
    font-size: 1.429em;
}

#about-author .photo {
    border: 1px solid #ddd;
    float: left;
    margin: 5px 1em 0 0;
}

/* Comments */
#comments-list {
    list-style: none;
    margin: 0 1em;
}
#comments-list blockquote {
    background: #f8f8f8;
    clear: both;
    font-style: normal;
    margin: 0;
    padding: 15px 20px;
    border-radius: 4px;
}
#comments-list footer {
    color: #888;
    padding: 0.5em 1em 0 0;
    text-align: right;
}

#comments-list li:nth-child(2n) blockquote {
    background: #f5f5f5;
}

/* Add a Comment */
#add-comment label {
    clear: left;
    float: left;
    text-align: left;
    width: 150px;
}
#add-comment input[type="text"],
#add-comment input[type="email"],
#add-comment input[type="url"] {
    float: left;
    width: 200px;
}

#add-comment textarea {
    float: left;
    height: 150px;
    width: 495px;
}

#add-comment p.req {
    clear: both;
    margin: 0 0.5em 1em 0;
    text-align: right;
}

#add-comment input[type="submit"] {
    float: right;
    margin: 0 0.5em;
}
#add-comment * {
    margin-bottom: 0.5em;
}

/** Roy's customizations: */
.pubdate {
    font-size: 100%;
}

/* Responsive: mobile */
@media (max-width: 640px) {
    .body {
        padding: 0 0.75rem;
    }

    #banner {
        padding: 1.5em 0.75rem 0;
    }

    #banner nav ul {
        flex-direction: column;
        align-items: center;
    }

    #banner nav li {
        display: block;
        width: 100%;
        text-align: center;
    }

    #extras .blogroll,
    #extras .social {
        float: none;
        width: 100%;
    }

    #about .bio {
        float: none;
        width: 100%;
    }

    #posts-list footer {
        float: none;
        position: static;
        width: auto;
    }

    #add-comment textarea {
        width: 100%;
        box-sizing: border-box;
    }

    img.right,
    figure.right,
    img.left,
    figure.left {
        float: none;
        margin: 1em auto;
        display: block;
    }
}
