/* Pytorch-themed blog styling */
:root {
    --pytorch-orange: #EE4C2C;
    --pytorch-purple: #6B46C1;
    --pytorch-blue: #0071B5;
    --pytorch-dark-bg: #1a1a1a;
    --pytorch-light-bg: #f8f9fa;
    --pytorch-text: #333333;
    --pytorch-text-light: #666666;
    --pytorch-border: #e0e0e0;
}

* {
    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: var(--pytorch-text);
    background-color: var(--pytorch-light-bg);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--pytorch-orange), var(--pytorch-purple));
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

nav a:hover {
    opacity: 0.8;
}

/* Main content */
main {
    padding: 2rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--pytorch-orange);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.blog-card h3 {
    color: var(--pytorch-purple);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.blog-card .meta {
    color: var(--pytorch-text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card p {
    margin-bottom: 1rem;
    color: var(--pytorch-text);
}

.read-more {
    color: var(--pytorch-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.8rem;
}

/* Blog post page */
.blog-post {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.blog-post h1 {
    color: var(--pytorch-purple);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    border-bottom: 3px solid var(--pytorch-orange);
    padding-bottom: 0.5rem;
}

.blog-post h2 {
    color: var(--pytorch-blue);
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.blog-post h3 {
    color: var(--pytorch-purple);
    margin: 1.5rem 0 0.8rem 0;
    font-size: 1.4rem;
}

.blog-post p {
    margin-bottom: 1rem;
    text-align: justify;
}

.blog-post ul, .blog-post ol {
    margin: 1rem 0 1rem 2rem;
}

.blog-post li {
    margin-bottom: 0.5rem;
}

.blog-post code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--pytorch-purple);
}

.blog-post pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-post pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-post strong, .blog-post b {
    color: var(--pytorch-orange);
    font-weight: 600;
}

.blog-post em, .blog-post i {
    color: var(--pytorch-purple);
}

.blog-post a {
    color: var(--pytorch-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.blog-post a:hover {
    border-bottom-color: var(--pytorch-blue);
}

/* Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pytorch-border);
}

.post-nav a {
    color: var(--pytorch-blue);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-nav a:hover {
    color: var(--pytorch-purple);
}

.back-to-home {
    background: linear-gradient(135deg, var(--pytorch-orange), var(--pytorch-purple));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.back-to-home:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--pytorch-dark-bg);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post h1 {
        font-size: 2rem;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 1rem;
    }
}
