@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Space+Grotesk:wght@300;400;500&display=swap');

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

body {
  background: #0c0c0c;
  color: #e8e4de;
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

.drawing-page {
  position: relative;
}

/* --- Header --- */

.drawing-header {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.drawing-header .back-link {
  position: absolute;
  top: 30px;
  left: 40px;
  font-size: 0.85em;
  color: #666;
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.drawing-header .back-link:hover {
  color: #e8e4de;
}

.drawing-header h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 3.5em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8e4de;
  margin-bottom: 12px;
}

.drawing-header .subtitle {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.1em;
  color: #666;
  letter-spacing: 0.05em;
}

.header-line {
  width: 40px;
  height: 1px;
  background: #333;
  margin: 30px auto 0;
}

/* --- Gallery --- */

.gallery {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 30px 80px;
  columns: 2;
  column-gap: 24px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }

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

.gallery-item img {
  width: 100%;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.gallery-item:hover img {
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.02);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 12, 12, 0.7) 0%,
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay .caption {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95em;
  color: #ccc;
  letter-spacing: 0.03em;
}

/* --- Lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid #222;
  transform: scale(0.95);
  transition: transform 0.4s ease;
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 1.5em;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  background: none;
  border: none;
}

.lightbox-close:hover {
  color: #e8e4de;
}

/* --- Footer --- */

.drawing-footer {
  text-align: center;
  padding: 40px 0 60px;
  border-top: 1px solid #1a1a1a;
  max-width: 1100px;
  margin: 0 auto;
}

.drawing-footer p {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: #444;
  font-size: 0.95em;
  letter-spacing: 0.05em;
}

.drawing-footer .social-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.drawing-footer .social-links a {
  color: #555;
  font-size: 1em;
  transition: color 0.3s ease;
  text-decoration: none;
}

.drawing-footer .social-links a:hover {
  color: #e8e4de;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .drawing-header h1 {
    font-size: 2.2em;
    letter-spacing: 0.08em;
  }

  .drawing-header .back-link {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    margin-bottom: 24px;
  }

  .gallery {
    columns: 1;
    padding: 20px 16px 60px;
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-close {
    top: 16px;
    right: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .gallery {
    max-width: 800px;
  }
}
