/* ===================================
   RANDALLBLACK.COM
   Custom Styles
=================================== */

/* =====================
   BRAND COLORS
===================== */

:root {
    --brand-blue: #263e8f;
    --brand-blue-hover: #0067E0;

    --bg-color: #ffffff;
    --text-color: #222222;
    --card-bg: #ffffff;
    --border-color: #e5e5e5;

    --code-bg: #f5f5f5;
    --code-inline-bg: #ececec;
}

[data-theme="dark"] {
    --brand-blue: #4f7cff;
    --brand-blue-hover: #0067E0;

    --bg-color: #121212;
    --text-color: #e5e5e5;
    --card-bg: #1e1e1e;
    --border-color: #333333;

    --code-bg: #181818;
    --code-inline-bg: #2a2a2a;
}

/* =====================
   GLOBAL
===================== */

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.title {
    color: var(--brand-blue) !important;
}

.subtitle {
    color: var(--text-color) !important;
    opacity: 0.85;
}

a {
    color: var(--brand-blue);
}

a:hover {
    text-decoration: underline;
}

/* =====================
   LAYOUT
===================== */

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* =====================
   NAVIGATION
===================== */

#navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {

    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    min-height: 4.5rem;

}

.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid #e5e5e5;
}

.brand-name {
    margin-left: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-blue);
    letter-spacing: -0.02em;
}

.nav-photo {
    height: 52px;
    width: auto;
    border-radius: 8px;
}

.navbar-item {
    font-size: 1.05rem;
    font-weight: 500;
}

.navbar-item:hover {
    color: var(--brand-blue) !important;
}

/* =====================
   HERO
===================== */

.hero {
    background-color: var(--brand-blue);
}

.hero .title {
    color: white !important;
}

.hero .subtitle {
    color: white !important;
}

.hero-home .subtitle {
    color: white !important;
    text-align: center !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    color: white;
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.navbar-burger {
    color: var(--text-color);
}

/* =====================
   BUTTONS
===================== */

.button.is-brand {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
    font-weight: 600;
}

.button.is-brand:hover {
    background-color: var(--brand-blue-hover);
    border-color: var(--brand-blue-hover);
    color: white;
}

.hero-home {
    background-image:
        linear-gradient(
            rgba(0,0,0,.55),
            rgba(0,0,0,.55)
        ),
        url('/images/hero-background.jpg');

    background-size: cover;
    background-position: center;
}

.hero-home .title,
.hero-home .subtitle {
    color: white;
}

/* =====================
   CONTENT SECTIONS
===================== */

.section-title {
    color: var(--brand-blue);
    margin-bottom: 1rem;
}

.box {
    background-color: var(--card-bg);
    color: var(--text-color);
    height: 100%;
    border-radius: 12px;
}

.box h3 {
    color: var(--brand-blue);
}

/* =====================
   IMAGES
===================== */

img {
    max-width: 100%;
    height: auto;
}

.profile-photo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.profile-photo-home {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.profile-photo-about {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* =====================
   BLOG
===================== */

.blog-card {
    margin-bottom: 2rem;
}

/* =====================
   FOOTER
===================== */

.footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.footer strong {
    color: var(--brand-blue);
}

.footer p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer a {
    color: var(--brand-blue);
    font-weight: 500;
}

/* =====================
   UTILITY CLASSES
===================== */

.has-brand-color {
    color: var(--brand-blue);
}

.has-brand-background {
    background-color: var(--brand-blue);
    color: white;
}

/* =====================
   PODCASTS
===================== */

.podcast-art {
    width: 200px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    display: block;
    margin: 0 auto;
}

/* ==================================================
   BLOG POSTS
================================================== */

.blog-feature-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto 2rem;
}

.blog-meta {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.75;
}

#blog-posts {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 2rem;

}

@media (max-width: 1024px) {

    #blog-posts {

        grid-template-columns:
            repeat(2, 1fr);

    }

}

@media (max-width: 768px) {

    #blog-posts {

        grid-template-columns:
            1fr;

    }

}

.blog-post p {
    margin-bottom: 1.5rem;
}

.blog-post h2,
.blog-post h3 {
    color: var(--brand-blue);
}

.blog-post h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-post ul,
.blog-post ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post li {
    margin-bottom: 0.5rem;
}

.blog-post blockquote {
    background-color: var(--card-bg);
    border-left: 4px solid var(--brand-blue);
    padding: 1rem 1.25rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    opacity: 0.9;
}

.blog-post img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.blog-post hr {
    margin: 2.5rem 0;
}

.blog-post a {
    font-weight: 500;
}

.blog-post table {
    width: 100%;
    margin: 2rem 0;
}

[data-theme="dark"] .blog-post blockquote {
    border-left-color: var(--brand-blue);
}

#latest-posts {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 2rem;

}

@media (max-width: 768px) {

    #latest-posts {

        grid-template-columns:
            1fr;

    }

}

.blog-post figure {

    margin: 2rem 0;

}

.blog-post figcaption {

    text-align: center;

    font-size: 0.9rem;

    color: var(--text-color);

    opacity: 0.75;

    margin-top: 0.5rem;

}

.blog-post figure.is-pulled-right {
    max-width: 350px;
}

/* =====================
   BLOCKQUOTES
===================== */
/* Warning / Caution Block */

blockquote.warning {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid var(--accent-color);
    background-color: var(--code-background);
    border-radius: 6px;
    font-style: normal;
}

blockquote.warning p:last-child {
    margin-bottom: 0;
}

blockquote.warning strong {
    font-weight: 700;
}

blockquote.warning::before {
    content: "⚠ Warning";
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.blog-post blockquote {

    margin: 2rem 0;
    padding: 1rem 1.5rem;

    border-left: 4px solid var(--brand-blue);

    background-color: var(--code-bg);

    border-radius: 0 8px 8px 0;

    font-style: italic;

}

.blog-post blockquote p {

    margin: 0;

}

.blog-post blockquote.scripture {

    border-left: 4px solid #c9a227;

    background-color: var(--code-bg);

    font-style: normal;

}

@media (max-width: 768px) {

    .blog-post figure.is-pulled-right {

        float: none !important;
        margin: 2rem auto !important;
        max-width: 100%;

    }

}

.blog-post::after {
    content: "";
    display: block;
    clear: both;
}

.blog-post ol > li {
    margin-bottom: 1.5rem;
}

.blog-post ol ol {
    margin-top: 1rem;
}

.blog-post ol ol > li {
    margin-bottom: 1rem;
}

.script-flow-chart {

    float: right;
    max-width: 200px;
    margin: 0 0 1.5rem 2rem;

}

.script-flow-chart img {

    width: 100%;
    height: auto;

}

.script-flow-chart figcaption {

    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.75;
    margin-top: 0.5rem;

}

.script-flow-chart img {

    cursor: zoom-in;
    transition: transform 0.2s ease;

}

.script-flow-chart img:hover {

    transform: scale(1.02);

}

@media (max-width: 768px) {

    .script-flow-chart {

        float: none;
        max-width: 100%;
        margin: 2rem auto;

    }

}

/* =====================
   NOTIFICATIONS
===================== */

.notification.site-note {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-blue);
}

.notification.site-note p,
.notification.site-note strong,
.notification.site-note a {
    color: var(--text-color);
}

.notification.site-note a {
    color: var(--brand-blue);
}

.article-notice {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
    background: var(--code-bg);
    border-radius: 4px;
}

/* =====================
   POST NAVIGATION
===================== */

.post-navigation {

    display: flex;
    justify-content: space-between;
    gap: 2rem;

    margin-top: 3rem;
    padding-top: 2rem;

    border-top: 1px solid var(--border-color);

}

.post-navigation a {

    color: var(--brand-blue);
    font-weight: 500;

    max-width: 45%;

}

.post-navigation a:hover {

    text-decoration: underline;

}

.nav-next {

    text-align: left;

}

.nav-prev {

    text-align: right;
    margin-left: auto;

}

@media (max-width: 768px) {

    .post-navigation {

        flex-direction: column;

    }

    .post-navigation a {

        max-width: 100%;
        text-align: left;

    }

}

/* =====================
   THEME TOGGLE
===================== */

#theme-toggle {

    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.5rem 1rem;

}

#theme-toggle:hover {

    color: var(--brand-blue);
    background: transparent;

}

#theme-toggle:focus-visible {

    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;

}

/* =====================
   CODE BLOCKS
===================== */

.blog-post pre {

    background-color: var(--code-bg);
    border: 1px solid var(--border-color);

    border-radius: 8px;

    padding: 1rem;
    margin: 2rem 0;

    overflow-x: auto;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 0.95rem;
    line-height: 1.5;

}

.blog-post pre code {

    background: none;
    padding: 0;

    color: var(--text-color);

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

}

.blog-post code {

    background-color: var(--code-inline-bg);

    color: var(--text-color);

    padding: 0.15rem 0.35rem;

    border-radius: 4px;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 0.9em;

}

/* =====================
   RELATED POSTS
===================== */

#related-posts .card-image img {
    width: 100%;
    height: auto;
    display: block;
}

#related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

#related-posts .columns {
    align-items: stretch;
}

#related-posts .column {
    display: flex;
}

#related-posts .card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#related-posts .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#related-posts .card-text {
    flex-grow: 1;
}

#related-posts .title.is-5 {
    font-size: 1.6rem;
}

.related-post-link {
    display: block;
    text-decoration: none;
}

.related-post-link .card {
    transition: transform 0.2s ease;
}

.related-post-link:hover .card {
    transform: translateY(-2px);
}

.related-post-link:hover,
.related-post-link:hover * {
    text-decoration: none !important;
}