/* ==========================================
   PHOTOGRAPHY GALLERY STYLESHEET
   Aesthetic Dark Minimalist Portfolio
========================================== */

:root {
  --bg: #0a0a0a;
  --bg-card: #131313;
  --bg-card-hover: #1a1a1a;
  --accent: #ff3b3b;
  --accent-glow: rgba(255, 59, 59, 0.25);
  --text: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #666666;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 59, 59, 0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.6);

  --font-display: "Poppins", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1280px, 92%);
  margin: 0 auto;
}

/* ================= HEADER ================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

.logo span, .logo .logo-bracket {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: #ffffff;
}

nav a.active {
  color: var(--accent);
}

/* ================= HERO SECTION ================= */
.gallery-hero {
  padding: 34px 0 16px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.gallery-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.gallery-hero p {
  font-family: var(--font-body);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ================= FILTER BUTTONS ================= */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-glow);
}

/* ================= PHOTO GRID ================= */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 80px;
}

.photo-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #171717;
  overflow: hidden;
}

.photo-thumb.tall {
  aspect-ratio: 3 / 4;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.photo-card:hover .photo-thumb img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  transition: opacity var(--transition);
}

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

.overlay-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  background: rgba(255, 59, 59, 0.9);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
}

.photo-info {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.photo-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.photo-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ================= PLACEHOLDER CARD ================= */
.photo-card.placeholder {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(20, 20, 20, 0.4);
}

.photo-card.placeholder:hover {
  border-color: var(--accent);
}

.placeholder-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
}

.placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.placeholder-text {
  font-size: 0.88rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
}

/* ================= LIGHTBOX MODAL ================= */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox-modal.active {
  display: flex;
}

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

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ================= FOOTER ================= */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ================= SCROLL TO TOP ================= */
#topBtn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 6px 20px var(--accent-glow);
  z-index: 99;
}

#topBtn.show {
  opacity: 1;
  visibility: visible;
}

#topBtn:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  header .nav-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    width: 100%;
  }
  nav a {
    font-size: 0.86rem;
  }
  .gallery-hero {
    padding: 24px 0 14px;
  }
  .gallery-hero h1 {
    font-size: 1.85rem;
  }
  .gallery-hero p {
    font-size: 0.88rem;
  }
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.05rem;
  }
  .gallery-hero h1 {
    font-size: 1.6rem;
  }
  .filter-tabs {
    gap: 6px;
    margin-bottom: 20px;
  }
  .filter-btn {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
}
