/* 1. Default Light Theme Styles */
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --accent-color: #0066cc;
    --time-color: #666666;
    /* Code Block Canvas Environment */
    --code-bg: #0d1117;          /* Canvas/Editor background */
    --code-text: #e6edf3;        /* Punctuation, types, namespaces, and operators */
    
    /* Syntax Token Rules */
    --code-keyword: #ff7b72;     /* Control keywords (using, namespace, public, return, switch) */
    --code-class: #f0883e;       /* Custom class names and definitions */
    --code-method: #d2a8ff;      /* Concrete methods and classes invoked with 'new' */
    --code-string: #a5d6ff;      /* Inline string literals inside quotation marks */
    --code-comment: #6e7681;     /* Formatting whitespace / muted tokens */
    --font-body: 1.1875rem; /* ~19px */
    --font-h1: 2.5rem;      /* ~40px */
    --font-h2: 1.875rem;    /* ~30px */
    --font-code: 0.95rem;   /* ~15px */
    
    --line-height-body: 1.65;
}

@media (max-width: 680px) {
    :root {
        --font-body: 1.0625rem; /* ~17px */
        --font-h1: 1.9375rem;   /* ~31px */
        --font-h2: 1.5rem;      /* ~24px */
        --font-code: 0.875rem;  /* ~14px */
    }
}

/* 2. Automatic Dark Theme Switch */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #f5f5f5;
        --accent-color: #4da6ff;
        --time-color: #aaaaaa;
    }
}

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

a:hover {
    text-decoration: underline;
}

.nav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    text-align: center;
}

.nav-item-link {
    padding: 14px 16px;
    display: block;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0 auto;
    max-width: 1000px;
    padding: 0 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s; /* Smooth transition when switching */
}

article {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

p {
    font-size: var(--font-body);
    line-height: var(--line-height-body);
    color: var(--text-color);
}

.articles {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-item {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.article-item a {
    text-decoration: none;
}

.article-item a:hover {
    text-decoration: underline;
}

h1 {
    font-size: var(--font-h1);
    line-height: 1.2;
    text-align: center;
    font-size: var(--font-h1);
    line-height: 1.2;
}

pre.code-block {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

footer {
    border-top: 1px solid var(--code-comment); /* Thin separator line using your muted gray variable */
    margin-top: 4rem;                          /* Generous breathing room below your article list */
    padding: 1.5rem 0;
}

.footer-content {
    max-width: 700px;                          /* Keeps it perfectly aligned with your main content wrapper */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;            /* Pushes copyright left, links right */
    align-items: center;
    flex-wrap: wrap;                           /* Gracefully wraps to a vertical stack on mobile screens */
    gap: 1rem;
    padding: 0 20px;                           /* Matches the side padding of your main layout */
}

.footer-content p, 
.footer-links li {
    font-size: 0.875rem;                       /* Slightly smaller meta text formatting (~14px) */
    color: var(--code-comment);                /* Uses your existing muted gray text color */
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;                               /* Clean gap between the footer links */
}

.footer-links a {
    color: var(--code-comment);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Subtle interactive state */
.footer-links a:hover {
    color: var(--accent-color);                /* Highlights with your coral accent variable on hover */
    text-decoration: underline;
}

.profile-pic {
    border-radius: 6px;
    height: auto; /* Maintains flawless aspect ratio */
    object-fit: cover;
    max-width: 100%;
}

/* Map compiled classes to your custom palette */
.code-block .k  { color: var(--code-keyword); }
.code-block .nc { color: var(--code-class); font-weight: bold; }
.code-block .nf { color: var(--code-method); font-weight: bold; }
.code-block .s  { color: var(--code-string); }
.code-block .w  { color: var(--code-comment); } 
.code-block .p  { color: var(--code-text); }