@import url("https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* Root modifiers (for Pico CSS especially) */
:root {
    color-scheme: dark;
    --pico-border-radius: 0.5rem;
    --pico-text-underline-offset: 0.5rem;
    --pico-typography-spacing-vertical: 1.5rem;
    --pico-transition: 0;
    --pico-form-element-spacing-vertical: 1rem;
    --pico-spacing: 2rem;
    --pico-form-element-spacing-horizontal: 1.25rem;
    --pico-font-family: "Space Mono", monospace;
    --font-size-base: 0.8rem;
    --font-size-small: 0.7rem;
    --font-size-large: 0.95rem;
    --pico-background-color: rgb(18, 18, 18);
    --pico-color: #d1d1d1;
    --pico-text-selection-color: rgba(201, 37, 37, 0.5);
    --pico-muted-color: #a0a0a0;
    --pico-muted-border-color: #3a3f44;
    --pico-primary: #d63333;
    --pico-primary-background: #c92525;
    --pico-primary-border: var(--pico-primary-background);
    --pico-primary-underline: rgba(201, 37, 37, 0.75);
    --pico-primary-hover: #d63333;
    --pico-primary-hover-background: #d63333;
    --pico-primary-hover-border: var(--pico-primary-hover-background);
    --pico-primary-hover-underline: var(--pico-primary-hover);
    --pico-primary-focus: rgba(201, 37, 37, 0.75);
    --pico-primary-inverse: #fff;
    --pico-h1-color: #e0e0e0;
    --pico-h2-color: #e0e0e0;
    --pico-h3-color: #d0d0d0;
    --pico-h4-color: #c0c0c0;
    --pico-h5-color: #b0b0b0;
    --pico-h6-color: #a0a0a0;
    --pico-blockquote-border-color: var(--pico-muted-border-color);
    --pico-blockquote-footer-color: var(--pico-muted-color);
    --pico-button-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    --pico-button-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    --pico-table-border-color: var(--pico-muted-border-color);
    --pico-table-row-stripped-background-color: rgba(255, 255, 255, 0.05);
    --pico-code-background-color: #222;
    --pico-code-color: var(--pico-color);
    --pico-code-kbd-background-color: var(--pico-color);
    --pico-code-kbd-color: var(--pico-background-color);
    --pico-accordion-border-color: var(--pico-muted-border-color);
    --pico-accordion-active-summary-color: var(--pico-primary-hover);
    --pico-accordion-close-summary-color: var(--pico-color);
    --pico-accordion-open-summary-color: var(--pico-muted-color);
    --pico-card-background-color: var(--pico-background-color);
    --pico-card-border-color: var(--pico-muted-border-color);
    --pico-card-box-shadow: var(--pico-box-shadow);
    --pico-card-sectioning-background-color: #2a2a35;
    --pico-modal-overlay-background-color: rgba(0, 0, 0, 0.75);
    --pico-tooltip-background-color: #000;
    --pico-tooltip-color: #e0e0e0;
}

/* Global Element Styling */
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: "Space Mono", monospace;
    font-size: var(--font-size-base);
    line-height: 1.5;
    width: 64%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    min-height: 100vh;
    padding-bottom: 6rem;
}

code {
    font-family: monospace;
}
code.copyable {
    cursor: pointer;
}

hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.8);
    margin: 2rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Space Mono", Courier, monospace;
    font-weight: 700;
    margin-bottom: 1rem;
}

section {
    margin-bottom: 4rem;
}

dialog {
    background-color: transparent;
    cursor: default;
    overflow: hidden;
}
dialog article {
    background: repeating-linear-gradient(
        45deg,
        var(--pico-background-color),
        var(--pico-background-color) 20px,
        #0c0c0c 20px,
        #0c0c0c 40px
    );
    box-shadow: 0 0 30px rgba(0, 0, 0, 1);
}
dialog article header {
    background-color: #0a0a0a;
}
dialog article h4 {
    margin-top: 1rem;
}

a {
    cursor: pointer;
    text-decoration: none;
}
a:hover {
    border-radius: 0px;
    background-color: #d63333;
    font-weight: bold;
    color: #0c0c0c;
}

/* Utility IDs */

#blep-image:hover {
    cursor: grab;
}

/* Utility Classes */
.center {
    text-align: center;
}

.faded {
    opacity: 0.7;
}

.mobile-nav {
    display: none;
}

.section-title {
    opacity: 0.7;
    text-align: center;
    margin-bottom: 2rem;
}

.warn-highlight {
    color: #0c0c0c;
    background-color: #d63333;
}

.pretty-highlight {
    color: #0c0c0c;
    background-color: var(--pico-color);
}

/* Top-Name Styling */
.name a {
    color: inherit;
    text-decoration: none;
    cursor: default;
    font: inherit;
    font-weight: inherit;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
}
.name a:hover {
    cursor: pointer;
}
.name a:active,
.name a:focus {
    color: inherit;
    text-decoration: none;
    background: none;
    outline: none;
}

/* Portfolio Specific Styling */
.portfolio-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.project-card {
    border: 3px solid #000;
    background-color: #0f0f0f;
    padding: 1.5rem;
    border-radius: var(--pico-border-radius);
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 300px;
}

.project-card:hover {
    cursor: pointer;
    transform: translateY(-8px);
}

.project-card:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 5px,
            black 5px,
            black 10px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 5px,
            black 5px,
            black 10px
        );
    background-blend-mode: multiply;
    border: none;
    border-bottom-left: 3px solid black;
    border-bottom-right: 3px solid black;
}

/* Pagination and Footer */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem 0;
    text-align: center;
    font-size: var(--font-size-small);
}

.footer p {
    color: #555;
}

/* Blog Post Specific Styling */
.blog-post {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 1rem;
    text-align: left;
}

.blog-post-left {
    display: block;
    font-size: var(--font-size-large);
}

.blog-post-left strong {
    font-size: 1.5rem;
    font-style: italic;
}

.blog-post-right {
    opacity: 0.5;
    font-size: var(--font-size-small);
}

/* Blog Display Specific Styling */
.blog-display {
    width: 95%;
    margin: 0 auto;
}

.blog-display-title {
    text-align: center;
    margin-top: 1rem;
    border: 1px solid var(--pico-primary);
    padding: 2rem;
    padding-bottom: 1rem;
}

.blog-display-footer {
    font-size: var(--font-size-small);
}

.blog-display-content {
    line-height: 1.6;
}

/* Tag Styling */
.blog-post-tags {
    font-size: var(--font-size-small);
}

.tag {
    display: inline-block;
    color: #fff;
    padding: 0.2rem;
    margin: 0.1rem;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: lowercase;
    text-decoration: none;
    transition: background-color var(--pico-transition);
}

.tag:hover {
    color: #fff;
    background-color: var(--pico-background-color);
}

.single-tag-name {
    color: #0c0c0c;
    background-color: #d63333;
}

/* Media Queries */
@media (max-width: 768px) {
    body {
        width: 100%;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: initial;
    }

    .portfolio-projects {
        flex-direction: column;
    }

    .project-card {
        flex: 1 1 100%;
        min-width: auto;
    }

    .blog-display {
        width: 100%;
    }

    .blog-post {
        padding: 0.7rem 0;
    }

    article {
        padding: 1.5rem;
    }

    dialog {
        display: none;
    }
}
