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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* Header */
header {
    background: #fff;
    border-bottom: 2px solid #e5e5e5;
}

.header-banner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem;
    text-align: center;
}

.header-banner img {
    max-width: 875px;
    width: 100%;
    height: auto;
}

/* Navigation */
nav {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 3px solid #e5e5e5;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    padding: 1rem 0;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #666;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icons a {
    color: #333;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #666;
}

/* Main container with sidebar */
.site-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Main content */
.main-content {
    background: #fff;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e5e5;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.post-meta {
    color: #999;
    font-size: 0.9rem;
}

.post-featured-image {
    margin: 2rem 0;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

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

.post-content h2, .post-content h3 {
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

.post-content figure {
    margin: 1.5rem 0;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

.post-content a {
    color: #0066cc;
    text-decoration: underline;
}

.post-content a:hover {
    color: #0052a3;
}

/* Sidebar */
.sidebar {
    background: #fff;
}

.widget {
    background: #f9f9f9;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e5e5;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #333;
}

.widget-book-cover {
    text-align: center;
    margin-bottom: 2rem;
}

.widget-book-cover img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.random-hacks-list {
    list-style: none;
}

.random-hack-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.random-hack-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.random-hack-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.random-hack-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.random-hack-title {
    flex: 1;
}

.random-hack-title a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.random-hack-title a:hover {
    color: #666;
}

/* Homepage specific */
.home-intro {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: #333;
}

.home-book-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.home-book-cover img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.home-book-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.home-book-info h2 a {
    color: #333;
    text-decoration: underline;
}

.home-book-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Post navigation */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.post-navigation a {
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.post-navigation a:hover {
    background: #e5e5e5;
}

@media (max-width: 968px) {
    .site-container {
        grid-template-columns: 1fr;
    }

    .home-book-section {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
}
