:root {
    --palette-blue: #4285f4;
    --palette-dark-blue: #01579b;
    --palette-yellow: #fbbc05;
    --palette-red: #ea4335;
    --palette-green: #24a853;
    --palette-orange: #ff8f00;
    --palette-dark-gray: #2F3436;
    --palette-light-gray: #d3d3d3;
    --palette-pink: #ff0080;
    --palette-purple: #9849e7;

    --primary-color: var(--palette-purple);
    --background-color: #ffffff;
    --background-secondary-color: #f5f5f5;
    --color: #000000;
    --link-color: var(--palette-purple);
    --border-color: #cfcfcf;

    --hover-bg-color: #d9d9d9;
    --active-bg-color: #e8e8e8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #000000;
        --background-secondary-color: #111111;
        --color: #ffffff;
        --border-color: #333333;

        --hover-bg-color: #262626;
        --active-bg-color: #171717;
    }
}

html, body {
    padding: 0;
    margin: 0;
    background-color: var(--background-color);
    color: var(--color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
}

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

    &:hover {
        text-decoration: underline;
    }

    &.body-color {
        color: var(--color);
        text-decoration: underline;

        &:hover {
            text-decoration: none;
        }
    }
}

/* Fix for Bootstrap's container-fluid class */
.container-fluid {
    box-sizing: border-box;
}

.header {
    height: 65px;
    background-color: #000000;
    color: #ffffff;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;

    .main-nav {
        min-width: 225px;

        .main-nav-link {
            color: #ffffff;
            white-space: nowrap;
            border-radius: 5px;
            transition: background-color 175ms;
            font-weight: 600;

            &.selected {
                color: var(--primary-color);
            }
        }
    }

    @media (max-width: 992px) {
        margin-bottom: 70px;
        box-shadow: none;

        .main-nav {
            background-color: #000000;
            position: absolute;
            top: 65px;
            left: 0;
            border-top: 1px solid #333333;
            width: 100%;
            min-width: 100%;
            box-sizing: border-box;
            overflow-x: auto;
            padding: 12px 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
        }
    }
}

.wallpaper {
    width: 100%;
    height: 700px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.7), var(--background-color)),
        url('/images/wallpaper-white.jpg');

    @media (prefers-color-scheme: dark) {
        background-image:
            linear-gradient(rgba(0,0,0,0.35), var(--background-color)),
            url('/images/wallpaper-black.jpg');
    }
}

.main-content {
    position: relative;
    z-index: 1;
}

.footer {
    position: relative;
    z-index: 1;
    padding: 15px 0;
    font-size: .85em;
    margin-top: 40px;

    .footer-link {
        color: var(--color);
        text-decoration: underline;

        &:hover {
            text-decoration: none;
        }
    }
}

.logo-wrapper {
    gap: 15px;
    font-size: 22px;
    font-weight: 600;

    a {
        text-decoration: none !important;
        color: var(--color);
    }

    .logo-white {
        color: #ffffff;
    }
}

.blog-post-tile {
    &:not(:last-child) {
        margin-bottom: 35px;
    }

    .post-image {
        height: 175px;
        width: 100%;
        object-fit: cover;
        border-radius: 5px;
    }

    .no-featured-image {
        background: var(--background-secondary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        width: 100%;
        height: 175px;
        max-width: 100%;

        .no-featured-image-icon {
            height: 75px;
            object-fit: cover;

            @media (prefers-color-scheme: dark) {
                opacity: 0.25;
            }
        }
    }

    .blog-post-excerpt {
        margin: 8px 0;
    }

    .blog-post-header-link {
        color: var(--color);
        font-size: 20px;

        &:hover {
            color: var(--link-color);
            text-decoration: none;
        }
    }
}

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

    figure {
        margin: 10px 0;

        figcaption {
            color: var(--color);
            font-size: .85em;
            text-align: center;
        }
    }

    .title-image {
        width: 100%;
        object-fit: cover;
        max-height: 600px;
        border-radius: 5px;
    }

    .image-gallery {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;

        .gallery-item {
            flex-basis: calc(50% - 2.5px);

            &:only-child {
                flex-basis: 100%;
            }

            @media (max-width: 767px) {
                flex-basis: 100%;
            }
        }

        img {
            width: 100%;
            height: auto;
            object-fit: cover;
        }
    }
}

.blog-post-meta {
    font-size: .8em;
    text-transform: uppercase;
}

.blog-pagination {
    .pagination-list {
        list-style: none;

        .page-item {
            &.active {
                .page-link {
                    color: #000000;
                    background-color: var(--primary-color);
                }
            }
        }
    }
}

.social-media {
    a {
        text-decoration: none;
        opacity: .65;
        transition: opacity 250ms;

        &:hover {
            opacity: 1;
        }
    }

    .social-icon {
        height: 20px;
        width: 20px;
    }
}

.badge {
    text-decoration: none;
    display: block;
    border-radius: 5px;
    background-color: var(--background-secondary-color);
    padding: 5px 12px;
    transition: background-color 350ms;
    font-size: .9em;
    font-weight: 700;
    color: var(--color);

    &:hover {
        color: #000000;
        background-color: var(--primary-color);
        text-decoration: none;
    }

    &.disabled {
        opacity: .2;
        cursor: default;
        user-select: none;

        &:hover {
            background-color: transparent;
            color: var(--color);
        }
    }
}

.low-opacity-text {
    opacity: .65;
    transition: opacity 250ms;

    &:hover {
        opacity: 1;
    }
}

.sidebar {
    font-size: .9em;

    .sidebar-content {
        margin-bottom: 20px;
    }

    .sidebar-header {
        position: relative;
        margin-top: 0;

        &::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 50px;
            height: 2px;
            background-color: var(--primary-color);
            border-radius: 2px;
        }
    }
}

.page-title {
    margin-top: 0;
}

.responsive-image {
    max-width: 100%;
    height: auto;
}

.tag-cloud {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 5px;
}
