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

:root {
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --code-bg: #f1f5f9;
    --header-bg: #1e293b;
    --header-text: #f8fafc;
    --sidebar-accent: #2563eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-alt);
    /* Subtle curved wave pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q 25 45, 50 50 T 100 50' stroke='%23000000' stroke-width='0.5' fill='none' opacity='0.03'/%3E%3Cpath d='M0 70 Q 25 65, 50 70 T 100 70' stroke='%23000000' stroke-width='0.5' fill='none' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Header with dark background - full width */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 3rem 0 2.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

header > * {
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--header-text);
    letter-spacing: -0.02em;
}

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

header h1 a:hover {
    color: #94a3b8;
}

header .intro {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.6;
}

nav {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #334155;
}

nav a {
    color: #94a3b8;
    margin-right: 2rem;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--header-text);
}

/* Main Content with side margins */
main, article {
    padding: 3rem;
    max-width: 50%;
    margin: 2rem auto;
    background: var(--background);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 4px;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 3rem 0 1.25rem;
    line-height: 1.3;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2.25rem 0 1rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.35rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
}

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

/* Sections */
section {
    margin-bottom: 3.5rem;
}

section:last-child {
    margin-bottom: 0;
}

/* Blog Listing */
.post-list {
    list-style: none;
}

.post-item {
    padding: 2rem 0 2rem 1.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--border);
    transition: all 0.3s;
}

.post-item:hover {
    border-left-color: var(--accent);
    padding-left: 2rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

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

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

.post-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Blog Post Content */
article header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

article header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Code Blocks */
code {
    background: var(--code-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
    color: #dc2626;
}

pre {
    background: var(--code-bg);
    padding: 1.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

/* Lists */
ul, ol {
    margin: 1.5rem 0 1.5rem 2.5rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: var(--background-alt);
    border-radius: 4px;
    color: var(--text-secondary);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Footer */
footer {
    padding: 1.5rem 3rem; /* Reduced from 2.5rem 3rem 3rem */
    border-top: 2px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
    background: var(--background);
    max-width: 50%;
    margin: 2rem auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 4px;
}

footer p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0; /* Remove default paragraph margin */
}

footer a {
    color: var(--accent);
}

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

/* Responsive */
@media (max-width: 768px) {
    header > * {
        max-width: 90%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header .intro {
        font-size: 1.05rem;
    }
    
    main, article {
        max-width: 90%;
        padding: 2rem 1.75rem 3rem;
        margin: 1.5rem auto;
    }
    
    footer {
        max-width: 90%;
        padding: 2rem 1.75rem 2.5rem;
        margin: 1.5rem auto;
    }
    
    h1 {
        font-size: 1.85rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin: 2.5rem 0 1rem;
    }
    
    nav a {
        display: inline-block;
        margin: 0.5rem 1rem 0.5rem 0;
    }
    
    .post-item {
        padding-left: 1.25rem;
    }
    
    .post-item:hover {
        padding-left: 1.5rem;
    }
}

@media (min-width: 1200px) {
    /* Minimum width constraint on very large screens */
    main, article {
        min-width: 700px;
    }
    
    footer {
        min-width: 700px;
    }
    
    header > * {
        min-width: 700px;
    }
}