@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: #e0e0e0;
    --pico-tooltip-color: #2a2a35;
}

/* 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;
}

code {
    font-family: monospace;
}
code.copyable {
    cursor: pointer;
    box-shadow: 0 8px 0 #000;
}

blockquote {
    background: rgb(40, 40, 40);
    border: none;
    text-align: justify;
    padding: 1.5rem;
    margin-left: 2.5rem;
    border-radius: 0.5rem;
    font-style: italic;
    box-shadow: 0 10px 0 #000000;
}

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;
    text-transform: uppercase;
    font-style: italic;
    color: #0c0c0c;
}

/* Utility IDs */

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

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

.faded {
    opacity: 0.7;
}

.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 */
header a {
    color: inherit;
}
header a:hover {
    color: inherit;
    background: none;
    font-style: normal;
    font-weight: normal;
    text-transform: none;
}

/* Links section styling */
.links i {
    color: #f0f0f0;
    font-size: 1rem;
}
.links a:hover {
    background: none;
}
.links a i {
    pointer-events: 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;
    outline: 8px solid #22222220;
    outline-offset: -8px;
}

.project-card:hover {
    cursor: pointer;
    outline: 8px solid #22222230;
    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;
}

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

footer,
.before-footer {
    font-size: var(--font-size-small);
    color: #555;
    text-align: center;
}

/* Blog Post Specific Styling */
.blog-post {
    text-align: left;
}

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

.blog-post-title {
    font-size: var(--font-size-large);
}

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

/* Blog Entry-specific Styling */
.blog-entry-title {
    text-align: center;
    margin-top: 1rem;
    border: 1px solid var(--pico-primary);
    padding: 2rem;
    padding-bottom: 0;
}

.blog-entry-footer {
    font-size: var(--font-size-small);
    margin-top: 1rem;
}

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

/* Bini */
#bini-image {
    margin-left: 1rem;
}
#useless-bullet {
    opacity: 0.6;
}
#useless-bullet img {
    width: 120px;
    height: auto;
}
#useless-bullet:hover {
    background: none;
    opacity: 1;
}

/* Tag Styling */
.tag-name {
    font-size: var(--font-size-small);
    color: dimgray;
}
.tag-name:hover {
    background: initial;
    color: gray;
}
.single-tag-name {
    color: #0c0c0c;
    background-color: #d63333;
}

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

    .links {
        margin-bottom: 1rem;
    }
    .links i {
        font-size: 1.3rem;
    }

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

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

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

    .blog-entry {
        width: 100%;
    }

    article {
        padding: 1.5rem;
    }

    dialog {
        display: none;
    }
}
