/* ============================================================
   BEKER.WORLD — Ludmila (warm theme)
   ============================================================ */

body.section-ludmila {
  background-color: var(--l-bg);
  color: var(--l-text);
}

/* ----------------------------------------
   Header
---------------------------------------- */
.section-ludmila .site-header {
  background-color: rgba(250, 246, 240, 0.88);
  border-bottom-color: var(--l-border);
  color: var(--l-text);
}

.section-ludmila .site-header__home {
  color: var(--l-accent);
}

/* ----------------------------------------
   Hero with background image
---------------------------------------- */
.section-ludmila .hero--bg {
  position: relative;
  min-height: 55vh;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

/* Image layer — filtered independently of text */
.section-ludmila .hero--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-url);
  background-size: cover;
  background-position: center center;
  z-index: 0;
}

.section-ludmila .hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 246, 240, 0.15) 0%,
    rgba(28, 12, 4, 0.55) 55%,
    rgba(28, 12, 4, 0.82) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.section-ludmila .hero--bg .hero__inner {
  position: relative;
  z-index: 2;
  color: var(--l-bg);
}

.section-ludmila .hero--bg .hero__name {
  color: #fff;
}

.section-ludmila .hero--bg .hero__subtitle {
  color: var(--l-accent);
  opacity: 0.9;
}

/* Hero name & subtitle keep main.css scale, just colours override above */
.section-ludmila .hero__name {
  color: var(--l-primary);
}

.section-ludmila .hero__subtitle {
  color: var(--l-accent);
}

/* ----------------------------------------
   Sections
---------------------------------------- */
.section-ludmila .section {
  border-top-color: var(--l-border);
}

/* Single standalone image in gallery subsection */
.section-ludmila .gallery-item--single {
  max-width: 340px;
  margin: 0 auto;
  cursor: zoom-in;
}

.section-ludmila .gallery-item--single img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* reserves space before lazy load */
  object-fit: unset;
}

/* ----------------------------------------
   Featured image (con anestesia local)
---------------------------------------- */
.section-ludmila .section--feature-image {
  border-top: none;
  padding-top: 0;
  padding-bottom: 0;
}

.section-ludmila .feature-image {
  max-width: 420px;
  margin: 0 auto;
  cursor: zoom-in;
}

.section-ludmila .feature-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* reserves space before lazy load, overridden by natural dims after */
  display: block;
}

.section-ludmila .feature-image__caption {
  padding-top: var(--space-xs);
}

.section-ludmila .feature-image__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  color: var(--l-text);
}

.section-ludmila .feature-image__subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--l-muted);
  margin-top: 0.1rem;
}

.section-ludmila .feature-image__year {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l-muted);
  margin-top: 0.15rem;
}

/* ----------------------------------------
   About — bio + statement (below hero)
---------------------------------------- */
.section-ludmila .section--about {
  border-top: none;
  padding-top: var(--space-lg);
}

.section-ludmila .about__bio {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  max-width: 58ch;
  margin-bottom: var(--space-sm);
}

.section-ludmila .about__bio:last-of-type {
  margin-bottom: var(--space-md);
}

.section-ludmila .about__statement {
  margin-top: var(--space-md);
  padding-left: var(--space-sm);
  border-left: 2px solid var(--l-accent);
  max-width: 52ch;
}

.section-ludmila .about__statement p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.75;
  color: var(--l-text);
}

/* ----------------------------------------
   Artistic Approach
---------------------------------------- */
.section-ludmila .approach__para {
  font-size: 1rem;
  line-height: 1.85;
  max-width: 66ch;
  margin-bottom: var(--space-sm);
}

.section-ludmila .approach__para:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------
   Gallery subsections
---------------------------------------- */
.gallery-subsection {
  margin-bottom: var(--space-lg);
}

.gallery-subsection:last-child {
  margin-bottom: 0;
}

.gallery-subsection__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--l-accent);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--l-border);
}

.gallery-subsection__text {
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 68ch;
  opacity: 0.8;
  margin-bottom: var(--space-md);
}

/* ----------------------------------------
   Gallery Grid — base
---------------------------------------- */
.section-ludmila .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.section-ludmila .gallery-item {
  position: relative;
  overflow: hidden;
  background-color: var(--l-bg-alt);
}

.section-ludmila .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
  transition: transform 0.4s ease;
}

/* ----------------------------------------
   Gallery mode: caption (default)
   — caption overlays on hover
---------------------------------------- */
.section-ludmila .gallery-grid[data-gallery-mode="caption"] .gallery-item__caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 12, 4, 0.88) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.section-ludmila .gallery-grid[data-gallery-mode="caption"] .gallery-item:hover .gallery-item__caption {
  opacity: 1;
}

.section-ludmila .gallery-grid[data-gallery-mode="caption"] .gallery-item:hover img {
  transform: scale(1.03);
}

/* ----------------------------------------
   Gallery mode: lightbox
   — same layout as caption but click opens modal
---------------------------------------- */
.section-ludmila .gallery-grid[data-gallery-mode="lightbox"] .gallery-item {
  cursor: zoom-in;
}

.section-ludmila .gallery-grid[data-gallery-mode="lightbox"] .gallery-item__caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 12, 4, 0.88) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.section-ludmila .gallery-grid[data-gallery-mode="lightbox"] .gallery-item:hover .gallery-item__caption {
  opacity: 1;
}

.section-ludmila .gallery-grid[data-gallery-mode="lightbox"] .gallery-item:hover img {
  transform: scale(1.03);
}

/* ----------------------------------------
   Gallery mode: carousel
   — horizontal scroll with snap
---------------------------------------- */
.section-ludmila .gallery-grid[data-gallery-mode="carousel"] {
  grid-template-columns: repeat(auto-fill, minmax(220px, 220px));
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--l-border) transparent;
  padding-bottom: var(--space-xs);
}

.section-ludmila .gallery-grid[data-gallery-mode="carousel"] .gallery-item {
  scroll-snap-align: start;
}

.section-ludmila .gallery-grid[data-gallery-mode="carousel"] .gallery-item__caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 12, 4, 0.88) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.section-ludmila .gallery-grid[data-gallery-mode="carousel"] .gallery-item:hover .gallery-item__caption,
.section-ludmila .gallery-grid[data-gallery-mode="carousel"] .gallery-item:focus-within .gallery-item__caption {
  opacity: 1;
}

/* Carousel navigation buttons (injected by JS) */
.carousel-nav {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  justify-content: flex-end;
}

.carousel-nav__btn {
  background: none;
  border: 1px solid var(--l-border);
  color: var(--l-text);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.carousel-nav__btn:hover {
  background-color: var(--l-bg-alt);
  border-color: var(--l-accent);
}

/* ----------------------------------------
   Gallery mode: editorial
   — 2-column CSS columns, text below, no crop
---------------------------------------- */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] {
  display: block;
  column-count: 2;
  column-gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item {
  break-inside: avoid;
  overflow: visible;
  background: none;
  margin-bottom: var(--space-md);
  cursor: zoom-in;
}

.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* portrait default — reserves space before load, overridden by natural dims after */
  object-fit: unset;
  display: block;
}

/* Caption flows below the image, not overlaid */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item__caption {
  position: static;
  background: none;
  opacity: 1;
  padding: var(--space-xs) 0 0;
  display: block;
  pointer-events: auto;
}

/* Title: bold sans-serif */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item__title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  font-style: normal;
  color: var(--l-text);
  margin-bottom: 0.15rem;
}

/* Translation subtitle: small, muted */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item__subtitle {
  font-size: 0.72rem;
  color: var(--l-muted);
  opacity: 1;
  margin-bottom: 0.15rem;
}

/* Year + medium: italic */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item__meta {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--l-muted);
  opacity: 1;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.3rem;
}

/* Description: regular */
.section-ludmila .gallery-grid[data-gallery-mode="editorial"] .gallery-item__desc {
  font-size: 0.82rem;
  color: var(--l-text);
  opacity: 0.8;
  line-height: 1.6;
}

@media (max-width: 580px) {
  .section-ludmila .gallery-grid[data-gallery-mode="editorial"] {
    column-count: 1;
  }
}

/* ----------------------------------------
   Caption text styles (shared across modes)
---------------------------------------- */
.gallery-item__caption {
  color: #fff;
}

.gallery-item__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.gallery-item__subtitle {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.75;
  margin-bottom: 0.2rem;
}

.gallery-item__meta {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.3rem;
}

.gallery-item__desc {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* Wide single-image layout (scenography) */
.gallery-single {
  display: flex;
  justify-content: center;
}

.gallery-item--wide {
  max-width: 640px;
}

.gallery-item--wide img {
  aspect-ratio: 16 / 9;
}

/* ----------------------------------------
   Current Work
---------------------------------------- */
.current-work__list {
  list-style: none;
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.current-work__item {
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: var(--space-sm);
  position: relative;
}

.current-work__item::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--l-accent);
}

.gallery-grid--current {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
}

/* ----------------------------------------
   CV — accordion
---------------------------------------- */
.cv-block {
  border-bottom: 1px solid var(--l-border);
}

.cv-block:first-of-type {
  border-top: 1px solid var(--l-border);
}

.cv-block__title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: var(--space-sm) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  color: var(--l-text);
  user-select: none;
  transition: color 0.2s;
}

.cv-block__title::-webkit-details-marker {
  display: none;
}

.cv-block__title::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.5;
  transition: transform 0.25s ease, opacity 0.2s;
  flex-shrink: 0;
}

.cv-block[open] .cv-block__title {
  color: var(--l-accent);
}

.cv-block[open] .cv-block__title::after {
  content: "−";
  opacity: 0.8;
}

.cv-list {
  list-style: none;
  padding: 0 0 var(--space-md) var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cv-list__item {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--l-text);
  padding-left: var(--space-sm);
  position: relative;
}

.cv-list__item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--l-accent);
}

.cv-text {
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 0 var(--space-xs) var(--space-md);
}

/* Expo & award items */
.cv-item--expo,
.cv-item--award {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-rows: auto auto;
  gap: 0 var(--space-xs);
  padding-left: 0;
}

.cv-item--expo::before,
.cv-item--award::before {
  display: none;
}

.cv-item__year {
  grid-row: 1 / 3;
  grid-column: 1;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--l-accent);
  padding-top: 0.15rem;
}

.cv-item__title {
  grid-column: 2;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
}

.cv-item__venue {
  grid-column: 2;
  font-size: 0.78rem;
  opacity: 0.6;
  line-height: 1.4;
}

/* ----------------------------------------
   Lightbox
---------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 4, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox__info {
  margin-top: var(--space-xs);
  color: rgba(250, 246, 240, 0.7);
  font-size: 0.82rem;
  text-align: center;
  font-style: italic;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(250, 246, 240, 0.6);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  padding: var(--space-xs);
  z-index: 301;
}

.lightbox__close {
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 1.2rem;
}

.lightbox__prev {
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  color: #fff;
}

/* ----------------------------------------
   Contact
---------------------------------------- */
.section-ludmila .contact-link {
  color: var(--l-primary);
}

/* ----------------------------------------
   Footer
---------------------------------------- */
.section-ludmila .site-footer {
  border-top-color: var(--l-border);
  color: var(--l-muted);
}

/* ----------------------------------------
   Dark mode
---------------------------------------- */
[data-theme="dark"] .section-ludmila .site-header {
  background-color: rgba(28, 15, 8, 0.92);
}

[data-theme="dark"] .section-ludmila .hero--bg::before {
  filter: brightness(0.70) saturate(0.35);
}

[data-theme="dark"] .section-ludmila .hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(8, 3, 0, 0.30) 0%,
    rgba(8, 3, 0, 0.70) 55%,
    rgba(8, 3, 0, 0.90) 100%
  );
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 768px) {
  .section-ludmila .hero--bg {
    min-height: 70vh;
    background-position: center center;
  }

  .section-ludmila .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid--current {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .section-ludmila .gallery-grid[data-gallery-mode="carousel"] {
    grid-auto-columns: 180px;
  }

  .gallery-item--wide img {
    aspect-ratio: 4 / 3;
  }

  /* Always show caption on touch (no hover) */
  .section-ludmila .gallery-item__caption {
    opacity: 1 !important;
  }
}

@media (max-width: 480px) {
  .section-ludmila .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid--current {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   TYPOGRAPHY — Refined mode (typoStyle: "refined")
   Cormorant Garamond is already dominant; Inter leads for labels.
   ============================================================ */

body.typo-refined.section-ludmila {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

body.typo-refined.section-ludmila .site-nav__link,
body.typo-refined.section-ludmila .lang-link,
body.typo-refined.section-ludmila .footer__copy,
body.typo-refined.section-ludmila .placeholder-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

body.typo-refined.section-ludmila .hero__name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-style: italic;
}

body.typo-refined.section-ludmila .hero__subtitle {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body.typo-refined.section-ludmila .section__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.02em;
}

body.typo-refined.section-ludmila .contact-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ----------------------------------------
   Gallery — arte.bio sticky CTA
   Visible only while gallery section is in viewport.
   Uses position: sticky so it auto-disappears outside the section.
---------------------------------------- */
.gallery-artebio-cta {
  position: sticky;
  top: 4.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
  padding: 0.65rem 1.25rem;
  background: var(--l-primary);
  border: 1px solid transparent;
  border-radius: 2rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
}

.gallery-artebio-cta__text {
  color: var(--l-bg-alt);
  font-style: italic;
}

.gallery-artebio-cta__link {
  color: var(--l-bg);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.gallery-artebio-cta__link:hover {
  opacity: 0.75;
}

/* Dark mode: light pill for contrast against dark background */
[data-theme="dark"] .gallery-artebio-cta {
  background: var(--l-primary);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .gallery-artebio-cta__text {
  color: var(--l-bg);
}

[data-theme="dark"] .gallery-artebio-cta__link {
  color: var(--l-bg-alt);
}

/* ----------------------------------------
   Bubble (links to Maria Sol → cold hint)
---------------------------------------- */
.section-ludmila .bubble--to-ms {
  background-color: var(--ms-bg-alt);
  color: var(--ms-primary);
  border-color: var(--ms-border);
}
