/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: #fff;
  color: #111;
  line-height: 1.5;
}

header {
  text-align: center;
  padding: 2rem 1rem;
}

header h1 {
  font-weight: 400;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-weight: 300;
  font-size: 1rem;
  color: #555;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 1rem;
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 4px;
}

/* Hover effect for desktop */
@media(min-width: 768px){
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 1024px){
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-weight: 300;
}

footer a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px dotted #111;
}

/* Clicked image enlarge (JS) */
img.enlarged {
  transform: scale(1.05);
  z-index: 10;
}

/* Header flex layout */
header .header-content {
  display: flex;
  align-items: center;
  justify-content: center; /* Центрируем блок по горизонтали */
  padding: 2rem 1rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header .profile-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

header .header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Текст внутри блока остаётся слева */
}

header h1 {
  font-weight: 400;
  font-size: 2rem;
  margin-bottom: 0.25rem;
  text-align: left;
}

header p {
  font-weight: 300;
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.25rem;
  text-align: left;
}

header .email a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px dotted #111;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  header .header-content {
    flex-direction: column;
    align-items: center; /* центрируем на мобилках */
  }

  header .profile-photo {
    width: 60px;
    height: 60px;
  }

  header .header-text {
    align-items: center; /* текст по центру на мобильных */
  }

  header h1 {
    font-size: 1.5rem;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}