@import "normalize.css";
@import "fonts.css";
@import "responsive.css";


/* Main elements */
html {
    background-color: #fcfcfc;
    color: hsl(0, 0%, 25%);
    font-family: Concourse, "Avenir Next", "Gill Sans", Helvetica, sans-serif;
    line-height: 130%;
    font-size: 1.2em;
    font-feature-settings: "lnum"on, "ss04"on, "ss12"on, "ss13"on, "ss15"off, "ss16"on, "ss18"on;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

div#content {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
}

a {
    color: hsl(199, 80%, 35%);
    text-decoration: none;
}

/* https://davidwalsh.name/external-links-css */
/* https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/ */
/* a[href*="//"]:not([href*="localhost"]):after {
    content: "•";
    vertical-align: baseline;
    position: relative;
    top: -0.4rem;
    font-size: 0.75rem;
    font-weight: normal;
} */

/* TODO: better color */
a:hover {
    background-color: hsl(199, 75%, 98%);
}

abbr {
    text-transform: lowercase;
    font-variant-caps: small-caps;
    /* https://stackoverflow.com/a/32162038 */
    border-bottom: none !important;
    cursor: inherit !important;
    text-decoration: none !important;
}

/* Blocks now have margins _after_, not before */
p,
ul {
    margin-top: 0;
    margin-bottom: 0.8rem;
}


/* Header sizes and styles */
h1,
h2,
h3,
h4 {
    color: hsl(0, 0%, 10%);
    line-height: 120%;
    font-family: Concourse, "Avenir Next", "Gill Sans", Helvetica, sans-serif;
}

h2,
h3 {
    font-weight: 500;
}

h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    margin-top: 1.6rem;
}

h3 {
    font-size: 1rem;
    font-weight: bold;
}

h4 {
    font-size: 0.9rem;
    font-variant-caps: all-small-caps;
    margin: 0.2rem 0;
}

/* ul,
ol {
    margin-top   : 1em;
    margin-bottom: 1em;
} */

ul ul,
ol ul,
ol ol,
ul ol {
    margin-top: 0;
}

ul li {
    margin-bottom: 0.2rem;
}

ul li:last-child {
    margin-bottom: 0;
}

pre {
    padding: 0.5rem;
    overflow: scroll;
}

code {
    font-family: SourceCodePro, Menlo, Consolas, monospace;
    font-size: 0.85em;
    line-height: 100%;
}

pre code {
    font-size: 0.75em;
}

blockquote {
    border-left: #dde5e5 0.5em solid;
    padding-left: 1em;
    color: hsl(0, 0%, 40%);
    font-style: italic;
}

hr {
    width: 66%;
    border: 0;
    height: 1px;
    background-color: hsl(0, 0%, 80%);
    margin: 1rem auto;
}


/* Custom classes */
.centered {
    text-align: center;
}

.clear {
    clear: both;
}

.no-height {
    height: 0;
}

/* Erase unstacked padding for the above block on the index page */
.no-height+h2 {
    margin-top: 1.2rem;
}

.subnav {
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.hide {
    visibility: hidden;
    font-size: 0;
}

.lnum {
    font-feature-settings: "onum"off, "lnum"on, "ss04"on, "ss12"on, "ss13"on, "ss15"off, "ss16"on, "ss18"on;
}

img.index-float-left {
    margin: 0 1.5rem 1rem 0;
    padding: 0;
    max-width: 40%;
    max-height: 100%;
    height: auto;
    width: auto;
    float: left;
    border-radius: 0.1rem;
    border: hsl(180, 7%, 70%) 1px solid;
}

ul.inline {
    list-style: none;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

/* https://stackoverflow.com/q/15306108/656740 */
ul.inline li {
    display: inline;
}

ul.inline li:after {
    content: " \2022 ";
}

ul.inline li:last-child:after {
    content: "";
}

/* Header and navigation */
header {
    margin-top: 4rem;
}


/* Styles for most pages */
header div#page-title {
    font-family: Concourse, "Aenir Next", "Gill Sans", Helvetica, sans-serif;
    font-size: 2em;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0.5em 0;
}

header div#page-title a {
    color: inherit;
    font-weight: inherit;
}

header div#page-title a:hover {
    background-color: inherit;
}

header div#page-title img {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.2em;
}

header div#page-title span {
    display: inline-block;
    vertical-align: middle;
}


/* Index page */
header.centered h1 {
    font-family: Concourse, "Aenir Next", "Gill Sans", Helvetica, sans-serif;
    font-size: 2.5em;
    margin: 0.67em 0;
    text-transform: uppercase;
}

nav {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}


/* Main content */
main {
    margin: 2rem auto 0 auto;
    width: 100%;
}


/* Footer */
footer {
    text-align: center;
    margin: 2rem 0 0.5rem;
    font-size: 0.75rem;
}

/* https://electrictoolbox.com/style-html-hr-tag-css/ */
footer hr {
    border: none;
    background-color: hsl(0, 0%, 60%);
    height: 1px;
}


/* Index page stuff */
h2#hi-im-tom {
    font-weight: bold;
}


/* Blog stuff */
/* Sub-title dates (and date captions) are a bit smaller */
.blog-date {
    font-size: 0.9rem;
}

p.blog-date {
    margin-top: -0.5rem;
}

/* Tags and archives show without bulletrs */

ul.no-bullet {
    padding-left: inherit;
}

ul.no-bullet li {
    margin-left: 0;
    margin-bottom: 0.3rem;
    list-style: none;
}

/* Clean up auto-generated footnote stuff */

div.footnote {
    font-size: 0.8rem;
}

div.footnote p {
    margin-bottom: 0.2rem;
}

div.footnote ol {
    padding-left: 1em;
}

div.footnote hr {
    display: none;
}
