/* ── Reset & Base ── */

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

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-light: #777;
  --border: #e0e0e0;
  --card-bg: #fff;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Banner ── */

.banner {
  background: #dce8d8;
  color: var(--text);
  text-align: center;
  padding: 0.75rem 2.5rem 0.75rem 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  position: relative;
}

.banner a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}

.banner a:hover {
  border-color: var(--text);
}

.banner-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.25rem;
}

.banner-close:hover {
  opacity: 1;
}

.banner.hidden {
  display: none;
}

/* ── Header / Nav ── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

/* ── Gallery ── */

#gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.artwork-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.artwork-card img {
  width: 100%;
  display: block;
  border-radius: 2px;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.artwork-card:hover img {
  transform: scale(1.02);
}

/* Featured image: larger and centered */
.artwork-card.featured {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(520px, 90vw);
}

.artwork-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.artwork-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay .card-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.card-overlay .card-meta {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ── Category filter ── */

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  color: var(--text-light);
  transition: all 0.2s;
  font-family: var(--font);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text);
  border-color: var(--text);
}

/* ── About ── */

#about {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-top: 1px solid var(--border);
}

#about h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* ── Contact ── */

#contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

#contact h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.contact-links a:hover {
  border-color: var(--text);
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* ── Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.lightbox.open {
  display: flex;
}

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

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-info {
  color: #ccc;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.lightbox-info .lb-title {
  color: #fff;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.lightbox-info .lb-meta {
  font-size: 0.8rem;
  color: #999;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.5rem;
  z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
    gap: 1.5rem;
  }

  #gallery {
    padding: 2rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .artwork-card.featured {
    grid-column: 1 / -1;
    width: min(100%, 700px);
  }

  .artwork-card .card-overlay {
    opacity: 1;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    padding: 1rem 0.75rem 0.75rem;
  }

  #about,
  #contact {
    padding: 3rem 1.5rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .artwork-card.featured {
    width: 100%;
  }
}