/* Simple blog styles */

:root {
    /* Light theme colors */
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f4;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #888;
    --border-color: #eee;
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --header-text: #555;
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #404040;
    --link-color: #4d9fff;
    --link-hover: #70b3ff;
    --header-text: #c0c0c0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.portrait:hover {
    border-color: var(--link-color);
}

header h1 a {
    color: var(--text-primary);
    text-decoration: none;
}

header h1 a:hover {
    color: var(--link-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-link {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    transform: scale(1.1);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--link-color);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

main {
    min-height: calc(100vh - 200px);
}

/* Post listing */
.posts h2 {
    margin-bottom: 1.5rem;
    color: var(--header-text);
}

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

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

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

.post-preview h3 a:hover {
    text-decoration: underline;
}

.post-preview time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-preview .summary {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Single post */
.post header {
    margin-bottom: 1.5rem;
}

.post header h2 {
    margin-bottom: 0.5rem;
}

.post header time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.post-content code {
    background-color: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

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

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

.post-content blockquote {
    border-left: 3px solid var(--link-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
}

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

.post-content a {
    color: var(--link-color);
}

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

.post footer a {
    color: var(--link-color);
    text-decoration: none;
}

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

/* Main footer */
body > footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}
