/* ===== Base ===== */

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #000;
  color: #fff;
}

main {
  padding-top: 110px;
}

/* ===== Header / Navigation ===== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  height: 72px;
  padding: 20px 40px;

  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
}

nav {
  display: flex;
  margin-left: auto;
}

nav a {
  display: inline-block;
  margin-left: 25px;

  color: #fff;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;

  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.7;
}

nav a.active {
  border-bottom: 1px solid #fff;
}

/* ===== Slideshow ===== */

.slideshow {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 3s;
}

.slide.active {
  opacity: 1;
}

/* ===== Hero Text ===== */

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  color: #fff;
  text-align: center;
}

.hero-text h2 {
  margin: 0;
  font-size: 40px;
}

.hero-text p {
  margin-top: 10px;
  font-size: 18px;
}

/* ===== About Section ===== */

.about {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  color: #fff;
  line-height: 1.8;
}

.about h1 {
  margin-bottom: 20px;
  font-size: 32px;
}

.about p {
  margin-bottom: 20px;
}

/* ===== Photography Section ===== */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 100vh;
  padding: 110px 30px 30px;
  background: #000;
}

.gallery img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.gallery:hover img {
  filter: grayscale(100%);
}

.gallery:hover img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* ===== Lightbox ===== */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 32px 32px 176px;
  background: rgba(0, 0, 0, 0.9);
}

#lightbox.active {
  display: flex;
}

#lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 82vw;
  max-height: calc(100dvh - 232px);
  object-fit: contain;
}

/* EXIF info: centered near the bottom on desktop */
.lightbox-info {
  position: fixed;
  left: auto;
  right: 32px;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: none;

  width: max-content;
  max-width: calc(100vw - 64px);
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 6px;

  color: #fff;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.lightbox-info p {
  margin: 0;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

/* Row 1: camera / lens */
.lightbox-row-top {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: end;
  align-items: start;
  gap: 16px;
}

/* Row 2: aperture / shutter speed / ISO */
.lightbox-meta-row {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: end;
  gap: 12px;
  text-align: left;
}

/* Row 3: shooting date / category */
.lightbox-row-bottom {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: end;
  align-items: start;
  gap: 16px;
}

.lightbox-row-top p:first-child,
.lightbox-row-bottom p:first-child {
  text-align: left;
}

.lightbox-row-top p:last-child,
.lightbox-row-bottom p:last-child {
  text-align: left;
}

/* ===== Buttons ===== */

#close {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 10000;

  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;

  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

#close:hover,
#close:focus,
#close:active {
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;

  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;

  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.arrow:hover,
.arrow:focus,
.arrow:active {
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

/* ===== Contact Section ===== */

.contact-section {
  max-width: 600px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}

.page-title {
  margin-bottom: 10px;
  font-size: 2rem;
  letter-spacing: 0.1em;
}

.contact-desc {
  margin-bottom: 40px;
  color: #fff;
  font-size: 0.9rem;
}

.contact-form {
  text-align: left;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;

  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  font-size: 1rem;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 15px;

  border: none;
  background: #000;
  color: #fff;
  letter-spacing: 0.2em;
  cursor: pointer;

  transition: opacity 0.3s;
}

.submit-btn:hover {
  opacity: 0.7;
}

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

@media (max-width: 768px) {
  body {
    padding-top: 0;
  }

  /* ===== Navigation ===== */
  header {
    height: auto;
    padding: 14px 16px 18px;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    width: 100%;
    gap: 8px 10px;
  }

  nav a {
    width: 100%;
    margin-left: 0;
    padding: 8px 6px;
    font-size: 13px;
    text-align: center;
  }

  nav a:nth-child(1) {
    grid-column: 1 / 3;
  }

  nav a:nth-child(2) {
    grid-column: 3 / 5;
  }

  nav a:nth-child(3) {
    grid-column: 5 / 7;
  }

  nav a:nth-child(4) {
    grid-column: 2 / 4;
  }

  nav a:nth-child(5) {
    grid-column: 4 / 6;
  }

  /* ===== Gallery ===== */
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 130px 8px 8px;
  }

  .gallery img {
    height: 140px;
  }

  /* ===== Lightbox ===== */
  #lightbox {
    padding: 72px 16px 176px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  #lightbox-img {
    max-width: 88vw;
    max-height: calc(100dvh - 236px);
    margin-top: 0;
  }

  /* Stack EXIF info below the image */
  .lightbox-info {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);

    width: 88vw;
    margin: 0;

    color: #fff;
    font-size: 15px;
    line-height: 1.7;
    text-align: left;
  }

  .lightbox-info p {
    margin: 0;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  /* Camera / lens */
  .lightbox-row-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    align-items: flex-start;
  }

  /* Aperture / shutter speed / ISO */
  .lightbox-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
  }

  .lightbox-meta-row p {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  /* Shooting date / category */
  .lightbox-row-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
  }

  .lightbox-row-bottom p:last-child {
    text-align: left;
  }

  #close {
    top: 14px;
    right: 16px;
    font-size: 34px;
  }

  /* Hide arrows on small screens */
  .arrow {
    display: none;
  }
}
