/* project6.css - Illustrations Gallery */

:root {
  --accent: #EB676C;
  --bg-dark: #ffffff;
  --bg-med: #ffffff;
  --text-light: #f1e4e4;
  --text-med: #ddd;
  --text-muted: #999;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-light);
  background: radial-gradient(circle at center, var(--bg-dark) 0%, var(--bg-med) 100%);
  overflow-x: hidden;
}

/* BACK LINK */
.back-link {
  position: absolute;
  top: 50px;
  left: 270px;
  z-index: 100;
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 16px;
  border-radius: 0px;
  overflow: hidden;
  background: linear-gradient(to top, var(--accent) 0%, var(--accent) 100%);
  background-size: 100% 0%;
  background-repeat: no-repeat;
  background-position: bottom center;
  transition: background-size 0.4s ease, color 0.4s ease, transform 0.3s;
}

.back-link:hover {
  background-size: 100% 100%;
  color: #000;
  transform: scale(1.05);
}

/* HEADER */
.project5 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.p5-header {
  text-align: center;
  padding: 10rem 2rem 4rem;
}

.p5-header .sub {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 400;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.2s;
}

.p5-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: lowercase;
  margin-bottom: 2rem;
  color: var(--text-light);
  line-height: 1.1;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards 0.4s;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* GALLERY - VERTICAL LAYOUT */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 8rem;
}

.project5-gallery {
  position: relative;
}

.spiral-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.spiral-gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px);
  animation: itemReveal 0.6s ease forwards;
}

.spiral-gallery img:nth-child(1) { animation-delay: 0.1s; }
.spiral-gallery img:nth-child(2) { animation-delay: 0.15s; }
.spiral-gallery img:nth-child(3) { animation-delay: 0.2s; }
.spiral-gallery img:nth-child(4) { animation-delay: 0.25s; }
.spiral-gallery img:nth-child(5) { animation-delay: 0.3s; }
.spiral-gallery img:nth-child(6) { animation-delay: 0.35s; }
.spiral-gallery img:nth-child(7) { animation-delay: 0.4s; }
.spiral-gallery img:nth-child(8) { animation-delay: 0.45s; }

@keyframes itemReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spiral-gallery img:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(90vh - 80px);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-counter {
  font-size: 1rem;
  color: white;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #aaa;
  font-size: 0.875rem;
  border-top: 1px solid #333;
  margin-top: 4rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .back-link {
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .p5-header {
    padding: 8rem 2rem 3rem;
  }
  
  .p5-header h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
  }
  
  .spiral-gallery {
    gap: 1.5rem;
  }
  
  .lightbox-close,
  .lightbox-nav {
    width: 44px;
    height: 44px;
  }
  
  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
  
  .lightbox-prev {
    left: 1rem;
  }
  
  .lightbox-next {
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .spiral-gallery {
    gap: 1rem;
  }
  
  .p5-header h1 {
    font-size: 2rem;
    letter-spacing: 0.1rem;
  }
}