:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #f9f9f9;
    --text-primary: #333;
    --text-secondary: #666;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --border-color: #e0e0e0;
    --shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-primary: #7c8fe6;
    --accent-secondary: #8a5fc7;
    --border-color: #404040;
    --shadow: rgba(0,0,0,0.3);
}

* {
    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.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    margin-bottom: 3rem;
    border-radius: 10px;
    position: relative;
}

.header-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 10px;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-nav {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.section {
    background: var(--bg-secondary);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.section h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.5rem;
}

.project-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    background: var(--bg-card);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.project-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.project-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px var(--shadow);
}

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

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--accent-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    margin-right: 0.5rem;
}

.btn:hover {
    background: var(--accent-secondary);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Blog Post Styles */
.post-list {
    list-style: none;
}

.post-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    background: var(--bg-card);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

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

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

.post-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-content {
    line-height: 1.8;
}

.post-content h2 {
    color: var(--accent-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
}

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

.post-content code {
    background: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.post-content pre {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    margin-top: 3rem;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

    .container {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}
