/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #e8f5e9;
  --bg-secondary: #dcedc8;
  --text-primary: #1b3a1b;
  --text-secondary: #3e6b3e;
  --text-muted: #6a9a6a;
  --accent: #2e7d32;
  --accent-light: #43a047;
  --border: rgba(0, 80, 0, 0.08);
  --white: #ffffff;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(232, 245, 233, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-icon {
  color: var(--accent);
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 200;
  letter-spacing: 0.2em;
  color: var(--text-primary);
}

/* ===== Album Nav ===== */
.album-nav-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.album-nav-wrapper::before,
.album-nav-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2rem;
  z-index: 10;
  pointer-events: none;
}

.album-nav-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary), transparent);
}

.album-nav-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary), transparent);
}

.album-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.25rem 2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.album-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: var(--text-secondary);
}

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

.nav-btn.active {
  background: var(--accent);
  color: var(--white);
}

/* ===== Hero ===== */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}

.hero-content {
  max-width: 42rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 200;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-desc {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
}

.hero-count {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Photo Grid ===== */
.photo-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  columns: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .photo-grid {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .photo-grid {
    columns: 3;
  }
}

@media (min-width: 1280px) {
  .photo-grid {
    columns: 4;
  }
}

.photo-item {
  position: relative;
  margin-bottom: 1rem;
  break-inside: avoid;
  cursor: pointer;
  overflow: hidden;
}

.photo-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

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

.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.photo-title {
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--white);
}

/* Skeleton loader */
.photo-skeleton {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer p {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  padding: 0.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--white);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  padding: 0.75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--white);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

.lightbox-image {
  max-height: 85vh;
  max-width: 90vw;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.lightbox-info {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.lightbox-title {
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--white);
}

.lightbox-counter {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}
