/* ── Scenic Marble — Stylesheet ──────────────────────────────────────── */
:root {
  --bg:       #0a0a0a;
  --surface:  #141414;
  --card:     #1a1a1a;
  --border:   rgba(255,255,255,0.08);
  --text:     #f0ebe3;
  --muted:    #7a736a;
  --accent:   #c8965a;
  --accent2:  #8ab4d4;
  --danger:   #c85a5a;
  --radius:   4px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
}

.logo-tagline {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-cta {
  padding: 8px 20px !important;
  background: var(--accent) !important;
  color: #0a0a0a !important;
  border-radius: 2px;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85 !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 80vh;
  min-height: 480px;
  overflow: hidden;
  background: var(--surface);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.75;
  transition: opacity 0.8s;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0) 40%,
    rgba(10,10,10,0.6) 70%,
    rgba(10,10,10,0.95) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 48px;
  left: 48px;
  right: 48px;
}

.hero-location {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-location::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 600px;
}

.hero-photographer {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.hero-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Section ─────────────────────────────────────────────────── */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.section-link {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.section-link:hover { border-color: var(--accent); }

/* ── Photo Grid ──────────────────────────────────────────────── */
.photo-grid {
  columns: 3;
  column-gap: 6px;
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease, opacity 0.3s;
}

.photo-card:hover img {
  transform: scale(1.04);
  opacity: 0.85;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 18px;
}

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

.photo-overlay .place {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.photo-overlay .title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.2;
  color: var(--text);
}

.photo-overlay .by {
  font-size: 11px;
  color: rgba(240,235,227,0.5);
  margin-top: 6px;
}

/* Featured badge */
.photo-card .badge-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
}
.photo-card:hover .badge-featured { opacity: 1; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 12px;
}
.empty-state p { color: var(--muted); margin-bottom: 28px; }

/* ── Photo Detail Page ───────────────────────────────────────── */
.photo-detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.photo-detail-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: var(--surface);
  margin-bottom: 32px;
}

.photo-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.photo-location-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.photo-location-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.photo-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 16px;
}

.photo-detail-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 24px;
}

.photo-stats {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.photo-stats span { display: flex; align-items: center; gap: 6px; }

.photo-attribution {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

.photo-attribution strong { color: var(--text); display: block; font-size: 16px; font-weight: 400; }

/* ── Browse Page ─────────────────────────────────────────────── */
.filters-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,150,90,0.06);
}

.continent-group {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.continent-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s;
}
.country-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.country-chip .cnt {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 10px;
}

/* ── Submit Form ─────────────────────────────────────────────── */
.form-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.form-page-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 300;
  margin-bottom: 8px;
}

.form-page-sub {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type=text], input[type=email], textarea, select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
}

textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* File drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(200,150,90,0.04);
}
.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-zone-icon {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--muted);
}
.drop-zone p { color: var(--muted); font-size: 14px; }
.drop-zone strong { color: var(--text); }
.drop-preview {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  margin: 12px auto 0;
  display: none;
  border-radius: var(--radius);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { opacity: 0.85; }

.notice {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 24px;
}
.notice-success { background: rgba(90,180,90,0.1); border: 1px solid rgba(90,180,90,0.3); color: #7dd87d; }
.notice-error   { background: rgba(200,90,90,0.1); border: 1px solid rgba(200,90,90,0.3); color: #e88a8a; }
.notice-info    { background: rgba(138,180,212,0.1); border: 1px solid rgba(138,180,212,0.3); color: var(--accent2); }

/* ── Admin ───────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.admin-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.admin-title span { font-size: 13px; color: var(--muted); font-family: var(--font-sans); }

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.admin-tab {
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  font-family: var(--font-sans);
}
.admin-tab.active, .admin-tab:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table .thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 2px;
}

/* Add photo form in admin */
.admin-section { margin-bottom: 48px; }
.admin-section h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── Page hero (non-homepage) ────────────────────────────────── */
.page-hero {
  background: var(--surface);
  padding: 56px 24px 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  margin-bottom: 8px;
}
.page-hero p { color: var(--muted); font-size: 15px; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  border-radius: 2px;
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { border-color: var(--accent); color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .logo-text { display: block; font-family: var(--font-serif); font-size: 20px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 300px; }
.footer-links h4 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-links a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
}

/* ── Login Box ───────────────────────────────────────────────── */
.login-wrap {
  max-width: 400px;
  margin: 100px auto;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.login-wrap h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 24px;
}

/* ── Marble vein line ────────────────────────────────────────── */
.marble-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent2) 70%, transparent);
  opacity: 0.4;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .photo-grid { columns: 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.97);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .photo-grid { columns: 1; }
  .hero-content { bottom: 28px; left: 24px; right: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .photo-meta { grid-template-columns: 1fr; }
  .admin-tabs { flex-wrap: wrap; }
}


/* ── Earth Hero ──────────────────────────────────────────────── */
.earth-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  background: radial-gradient(ellipse at center, #050a1a 0%, #000005 70%);
  overflow: hidden;
  cursor: grab;
}
.earth-hero:active { cursor: grabbing; }

#earth-canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.earth-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 24px 56px;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0,0,5,0.90) 0%,
    rgba(0,0,5,0.45) 25%,
    transparent 55%
  );
}

.earth-tagline {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(138,180,212,0.7);
  margin-bottom: 12px;
}

.earth-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 80px rgba(68,136,255,0.4);
  margin-bottom: 16px;
}

.earth-sub {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 300;
  color: rgba(240,235,227,0.55);
  letter-spacing: 0.06em;
  margin-bottom: 48px;
}

.earth-scroll {
  pointer-events: all;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s;
  animation: bounce 2.4s ease-in-out infinite;
}
.earth-scroll:hover { color: rgba(255,255,255,0.7); }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ── Tags ────────────────────────────────────────────────────── */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.tag-chip {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(200,150,90,0.08);
  border: 1px solid rgba(200,150,90,0.25);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: 20px;
  transition: all 0.2s;
}
.tag-chip:hover {
  background: rgba(200,150,90,0.18);
  border-color: var(--accent);
}

/* Tag cloud on browse page */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Search bar */
.search-bar {
  max-width: 600px;
  margin: 0 auto 32px;
  position: relative;
}
.search-bar input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 48px 14px 20px;
  border-radius: 40px;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar button {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s;
}
.search-bar button:hover { color: var(--accent); }