/* ========================================
   RESET
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
  color: white;
}

/* ========================================
   GALLERY IMAGE REVEAL
======================================== */

.gallery-item {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.gallery-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SIDEBAR
======================================== */

#sidebar {
  position: fixed;
  top: 0;
  left: 0;

  width: 280px;
  height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 50px 40px;

  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid #444;

  z-index: 100;
}

.logo {
  position: relative;

  width: 100%;
  height: 80px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-link {
  position: relative;

  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* Signature shown by default */
.sidebar-signature {
  position: absolute;

  width: 200px;
  height: auto;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Text hidden by default */
.logo span {
  position: absolute;
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  width: max-content;

  font-size: 40px;
  font-weight: bold;
  letter-spacing: 2px;

  text-align: center;

  opacity: 0;
  transition: opacity 0.8s ease;
}

.logo-link span {
  position: absolute;
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  width: max-content;

  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;

  opacity: 0;
  transition: opacity 0.4s ease;
}

.logo-link:hover .sidebar-signature {
  opacity: 0;
}

/* Hover: show Carson Dibb */
.logo-link:hover span {
  opacity: 1;
}

/* Hover transition */

.sidebar-signature path {
  fill: none;
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 20000;
  stroke-dashoffset: 20000;

  animation: drawSignature 9s ease forwards;
}

.sidebar-signature path:nth-child(2) {
  animation-delay: 0.8s;
}

/* ========================================
   MAIN LAYOUT
======================================== */

main {
  margin-left: 320px;
  padding: 70px;
}

.page-title {
  margin-bottom: 60px;

  font-size: 70px;
  letter-spacing: 8px;
}

/* ========================================
   GALLERY
======================================== */

.gallery {
  max-width: 1600px;
  margin: auto;
}

.gallery img {
  height: auto;
}

.gallery-item {
  position: relative;

  width: calc(33.333% - 17px);
  margin-bottom: 25px;

  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  display: block;
  width: 100%;

  transition: 0.35s;
}

.gallery-item:hover img {
  filter: brightness(0.45);
  transform: scale(1.03);
}

/* ========================================
   OVERLAY
======================================== */

.overlay {
  position: absolute;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.45);

  font-size: 20px;
  text-align: center;

  opacity: 0;
  transition: 0.35s;

  pointer-events: none;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.photo-number {
  position: absolute;
  right: 15px;
  bottom: 15px;

  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;

  opacity: 0;
  transform: translateY(8px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;

  pointer-events: none;
}

.gallery-item:hover .photo-number {
  opacity: 0.9;
  transform: translateY(0);
}

/* ========================================
   LIGHTBOX
======================================== */

#lightbox {
  position: fixed;
  inset: 0;

  display: none;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.95);

  cursor: zoom-out;
  z-index: 999999;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.95);
}

#lightbox img {
  max-width: 95vw;
  max-height: 85vh;

  object-fit: contain;

  transition: opacity 0.15s ease;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;

  max-width: 95vw;
  max-height: 95vh;
}

#close {
  position: absolute;
  top: 25px;
  right: 40px;

  color: white;
  font-size: 50px;
  font-weight: 300;

  cursor: pointer;
  z-index: 1001;
}

#photo-info {
  margin-top: 15px;

  color: white;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;

  opacity: 0.85;
}

#photo-title {
  font-size: 18px;
  font-weight: bold;
}

#photo-location,
#photo-details {
  font-size: 13px;
}

/* ========================================
   CONTACT CTA
======================================== */

.contact-cta {
  max-width: 1600px;

  margin: 50px auto 25px;
  padding: 25px 20px;

  text-align: center;

  border-top: 1px solid #333;
}

.contact-cta h2 {
  margin-bottom: 8px;

  font-size: 28px;
  font-weight: 700;
  letter-spacing: 5px;
}

.contact-cta p {
  margin-bottom: 15px;

  color: #999;
  font-size: 14px;
}

.contact-button {
  display: inline-block;

  padding: 8px 18px;

  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;

  border: 1px solid #c49a45;

  transition: 0.3s ease;
}

.contact-button:hover {
  background: #c49a45;
  color: #111;
}

/* ========================================
   FOOTER
======================================== */

footer {
  padding: 30px 20px;

  background: #0d0d0d;
  border-top: 1px solid #333;

  color: #888;
  text-align: center;
  font-size: 14px;
}

footer p {
  margin: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes drawSignature {
  to {
    stroke-dashoffset: 0;
  }
}

/* ========================================
   TO TOP BUTTON
======================================== */

#to-top {
  position: fixed;
  right: 35px;
  bottom: 35px;

  width: 50px;
  height: 50px;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(17, 17, 17, 0.9);
  color: white;

  border: 1px solid #444;
  border-radius: 50%;

  font-size: 28px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
}

#to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#to-top:hover {
  background: #c49a45;
  color: #111;
  border-color: #c49a45;
}

@media (max-width: 900px) {
  #to-top {
    right: 20px;
    bottom: 20px;

    width: 45px;
    height: 45px;

    font-size: 24px;
  }
}

/* ========================================
   RESPONSIVE
======================================== */

/* Tablet */
@media (max-width: 1200px) {
  .gallery-item {
    width: 48%;
  }
}

/* Phone */
@media (max-width: 900px) {
  #sidebar {
    display: none;
  }

  main {
    margin-left: 0;
    padding: 25px;
  }

  .gallery-item {
    width: 100%;
  }

  .page-title {
    font-size: 48px;
  }

  .contact-cta {
    margin-top: 80px;
    padding: 60px 20px;
  }

  .contact-cta h2 {
    font-size: 42px;
    letter-spacing: 5px;
  }

  .contact-cta p {
    font-size: 18px;
  }
}
