:root {
  --page-max: 1540px;
  --page-padding: clamp(20px, 4vw, 64px);
  --grid-gap-x: clamp(50px, 4vw, 90px);
  --grid-gap-y: clamp(90px, 6vw, 100px);
  --text: #111;
  --muted: #666;
}
 
* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
}

a {
  color: inherit;
}

.site-header,
.projects,
.site-footer {
  width: min(var(--page-max), 100%);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.site-header {
  padding-top: clamp(28px, 5vw, 70px);
  padding-bottom: clamp(34px, 5vw, 72px);
}

.site-header h1 {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
}

.site-header a {
  text-decoration: none;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--grid-gap-x);
  row-gap: var(--grid-gap-y);
}

.project-card {
  display: block;
  min-width: 0;
  text-decoration: none;
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #f2f2f2;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease, opacity 240ms ease;
}

.project-card:hover .project-image img,
.project-card:focus-visible .project-image img {
  transform: scale(1.015);
  opacity: 0.92;
}

.project-card h2 {
  margin: 14px 0 0;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.play-symbol {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-42%, -50%);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid rgba(255,255,255,0.92);
  filter: drop-shadow(0 1px 5px rgba(0,0,0,0.25));
}

.site-footer {
  margin-top: clamp(90px, 12vw, 180px);
  padding-top: 32px;
  padding-bottom: 50px;
  border-top: 1px solid #ddd;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer .footer-note {
  margin-top: 10px;
  color: var(--muted);
}

/* Galerie */

.gallery-page {
  min-height: 100dvh;
  overflow: hidden;
}

.gallery {
  position: relative;
  width: 100vw;
  height: 100dvh;
  background: #fff;
}

.gallery-topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  pointer-events: none;
}

.gallery-topbar a,
.gallery-counter {
  pointer-events: auto;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  font-size: 0.92rem;
}

.gallery-topbar a {
  text-decoration: none;
}

.gallery-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 64px 74px 54px;
}

.gallery-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gallery-button {
  position: fixed;
  z-index: 15;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 70px;
  border: 0;
  background: rgba(255,255,255,0.78);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-button:hover,
.gallery-button:focus-visible {
  background: #fff;
}

.gallery-button--prev {
  left: 8px;
}

.gallery-button--next {
  right: 8px;
}

.gallery-caption {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  margin: 0;
  padding: 7px 10px;
  background: rgba(255,255,255,0.88);
  font-size: 0.86rem;
  white-space: nowrap;
}

@media (max-width: 950px) {
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .projects {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-bottom: 34px;
  }

  .gallery-stage {
    padding-inline: 46px;
  }

  .gallery-button {
    width: 42px;
    height: 60px;
  }

  .gallery-topbar {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-image img {
    transition: none;
  }
}
