/* MLCurve Stylesheet */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --text: #333;
    --text-light: #666;
    --border: #ddd;
    --bg: #fff;
    --bg-alt: #f8f9fa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    transition: color 0.3s;
}

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

/* Post Previews */
.post-list {
    margin-top: 2rem;
}

.post-preview {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

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

.post-preview h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-preview h3 a {
    color: var(--text);
    text-decoration: none;
}

.post-preview h3 a:hover {
    color: var(--primary);
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.excerpt {
    color: var(--text-light);
    margin: 1rem 0;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Post Content */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.post-title {
    margin-bottom: 0.5rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

.post-content code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

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

.prev-post,
.next-post {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.topic {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.topic:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic h3 {
    margin-top: 0;
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .nav-links {
        gap: 1rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
}