/* Shared RU visual rhythm. Content, SEO and URLs intentionally remain untouched. */
.category-projects {
  padding-top: clamp(2.5rem, 4vw, 4rem) !important;
  padding-bottom: clamp(1.25rem, 2vw, 2rem) !important;
}
.category-projects > header {
  align-items: start !important;
  padding-bottom: clamp(1.5rem, 2.2vw, 2.5rem) !important;
}
.category-projects h2 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 3.6vw, 3.25rem) !important;
  line-height: .98;
}
.category-projects > header p { margin-top: .25rem; }
.project-strip figure { height: clamp(18rem, 30vw, 27.5rem) !important; }

.empty-category.empty-category--compact {
  padding: clamp(3rem, 4.5vw, 4.75rem) 6vw clamp(4rem, 6vw, 6rem) !important;
  gap: clamp(2.5rem, 4vw, 5rem) !important;
  align-items: start !important;
}
.empty-category--compact figure {
  width: min(100%, 32.5rem);
  justify-self: center;
}
.empty-category--compact > div { padding-top: clamp(.25rem, 1vw, 1rem); }

.contact-opening.contact-opening--compact {
  min-height: 0 !important;
  gap: clamp(2.5rem, 5vw, 6rem) !important;
  padding: clamp(7.5rem, 9vw, 9rem) 6vw clamp(3.5rem, 5vw, 5rem) !important;
  align-items: start;
}
.contact-opening--compact h1 {
  font-size: clamp(3.5rem, 6vw, 5.5rem) !important;
  line-height: .94 !important;
}
.contact-opening--compact > div:last-child { padding-top: 0 !important; }
.journal-hero.journal-hero--compact h1,
.about-opening.about-opening--compact h1,
.template-hero.template-hero--section-compact h1 {
  font-size: clamp(3.5rem, 6vw, 5.5rem) !important;
  line-height: .94 !important;
}

[data-ambient-gallery] .project-strip figure,
[data-ambient-gallery] .project-layer,
[data-ambient-gallery] .project-thumb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #121b20;
}
[data-ambient-gallery] [data-ambient-ready]::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -8%;
  background-image: var(--ambient-image);
  background-position: center;
  background-size: cover;
  filter: blur(24px) saturate(.72) brightness(.68);
  transform: scale(1.08);
  opacity: .92;
  pointer-events: none;
}
[data-ambient-gallery] img,
[data-ambient-gallery] video {
  position: relative;
  z-index: 1;
  object-fit: contain !important;
  background: transparent !important;
}

/* Home projects: always show the complete photograph inside the ambient frame. */
.projects-showcase[data-ambient-gallery] .project-layer {
  position: absolute;
  inset: 0;
}

.projects-showcase[data-ambient-gallery] .project-layer img,
.projects-showcase[data-ambient-gallery] .project-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

.projects-showcase[data-ambient-gallery] .project-layer img {
  position: absolute !important;
  inset: 0 !important;
}

@media (max-width: 900px) {
  .category-projects { padding-top: 2.75rem !important; }
  .category-projects > header { padding-bottom: 1.5rem !important; }
  .category-projects h2 { font-size: clamp(2rem, 8vw, 2.75rem) !important; }
  .project-strip figure { height: clamp(17.5rem, 74vw, 18.5rem) !important; }
  .empty-category.empty-category--compact {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 3rem 1.25rem 4rem !important;
    gap: 2rem !important;
  }
  .empty-category--compact figure { width: min(100%, 21.875rem); }
  .contact-opening.contact-opening--compact {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 7rem 1.25rem 3.5rem !important;
    gap: 2.25rem !important;
  }
  .contact-opening--compact h1,
  .journal-hero.journal-hero--compact h1,
  .about-opening.about-opening--compact h1,
  .template-hero.template-hero--section-compact h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.75rem) !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-ambient-gallery] * { scroll-behavior: auto !important; }
}
