:root {
    --text: #1a1a1a;
    --bg: #ffffff;
    --link: #0066cc;
    --border: #e5e5e5;
    --code-bg: #f5f5f5;
    --max-width: 650px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #e5e5e5;
        --bg: #1a1a1a;
        --link: #6db3f2;
        --border: #333;
        --code-bg: #2a2a2a;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header, main, footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

header {
    padding-top: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.header-content {
    text-align: center;
}

.site-branding {
    margin-bottom: 2rem;
}

.site-title {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    display: block;
    margin-bottom: 0.5rem;
}

.site-tagline {
    margin: 0 auto;
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
    max-width: 500px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    position: relative;
}

.main-nav a:hover {
    opacity: 1;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--link);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

main {
    padding: 2rem 1rem;
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin-top: 0;
    line-height: 1.2;
    font-weight: 600;
}

strong, b {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
}

a {
    color: var(--link);
}

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

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

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

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

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

time {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.7;
}

.tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    opacity: 0.7;
}

.tag:hover {
    opacity: 1;
}

.back-home {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.back-home:hover {
    opacity: 1;
}

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

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

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

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

.post-content img {
    max-width: 100%;
    height: auto;
}

.post-content pre:not(.code) {
    background: var(--code-bg);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
}

.post-content code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 1em;
}

.post-content pre {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

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

div.code, .code, pre.code {
    background: #000000;
    color: #00FF00;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.6;
    white-space: pre-line;
}

/* Override default pre styling when using .code class */
pre.code {
    white-space: pre-wrap;
    margin: 1rem 0;
}

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

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

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.page-info {
    font-size: 0.9rem;
    opacity: 0.7;
}

.archive-list {
    list-style: none;
    padding: 0;
}

.archive-list li {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
}

.archive-list time {
    min-width: 80px;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

footer p {
    margin: 0.5rem 0 0;
    opacity: 0.7;
}

.footer-bio {
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.85rem;
    margin-top: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: #000000;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    text-decoration: none;
    font-size: 1.25rem;
}

.social-links a:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    header {
        padding-top: 2rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-tagline {
        font-size: 0.875rem;
        padding: 0 1rem;
    }
    
    .main-nav {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .archive-list li {
        flex-direction: column;
        gap: 0.25rem;
    }
    
}

/* Reading Pages Styles */
.page-header {
    margin-bottom: 0;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin: 0;
}

.reading-list {
    margin-bottom: 3rem;
}

.reading-category {
    margin-bottom: 3rem;
    padding-top: 20px;
}

.reading-category h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.blog-list, .book-list, .movie-list, .podcast-list {
    display: grid;
    gap: 1.5rem;
}

.blog-item {
    padding: 1.5rem;
    background: var(--code-bg);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.book-item, .movie-item {
    padding: 1.5rem;
    background: var(--code-bg);
    border-radius: 8px;
    transition: transform 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.podcast-item {
    padding: 1.5rem;
    background: var(--code-bg);
    border-radius: 8px;
    transition: transform 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.blog-item:hover, .book-item:hover, .movie-item:hover, .podcast-item:hover {
    transform: translateY(-2px);
}

.blog-item h3, .book-item h3, .movie-item h3, .podcast-item h3 {
    margin: 0 0 0.5rem 0;
}

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

.blog-item h3 a:hover {
    color: var(--link);
}

.blog-item p, .book-item p, .movie-item p, .podcast-item p {
    margin: 0;
    line-height: 1.5;
}

.book-author {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 0.5rem !important;
}

.book-note {
    font-size: 0.95rem;
}

.book-progress {
    margin-top: 1rem;
    background: var(--border);
    height: 8px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    display: block;
    height: 100%;
    background: var(--link);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}

.book-rating, .movie-rating {
    margin-top: 0.5rem !important;
    color: #ffa500;
    font-size: 1.1rem;
}

.book-item.finished, .movie-item.finished {
    border-left: 3px solid #4caf50;
}

.book-item.favorite, .movie-item.favorite {
    border-left: 3px solid #ffa500;
}

.book-list.upcoming, .movie-list.upcoming {
    opacity: 0.7;
}

.movie-info, .podcast-info {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 0.5rem !important;
    font-size: 0.9rem;
}

.movie-note, .podcast-note {
    font-size: 0.95rem;
}

.podcast-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.book-cover,
.movie-poster {
    width: 60px;
    height: 80px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

.podcast-content,
.book-content,
.movie-content {
    flex: 1;
}

.podcast-item h3 a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s ease;
}

.podcast-item h3 a:hover {
    color: var(--link);
}

.page-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.update-note {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.back-link {
    color: var(--text);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 1;
}