/* COLORS */
:root {
    --white:        #fcfcfc;
    --primary-dark: #212224;
    --accent-color: #d24601;
    --overlay-gray: rgba(255,255,255,.5);
    --text-dark:    #363636;
    --text-light:   #4a4a4a;
    --text-white:   #c3c3c3;

    color-scheme: light;
}

/* Spacing */
:root {
 --spacing: 1rem;
 --sidebar: 215px;
}

/* Typography */
a {
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: none;
}

.sidebar .title, 
.mobile-header .title {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.25;
}
.sidebar .subtitle, 
.mobile-header .subtitle {
    color: var(--white);
    padding-top: .5rem;
    font-weight: 400;
    font-size: .8rem;
    color: var(--overlay-gray)
}
.content-title {
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.125;
    word-break: break-word;
}
.post-title {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.125;
    word-break: break-word;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.125;
    margin-bottom: 0.6rem;
    /* text-decoration: underline 3px solid var(--dark-mode-blocks); */
    /* text-underline-offset: 0.2em; */
}

.content h1 {
    font-size: 2rem;
    /* text-decoration-style: solid;
    text-decoration-color: var(--accent-color); */
}

.content h2 {
    font-size: 1.5rem;
    /* text-decoration-color: var(--dark-mode-blocks); */
}

.content h3 {
    font-size: 1.25rem;
    /* text-decoration-color:  var(--dark-mode-blocks); */
}

.content p {
    word-break: break-word;
}

/* Lists */
.content ul {
    list-style: disc outside;
    margin-left: 2em;
}

.content ol {
    list-style-position: outside;
    list-style-type: decimal-leading-zero;
    margin-left: 2em;
}

.content li {
    padding-left: .5rem;
}

.content ol > li > ol > li {
    list-style-type: lower-alpha;
}

.content blockquote:not(:last-child), .content dl:not(:last-child), .content ol:not(:last-child), .content p:not(:last-child), .content pre:not(:last-child), .content table:not(:last-child), .content ul:not(:last-child) {
    margin-bottom: 1em;
}

.content blockquote {
    background-color: #f5f5f5;
    border-left: 5px solid #dbdbdb;
    padding: 1.25em 1.5em;
}

.content pre {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    padding: 1.25em 1.5em;
    white-space: pre;
    word-wrap: normal;
}

pre {
    -webkit-overflow-scrolling: touch;
    background-color: #f5f5f5;
    color: #4a4a4a;
    overflow-x: auto;
    padding: 1.25rem 1.5rem;
    white-space: pre;
    word-wrap: normal;
}

pre code {
    background-color: transparent;
    color: currentColor;
    font-size: 1em;
    padding: 0;
}
code {
    background-color: #f5f5f5;
    font-weight: 400;
    padding: 0.25em 0.5em 0.25em;
}
code, pre {
    -moz-osx-font-smoothing: auto;
    -webkit-font-smoothing: auto;
    font-family: monospace;
    border-radius: 2px;
}

hr {
    background-color: #f5f5f5;
    border: none;
    display: block;
    height: 2px;
    margin: 1.5rem 0;
}

.post-date-1 + .post-date-1 .post-label,
.post-date-2 + .post-date-2 .post-label,
.post-date-3 + .post-date-3 .post-label,
.post-date-4 + .post-date-4 .post-label,
.post-date-5 + .post-date-5 .post-label,
.post-date-6 + .post-date-6 .post-label,
.post-date-7 + .post-date-7 .post-label,
.post-date-8 + .post-date-8 .post-label,
.post-date-9 + .post-date-9 .post-label,
.post-date-10 + .post-date-10 .post-label,
.post-date-11 + .post-date-11 .post-label,
.post-date-12 + .post-date-12 .post-label {
  display: none;
}

.post-label {
    flex: 0 0 100%;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
}

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
}

/* Images */
.image {
    display: block;
    position: relative;
}
.image img {
    display: block;
    height: auto;
    width: 100%;
    max-width: 100%;
}
img, video {
    height: auto;
    max-width: 100%;
}

.card-content .card-image {
    padding-top: 10px;
}
.secondary-nav img {
    width: 16px;
    vertical-align: middle;
}

/* Structure */
html {
    background-color: var(--primary-dark);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-light);
    line-height: 1.5;
    font-family: "system-ui", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    overscroll-behavior: none;
}

.primary-container {
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
}

.sidebar {
    flex: 0 0 auto;
    width: var(--sidebar);
}

.main-content {
    background-color: var(--white);
    flex: 1;
}

/* Sidebar / Navigation */

.sidebar, .mobile-header {
    background-color: var(--primary-dark)
}

.sidebar-content {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    padding: 3rem 2rem
}

.menu-list {
    list-style: none;
}

.sidebar-content .menu-list {
    padding-top: 20px;
    margin-left: -0.5rem;
}

.sidebar-content .menu-list a {
    padding: 0 .5rem;
}
.sidebar-content .menu-list a:hover {
    background-color: var(--white);
    color: #363636;
    border-radius: 2px;
    display: block;
}
.secondary-nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 1.5em;
    margin-left: -16px;
}

.secondary-nav a {
    display: flex;
    padding: .5em;
    flex-basis: 32px;
    justify-content: center;
}

.nav-item, .nav-item a {
    color: var(--white); 
    font-size: .9rem;
    line-height: 1.7rem;
}

/* Main Content */
.main-content {
    padding: 3rem 2rem;
}

.post-body .card-content,
article .card-content {
    padding: 0 0px 20px 0px;
    flex: 1;
}
.post-body .content-description,
article .content-description {
    padding-top: 10px;
}

/* Pagination */
.pagination {
    font-size: .8rem;
    padding-bottom: 2rem;
}
.pagination, .pagination-list {
    align-items: center;
    display: flex;
    justify-content: center;
    text-align: center;
}
.pagination-previous, 
.pagination-next {
    -moz-appearance: none;
    -webkit-appearance: none;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: none;
    display: inline-flex;
    height: 2.5em;
    justify-content: flex-start;
    line-height: 1.5;
    padding-left: calc(0.75em - 1px);
    padding-right: calc(0.75em - 1px);
    position: relative;
    vertical-align: top;
}
.pagination-current {
    padding-left: calc(0.75em - 1px);
    padding-right: calc(0.75em - 1px);
}
.pagination-next, 
.pagination-previous {
    flex-grow: 1;
    flex-shrink: 1;
    border-color: #dbdbdb;
    background: #f0f0f0;
    color: var(--text-dark);
    min-width: 2.5em;
    font-size: 1em;
    justify-content: center;
    margin: 0.25rem;
    text-align: center;
    padding-left: 0.75em;
    padding-right: 0.75em;
    white-space: nowrap;
}

/* Posts */
.post-section {
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}
.post-body {
    min-width: 66%; 
    max-width: 650px;
    flex: 1 0;
}
.post-meta {
    min-width: 33%;
    flex: 0 1 auto;
}
.card-content .content {
    padding-top: 10px;
    width: 100%;
}
.podcast-feed-meta {
    margin-bottom: 10px !important;
    color: unset !important;
    border-top: none !important;
}

.podcast-feed-meta a {
    color: var(--text-dark) !important;
}
.podcast-feed-meta .rss-text a {
    color: var(--accent-color) !important;
}

/* Hardcover Widget Styles */
.hardcover-widget {
    padding: 1rem 0 !important
}
.hardcover-widget li {
    list-style: none;
}

.hardcover-widget ul {
    margin-left: 0;
}
.hardcover-widget .hw-book-cover {
    background: none;
}

.hw-books-grid li:nth-of-type(n+5) {
  display: none;
}


/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .sidebar {
        display: none;
    }

    /* Mobile Header */
    /* Hide the links inside the navigation menu (except for logo/home) */
    .mobile-header #myLinks {
        display: none;
        padding-bottom: 10px;
    }

    .mobile-header #myLinks a {
        padding: 0 15px;
        font-size: .8rem;
        color: var(--white);
    }
    .mobile-header .menu-list {
        padding-top: 0;
    }
    
    /* Style navigation menu links */
    .mobile-header a {
        color: var(--white);
        padding: 15px 15px;
        text-decoration: none;
        font-size: 17px;
        display: block;
    }

    /* Style the hamburger menu */
    .mobile-header a.icon {
        display: block;
        position: absolute;
        right: 25px;
        top: 15px;
    }

    .fa-bars {
        display: block;
        position: absolute;
        text-align: center;
        left: 8px;
        top: 5px;
    }

    /* Content */
    .main-content {
        padding-top: var(--spacing);
        padding-right: var(--spacing);
        padding-left: var(--spacing);
        padding-bottom: 0;
    }
    article .card-content {
        padding: 0 0 20px 0;
    }
    article .date-col {
        display: none;
    }
    .post-body {
        width: calc(100vw - (var(--spacing) * 2));
    }

    /* Post Meta */
    .post-meta {
        padding: 10px 0 20px;
        margin: 0 -1rem;
        background-color: var(--primary-dark);
        color: var(--text-white);
        width: calc(100% + 2rem);
        max-width: none;
        border-left: none;
        border-top: 2px solid var(--primary-dark);
    }
    .post-meta a {
        color: var(--text-white);
        text-decoration: underline;
    }
    .post-meta .card-image {
        display: none;
    }
    .post-card-byline-date {
        border-left: none;
        padding-left: 1rem;
    }
    .post-meta .post-title {
        text-decoration: none;
    }
    .podcast-feed-body {
        order: 2;
    }
    .podcast-feed-meta {
        padding: 10px 0 10px;
        background-color: #ececec;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .mobile-header {
        display: none;
    }

    /* Post Meta */
    .post-meta {
        padding: 10px 0 20px;
        margin: 0 -2rem;
        background-color: #ececec;
        color: var(--primary-dark);
        width: calc(100% + 4rem);
        max-width: none;
        border-left: none;
        border-top: none;
    }
    .post-meta .card-image {
        display: none;
    }
    .post-card-byline-date {
        border-left: none;
        padding-left: calc(var(--spacing)*2);
    }
    /* Content */
    .main-content {
        padding-bottom: 0;
    }
    .post-body {
        width: calc(100vw - var(--sidebar) - (var(--spacing) * 4));
    }
    .podcast-feed-body {
        order: 2;
    }
    .podcast-feed-meta {
        padding: 10px 0 10px;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    article .date-col {
        display: none;
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .blog-content, 
    .index-content,
    .archive-content {
        max-width: 650px;
    }
    .home-content article,
    .blog-content article {
        display: flex;
        flex-wrap: wrap;
    }
    article .date-col {
        display: flex;
        flex: 0 1 auto;
        min-width: 85px;
    }
    .content-date-time {
        display: none;
    }
    /* Post Meta */
    .post-meta {
        padding: unset;
        margin: unset;
        background-color: unset;
        color: var(--primary-dark);
        /* max-width: 200px; */
    }
    .post-card-byline-date {
        position: -webkit-sticky; /* Safari */
        position: sticky;
        top: 3rem;
    }
    .card-side .image {
        max-height: 200px;
    }
    .post-meta .card-image {
        display: block;
        width: 60%;
        margin-bottom: 1rem;
        max-width: 15rem;
    }
    .post-meta {
        min-width: 33%;
        flex: 1;
    }
    /* .home-content .content,
    .card-content .content {
        padding-bottom: 50px;
    } */
    .post-meta .card-text {
        border-left: 2px solid var(--primary-dark);
        padding-left: 10px;
    }
    .podcast-feed-body {
        order: 0;
    }
    .podcast-feed-meta {
        background-color: unset !important;
    }
} 

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .post-body {
        min-width: unset;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark-mode-blocks: #181d28;
        --dark-mode-bluish-black: #0f131b;

        --text-dark: var(--text-white);
        --white: var(--text-white);

        color-scheme: dark;
    }

    body {
        color: var(--text-white);
    }
    .main-content {
        background-color: var(--dark-mode-bluish-black)
    }
    .sidebar, .mobile-header, .post-meta {
        background-color: var(--dark-mode-bluish-black);
    }

    .sidebar .title, 
    .mobile-header .title
    .content-title,
    .post-title,
    .post-meta,
    .nav-item, .nav-item a {
        color: var(--text-white);
    }

    hr {
        background-color: var(--accent-color);
    }

    pre, code, .content blockquote {
        color: var(--text-white);
        background-color: var(--dark-mode-blocks);
    }

    .content blockquote {
        border-left: 5px solid var(--accent-color);
    }

    .pagination-next, 
    .pagination-previous {
        border-color: var(--dark-mode-bluish-black);
        background: var(--dark-mode-blocks);
        color: var(--text-dark);
    }

    @media only screen and (min-width: 600px) {
        .post-meta {
            border-top: 2px solid var(--accent-color);
        }
    }

    @media only screen and (max-width: 600px) {
        .post-meta {
            border-top: 2px solid var(--accent-color);
        }
    }

    @media only screen and (min-width: 992px) {
        .post-meta {
            border-top: none;
        }
        .post-meta .card-text {
            border-left: 2px solid var(--accent-color);
        }
    }
}