/* Import iA Writer Mono font similar to Cassidy's blog */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* CSS Variables */
:root {
    --white: #efefef;
    --transwhite: rgba(239, 239, 239, 0.7);
    --moretranswhite: rgba(239, 239, 239, 0.1);
    --black: #252525;
    --transblack: rgba(37, 37, 37, 0.7);
    --moretransblack: rgba(37, 37, 37, 0.1);
    --gray: #6b6b6b;
    --highlight: #e5ffc3;
    --red: #e4002b;
    --green: #24d05a;
    --pink: #eb4888;
    --blue: #10a2f5;
    --yellow: #e9bc3f;
}

/* Remove unwanted focus outlines */
*:focus {
    outline: none;
}

/* Keep focus outlines for interactive elements for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

::selection {
    background-color: var(--highlight);
    color: var(--black);
}

html,
body {
    margin: auto;
    padding: 20px;
    max-width: 70ch;
    background-color: var(--white);
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--black);
}

html,
body,
button,
code {
    font-family: "JetBrains Mono", "iA Writer Mono", monospace;
}

h1,
strong,
b {
    color: var(--black);
    font-weight: 400;
    outline: none; /* Remove any focus outline from headers */
}

h2,
h3,
h4,
h5,
h6 {
    color: var(--gray);
    line-height: 1.1;
    font-weight: 400;
    outline: none; /* Remove any focus outline from headers */
}

h3 {
    text-align: center;
}

.center {
    text-align: center;
}

.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    outline: none; /* Remove any focus outline */
}

.header-frame {
    max-width: 350px;
    text-align: center;
    outline: none; /* Remove any focus outline */
}

.header-frame h1 {
    font-size: 2em;
    margin: 0.25em 0;
    outline: none; /* Remove any focus outline */
}

.header-frame h2 {
    margin: 0.5em 0;
    font-style: italic;
    outline: none; /* Remove any focus outline */
}

a {
    color: var(--black);
    text-decoration-thickness: 0.3ex;
    text-underline-offset: 0.3ex;
}

nav {
    position: sticky;
    top: 0;
    text-align: center;
    background: var(--transwhite);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

nav a {
    margin: 25px 0;
}

nav a:not(:last-child) {
    padding: 0 12px 0 0;
}

hr {
    border-top: 1px solid var(--gray);
    margin: 1rem 0;
}

ul.posts-list {
    padding: unset;
    list-style-type: none;
}

.post {
    margin: 0 0 30px 0;
}

.post .title {
    font-size: 1.3em;
    text-decoration: none;
}

.post .title:hover {
    text-decoration: underline;
}

time {
    font-style: italic;
    color: var(--gray);
    white-space: nowrap;
}

main,
content {
    line-height: 1.6;
}

.about {
    margin: 2rem 0;
}

.about p {
    margin-bottom: 1rem;
}

table {
    width: 100%;
}

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

code {
    padding: 2px 5px;
    background-color: var(--moretransblack);
    font-weight: bold;
}

pre {
    padding: 1rem;
    background-color: var(--moretransblack);
    overflow-x: auto;
}

pre > code {
    all: unset;
}

blockquote {
    border: 1px solid var(--gray);
    color: var(--black);
    padding: 2px 0px 2px 20px;
    margin: 0px;
    font-style: italic;
}







/* Container styles */
.container {
    max-width: 70ch;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading, error, and empty states */
.loading-container,
.error-container,
.empty-state,
.not-found-container {
    text-align: center;
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.error-container,
.not-found-container {
    color: var(--red);
}

.empty-state {
    color: var(--gray);
}

/* Post metadata */
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.reading-time {
    color: var(--gray);
}

/* Post excerpts */
.excerpt {
    color: var(--gray);
    font-style: italic;
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* Tags */
.post-tags,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.tag {
    background-color: var(--moretransblack);
    color: var(--gray);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    text-decoration: none;
}

/* Article layout improvements */
.blog-post-article {
    max-width: 65ch;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
}

.blog-post-content {
    font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
    line-height: 1.8;
}

.blog-post-content > * + * {
    margin-block-start: 1em;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray);
}

/* Responsive design */
@media (max-width: 600px) {
    nav a:not(:last-child) {
        padding: 0;
    }
    
    .header-frame {
        max-width: 100%;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

