:root {
    --background: #f2f2f2;
    /* --foreground: #171717; */
    --foreground: #000000;
    --background-dark: color-mix(in srgb, var(--background), black 50%);
    --background-light: color-mix(in srgb, var(--background), white 50%);
    --main: #b82a20;
    --main-alt: #D96669;
    --muted: #a1a1aa;
    /* Zinc 400 */
    --border: rgba(255, 255, 255, 0.15);
    /* dark:border-white/20 */
    --card-bg: #000000;
    /* dark:bg-black */
    --accent: #d8d8d5;
    /* Hover states */

    /* Typography */
    --font-heading: 'Bitcount Single', monospace;
    --font-body: system-ui, -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

pre,
pre * {
    filter: invert(1) !important;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #000000;
        --foreground: #f2f2f2;
        --accent: #27272a;
    }

    pre,
    pre * {
        filter: invert(0) !important;
    }
}

@media (min-width: 1050px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;

        .main-container {
            min-width: 60%;
        }

        .content {
            width: 850px;
        }
    }
}



@media (max-width: 450px) {
    h1 {
        font-size: 4rem !important;
    }
}

@media (max-width: 280px) {
    h1 {
        font-size: 2rem !important;
    }
}

.bitcount-single,
h1 {
    font-family: "Bitcount Single", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "CRSV" 0.5,
        "ELSH" 0,
        "ELXP" 0;
}

.jetbrains-mono {
    font-family: "JetBrains Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

body {
    margin: 25px;
}

a {
    color: var(--main-alt);
}

a:hover {
    color: var(--main);
}


.main-header {
    font-size: 6rem;
}

h1 {
    text-align: left;
    font-size: 5rem;
    margin-bottom: 0;
    /* text-shadow: 0 0 2px #f99, 0 0 5px #99ff99; */

    span {
        font-size: 2rem;
        display: block;
    }
}


.cursor {
    animation: blink 1s step-end infinite;
}

.main {
    color: var(--main);
}

.main-alt {
    color: var(--main-alt);
}

.background {
    background-color: var(--background);
}

.foreground {
    color: var(--foreground);
}

.blog-list {
    list-style: none;
    padding: 0;
}

.blog-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
}

.content {
    text-align: justify;
    line-height: 1.6;
    font-family: system-ui, -apple-system, sans-serif;
}

.date-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* font-family: ui-sans-serif, system-ui, sans-serif; */
    line-height: 1;
    width: fit-content;
}

.date-container .year {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.date-container .month {
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
}

.date-container .day {
    font-size: 2.2rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    padding-right: 5px;
}

.content-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-title {
    font-size: 2.2rem;
    line-height: 2.1rem;
    font-weight: 600;
    margin: 0;
}

.blog-title a {
    text-decoration: none;
}

.blog-title a:hover {
    text-decoration: underline;
}

.blog-excerpt {
    margin: 0;
    line-height: 1.5;
    opacity: 0.75;
}

table {
    text-align: center;
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--border);
}

th {
    text-align: center;
    background-color: var(--accent);
    color: var(--foreground);
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid var(--main);
}

td {
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
    opacity: 0.9;
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

pre {
    background-color: #111;
    border: 1px solid var(--border);
    border-left: 4px solid var(--main);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

p {
    font-size: 1.15rem;
}

code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.5;
}

p code,
li code {
    background-color: var(--accent);
    color: var(--main-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85em;
}

pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: var(--main);
}

blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background-color: #111;
    border: 1px solid var(--border);
    border-left: 5px solid var(--main);
    border-radius: 0 8px 8px 0;
    position: relative;
    font-style: italic;
}

blockquote p {
    margin: 0;
    line-height: 1.6;
    color: var(--foreground);
    opacity: 0.9;
    font-size: 1.1rem;
}

blockquote::before {
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--main);
    opacity: 0.2;
    line-height: 1;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-heading);
    font-style: normal;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--main-alt);
}

blockquote cite::before {
    content: "— ";
}

.back-link {
    width: 100%;
    position: sticky;
    top: 2rem;
}

.hexagon-btn {
    position: relative;
    /* Required for the ::before element */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 55px;

    /* This background acts as the BORDER color */
    background: var(--main);

    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.75s ease-in-out, background 0.3s;

    text-decoration: none;
    color: var(--main);
    /* Text/Icon color */
    z-index: 1;
    opacity: 0.75;
}

/* This creates the "hollow" inside */
.hexagon-btn::before {
    content: '';
    position: absolute;
    inset: 5px;
    background-color: var(--background);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
}

.back-link {
    z-index: 999;
}

.hexagon-btn:hover {
    transform: rotate(360deg);
    opacity: 1;
}
