/* ============================================================
   SINCERELY PAUL ARCHIVES — style.css
   Color palette: #000 base | #2d0057 deep purple | #0a0a3a dark blue
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:        #000000;
  --deep-purple:  #2d0057;
  --dark-blue:    #0a0a3a;
  --purple-mid:   #5a1a8a;
  --blue-mid:     #1a1a6e;
  --purple-glow:  #7b2fff;
  --blue-glow:    #3a3aff;
  --text-primary: #e8e0f0;
  --text-muted:   #9a8ab0;
  --border-subtle: rgba(122, 47, 255, 0.18);
  --overlay-bg:   rgba(0, 0, 0, 0.88);
  --transition:   0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--black);
  color: var(--text-primary);
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- HEADER ---------- */
.site-header {
  position: relative;
  text-align: center;
  padding: 80px 24px 64px;
  overflow: hidden;
}

/* Radial glow behind title */
.header-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(45, 0, 87, 0.70) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(10, 10, 58, 0.55) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Thin decorative line below header */
.site-header::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--purple-glow),
    var(--blue-glow),
    transparent
  );
  opacity: 0.5;
}

.header-content {
  position: relative;
  z-index: 1;
}

.site-title {
  font-family: 'Palatino Linotype', 'Palatino', 'Book Antiqua', Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  line-height: 1.15;

  /* Purple → Blue gradient text */
  background: linear-gradient(
    135deg,
    #c084fc 0%,
    #a855f7 25%,
    #818cf8 55%,
    #60a5fa 85%,
    #93c5fd 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  text-shadow: none;
  animation: titleFadeIn 1.2s ease both;
}

.site-subtitle {
  margin-top: 14px;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: titleFadeIn 1.2s 0.3s ease both;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes titleFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- GALLERY CONTAINER ---------- */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

/* Masonry-style CSS columns */
.gallery-grid {
  column-count: 4;
  column-gap: 14px;
}

@media (max-width: 1100px) { .gallery-grid { column-count: 3; } }
@media (max-width: 720px)  { .gallery-grid { column-count: 2; } }
@media (max-width: 420px)  { .gallery-grid { column-count: 1; } }

/* ---------- GALLERY ITEMS ---------- */
.gallery-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;

  /* Subtle purple/blue border */
  border: 1px solid var(--border-subtle);

  /* Entrance animation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease,
              box-shadow var(--transition), border-color var(--transition);
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.5s ease;
  filter: brightness(0.88) saturate(0.9);
}

/* Hover: lift + glow + image brighten */
.gallery-item:hover {
  border-color: var(--purple-glow);
  box-shadow:
    0 0 18px rgba(123, 47, 255, 0.45),
    0 0 40px rgba(58, 58, 255, 0.18),
    0 8px 30px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.05);
}

/* Overlay label */
.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(45, 0, 87, 0.78) 0%,
    rgba(10, 10, 58, 0.4) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 14px 12px;
}

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

.item-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 400;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
}

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

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

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(123, 47, 255, 0.35);
  box-shadow:
    0 0 60px rgba(123, 47, 255, 0.25),
    0 0 120px rgba(58, 58, 255, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.8);
  transition: opacity 0.25s ease;
}

.lightbox-caption {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* Nav buttons */
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(45, 0, 87, 0.5);
  border: 1px solid rgba(123, 47, 255, 0.3);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              transform 0.2s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(90, 26, 138, 0.7);
  border-color: var(--purple-glow);
  box-shadow: 0 0 16px rgba(123, 47, 255, 0.4);
}

.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-close:hover { transform: scale(1.1); }

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid rgba(45, 0, 87, 0.4);
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--deep-purple), var(--dark-blue));
  border-radius: 3px;
}
