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

:root {
  --bg: #0d0f12;
  --surface: #141720;
  --surface-2: #1c2030;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --amber: #ff8400;
  --amber-dim: rgba(255,132,0,0.12);
  --amber-glow: rgba(255,132,0,0.06);
  --text-primary: #eef0f4;
  --text-secondary: #7a8294;
  --text-muted: #4a5060;
  --success: #3ecf8e;
  --radius: 10px;
  --radius-lg: 16px;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  scrollbar-gutter: stable;
}

body {
  font-family: 'DM Sans', sans-serif;
  margin: 0;
  padding: 0 20px;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Subtle grid + amber glow background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,132,0,0.04) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(255,255,255,0.015) 39px,
      rgba(255,255,255,0.015) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(255,255,255,0.015) 39px,
      rgba(255,255,255,0.015) 40px
    );
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

@media (max-width: 600px) {
  body { padding: 0 10px; }
}

body.no-scroll {
  position: fixed;
  left: 0;
  right: 0;
}


/* ── Main hero block ────────────────────────────────────────────────────────── */
.main_block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  text-align: center;
  padding: 36px 40px 40px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  overflow: hidden;
}

/* Amber top-edge shimmer */
.main_block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,132,0,0.5), transparent);
}

.main_block_logo {
  height: 20vh;
  max-height: 150px;
  position: relative;
}

.main_block_text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page_title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.3rem, 1.5vw + 1.5rem, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0 0 4px;
}

.photographer_name {
  font-size: clamp(0.935rem, 0.6vw + 0.65rem, 1.22rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  font-family: 'DM Sans', sans-serif;
}

.tagline {
  font-size: clamp(0.79rem, 0.5vw + 0.55rem, 1.03rem);
  letter-spacing: 0.14em;
  opacity: 1;
  font-family: 'Space Mono', monospace;
  color: var(--amber);
  margin: 0;
}

@media (max-width: 600px) {
  .main_block {
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 28px;
    gap: 20px;
  }
  .main_block_text {
    align-items: center;
    text-align: center;
  }
}

/* Logo as a home link (download page) */
a.logo-link {
  display: contents;
}
a.logo-link .main_block_logo {
  transition: opacity 0.2s;
  cursor: pointer;
}
a.logo-link:hover .main_block_logo {
  opacity: 0.75;
}


/* ── Gallery block wrapper (home page only) ─────────────────────────────────── */
.gallery_block {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  padding: 0 24px 28px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.gallery_block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,132,0,0.4), transparent);
}

.gallery_block_header {
  padding-top: 28px;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gallery_title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(15px, 0.6vw + 0.55rem, 20px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.85;
  margin: 0;
  text-align: center;
}

@media (max-width: 600px) {
  .gallery_block {
    padding: 0 10px 18px;
  }
  .gallery_block_header {
    padding-top: 18px;
  }
}


/* ── Gallery masonry grid ───────────────────────────────────────────────────── */
.gallery {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
  align-items: flex-start;
}

.pic_column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Home page uses .album, download page uses .photo-card — same visual style */
.album,
.photo-card {
  break-inside: avoid;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  cursor: pointer;
  outline: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.album img,
.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(0,0,0,0.6);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.album:hover,
.photo-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,132,0,0.18);
}

.album:active,
.photo-card:active { transform: scale(0.97); }

/* Album photo-count badge (home page only) */
.album-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(13,15,18,0.75);
  color: var(--amber);
  font-size: clamp(0.805rem, 0.5vw + 0.57rem, 1.05rem);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,132,0,0.2);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .gallery {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .pic_column {
    flex: 0 0 calc(50% - 4px);
    min-width: calc(50% - 4px);
    gap: 8px;
  }
  .pic_column:nth-child(3) { display: none; }
  .album,
  .photo-card { border-radius: 6px; }
  .album img,
  .photo-card img { border-radius: 6px; }
}

@media (max-width: 400px) {
  .pic_column {
    flex: 0 0 100%;
    min-width: 100%;
  }
  .pic_column:nth-child(2),
  .pic_column:nth-child(3) { display: none; }
}


/* ── Overlay (lightbox) ─────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  display: none;
  grid-template-rows: 1fr auto;
  grid-template-columns: 72px 1fr 72px;
  z-index: 1000;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.overlay-col-left {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding-left: 4px;
  z-index: 1001;
  outline: none;
}

.overlay-col-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 10px 4px;
  z-index: 1001;
  outline: none;
}

.overlay-col-right .overlay-close { align-self: flex-end; }
.overlay-col-right .overlay-arrow { margin: auto 0; }

.overlay-col-center {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  padding: 12px 0;
}

#mainImg {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
  transition: opacity 0.15s ease-in-out;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.overlay-close {
  font-size: 2.1rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
  outline: none;
}
.overlay-close:hover { color: var(--amber); }

.overlay-arrow {
  font-size: 4.5rem;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  line-height: 1;
  user-select: none;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.overlay-arrow:hover { color: var(--amber); }

/* Thumbnail strip (home page) / download bar container (download page) */
.overlay-footer {
  grid-column: 1 / -1;
  display: flex;
  background: rgba(13,15,18,0.8);
  border-top: 1px solid var(--border);
}

/* Home page: scrollable thumbnail strip */
.overlay-footer.thumbnails {
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,132,0,0.3) transparent;
}

.overlay-footer.thumbnails::before,
.overlay-footer.thumbnails::after {
  content: '';
  flex: 1;
}

.overlay-footer.thumbnails::-webkit-scrollbar { height: 3px; }
.overlay-footer.thumbnails::-webkit-scrollbar-track { background: transparent; }
.overlay-footer.thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255,132,0,0.3);
  border-radius: 2px;
}
.overlay-footer.thumbnails::-webkit-scrollbar-thumb:hover {
  background: rgba(255,132,0,0.55);
}

.overlay-footer.thumbnails img {
  height: 72px;
  cursor: pointer;
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
  outline: none;
  border: 2px solid transparent;
}

.overlay-footer.thumbnails img.active {
  opacity: 1;
  border-color: var(--amber);
}

/* Download page: centered download bar container */
.overlay-footer.download-footer {
  justify-content: center;
  padding: 0 10px 10px 10px;
}

@media (max-width: 600px) {
  #mainImg { border-radius: 6px; }
  .overlay {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .overlay-col-left,
  .overlay-col-right {
    position: absolute;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 1002;
  }
  .overlay-col-left {
    left: 0;
    top: calc(50% - 50px);
    transform: translateY(-50%);
    padding: 8px;
  }
  .overlay-col-right {
    right: 0;
    top: 0;
    bottom: 100px;
    padding: 10px 8px;
  }
  .overlay-col-left .overlay-arrow,
  .overlay-col-right .overlay-arrow { font-size: 3.6rem; }
  .overlay-col-center {
    grid-column: 1;
    grid-row: 1;
  }
  .overlay-footer {
    grid-column: 1;
  }
  .overlay-footer.thumbnails {
    padding: 8px 10px;
  }
  .overlay-footer.thumbnails img { height: 60px; }
  .overlay-close {
    font-size: 2.6rem;
    padding: 4px;
  }
}


/* ── Download bar (download page only) ─────────────────────────────────────── */
.download-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  max-width: 600px;
  width: 100%;
  margin-top: 10px;
}

.download-filename {
  font-size: 0.82rem;
  font-family: 'Space Mono', monospace;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.download-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  border: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}

.download-btn:hover {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(255,132,0,0.25);
}

.download-btn:active { transform: scale(0.96); }

.download-btn-original {
  background: var(--amber);
  color: #0d0f12;
  border-color: transparent;
  font-weight: 700;
}

.download-btn-original:hover {
  background: #ff9a2a;
  color: #0d0f12;
}

.download-btn svg { flex-shrink: 0; }

@media (max-width: 600px) {
  .download-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    text-align: center;
  }
  .download-filename {
    width: 100%;
    text-align: center;
  }
  .download-buttons {
    width: 100%;
    justify-content: center;
  }
}


/* ── Filter banner (download page only) ─────────────────────────────────────── */
.filter-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.filter-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,132,0,0.3), transparent);
}

.filter-banner-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.filter-banner-text strong {
  color: var(--text-primary);
  text-transform: capitalize;
}

.filter-banner-clear {
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  color: var(--amber);
  text-decoration: none;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,132,0,0.25);
  transition: background 0.15s, color 0.15s;
}

.filter-banner-clear:hover {
  background: var(--amber-dim);
}

@media (max-width: 600px) {
  .filter-banner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}


/* ── Loading message (download page only) ───────────────────────────────────── */
.loading-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  transition: opacity 0.4s ease;
}

.loading-message p {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 0;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,132,0,0.12);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ── Data warning prompt (download page only) ───────────────────────────────── */
.data-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 40px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  text-align: center;
  transition: opacity 0.4s ease;
  position: relative;
  overflow: hidden;
}

.data-prompt::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,132,0,0.4), transparent);
}

.data-prompt-icon { opacity: 0.7; }

.data-prompt-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.data-prompt-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
  margin: 0;
}

.data-prompt-size {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber);
  margin: 4px 0 0 0;
  letter-spacing: 0.02em;
}

.data-prompt-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0d0f12;
  background: var(--amber);
  border: none;
  border-radius: var(--radius);
  padding: 11px 36px;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.data-prompt-btn:hover { background: #ff9a2a; }
.data-prompt-btn:active { transform: scale(0.96); }


/* ── Bottom / footer block ──────────────────────────────────────────────────── */
.bottom_block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  text-align: center;
  display: inline-block;
  width: 100%;
  padding: 32px 0 24px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.bottom_block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,132,0,0.4), transparent);
}

/* Instagram logo — home page uses .main_block_insta_logo, download uses .insta_logo */
.main_block_insta_logo,
.insta_logo {
  height: 36px;
  padding-bottom: 0;
  cursor: pointer;
  position: relative;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.main_block_insta_logo:hover,
.insta_logo:hover { opacity: 1; }

.insta_handle {
  color: var(--amber) !important;
  cursor: pointer;
}

.about_bottom {
  font-size: clamp(0.935rem, 0.6vw + 0.65rem, 1.22rem);
  margin-top: 8px;
  margin-bottom: 0;
  text-align: center;
  color: var(--text-secondary);
  position: relative;
  text-shadow: none;
}

.copyright {
  padding-top: 20px;
  font-size: clamp(0.79rem, 0.5vw + 0.55rem, 1.03rem);
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.03em;
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  position: relative;
}

hr {
  margin: 5vh 0;
  border: none;
  border-top: 1px solid var(--border);
  max-width: 100%;
}


/* ── Fade-in on scroll / load ───────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}