/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #222222;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e1e4e8;
    --link-color: #0366d6;
    --link-hover: #0056b3;
    --accent-color: #0366d6;
    --code-bg: #f6f8fa;
    --max-width: 720px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-name:hover {
    color: var(--link-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: transform 0.2s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.article-tag {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    background-color: var(--code-bg);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.article-tag:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Lists */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code */
code {
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
    color: var(--text-primary);
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    margin-top: 0;
}

/* Book Review Card */
.book-review {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: var(--bg-secondary);
}

.book-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.book-cover {
    flex-shrink: 0;
}

.book-cover img {
    width: 100px;
    height: auto;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.book-info .author {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.book-info .rating {
    color: var(--accent-color);
    font-weight: 600;
}

.book-review-text {
    line-height: 1.6;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
    background-color: var(--bg-secondary);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--code-bg);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Blog Post Preview */
.blog-post-preview {
    margin-bottom: 3rem;
}

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

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

.blog-post-preview h2 a:hover {
    color: var(--link-color);
}

.blog-post-preview p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.read-more {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Citation Box */
.citation-box {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.citation-box p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.citation-box p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background-color: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        gap: 0;
        display: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--bg-secondary);
        font-size: 16px;
        width: 100%;
    }

    .nav-links a:hover {
        background-color: var(--bg-secondary);
    }

    .nav-links .profile-pic {
        margin: 1rem auto 0.5rem;
        width: 48px;
        height: 48px;
    }

    .container {
        padding: 2rem 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .book-header {
        flex-direction: column;
    }

    .social-links {
        flex-wrap: wrap;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer {
        display: none;
    }
}
