/* --- MODERN & CLEAN THEME --- */


/* 1. General Setup & Variables */
:root {
    --primary-color: #C0A062;

    /* --- MODIFIED: New Warm Gradient Background Colors --- */
    --bg-warm-start: #242021; /* A very dark, warm, reddish-brown */
    --bg-warm-end: #181516;   /* A slightly darker, near-black version */

    --surface-color: #1E1E1E;
    --border-color: rgba(255, 255, 255, 0.1);

    --text-color: #b3b3b3;
    --heading-color: #ffffff;

    --title-font: 'Poppins', sans-serif;
    --body-font: 'Inter', sans-serif;
    --hebrew-font: 'Assistant', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);

    /* --- MODIFIED: Applying the new gradient background --- */
    background: radial-gradient(ellipse at center, var(--bg-warm-start) 0%, var(--bg-warm-end) 100%);
    background-attachment: fixed; /* Keeps the gradient in place on scroll */

    text-align: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Modern Header and Navigation */
header {
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

nav ul .nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

nav ul .nav-link:hover {
    color: var(--heading-color);
    background-color: var(--surface-color);
}

nav ul .nav-link.active {
    color: var(--bg-warm-end); /* Use dark background color for text */
    background-color: var(--primary-color);
    font-weight: 500;
}

/* 3. Main Content & Animations */
main {
    padding: 8rem 1rem 4rem;
}

.content-section {
    display: none;
    max-width: 1000px;
    margin: 0 auto;
}

.content-section.active {
    display: block;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Apply cascading animations */
.content-section.active > * {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}
.content-section.active > *:nth-child(2) { animation-delay: 0.3s; }
.content-section.active > *:nth-child(3) { animation-delay: 0.4s; }
.content-section.active > *:nth-child(4) { animation-delay: 0.5s; }

/* 4. Section-Specific Styles */

/* Home Section */
.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 2rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.main-title {
    font-family: var(--title-font);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.about-text {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.4rem;
    margin: 0 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* General Section Title */
.section-title {
    font-family: var(--title-font);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--heading-color);
}

/* Author Section */
.author-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.book-showcase {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 900px;
    width: 100%;
    /* MODIFIED: Added transition for the new hover effect */
    transition: all 0.4s ease;
}

/* NEW: Added a hover effect with glow for the entire book showcase */
.book-showcase:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 20px color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.book-cover-img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

.book-cover-img:hover {
    transform: scale(1.05);
}

.book-description {
    text-align: right;
    direction: rtl;
}

.book-description h3 {
    font-family: var(--title-font);
    font-size: 2rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.book-description p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.book-links-container {
    width: 100%;
    max-width: 700px;
}

.book-links-container h4 {
    font-family: var(--title-font);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

.book-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.book-link {
    background: transparent;
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-grow: 1;
    min-width: 150px;
}

.book-link:hover {
    background: var(--primary-color);
    /* --- MODIFIED: Use new background color for text on hover --- */
    color: var(--bg-warm-end);
}

/* Painter Section */
.gallery-intro {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    background-color: var(--surface-color);
}

.gallery-item:hover {
    transform: scale(1.03);
    /* MODIFIED: Added a glow effect to the existing shadow */
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease;
}

.gallery-item:hover img {
    opacity: 0.85;
}

/* 5. Responsive Adjustments */
@media (max-width: 768px) {
    .main-title { font-size: 2.8rem; }
    .section-title { font-size: 2.2rem; }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .book-showcase {
        flex-direction: column;
        padding: 1.5rem;
        gap: 2rem;
    }

    .book-description {
        text-align: right;
    }
}

/* 6. Hebrew Font Overrides */

/* Apply to all titles in the Author section */
#author .section-title,
#author .book-description h3,
#author .book-links-container h4 {
    font-family: var(--hebrew-font);
}

/* Apply to the main book description paragraphs */
.book-description p {
    font-family: var(--hebrew-font);
    font-size: 1.1rem; /* Slightly larger for better readability */
    line-height: 1.9;
}

/* Apply to the bookstore links */
.book-link {
    font-family: var(--hebrew-font);
    font-weight: 700;
}