/* ==========================================================================
   Johannes Hemmen – Digital Fine Art
   Design: Georgia serif, dark blue-gray background
   Specs: 1920×1080, 72dpi
   Background CMYK: C71 M59 Y47 K27 → #364C63
   Text: light for contrast on dark bg
   ========================================================================== */

:root {
  --bg-color: #364C63;
  --text-color: #e8edf2;
  --border-color: rgba(232, 237, 242, 0.35);
  --font-main: 'Georgia', 'Times New Roman', serif;
  --transition-speed: 0.5s;
  --transition-fast: 0.3s;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-family: var(--font-main);
}

/* ==========================================================================
   Page Sections (SPA Views)
   ========================================================================== */

.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background-color: var(--bg-color);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.page.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* ==========================================================================
   Page Header (shared by all pages)
   ========================================================================== */

.page-header {
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  flex-shrink: 0;
}

.page-header .site-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.2em;
}

.page-header .site-title.clickable {
  cursor: pointer;
  transition: opacity var(--transition-fast) ease;
}

.page-header .site-title.clickable:hover {
  opacity: 0.7;
}

.page-header .site-subtitle {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Page Footer (shared)
   ========================================================================== */

.page-footer {
  text-align: center;
  padding: 1.5rem 2rem 1rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: auto;
}

.page-footer .footer-statement {
  margin-bottom: 0.2em;
}

.page-footer .footer-quote {
  font-style: italic;
  margin-bottom: 0.1em;
}

.page-footer .footer-quote-author {
  margin-bottom: 0.8em;
}

.page-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.7rem;
}

.page-footer .footer-links a {
  font-size: 0.7rem;
}

.page-footer .footer-credit {
  opacity: 0.6;
  font-size: 0.65rem;
}

/* ==========================================================================
   Overview Grid
   ========================================================================== */

.overview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 3rem 1rem;
  position: relative;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem 1.5rem;
  max-width: 1200px;
  width: 100%;
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
}

.overview-grid.transitioning-out {
  opacity: 0;
  transform: translateX(-30px);
}

.overview-grid.transitioning-in {
  opacity: 0;
  transform: translateX(30px);
}

.overview-item {
  cursor: pointer;
  text-align: center;
  transition: transform var(--transition-fast) ease, opacity var(--transition-fast) ease;
}

.overview-item:hover {
  transform: scale(1.03);
}

.overview-item .thumb-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 0.4rem;
  position: relative;
  background-color: rgba(0, 0, 0, 0.2);
}

.overview-item .thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition-fast) ease;
}

.overview-item .thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  opacity: 0.4;
  font-style: italic;
}

.overview-item .thumb-title {
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.3;
}

.overview-item .thumb-title-he {
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.85;
}

/* About me link on overview */
.overview-about-link {
  text-align: right;
  align-self: flex-end;
  margin-top: 0.8rem;
  max-width: 1200px;
  width: 100%;
}

.overview-about-link a {
  display: block;
}

.overview-about-link .about-link-de {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
}

.overview-about-link .about-link-he {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
}

/* Overview page navigation */
.overview-page-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.overview-page-nav.hidden {
  display: none;
}

.page-arrow {
  width: 20px;
  height: 34px;
  opacity: 0.5;
  transition: opacity var(--transition-fast) ease;
}

.page-arrow:hover {
  opacity: 1;
}

.page-arrow svg {
  width: 100%;
  height: 100%;
}

.page-arrow svg polyline {
  fill: none;
  stroke: var(--text-color);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-indicator {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* ==========================================================================
   Gallery View
   ========================================================================== */

.gallery-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 4rem;
  position: relative;
}

/* Gallery info panel (left side text box) */
.gallery-info {
  position: absolute;
  left: 4rem;
  top: 0;
  width: 220px;
  min-height: 280px;
  border: 1px solid var(--border-color);
  padding: 1rem 1.1rem;
  z-index: 2;
}

.gallery-info .gallery-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.gallery-info .gallery-description {
  font-size: 0.65rem;
  line-height: 1.6;
  white-space: pre-line;
}

/* Gallery image viewer */
.gallery-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin-left: 100px;
  position: relative;
}

.gallery-image-container {
  position: relative;
  max-width: 900px;
  max-height: 60vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image-container img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.gallery-image-container img:hover {
  opacity: 0.85;
}

.gallery-image-container img.hidden {
  position: absolute;
  opacity: 0;
}

.gallery-image-container img.fade-out {
  opacity: 0;
}

.gallery-image-container img.fade-in {
  opacity: 1;
}

/* Image placeholder when no image loaded */
.gallery-image-placeholder {
  width: 500px;
  height: 350px;
  background-color: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.5;
}

/* Gallery arrows */
.gallery-arrow {
  width: 30px;
  height: 50px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--transition-fast) ease;
  z-index: 3;
}

.gallery-arrow:hover {
  opacity: 1;
}

.gallery-arrow svg {
  width: 100%;
  height: 100%;
}

.gallery-arrow svg polyline {
  fill: none;
  stroke: var(--text-color);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-arrow.hidden {
  visibility: hidden;
}

/* Gallery caption */
.gallery-caption {
  text-align: center;
  padding: 0.5rem 0 0;
  margin-left: 100px;
  flex-shrink: 0;
}

.gallery-caption .caption-de {
  display: block;
  font-size: 0.72rem;
  line-height: 1.4;
}

.gallery-caption .caption-he {
  display: block;
  font-size: 0.65rem;
  line-height: 1.4;
  opacity: 0.85;
}

/* ==========================================================================
   About Me
   ========================================================================== */

.about-content {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 0 4rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.about-bio,
.about-exhibitions {
  flex: 1;
  border: 1px solid var(--border-color);
  padding: 1.5rem 1.8rem;
  max-width: 480px;
}

.about-bio h3,
.about-exhibitions h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-bio div {
  font-size: 0.68rem;
  line-height: 1.7;
  white-space: pre-line;
}

.about-exhibitions ul {
  list-style: none;
  font-size: 0.68rem;
  line-height: 1.8;
}

.about-exhibitions li::before {
  content: none;
}

.about-exhibitions .exhibition-year {
  font-weight: 700;
  margin-right: 0.5em;
}

.about-disclaimer-note {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 4rem;
  font-size: 0.55rem;
  line-height: 1.5;
  opacity: 0.6;
  font-style: italic;
}

/* ==========================================================================
   Legal Pages (Impressum / Disclaimer)
   ========================================================================== */

.legal-content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 4rem;
  width: 100%;
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.legal-content h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.legal-back {
  margin-top: 2rem;
}

.legal-back a {
  font-size: 0.8rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Ultra-wide: cap content width */
@media (min-width: 1800px) {
  .overview-grid {
    max-width: 1400px;
  }
}

@media (max-width: 1400px) {
  .overview-grid {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
  }

  .overview-about-link {
    max-width: 1000px;
  }
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 800px;
  }

  .overview-about-link {
    max-width: 800px;
  }

  .gallery-info {
    width: 180px;
    min-height: 220px;
    left: 2rem;
  }

  .gallery-viewer {
    margin-left: 60px;
  }

  .gallery-caption {
    margin-left: 60px;
  }
}

@media (max-width: 850px) {
  .page-header {
    padding: 2rem 1.5rem 1rem;
  }

  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
    gap: 1rem 1.2rem;
  }

  .overview-about-link {
    max-width: 600px;
  }

  .gallery-info {
    position: relative;
    left: 0;
    width: 100%;
    min-height: auto;
    margin-bottom: 1rem;
  }

  .gallery-viewer {
    margin-left: 0;
  }

  .gallery-caption {
    margin-left: 0;
  }

  .gallery-content {
    padding: 0 2rem;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
  }

  .about-bio,
  .about-exhibitions {
    max-width: 100%;
  }

  .legal-content {
    padding: 0 2rem;
  }
}

@media (max-width: 600px) {
  .page-header {
    padding: 1.5rem 1rem 0.8rem;
  }

  .page-header .site-title {
    font-size: 1.6rem;
  }

  .page-header .site-subtitle {
    font-size: 0.85rem;
  }

  .overview-container {
    padding: 0 1rem;
  }

  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
    gap: 0.8rem 1rem;
  }

  .overview-about-link {
    text-align: center;
    align-self: center;
    max-width: 400px;
  }

  .gallery-content {
    padding: 0 1rem;
  }

  .gallery-image-container {
    max-height: 50vh;
  }

  .gallery-image-container img {
    max-height: 50vh;
  }

  .gallery-arrow {
    width: 24px;
    height: 40px;
  }

  .about-content {
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .about-bio,
  .about-exhibitions {
    padding: 1rem 1.2rem;
  }

  .about-disclaimer-note {
    padding: 0 1rem;
  }

  .legal-content {
    padding: 0 1rem;
  }

  .page-footer {
    padding: 1rem 1rem 0.8rem;
  }

  .page-footer .footer-bottom {
    flex-direction: column;
    gap: 0.3rem;
  }
}

@media (max-width: 400px) {
  .overview-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  .overview-about-link {
    max-width: 280px;
  }
}

/* Landscape mobile / short viewports */
@media (max-height: 600px) {
  .page-header {
    padding: 1rem 1.5rem 0.5rem;
  }

  .page-header .site-title {
    font-size: 1.6rem;
  }

  .page-footer {
    padding: 0.5rem 1rem;
  }

  .page-footer .footer-statement,
  .page-footer .footer-quote,
  .page-footer .footer-quote-author {
    display: none;
  }

  .gallery-image-container {
    max-height: 45vh;
  }

  .gallery-image-container img {
    max-height: 45vh;
  }
}
