* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #2d3748;
    background: #ffffff;
    padding: 20px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.subtitle {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2.5rem 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.greeting {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
    color: #718096;
    text-align: center;
}

a {
    color: #3182ce;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation styles */
header nav {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

header nav a {
    margin-right: 1rem;
}

/* Blog listing styles */
.post-preview {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.post-preview h2 {
    margin-top: 0;
}

.post-meta {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-meta .tag-list {
    display: inline-flex;
    margin: 0;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
}

/* Latest Posts on Homepage */
.latest-posts {
    margin: 2rem 0;
}

.post-preview-compact {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.post-preview-compact h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.view-all-posts {
    margin-top: 2rem;
    text-align: right;
}

.view-all-posts a {
    font-weight: 500;
    padding: 0.5rem 0;
}

/* Tags */
.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tag-group {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tag-group h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.tag-group p {
    color: #4a5568;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.post-count {
    display: inline-block;
    background: #edf2f7;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #4a5568;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    background: #edf2f7;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.tag-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tag-header h1 {
    margin-bottom: 1rem;
    color: #1a202c;
}

.tag-description {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tag-meta {
    color: #718096;
    font-size: 0.9rem;
}

.back-to-tags {
    color: #3182ce;
    text-decoration: none;
}

.back-to-tags:hover {
    text-decoration: underline;
}

/* Code blocks */
pre {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Difficulty indicators */
.difficulty {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.beginner { background: #c6f6d5; color: #22543d; }
.intermediate { background: #fefcbf; color: #744210; }
.advanced { background: #fed7d7; color: #742a2a; }

@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 20px 10px;
    }
}