/* CSS Variables are now defined in variables.css */

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text);
    background: var(--bg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem var(--spacing);
}

/* Typography */
h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text);
}

h1 { 
    font-size: 2.75rem; 
    font-weight: 700; 
    margin-top: 0;
    margin-bottom: 1.5rem;
}
h2 { 
    font-size: 2rem; 
    font-weight: 600; 
    margin-top: 3.5rem; 
    margin-bottom: 1.5rem;
}
h3 { 
    font-size: 1.5rem; 
    font-weight: 600; 
    margin-top: 2.5rem; 
    margin-bottom: 1.25rem;
}

p {
    margin-bottom: var(--paragraph-spacing);
}

/* Links - mobile optimized */
a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent-soft);
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
}

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

/* Post list links - no underline by default */
.post-link a {
    text-decoration: none;
    color: var(--text);
}

.post-link a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Quote tags */
.blog-section q {
    color: var(--accent);
    font-style: italic;
}

/* Touch-friendly links in content */
.post-content a {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--text-muted);
    text-decoration-thickness: 1px;
}

.post-content a:hover {
    text-decoration-color: var(--accent);
    background: transparent;
}


/* Header - mobile-first responsive */
.header {
    margin-bottom: var(--section-gap);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    padding: 0.5rem 0;
    display: block;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    text-decoration: none;
}

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

.header-right {
    display: flex;
    align-items: center;
}

/* Hamburger menu button - hidden on desktop */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    gap: 5px;
}

.hamburger-menu span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-muted);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav a,
.nav-item {
    padding: 0.625rem 0.875rem;
    font-size: 1.125rem;
    color: var(--text-muted);
    border-radius: 0;
    transition: color 0.2s ease;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}

.nav a:hover,
.nav-item:hover {
    background: transparent;
    color: var(--accent);
    text-decoration: none;
}

/* Posts list */
.post-entry {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-title a {
    color: var(--text);
}

.post-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-summary {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Typography - adjust headings */
.post-title {
    line-height: 1.3;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    hyphens: auto;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.post-meta {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.post-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
    margin-left: 0.5rem;
}

/* Post navigation - minimal style */
.post-nav {
    margin-top: var(--section-gap);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 1.5rem;
}

.nav-prev,
.nav-next {
    display: block;
}

.nav-link {
    display: block;
    padding: 0;
    background: transparent;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.nav-link:hover .nav-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    display: block;
    margin-bottom: 0.35rem;
}

.nav-title {
    font-weight: 400;
    color: var(--text);
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Content spacing - mobile optimized */
.post-content {
    line-height: var(--line-height);
    font-size: var(--font-size-base);
}

.post-content h1 {
    font-size: 2.75rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-content h2,
.post-content h3 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: 100px; /* Account for sticky header */
    word-wrap: break-word;
    hyphens: auto;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

/* Horizontal rule */
.post-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5rem 0;
    opacity: 0.5;
}

.post-content p {
    margin-bottom: var(--paragraph-spacing);
    text-align: left;
    hyphens: auto;
    word-wrap: break-word;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0 2.25rem 1.5rem;
    padding-left: 0.5rem;
}

.post-content li {
    margin-bottom: 1rem;
    line-height: var(--line-height);
}

/* Better paragraph spacing in lists */
.post-content li p {
    margin-bottom: 1rem;
}

.post-content li:last-child {
    margin-bottom: 0;
}

/* Code - minimal style */
code {
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 0.9em;
    background: var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    color: var(--text);
}

pre {
    background: var(--bg);
    padding: 1.25rem;
    padding-top: 2.25rem; /* Extra space at top for language label */
    border-radius: 4px;
    margin: 2.5rem 0;
    position: relative;
    border: none;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text);
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

/* Ensure Hugo/Chroma wrappers never scroll horizontally */
.highlight, .highlight pre, .highlight .chroma, .highlight pre.chroma, .highlight pre code {
    overflow: hidden !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

.chroma .line {
    display: block;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

/* Chroma often adds tabindex on <pre>; make sure desktop wraps too */
pre[tabindex], pre[tabindex] code {
    overflow: hidden !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

/* Hide scrollbars to prevent horizontal bar UI */
pre::-webkit-scrollbar,
code::-webkit-scrollbar,
.chroma::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Copy button styles - subtle minimal style */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 4px;
    padding: 0.35rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 11;
    opacity: 0;
}

pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    color: var(--text);
}

.code-copy-btn.copied {
    color: var(--success);
    opacity: 1;
}

/* Language label styles - subtle minimal style */
.code-language {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    background: transparent;
    color: var(--text-muted);
    padding: 0;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0;
    z-index: 10;
    border: none;
    max-width: calc(100% - 4rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Blockquotes - minimal style */
blockquote {
    border-left: 2px solid var(--border-light);
    padding-left: 1.25rem;
    margin: 2.5rem 0;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
}

/* Markdown alerts such as > [!NOTE] */
.callout {
    margin: 2.5rem 0;
    padding: 1.15rem 1.25rem 1.2rem;
    border: 1px solid rgba(169, 214, 238, 0.28);
    border-radius: 8px;
    background: rgba(169, 214, 238, 0.06);
    color: var(--text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.callout-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.callout-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid rgba(169, 214, 238, 0.32);
    border-radius: 50%;
    background: rgba(169, 214, 238, 0.1);
    color: var(--accent);
}

.callout-heading {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.12rem;
}

.callout-label {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.callout-title {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.45;
}

.callout-title strong {
    font-weight: inherit;
}

.callout-body {
    padding-left: 2.55rem;
    color: var(--text-muted);
    font-style: normal;
    line-height: 1.75;
}

.callout-body > :first-child {
    margin-top: 0;
}

.callout-body > :last-child {
    margin-bottom: 0;
}

.callout-body p,
.callout-body ul,
.callout-body ol {
    margin-bottom: 0.8rem;
}

.callout-body pre {
    margin: 1rem 0;
}

/* Tables - minimal style */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 1rem;
    border: none;
    border-radius: 0;
    overflow: visible;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: transparent;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-transform: capitalize;
    letter-spacing: 0;
    border-bottom: 1px solid var(--border-light);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content .post-image {
    width: min(100%, 52rem);
    margin: clamp(2.75rem, 7vw, 4rem) auto;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.post-content .post-image-media,
.post-content .post-image-inline {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid color-mix(in srgb, var(--border-light) 70%, transparent);
    border-radius: 10px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.post-content .post-image-caption {
    width: min(100%, 38rem);
    margin: 0 auto;
    padding-top: 0.55rem;
    color: color-mix(in srgb, var(--text-muted) 82%, var(--accent) 18%);
    font-size: 0.92rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-align: center;
    text-wrap: balance;
    position: relative;
}

.post-content .post-image-caption::before {
    content: "";
    width: 3rem;
    height: 1px;
    background: color-mix(in srgb, var(--border-light) 72%, transparent);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.post-content .post-image-caption > :last-child {
    margin-bottom: 0;
}

.post-content .post-image-inline {
    margin: 2.5rem auto;
}

.post-content p[align="center"] {
    width: min(100%, 52rem);
    margin: clamp(2.75rem, 7vw, 4rem) auto;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
}

.post-content p[align="center"] img {
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--border-light) 70%, transparent);
    border-radius: 10px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.post-content p[align="center"] br {
    display: none;
}

.post-content p[align="center"] sub {
    width: min(100%, 38rem);
    display: block;
    margin: 0 auto;
    padding-top: 0.55rem;
    color: color-mix(in srgb, var(--text-muted) 82%, var(--accent) 18%);
    font-size: 0.92rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-align: center;
    position: relative;
    vertical-align: baseline;
}

.post-content p[align="center"] sub::before {
    content: "";
    width: 3rem;
    height: 1px;
    background: color-mix(in srgb, var(--border-light) 72%, transparent);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Tags - minimal style */
.tag {
    background: transparent;
    color: var(--text-muted);
    padding: 0;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
    border: none;
    font-weight: 400;
}

.tag:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Footer - minimal style */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Note blocks - minimal style */
.note-block {
    display: flex !important;
    align-items: flex-start;
    margin: 3rem 0 !important;
    padding: 1.25rem 0 1.25rem 1.25rem !important;
    border-radius: 0;
    border: none !important;
    border-left: 2px solid var(--border-light) !important;
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    background: transparent !important;
}

/* Q/A blocks - minimal style */
.qa-block {
    margin: 3rem 0 !important;
    padding: 1.25rem 0 1.25rem 1.25rem !important;
    border-radius: 0;
    border: none !important;
    border-left: 2px solid var(--border-light) !important;
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    background: transparent !important;
}

.qa-block::before,
.note-block::before {
    display: none;
}

.qa-content {
    width: 100%;
}

.qa-question-section {
    margin-bottom: 1rem;
}

.qa-label {
    font-weight: 700;
    color: var(--accent);
    margin-right: 0.5rem;
}

.qa-text {
    color: var(--text);
}

.note-block.note-info,
.note-block.note-warning,
.note-block.note-error,
.note-block.note-success,
.note-block.note-tip {
    background: var(--bg) !important;
    border-color: var(--border) !important;
    border-left-color: var(--text-muted) !important;
}

.note-icon {
    display: none;
}

.note-content {
    flex: 1;
}

.note-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.note-body {
    color: var(--text);
}

.note-body p:last-child {
    margin-bottom: 0;
}

.note-body ul,
.note-body ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.note-body code {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    :root {
        --line-height: var(--line-height-mobile);
        --section-gap: var(--section-gap-mobile);
    }
    
    body {
        padding: 1rem 1.25rem;
        line-height: var(--line-height-mobile);
    }
    
    /* Typography scaling */
    h1 { 
        font-size: 2.25rem; 
        line-height: 1.2;
        margin-bottom: 1.25rem;
    }
    
    h2 { 
        font-size: 1.75rem;
        line-height: 1.25;
        margin-top: 2.5rem;
        margin-bottom: 1.25rem;
    }
    
    h3 {
        font-size: 1.375rem;
        line-height: 1.3;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .post-title {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .post-content h1 {
        font-size: 2.25rem;
        margin-bottom: 1.5rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
        margin-top: 2.5rem;
        margin-bottom: 1.25rem;
    }
    
    .post-content h3 {
        font-size: 1.375rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    /* Header mobile optimization */
    .header {
        margin-bottom: 1.5rem;
        padding: 0.75rem 0;
        padding-bottom: 0; /* Remove bottom padding to eliminate gap */
        position: sticky; /* Keep sticky on mobile */
        top: 0;
        background: var(--bg);
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding-bottom: 0.75rem; /* Move padding to content */
        border-bottom: 1px solid var(--border);
    }
    
    .logo a {
        font-size: 1.25rem;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }
    
    /* Hide navigation by default on mobile */
    .header-right {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-top: 1px solid var(--border);
        padding: 1rem 0;
        margin-top: 0; /* Remove margin to eliminate gap */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 100;
    }
    
    .header-right.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .nav a,
    .nav-item {
        padding: 0.875rem 1rem;
        font-size: 1.05rem;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Content mobile optimization */
    .post-content p {
        text-align: left; /* Better for mobile reading */
        margin-bottom: 1.5rem;
    }
    
    .post-content ul,
    .post-content ol {
        margin-left: 1rem;
        padding-left: 0.5rem;
        margin-top: 1.25rem;
        margin-bottom: 1.75rem;
    }
    
    .post-content li {
        margin-bottom: 0.75rem;
    }
    
    /* Post navigation mobile */
    .post-nav {
        margin-top: 2rem;
    }
    
    .nav-link {
        padding: 0;
    }
    
    /* Touch targets */
    .post-content a {
        padding: 0.25rem 0.5rem;
        margin: -0.25rem -0.5rem;
    }
    
    /* Code blocks mobile optimization */
    pre {
        margin: 1rem -0.75rem;
        padding: 0.75rem;
        padding-top: 2.25rem; /* Extra space at top for language label */
        border-radius: 0;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .code-copy-btn {
        top: 0.5rem;
        right: 0.5rem;
        width: 28px;
        height: 28px;
        padding: 0.375rem;
        opacity: 0.7;
    }
    
    .code-copy-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .code-language {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        max-width: calc(100% - 3.5rem); /* Leave space for copy button */
        opacity: 0.8;
    }
    
    code {
        font-size: 0.8rem;
        padding: 0.1rem 0.2rem;
        word-break: break-all;
    }
    
    pre code {
        font-size: 0.8rem;
        white-space: pre-wrap;
        word-break: break-word;
    }
    
    /* Note blocks mobile optimization */
    .note-block {
        margin: 1.5rem 0 !important;
        padding: 1rem 0 1rem 1rem !important;
        border-radius: 0;
        box-shadow: none !important;
    }
    
    /* Q/A blocks mobile optimization */
    .qa-block {
        margin: 1.5rem 0 !important;
        padding: 1rem 0 1rem 1rem !important;
        border-radius: 0;
        box-shadow: none !important;
    }
    
    .qa-label {
        font-size: 1rem;
    }
    
    .qa-text {
        width: calc(100% - 1.5rem);
    }
    
    .note-icon {
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    .note-title {
        font-size: 0.9rem;
    }
    
    /* Tables mobile optimization */
    table {
        font-size: 0.8rem;
        margin: 1rem -0.75rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Mobile-specific enhancements */
    html {
        scroll-behavior: smooth;
    }
    
    a:focus,
    button:focus {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .post-content {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    blockquote {
        margin: 1.5rem -0.75rem;
        padding: 1rem 1rem 1rem 1.5rem;
        border-radius: 0;
        border-left-width: 4px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    h1 { 
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1.25rem;
    }
    
    h2 { 
        font-size: 1.5rem;
        line-height: 1.25;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    h3 { 
        font-size: 1.25rem;
        line-height: 1.3;
        margin-top: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .post-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1.25rem;
    }
    
    .post-content h1 {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
        margin-top: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Extra small screen adjustments */
    .header {
        margin-bottom: 1rem;
    }
    
    .logo a {
        font-size: 1.5rem;
    }
    
    .hamburger-menu {
        width: 28px;
        height: 28px;
    }
    
    .nav a,
    .nav-item {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .post-meta {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }
    
    .post-header {
        margin-bottom: 2.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content p {
        margin-bottom: 1.5rem;
    }
    
    .post-content ul,
    .post-content ol {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Code blocks */
    pre {
        margin: 1rem -0.5rem;
        padding: 0.75rem;
        padding-top: 2rem; /* Extra space at top for language label */
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .code-copy-btn {
        top: 0.4rem;
        right: 0.4rem;
        width: 26px;
        height: 26px;
        padding: 0.3rem;
        opacity: 0.7;
    }
    
    .code-copy-btn svg {
        width: 15px;
        height: 15px;
    }
    
    .code-language {
        top: 0.4rem;
        left: 0.4rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        max-width: calc(100% - 3rem); /* Leave space for copy button */
        opacity: 0.8;
    }
    
    code {
        font-size: 0.8rem;
    }
    
    pre code {
        font-size: 0.8rem;
    }
    
    /* Note blocks */
    .note-block {
        margin: 1rem 0 !important;
        padding: 0.75rem 0 0.75rem 0.875rem !important;
    }
    
    /* Q/A blocks */
    .qa-block {
        margin: 1rem 0 !important;
        padding: 0.75rem 0 0.75rem 0.875rem !important;
    }
    
    .note-icon {
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    .note-title {
        font-size: 0.9rem;
    }
    
    /* Tables */
    table {
        margin: 1rem -0.5rem;
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Tags */
    .tag {
        padding: 0;
        font-size: 0.8rem;
    }
    
    /* Navigation */
    .nav-link {
        padding: 0;
    }
    
    .nav-label {
        font-size: 0.75rem;
    }
}


/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #4a5568;
        --text-muted: #cbd5e0;
    }
    
    .tag {
        color: var(--text-muted);
    }
    
    .note-block {
        border-left-color: var(--border) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
