:root {
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        --surface-color: #1e293b;
        --text-color: #f8fafc;
        --text-muted: #94a3b8;
        --primary-color: #3b82f6;
        --primary-hover: #60a5fa;
        --border-color: #334155;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    }
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 50px; /* Pill shape for very distinct buttons */
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Header */
.site-header {
    background-color: var(--surface-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.site-title:hover {
    text-decoration: none;
    color: var(--primary-color);
}

/* Navigation Menu */
.site-nav {
    display: flex;
    gap: 0.25rem;
    background-color: var(--bg-color);
    padding: 0.35rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.site-nav a {
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-nav a:hover {
    color: var(--text-color);
    background-color: rgba(128, 128, 128, 0.1);
}

.site-nav a.active {
    background-color: var(--text-color);
    color: var(--surface-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 5rem;
}

.hero-content {
    flex: 1;
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-content p:last-of-type {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex-shrink: 0;
    align-self: flex-end; /* Logo rechts oben */
}
.site-logo {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.hero-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 4px solid var(--surface-color); /* Gibt dem Kreis einen schönen Rahmen */
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-badge {
    display: inline-block;
    background: var(--border-color);
    color: var(--text-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Posts Grid & Sidebar Layout */
.container.with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.widget h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--text-color);
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    margin-bottom: 0.5rem;
}

.widget-list a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.recent-posts h2, .page-header h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 800;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.post-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.post-card-image {
    flex-shrink: 0;
    width: 140px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card-image:hover img {
    transform: scale(1.05);
}

.post-card-content {
    flex-grow: 1;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.post-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

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

.post-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Single Post */
.post-content {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-cover-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: block; /* Centers the image if margin is auto, but here it's 2rem 0 */
}

/* Optional styling for image descriptions (captions) */
.post-body figure {
    margin: 2rem 0;
}
.post-body figure img {
    margin: 0;
    width: 100%;
}
.post-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Book Review Info Box */
.book-info-box {
    display: flex;
    gap: 2.5rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 3.5rem;
    margin-top: 2rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

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

.book-cover img {
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 0;
}

.book-details h2 {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.book-details p {
    margin-bottom: 0.75rem !important;
    font-size: 1.05rem !important;
    line-height: 1.4;
}

.book-details strong {
    color: var(--text-color);
}

.book-rating {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.book-rating .stars {
    color: #eab308; /* Star rating gold/yellow */
    font-size: 1.5rem;
    margin-left: 0.5rem;
    letter-spacing: 2px;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Main */
main {
    flex: 1;
}

/* Footer */
.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap; /* Wichtig für Mobile, damit es umbricht */
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: block;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.social-links a:hover .social-icon {
    transform: scale(1.15) translateY(-2px);
    opacity: 1;
}

.footer-links a {
    color: var(--text-muted);
    margin-left: 1rem;
}
.footer-links a:hover {
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
    .hero-image {
        align-self: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .avatar-placeholder {
        width: 150px;
        height: 150px;
        font-size: 60px;
    }
    .post-content {
        padding: 1.5rem;
    }
    .post-card {
        flex-direction: column;
        padding: 1.25rem;
        gap: 1rem;
    }
    .post-card-image {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    .book-info-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }
    .book-details h2 {
        text-align: center;
    }
    .container.with-sidebar {
        grid-template-columns: 1fr;
    }
}
