/*
 *  Copyright (c) John Sundell and Gui Rambo 2022
 *  Uses the Source Sans Pro font, Copyright 2010-2018 Adobe, license: https://github.com/adobe-fonts/source-sans-pro/blob/release/LICENSE.md.
 *  Uses the Source Code Pro font, Copyright 2010, 2012 Adobe Systems Incorporated, license: https://github.com/adobe-fonts/source-code-pro/blob/master/LICENSE.md.
 */

 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fonts */

@font-face {
    font-family: "Main";
    src: url(/https/stacktracepodcast.fm/fonts/SourceSansPro-Regular.ttf);
}

@font-face {
    font-family: "Main";
    src: url(/https/stacktracepodcast.fm/fonts/SourceSansPro-Bold.ttf);
    font-weight: bold;
}

@font-face {
    font-family: "Code";
    src: url(/https/stacktracepodcast.fm/fonts/SourceCodePro-Regular.ttf);
}

/* Core elements */

html {
    background-color: #fff;
}

body {
    color: #111;
    font-family: "Main";
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

h1 {
    font-size: 2em;
}

h1.section-title {
    font-size: 2.5em;
    flex-grow: 1;
}

h2 {
    font-size: 1.5em;
    padding-top: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style-type: none;
    margin-block-start: 0;
    margin-block-end: 0;
}

pre {
    padding-top: 15px;
}

code {
    font-family: Code;
}

pre code {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.wrapper {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 40px;
}

.hstack {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.see-all {
    text-align: center;
    margin-top: 30px;
}

.see-all a {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #555;
    color: #fff;
}

/* Header */

header {
    position: relative;
    background: linear-gradient(to bottom, #011627, #010D17);
    color: #fff;
    text-align: center;
    padding: 40px;
    padding-top: 45px;
}

header .logo {
    display: inline-block;
    margin-bottom: 25px;
}

header img {
    max-width: 515px;
}

header li {
    display: inline-block;
    font-family: Code;
    border-left: 1px solid #eee;
    padding: 0 15px;
}

header li:first-child {
    border: none;
}

/* Show info */

.show-info {
    margin-bottom: 15px;
}

.show-info p {
    display: inline-block;
    font-family: Code;
    color: #666;
    padding-right: 30px;
}

/* Subscription links */

.subscription-links {
    flex: none;
}

.subscription-links,
.subscription-links * {
    display: inline-block;
    height: 40px;
}

.subscription-links li:first-child {
    padding-right: 10px;
}

/* Content */

article p, article li {
    line-height: 1.5;
}

article p, article ul {
    padding-top: 15px;
}

article a:not(.episode-title a) {
    text-decoration: underline;
}

article ul {
    list-style-type: disc;
    padding-left: 20px;
}

article li:not(:last-child) {
    padding-bottom: 5px;
}

article li > ul {
    padding-top: 5px;
}

/* Episodes */

.episode-list-header {
    padding-bottom: 10px;
}

.episode-list {
    padding-top: 15px;
}

.episode-list > li:not(:last-child) {
    margin-bottom: 30px;
}

.episode-list > li > a:hover {
    text-decoration: none;
}

.episode-list li > a:hover article {
    background-color: #ddd;
}

.episode-list article {
    background-color: #eaeaea;
    border-radius: 15px;
    padding: 20px;
}

.episode .metadata {
    color: #165C57;
    font-family: Code;
}

.episode:not(.compact) .metadata {
    margin-bottom: 20px;
}

.episode audio {
    width: 100%;
}

.episode .footnote {
    font-size: 0.8em;
    color: #555;
    text-align: center;
}

/* Footer */

footer {
    font-size: 0.9em;
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

footer a {
    text-decoration: underline;
}

/* Responsive rules */

@media(max-width: 800px) {
    .show-info,
    .subscription-links {
        display: block;
    }

    .show-info .subscription-links {
        text-align: center;
        margin-top: 25px;
    }
}

@media(max-width: 650px) {
    .wrapper {
        padding-left: 25px;
        padding-right: 25px;
    }

    header {
        padding: 30px;
        padding-top: 35px;
        padding-bottom: 25px;
    }

    header img {
        width: 100%;
    }

    header .logo {
        margin-bottom: 15px;
    }

    header nav li {
        line-height: 2;
    }

    .episode-list-header {
        display: block;
    }

    .episode-list-header .subscription-links {
        text-align: center;
        margin-top: 20px;
    }
}

@media(max-width: 400px) {
    header li {
        display: block;
        border-left: none;
        padding: 0;
    }

    article h1 {
        line-height: 1.2;
    }

    .episode-title {
        margin-bottom: 15px;
    }

    .episode .metadata {
        font-size: 0.85em;
    }

    .show-info {
        margin-bottom: 10px;
    }

    .subscription-links {
        height: auto;
        margin-top: 20px;
    }

    .subscription-links * {
        height: 38px;
    }
}

@media(max-width: 350px) {
    .subscription-links li {
        display: block;
        margin-top: 10px;
    }

    .subscription-links li:first-child {
        padding-right: 0;
        margin-top: 0;
    }
}


/* Theming */

@media (prefers-color-scheme: dark) {
    html {
        background-color: #111;
    }

    body {
        color: #ddd;
    }

    .show-info p, .episode .footnote {
        color: #aaa;
    }

    .episode-list article {
        background-color: #222;
    }

    .episode-list li > a:hover article {
        background-color: #000;
    }

    .episode .metadata {
        color: #5A9F9B;
    }

    footer {
        color: #888;
    }
}
