/* Bear-like theme, copied from hrdk.bearblog.dev default style.
   This is the ONLY css file. Everything visual lives here.
   Learn it: :root = variables, body = centered 720px column. */

:root {
    --width: 720px;
    --font-main: Verdana, sans-serif;
    --font-secondary: Verdana, sans-serif;
    --font-scale: 1em;
    --background-color: #f5f3ee;
    --heading-color: #302d29;
    --text-color: #48443f;
    --link-color: #626d55;
    --visited-color: #786a59;
    --muted-color: #7d766d;
    --code-background-color: #e9e5dd;
    --code-color: #302d29;
    --blockquote-color: #48443f;
    --rule-color: #d7d1c7;
}

/* Bear auto dark-mode. Remove this block if you only want light mode. */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1e1d1b;
        --heading-color: #d8d1c8;
        --text-color: #c7bfb5;
        --link-color: #b5a895;
        --visited-color: #a69b87;
        --muted-color: #938a80;
        --code-background-color: #2a2825;
        --code-color: #d8d1c8;
        --blockquote-color: #c7bfb5;
        --rule-color: #45413b;
    }
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.social-links,
.icon-link {
    display: flex;
    align-items: center;
}

.social-links {
    flex-wrap: wrap;
    gap: 18px;
}

.icon-link {
    width: fit-content;
    gap: 6px;
    color: var(--muted-color);
    font-size: .92em;
}

.icon-link:hover {
    color: var(--link-color);
}

.icon {
    display: block;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
}

nav a {
    margin-right: 8px;
}

strong, b {
    color: var(--heading-color);
}

button {
    margin: 0;
    cursor: pointer;
}

time {
    font-family: monospace;
    font-style: normal;
    font-size: 15px;
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px dashed var(--rule-color);
}

/* THIS is your free image support.
   Bear free plan blocks uploads. Here images are just files in /images/,
   and this rule makes them never overflow the 720px column. */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

code {
    font-family: monospace;
    padding: 2px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
}

blockquote {
    border-left: 1px solid var(--rule-color);
    color: var(--blockquote-color);
    padding-left: 20px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
}

.title:hover {
    text-decoration: none;
}

.title h1 {
    font-size: 1.5em;
}

/* blog post list like Bear's /blog/ page */
ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex: 0 0 130px;
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

pre {
    padding: 12px 15px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
    overflow-x: auto;
}

pre code {
    padding: 0;
    background: none;
}
