/*
Theme Name: peterswimm
Theme URI: https://peterswimm.com
Author: Peter Swimm
Description: Classic PHP theme ported from the peterswimm Hexo theme.
Version: 1.0.0
Text Domain: peterswimm
*/

/* === Font Faces === */
@font-face {
    font-family: "Meslo LG";
    font-weight: 400;
    font-style: normal;
    src: url("assets/fonts/MesloLGS-Regular.ttf") format("truetype");
}
@font-face {
    font-family: "Meslo LG";
    font-weight: 700;
    font-style: normal;
    src: url("assets/fonts/MesloLGS-Bold.ttf") format("truetype");
}
@font-face {
    font-family: "Meslo LG";
    font-weight: 400;
    font-style: italic;
    src: url("assets/fonts/MesloLGS-Italic.ttf") format("truetype");
}
@font-face {
    font-family: "Meslo LG";
    font-weight: 700;
    font-style: italic;
    src: url("assets/fonts/MesloLGS-BoldItalic.ttf") format("truetype");
}

/* === Reset === */
*, *:before, *:after { box-sizing: border-box; }
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 {
    margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ""; content: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* === Scrollbar === */
* { scrollbar-color: #999 transparent; }
*::-webkit-scrollbar { width: 8px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: #999; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background-color: #666; }
*::-webkit-scrollbar-thumb:active { background-color: #4d4d4d; }

/* === Base === */
html {
    margin: 0;
    padding: 0;
    height: 100%;
    border-top: 2px solid #363533;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}
body {
    margin: 0;
    height: 100%;
    background-color: #e2e0de;
    color: #363533;
    font-weight: 400;
    font-size: 14px;
    font-family: "Menlo", "Meslo LG", monospace;
    line-height: 1.725;
    text-rendering: geometricPrecision;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, .h1 {
    display: block;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #d44375;
    letter-spacing: .01em;
    font-weight: 700;
    font-style: normal;
    font-size: 1.5em;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}
h2, .h2 {
    position: relative;
    display: block;
    margin-top: 2rem;
    margin-bottom: .5rem;
    color: #111111;
    text-transform: none;
    letter-spacing: normal;
    font-weight: bold;
    font-size: 1rem;
}
h3 {
    color: #111111;
    text-decoration: underline;
    font-weight: bold;
    font-size: .9rem;
}
h4, h5, h6 {
    display: inline;
    text-decoration: none;
    color: #666666;
    font-weight: bold;
    font-size: .9rem;
}
h3, h4, h5, h6 { margin-top: .9rem; margin-bottom: .5rem; }
hr {
    border: .5px dashed #666666;
    opacity: .5;
    margin: 20px 0;
}
strong { font-weight: bold; }
em, cite { font-style: italic; }
sup, sub { position: relative; vertical-align: baseline; font-size: .75em; line-height: 0; }
sup { top: -.5em; }
sub { bottom: -.2em; }
small { font-size: .85em; }
acronym, abbr { border-bottom: 1px dotted; }
ul, ol, dl { line-height: 1.725; }
ul ul, ul ol, ol ul, ol ol { margin-top: 0; margin-bottom: 0; }
ol { list-style: decimal; }
dt { font-weight: bold; }
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
    overflow: auto;
    display: block;
}
th {
    padding: 8px;
    border-bottom: 1px dashed #666;
    color: #111111;
    font-weight: bold;
    font-size: 13px;
}
td { padding: 0 8px; border-bottom: none; }

/* === Layout === */
.max-width { max-width: 39rem; }
.mx-auto { margin-right: auto; margin-left: auto; }
.px3 { padding-right: 2rem; padding-left: 2rem; }
.py4 { padding-top: 4rem; padding-bottom: 4rem; }

@media (max-width: 480px) {
    .px3 { padding-right: 1rem; padding-left: 1rem; }
    .my4 { margin-top: 2rem; margin-bottom: 2rem; }
}

.content {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow-wrap: break-word;
}
.content p {
    hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    -webkit-hyphens: auto;
}
.content code {
    hyphens: manual;
    -moz-hyphens: manual;
    -ms-hyphens: manual;
    -webkit-hyphens: manual;
}
.content a {
    color: #363533;
    text-decoration: none;
    background-image: linear-gradient(transparent, transparent 5px, #363533 5px, #363533);
    background-position: bottom;
    background-size: 100% 6px;
    background-repeat: repeat-x;
}
.content a:hover {
    background-image: linear-gradient(transparent, transparent 4px, #2bbc8a 4px, #2bbc8a);
}
.content a.icon { background: none; }
.content a.icon:hover { color: #2bbc8a; }
.content h1 a, .content .h1 a,
.content h2 a, .content h3 a,
.content h4 a, .content h5 a, .content h6 a {
    background: none;
    color: inherit;
    text-decoration: none;
}
.content h1 a:hover, .content .h1 a:hover,
.content h2 a:hover, .content h3 a:hover,
.content h4 a:hover, .content h5 a:hover, .content h6 a:hover {
    background-image: linear-gradient(transparent, transparent 6px, #2bbc8a 6px, #2bbc8a);
    background-position: bottom;
    background-size: 100% 6px;
    background-repeat: repeat-x;
}
@media (min-width: 480px) { p { text-align: justify; } }

/* === Header === */
#header {
    margin: 0 auto 2rem;
    width: 100%;
}
#header h1, #header .h1 {
    margin-top: 0;
    margin-bottom: 0;
    color: #363533;
    letter-spacing: .01em;
    font-weight: 700;
    font-style: normal;
    font-size: 1.5rem;
    line-height: 2rem;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}
#header a {
    background: none;
    color: inherit;
    text-decoration: none;
}
#header #nav {
    color: #d44375;
    letter-spacing: .01em;
    font-weight: 200;
    font-style: normal;
    font-size: .8rem;
}
#header #nav ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    line-height: 15px;
}
#header #nav ul a {
    margin-right: 15px;
    color: #d44375;
    background: none;
}
#header #nav ul a:hover {
    background-image: linear-gradient(transparent, transparent 5px, #d44375 5px, #d44375);
    background-position: bottom;
    background-size: 100% 6px;
    background-repeat: repeat-x;
}
#header #nav ul li {
    display: inline-block;
    margin-right: 15px;
    border-right: 1px dotted #d44375;
    vertical-align: middle;
}
#header #nav ul .icon { display: none; }
#header #nav ul li:last-child { margin-right: 0; border-right: 0; }
#header #nav ul li:last-child a { margin-right: 0; }

@media screen and (max-width: 480px) {
    #header #title {
        display: table;
        margin-right: 5rem;
    }
    #header #title h1 {
        display: table-cell;
        vertical-align: middle;
    }
    #header #nav ul a:hover { background: none; }
    #header #nav ul li { display: none; border-right: 0; }
    #header #nav ul .icon {
        position: absolute;
        top: 77px;
        right: 1rem;
        display: inline-block;
        text-align: center;
    }
    #header #nav ul.responsive li { display: block; }
    #header #nav ul a[aria-label="Menu"] {
        display: inline-block;
        min-width: 48px;
        min-height: 48px;
    }
    #header #nav ul li:not(:first-child) {
        padding-top: 1rem;
        padding-left: 20px;
        font-size: 1rem;
    }
}

/* back link on single posts */
#post-back {
    margin-bottom: 2rem;
    font-size: .85rem;
}
#post-back a {
    color: #d44375;
    background: none;
    text-decoration: none;
}
#post-back a:hover { text-decoration: underline; }

/* === Post list (index/writing) === */
#about {
    margin-bottom: 2rem;
}
#writing {
    margin-bottom: 2rem;
}
.post-list { padding: 0; }
.post-list .post-item {
    margin-bottom: 1rem;
    margin-left: 0;
    list-style-type: none;
}
.post-list .post-item .meta {
    display: block;
    margin-right: 16px;
    min-width: 100px;
    color: #666;
    font-size: 14px;
}
@media (min-width: 480px) {
    .post-list .post-item {
        display: flex;
        margin-bottom: 5px;
    }
    .post-list .post-item .meta { text-align: left; }
}

/* === Article / Single Post === */
article header .posttitle {
    margin-top: 0;
    margin-bottom: 0;
    text-transform: none;
    font-size: 1.5em;
    line-height: 1.25;
}
.posttitle {
    text-transform: none;
    font-size: 1.5em;
    line-height: 1.25;
}
article header .meta {
    margin-top: 0;
    margin-bottom: 1rem;
}
article header .meta * {
    color: #666666;
    font-size: .85rem;
}
article header .author {
    text-transform: uppercase;
    letter-spacing: .01em;
    font-weight: 700;
}
article header .postdate { display: inline; }

.content article .entry-content h2:before,
.content .e-content h2:before {
    position: absolute;
    top: -4px;
    left: -1rem;
    color: #d44375;
    content: "#";
    font-weight: bold;
    font-size: 1.2rem;
}
.content article img,
.content article video,
.content .e-content img,
.content .e-content video {
    display: block;
    margin: auto;
    max-width: 100%;
    height: auto;
}
.video-container {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    height: 0;
}
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 0;
    width: 100%;
    height: 100%;
}
.content article blockquote,
.content .e-content blockquote {
    margin: 1rem 10px;
    padding: .5em 10px;
    background: inherit;
    color: #ab2251;
    quotes: "\201C" "\201D" "\2018" "\2019";
    font-weight: bold;
}
.content article blockquote p,
.content .e-content blockquote p { margin: 0; }
.content article blockquote:before,
.content .e-content blockquote:before {
    margin-right: .25em;
    color: #ab2251;
    content: "\201C";
    vertical-align: -.4em;
    font-size: 2em;
    line-height: .1em;
}
.content article blockquote footer,
.content .e-content blockquote footer {
    color: #666;
    font-size: 12px;
}
.article-tag .tag-link:before { content: "#"; }
.article-tag .tag-link {
    background-image: linear-gradient(transparent, transparent 10px, #2bbc8a 10px, #2bbc8a);
    background-position: bottom;
    background-size: 100% 6px;
    background-repeat: repeat-x;
}
.article-category .category-link {
    background-image: linear-gradient(transparent, transparent 10px, #2bbc8a 10px, #2bbc8a);
    background-position: bottom;
    background-size: 100% 6px;
    background-repeat: repeat-x;
}
@media (min-width: 480px) {
    .article-tag, .article-category { display: inline; }
    .article-tag:before, .article-category:before { content: "|"; }
}

/* === Archive === */
#archive .post-year { list-style-type: none; }
#archive .post-list { padding: 0; }
#archive .post-list .post-item {
    margin-bottom: 1rem;
    margin-left: 0;
    list-style-type: none;
}
#archive .post-list .post-item .meta {
    display: block;
    margin-right: 16px;
    min-width: 100px;
    color: #666;
    font-size: 14px;
}
@media (min-width: 480px) {
    #archive .post-list .post-item {
        display: flex;
        margin-bottom: 5px;
        margin-left: 1rem;
    }
    #archive .post-list .post-item .meta { text-align: left; }
}

/* === Footer === */
#footer {
    position: absolute;
    bottom: 0;
    margin-bottom: 10px;
    width: 100%;
    color: #666;
    vertical-align: top;
    text-align: center;
    font-size: 12px;
}
#footer ul { margin: 0; padding: 0; list-style: none; }
#footer li {
    display: inline-block;
    margin-right: 15px;
    border-right: 1px solid #666;
    vertical-align: middle;
}
#footer li a { margin-right: 15px; }
#footer li:last-child { margin-right: 0; border-right: 0; }
#footer li:last-child a { margin-right: 0; }
#footer a {
    color: #666;
    text-decoration: underline;
    background-image: none;
}
#footer a:hover { color: #888; }
#footer .footer-left { height: 20px; vertical-align: middle; line-height: 20px; }
@media (min-width: 39rem) {
    #footer {
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
        align-items: center;
        align-content: center;
        margin-bottom: 20px;
    }
    #footer .footer-left { align-self: flex-start; margin-right: 20px; }
    #footer .footer-right { align-self: flex-end; }
}

/* === Code === */
pre {
    overflow-x: auto;
    padding: 10px 15px 0;
    border: 1px dotted #666;
    border-radius: 4px;
    font-size: 13px;
    font-family: "Menlo", "Meslo LG", monospace;
    line-height: 22px;
}
pre code {
    display: block;
    padding: 0;
    border: none;
}
code {
    padding: 0 5px;
    border: 1px dotted #666;
    border-radius: 2px;
}
.highlight {
    overflow-x: auto;
    margin: 1rem 0;
    padding: 10px 15px;
    border-radius: 4px;
    background: #d5d3d0;
    font-family: "Menlo", "Meslo LG", monospace;
}
.highlight pre { margin: 0; padding: 0; border: none; background: none; }
.highlight table { width: auto; }
.highlight td.gutter { text-align: right; opacity: .2; }
.highlight .line { height: 22px; }

/* === Pagination === */
.pagination, .nav-links {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    font-size: .85rem;
}
.pagination a, .nav-links a {
    color: #d44375;
    background: none;
    text-decoration: none;
}
.pagination a:hover, .nav-links a:hover { text-decoration: underline; }

/* === Search === */
.search-form {
    display: flex;
    margin: 1rem 0;
}
.search-form input[type="search"] {
    flex: 1;
    padding: .25rem .5rem;
    border: 1px dotted #666;
    border-radius: 2px;
    background: #e2e0de;
    color: #363533;
    font-family: inherit;
    font-size: 14px;
}
.search-form button {
    padding: .25rem .75rem;
    border: 1px dotted #666;
    border-left: 0;
    background: #e2e0de;
    color: #363533;
    font-family: inherit;
    cursor: pointer;
}
.search-form button:hover { color: #d44375; }

/* === WP nav menu overrides === */
#header #nav ul.menu { margin: 0; padding: 0; }
#header #nav ul.menu li { /* same as above */ }
#footer .menu { margin: 0; padding: 0; list-style: none; }
#footer .menu li {
    display: inline-block;
    margin-right: 15px;
    border-right: 1px solid #666;
    vertical-align: middle;
}
#footer .menu li:last-child { margin-right: 0; border-right: 0; }
#footer .menu li a { color: #666; text-decoration: underline; background: none; }
