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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #353535;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 70ch;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.site-title a {
    color: #353535;
    text-decoration: none;
}

.site-title a:hover {
    color: #666;
}

/* Navigation */
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: #353535;
    text-decoration: none;
    font-weight: 500;
}

.site-nav a:hover {
    color: #666;
}

/* Main content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
    border-bottom: 1px solid #e5e5e5;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #353535;
}

.hero-description {
    font-size: 1.125rem;
    color: #666;
    max-width: 50ch;
    margin: 0 auto;
}

/* Content */
.content {
    max-width: 100%;
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #353535;
}

.content-description {
    color: #666;
    font-size: 1.125rem;
}

/* Post meta */
.post-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.post-meta time {
    font-weight: 500;
}

.post-author {
    font-weight: 500;
}

/* Content body */
.content-body {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
    border-radius: 4px;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    margin: 2rem 0 1rem 0;
    font-weight: 600;
    color: #353535;
}

.content-body h2 {
    font-size: 1.5rem;
}

.content-body h3 {
    font-size: 1.25rem;
}

.content-body p {
    margin-bottom: 1.5rem;
}

.content-body blockquote {
    background-color: #f0f0f0;
    border-left: 4px solid #353535;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.content-body code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
}

.content-body pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-body pre code {
    background: none;
    padding: 0;
}

/* Posts list */
.posts-list {
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-item {
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.post-item:last-child {
    border-bottom: none;
}

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

.post-title a {
    color: #353535;
    text-decoration: none;
}

.post-title a:hover {
    color: #666;
}

.post-summary {
    margin-top: 0.75rem;
    color: #666;
    line-height: 1.6;
}

.post-item img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Posts grid for homepage */
.recent-posts {
    margin-top: 3rem;
}

.recent-posts h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #353535;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: border-color 0.2s ease;
    background-color: #ffffff;
}

.post-card:hover {
    border-color: #353535;
}

.post-card .post-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.post-card .post-summary {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.post-card img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Tags */
.tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #353535;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

/* Footer */
.site-footer {
    background-color: #f9f9f9;
    padding: 2rem 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 4rem;
}

.site-footer p {
    color: #666;
    font-size: 0.875rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 700px) {
    .container {
        padding: 0 1rem;
    }
    
    .site-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .content-header h1 {
        font-size: 1.75rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .posts-list,
    .content-body {
        max-width: 100%;
    }
    
    .post-item {
        padding: 1.5rem 0;
    }
}

/* Selection highlighting */
::selection {
    background-color: #353535;
    color: white;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #353535;
    outline-offset: 2px;
}
