/* ===== VARIABLES ===== */
:root {
    --cream:      #f5f0e8;
    --parchment:  #ede5d0;
    --terracotta: #b85c38;
    --sienna:     #8b3a1e;
    --ochre:      #c9943a;
    --dark:       #2a1f14;
    --mid:        #5a4535;
    --light:      #9a8470;
    --white:      #fdfaf5;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Assistant', 'Arial Hebrew', Arial, sans-serif;

    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow:     0 4px 24px rgba(42, 31, 20, 0.12);
    --shadow-lg:  0 12px 48px rgba(42, 31, 20, 0.2);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--cream);
    color: var(--dark);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    direction: rtl;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 2px solid var(--parchment);
    box-shadow: 0 2px 12px rgba(42,31,20,0.07);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: 0.02em;
}
.logo-sub {
    font-size: 0.75rem;
    color: var(--terracotta);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 300;
}

.main-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}
.main-nav a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--mid);
    letter-spacing: 0.05em;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ===== PAGE HERO ===== */
.page-hero {
    text-align: center;
    padding: 4rem 2rem 2rem;
}
.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    color: var(--dark);
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}
.page-hero .subtitle {
    color: var(--light);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.page-hero .ornament {
    display: block;
    width: 48px;
    height: 2px;
    background: var(--terracotta);
    margin: 1.2rem auto 0;
}

/* ===== GALLERY FILTERS ===== */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 2rem 0;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.5rem 1.6rem;
    border: 2px solid var(--parchment);
    background: transparent;
    color: var(--mid);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    border-radius: 2px;
    transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--white);
}

/* ===== GALLERY GRID ===== */
.gallery-section {
    padding: 2.5rem 2rem 4rem;
    max-width: 1300px;
    margin: 0 auto;
}

.gallery-grid {
    columns: 4 280px;
    column-gap: 12px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--parchment);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(42, 31, 20, 0);
    transition: background var(--transition);
}

.gallery-item:hover::after {
    background: rgba(42, 31, 20, 0.18);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item[data-category="drawings"] {
    background: var(--cream);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(20, 14, 8, 0.93);
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    box-shadow: var(--shadow-lg);
}

.lightbox-counter {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 1rem;
    letter-spacing: 0.1em;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.4rem;
    transition: color var(--transition);
}
.lightbox-close:hover { color: white; }

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 3rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color var(--transition);
    line-height: 1;
}
.lightbox-prev:hover,
.lightbox-next:hover { color: white; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ===== ABOUT PAGE ===== */
.about-layout {
    max-width: 900px;
    margin: 3rem auto 5rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-sidebar {
    position: sticky;
    top: 96px;
}

.about-portrait {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    box-shadow: var(--shadow);
    filter: sepia(8%);
}

.about-portrait-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--parchment);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.about-details {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.about-detail {
    font-size: 0.85rem;
    color: var(--light);
    letter-spacing: 0.05em;
}
.about-detail strong {
    color: var(--mid);
    font-weight: 600;
}

.about-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 400;
    margin-bottom: 0.3rem;
    color: var(--dark);
}
.about-content .title-line {
    color: var(--terracotta);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: block;
}

.bio-text {
    color: var(--mid);
    font-size: 1.05rem;
    line-height: 1.9;
}
.bio-text p {
    margin-bottom: 1.4rem;
}
.bio-text p:last-child {
    font-style: italic;
    color: var(--light);
    border-right: 3px solid var(--ochre);
    padding-right: 1rem;
    margin-top: 2.5rem;
}

/* ===== CONTACT PAGE ===== */
.contact-layout {
    max-width: 700px;
    margin: 3rem auto 5rem;
    padding: 0 2rem;
}

.contact-intro {
    color: var(--mid);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.88rem;
    color: var(--mid);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid var(--parchment);
    background: var(--white);
    color: var(--dark);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: border-color var(--transition);
    outline: none;
    direction: rtl;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ochre);
}
.form-group textarea {
    min-height: 160px;
    resize: vertical;
}

.form-submit {
    padding: 0.9rem 2.5rem;
    background: var(--terracotta);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    align-self: flex-start;
    border-radius: 2px;
    transition: background var(--transition), transform var(--transition);
}
.form-submit:hover {
    background: var(--sienna);
    transform: translateY(-1px);
}
.form-submit:active {
    transform: translateY(0);
}

.alert {
    padding: 1rem 1.4rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 4px solid #4caf50;
}
.alert-error {
    background: #fdecea;
    color: #c62828;
    border-right: 4px solid #ef5350;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 2rem;
}
.footer-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--parchment);
    margin-bottom: 0.3rem;
}
.footer-copy {
    font-size: 0.82rem;
    opacity: 0.6;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: fixed;
        inset: 72px 0 0 0;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        z-index: 99;
    }
    .nav-open .main-nav { display: flex; }
    .nav-toggle { display: flex; }

    .gallery-grid { columns: 2 160px; }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-sidebar { position: static; }
    .about-portrait { max-width: 220px; }
}

@media (max-width: 480px) {
    .gallery-grid { columns: 1; }
    .header-inner { padding: 0 1rem; }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.22rem 0.65rem;
    border: 1.5px solid var(--terracotta);
    color: var(--terracotta);
    border-radius: 3px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.lang-switch:hover {
    background: var(--terracotta);
    color: var(--white);
}

/* ===== LTR OVERRIDES (English) ===== */
html[dir="ltr"] body {
    direction: ltr;
}

html[dir="ltr"] .form-group input,
html[dir="ltr"] .form-group textarea {
    direction: ltr;
}

html[dir="ltr"] .bio-text p:last-child {
    border-right: none;
    padding-right: 0;
    border-left: 3px solid var(--ochre);
    padding-left: 1rem;
}

html[dir="ltr"] .alert-success {
    border-right: none;
    border-left: 4px solid #4caf50;
}

html[dir="ltr"] .alert-error {
    border-right: none;
    border-left: 4px solid #ef5350;
}

html[dir="ltr"] .lightbox-close {
    left: auto;
    right: 1.5rem;
}
