.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post img {
    max-width: 100%;
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-meta > * {
    position: relative;
}

.post-meta > *:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -0.75rem;
}

/* Improved markdown content styles */
.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-colour);
    font-size: 1.75rem;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-colour);
    font-size: 1.5rem;
}

.post-content p {
    margin: 1.5rem 0;
}

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

.post-content li {
    margin: 0.5rem 0;
}

.post-content li > ul,
.post-content li > ol {
    margin: 0.5rem 0;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--secondary-colour);
    background: #f8f9fa;
    font-style: italic;
    color: #495057;
}

.post-content blockquote p {
    margin: 0;
}

.post-content blockquote p + p {
    margin-top: 1rem;
}

.post-content pre {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    background: #1e1e1e;
    overflow-x: auto;
    font-family: 'Hack', monospace;
    font-size: 0.9em;
}

.post-content code {
    font-family: 'Hack', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    background: #f1f3f5;
}

.post-content pre code {
    padding: 0;
    background: none;
    color: #e1e4e8;
}

/* Task list styles */
.task-list-item {
    list-style: none;
    margin-left: -1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.task-list-item input[type="checkbox"] {
    margin-top: 0.4rem;
}

/* Syntax highlighting - VS Code Dark Theme */
.hljs {
    display: block;
    overflow-x: auto;
    padding: 1em;
    color: #e1e4e8;
}

.hljs-comment,
.hljs-quote {
    color: #6a737d;
    font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
    color: #ff79c6;
}

.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
    color: #95e6cb;
}

.hljs-title,
.hljs-section {
    color: #e2b93d;
}

.hljs-built_in,
.hljs-literal,
.hljs-addition {
    color: #78dce8;
}

.hljs-meta,
.hljs-meta-string {
    color: #ff79c6;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

@media (prefers-color-scheme: light) {
    .post-content pre {
        background: #f8f9fa;
    }
    
    .post-content pre code {
        color: #1e1e1e;
    }
    
    .hljs {
        color: #1e1e1e;
    }
    
    .hljs-comment,
    .hljs-quote {
        color: #5c6370;
    }
    
    .hljs-keyword,
    .hljs-selector-tag,
    .hljs-type {
        color: #b229d8;
    }
    
    .hljs-string,
    .hljs-number,
    .hljs-selector-id,
    .hljs-selector-class,
    .hljs-quote,
    .hljs-template-tag,
    .hljs-deletion {
        color: #177b69;
    }
    
    .hljs-title,
    .hljs-section {
        color: #b58e1d;
    }
    
    .hljs-built_in,
    .hljs-literal,
    .hljs-addition {
        color: #207b8d;
    }
    
    .hljs-meta,
    .hljs-meta-string {
        color: #b229d8;
    }
}

.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--page-accent-colour);
    background-color: transparent;
}

.tags {
    margin-bottom: 2rem;
}

.tag {
    display: inline-block;
    background: var(--page-accent-colour);
    padding: 0.3rem 0.75rem 0.3rem 0.75rem; 
    border: 1px solid var(--secondary-colour);
    border-radius: 1rem;
    font-size: 0.875rem;
    margin: 0.25rem;
    font-family: 'Hack', 'Courier New', Courier, monospace;
}

.share {
    text-align: center;
}

.share h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-buttons a {
    color: var(--secondary-colour);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-colour);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    background: var(--secondary-colour);
    color: white;
}

/* Blog markdown content styles */
.post-content .footnotes {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--page-accent-colour);
    font-size: 0.875rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.post-content th,
.post-content td {
    padding: 0.75rem;
    border: 1px solid var(--page-accent-colour);
}

.post-content th {
    background: var(--page-secondary-colour);
    font-weight: 500;
}

@media screen and (max-width: 600px) {
    .blog-post {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .post-meta > *::after {
        display: none;
    }
    
    .share-buttons {
        flex-direction: column;
    }
}

/* Blog index page styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
}

.blog-card {
    background: white;
    border: 1px solid var(--secondary-colour);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.blog-card.featured {
    grid-column: 1 / -1;
    grid-row: 1;
}

.blog-card h2 {
    margin: 1rem 0;
}

.blog-card h2 a {
    color: var(--secondary-colour);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h2 a:hover {
    color: var(--secondary-accents);
}

.blog-card p {
    width: auto;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    max-height: calc(4em * 1.75);
    text-overflow: ellipsis;
}

.blog-card .read-more {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--secondary-colour);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-card .read-more:hover {
    color: var(--secondary-accents);
}

.blog-card.placeholder {
    grid-row-end: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-style: dashed;
    opacity: 0.7;
}

.newsletter-signup {
    margin-top: 1.5rem;
    width: 100%;
}

.form-inline {
    display: flex;
    gap: 0.5rem;
}

.form-inline input[type="email"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--page-accent-colour);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.form-inline button {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-colour);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-inline button:hover {
    background: var(--secondary-accents);
}

@media screen and (max-width: 600px) {
    .form-inline {
        flex-direction: column;
    }
    
    .form-inline button {
        width: 100%;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}