* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none; /* Remove max-width constraint */
    background: rgba(0, 0, 0, 0.35); /* Semi-transparent black */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.3rem 0;
}

/* Center nav content within max-width */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

nav button {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

nav button:hover {
    color: #f0e6d2;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 0; /* CHANGED: Remove margin so nav overlays */
}

.hero h1 {
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 100%;        /* Always fills container width */
    height: auto;       /* Maintains aspect ratio */
    display: block;
    filter: brightness(0.6);
}

/* Section Styling */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

/* Books Section */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.book-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.book-cover {
    width: 100%;
    height: 0;
    padding-bottom: 150%; /* 150% = 2:3 ratio (900/600) */
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.book-info p {
    color: #555;
    margin-bottom: 1.5rem;
}

.amazon-btn {
    display: inline-block;
    background: #8b7355;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.amazon-btn:hover {
    background: #6d5a43;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
    width: 100%;
}

.author-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.author-image {
    width: 100%;        /* Always fills container width */
    height: auto;       /* Maintains aspect ratio */
    display: block;
    filter: brightness(1.0);
}

.author-bio {
    font-size: 1.1rem;
    color: #555;
}

.author-bio p {
    margin-bottom: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.social-links {
    list-style: none;
}

.social-links li {
    margin: 1rem 0;
}

.social-links a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links a i {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.social-links a:hover {
    color: #8b7355;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-photo {
        margin: 0 auto;
    }

    nav ul {
        gap: 1rem;
        padding: 0 1rem;
    }

    nav button {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 0.5rem;
    }

    nav button {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .book-cover {
        height: 300px;
    }
}