/* ============================================================
   style.css — Merav Burstein AI Art Portfolio
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=Heebo:wght@300;400;500;600&display=swap');

/* ── Custom properties ──────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --bg-card:     #f5f5f5;
  --bg-card-hover: #efefef;
  --bg-nav:      rgba(255, 255, 255, 0.92);
  --text:        #111111;
  --text-muted:  #888888;
  --text-dim:    #cccccc;
  --accent:      #111111;
  --accent-glow: rgba(0, 0, 0, 0.06);
  --border:      #e8e8e8;
  --nav-h:       68px;
  --radius-sm:   3px;
  --radius:      6px;
  --radius-lg:   12px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --dur:         0.28s;
  --font-display:'Playfair Display', 'Heebo', Georgia, serif;
  --font-body:   'DM Sans', 'Heebo', system-ui, sans-serif;
  --max-w:       1280px;
  --gutter:      clamp(1.25rem, 4vw, 3rem);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
a      { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Fade-in animation ──────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.45s var(--ease) both; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 900;
  background: transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: var(--bg-nav);
  border-bottom-color: var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.logo-tagline {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-inline-start: auto;
}
.nav-links a {
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--dur), background var(--dur);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(0,0,0,0.05);
}
.nav-links a.active {
  color: var(--accent);
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: border-color var(--dur);
}
.lang-toggle:hover { border-color: var(--text-muted); }
.lang-option {
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--dur), background var(--dur);
  user-select: none;
}
.lang-option.lang-active {
  color: #ffffff;
  background: var(--accent);
}
.lang-divider {
  color: var(--text-dim);
  font-size: 0.65rem;
}

/* ── Main content offset ────────────────────────────────────── */
#app {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ============================================================
   HOME PAGE
   ============================================================ */

/* Hero */
.home-hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}
.hero-name em { font-style: italic; color: var(--accent); }
.hero-tagline {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Series grid */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 1px;
  padding: 0 0 1px;
  background: var(--border);
}

/* Series card */
.series-card {
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background var(--dur);
  text-decoration: none;
  color: inherit;
}
.series-card:hover,
.series-card:focus-visible { background: var(--bg-card-hover); }

.card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.series-card:hover .card-img-wrap img { transform: scale(1.06); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur);
}
.series-card:hover .card-overlay { background: rgba(0,0,0,0.38); }
.card-cta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.series-card:hover .card-cta,
.series-card:focus-visible .card-cta { opacity: 1; transform: translateY(0); }

.card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
}
.card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   HOME INTRO (preamble before series grid)
   ============================================================ */
.home-intro {
  padding: 0 var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
}
.home-intro-inner {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.home-intro-inner p {
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.85;
  font-weight: 300;
  color: #555555;
  margin-bottom: 1.2rem;
}
.home-intro-inner p:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-style: italic;
  color: var(--text);
  font-weight: 400;
}
.home-intro-inner p:last-of-type { margin-bottom: 0; }
.home-intro-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color var(--dur), border-color var(--dur);
}
.home-intro-link:hover {
  color: var(--text);
  border-color: var(--text);
}

/* RTL intro */
[dir="rtl"] .home-intro-inner { text-align: right; }
[dir="rtl"] .home-intro-inner p { text-align: right; }

/* ============================================================
   SERIES PAGE
   ============================================================ */
.series-header {
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}
.back-btn {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0;
  transition: color var(--dur);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.back-btn:hover { color: var(--accent); }

.series-meta { max-width: 680px; }
.series-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.series-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 300;
}

/* Thumbnails grid — masonry (Pinterest-style, no cropping) */
.thumbs-grid {
  columns: 2;
  column-gap: 12px;
  padding: 0 var(--gutter) 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 12px;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  border: none;
}
.thumb-btn img {
  width: 100%;
  height: auto;           /* full image, no cropping */
  display: block;
  transition: transform 0.55s var(--ease);
}
.thumb-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--dur);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.thumb-overlay::after {
  content: '🔍';
  font-size: 2rem;
  opacity: 0;
  transition: opacity var(--dur);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.thumb-btn:hover img             { transform: scale(1.04); }
.thumb-btn:hover .thumb-overlay  { background: rgba(0,0,0,0.28); }
.thumb-btn:hover .thumb-overlay::after { opacity: 1; }

/* ============================================================
   ARTIST BANNER (home page, after series grid)
   ============================================================ */
.artist-banner {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: var(--max-w);
  margin: clamp(3rem, 8vw, 6rem) auto;
  padding: 0 var(--gutter);
}

.artist-banner-img-wrap {
  flex-shrink: 0;
  width: clamp(200px, 28vw, 380px);
  border-radius: var(--radius);
  overflow: hidden;
}
.artist-banner-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(8%);
  transition: filter 0.4s var(--ease);
}
.artist-banner-img-wrap:hover img { filter: grayscale(0%); }

.artist-banner-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.artist-banner-quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
  padding: 0;
  border: none;
}
.artist-banner-sub {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.artist-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  width: fit-content;
  transition: color var(--dur), border-color var(--dur);
}
.artist-banner-link:hover {
  color: var(--text-muted);
  border-color: var(--text-muted);
}

/* RTL */
[dir="rtl"] .artist-banner      { flex-direction: row-reverse; }
[dir="rtl"] .artist-banner-text { text-align: right; }

/* Mobile */
@media (max-width: 700px) {
  .artist-banner {
    flex-direction: column !important;
    text-align: center;
  }
  .artist-banner-img-wrap { width: 70%; }
  .artist-banner-link     { margin: 0 auto; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about-photo-col { position: sticky; top: calc(var(--nav-h) + 2rem); }
.about-photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.about-photo-name {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 1.75rem;
  line-height: 1.15;
}
.about-body p {
  font-size: 1.025rem;
  line-height: 1.8;
  font-weight: 300;
  color: #444444;
  margin-bottom: 1.25rem;
}
.about-body p:last-child { margin-bottom: 0; }

.tools-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tool-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color var(--dur), background var(--dur);
}
.tool-tag:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.tool-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.tool-desc {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 4, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightboxImg {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transition: opacity 0.2s var(--ease);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.5);
  color: #ffffff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  transition: background var(--dur), color var(--dur), transform var(--dur);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.2rem;
  width: 48px;
  height: 48px;
}
.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  z-index: 2;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 2rem var(--gutter) 2.5rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.social-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--dur), border-color var(--dur), transform var(--dur);
}
.social-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* ============================================================
   RTL OVERRIDES  (dir="rtl" applied to <html>)
   ============================================================ */

/* General text alignment */
[dir="rtl"] body                { text-align: right; }

/* Hero — centered in both languages */
[dir="rtl"] .home-hero          { text-align: center; }
[dir="rtl"] .hero-tagline,
[dir="rtl"] .logo-tagline       { letter-spacing: 0.05em; }

/* Home intro — centered in both languages */
[dir="rtl"] .home-intro-inner   { text-align: center; }
[dir="rtl"] .home-intro-inner p { text-align: center; }
[dir="rtl"] .home-intro-link    { margin: 1.75rem auto 0; }

/* Cards */
[dir="rtl"] .card-body          { text-align: right; }

/* Series page */
[dir="rtl"] .series-meta        { text-align: right; }
[dir="rtl"] .series-desc        { text-align: right; }
[dir="rtl"] .back-btn           { flex-direction: row-reverse; }

/* About page */
[dir="rtl"] .about-title        { text-align: right; }
[dir="rtl"] .about-body         { text-align: right; }
[dir="rtl"] .about-body p       { text-align: right; }
[dir="rtl"] .tools-title        { text-align: right; }
[dir="rtl"] .about-photo-name   { text-align: center; }
[dir="rtl"] .tool-tag           { text-align: right; }

/* Footer — centered in both languages */
[dir="rtl"] .site-footer        { text-align: center; }

/* Lightbox arrow semantics flip in RTL */
[dir="rtl"] .lightbox-prev { order: 2; }
[dir="rtl"] .lightbox-next { order: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-photo-col {
    position: static;
    max-width: 260px;
    margin: 0 auto;
  }
  .about-photo-name { text-align: center; }
  .about-text-col   { text-align: start; }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --nav-h: 58px; }

  .nav-links a { padding: 0.3rem 0.6rem; font-size: 0.82rem; }
  .logo-name   { font-size: 1rem; }

  .series-grid  { grid-template-columns: 1fr; }
  .thumbs-grid  { columns: 1; }

  .about-layout { padding: 1.5rem var(--gutter) 2rem; }
  .about-photo-col { max-width: 200px; }

  .lightbox-prev { inset-inline-start: 0.5rem; width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-next { inset-inline-end: 0.5rem;   width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-close { top: 0.75rem; inset-inline-end: 0.75rem; width: 40px; height: 40px; }
}

/* Wide screens — cap columns */
@media (min-width: 1100px) {
  .series-grid { grid-template-columns: repeat(3, 1fr); }
  .thumbs-grid { columns: 3; }
}

/* ── Error state ─────────────────────────────────────────────── */
.error-msg {
  padding: 4rem var(--gutter);
  text-align: center;
  color: var(--text-muted);
}
