/* ============================================================
   Kluger Virtual Memorial Museum — Design System
   Dark luxury: charcoal + antique gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Deep black palette */
  --bg-primary:    #080808;
  --bg-secondary:  #101010;
  --bg-card:       #161616;
  --bg-overlay:    rgba(0,0,0,0.95);
  /* Gold — matched to logo flame/lettermark */
  --gold:          #d4aa52;  /* bumped for 4.5:1 contrast on #080808 */
  --gold-light:    #e8c870;
  --gold-dark:     #9a7830;
  --gold-subtle:   rgba(201,168,76,0.1);
  --gold-border:   rgba(201,168,76,0.28);
  /* Text */
  --text-primary:  #f2edd8;
  --text-secondary:#b8ab88;
  --text-muted:    #555555;
  --border:        rgba(255,255,240,0.07);
  --radius:        4px;
  --radius-lg:     8px;
  --shadow:        0 4px 28px rgba(0,0,0,0.6);
  --shadow-gold:   0 0 40px rgba(201,168,76,0.12);
  --transition:    0.25s ease;
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --max-width:     1320px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  /* subtle canvas grain matching logo */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-secondary); margin-bottom: 1rem; }
.gold { color: var(--gold); }
.italic { font-style: italic; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
section { padding: 5rem 0; }
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 { margin-bottom: 0.5rem; }
.section-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1rem auto;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(4,4,4,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
}
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-links .nav-admin {
  border: 1px solid var(--gold-border);
  padding: 0.35rem 1rem;
  border-radius: var(--radius);
  color: var(--gold);
}
.nav-links .nav-admin:hover {
  background: var(--gold-subtle);
}
body { padding-top: 64px; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(201,168,76,0.08) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  pointer-events: none;
}
.hero-logo {
  width: clamp(260px, 40vw, 520px);
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 0 40px rgba(201,168,76,0.25));
}
.hero-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-style: italic;
}
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.btn-gold {
  background: var(--gold);
  color: #111;
}
.btn-gold:hover {
  background: var(--gold-light);
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold-subtle);
  border-color: var(--gold);
}

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
  padding: 2rem 0;
}
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ── About Section ─────────────────────────────────────────── */
.about-section {
  background: var(--bg-secondary);
}
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 1.05rem;
  line-height: 1.9;
}
.about-icons {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.about-icon-item {
  text-align: center;
}
.about-icon-item .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}
.about-icon-item span:last-child {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ── Artist Sections ───────────────────────────────────────── */
.artists-section { padding: 5rem 0; }
.artist-block {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.artist-block:last-child { border-bottom: none; }
.artist-block.reverse { grid-template-columns: 2fr 1fr; }
.artist-block.reverse .artist-portrait { order: 2; }
.artist-block.reverse .artist-bio { order: 1; }

.artist-portrait {
  position: relative;
}
.artist-portrait-placeholder {
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  gap: 0.75rem;
}
.artist-portrait-placeholder .placeholder-icon { font-size: 3rem; opacity: 0.4; }
.artist-portrait-placeholder span { font-size: 0.8rem; color: var(--text-muted); }

.artist-bio-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.5rem;
  display: block;
}
.artist-bio h2 { margin-bottom: 1.5rem; }
.artist-bio p { font-size: 1rem; line-height: 1.9; }
.artist-bio .btn { margin-top: 1.5rem; }

/* ── Gallery Grid ──────────────────────────────────────────── */
.gallery-section { padding: 4rem 0; }

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.filter-btn:hover { border-color: var(--gold-border); color: var(--gold); }
.filter-btn.active {
  background: var(--gold-subtle);
  border-color: var(--gold);
  color: var(--gold);
}

.gallery-grid {
  columns: 4 220px;
  gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.2rem;
}
.gallery-item-meta {
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gallery-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.gallery-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-overlay);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-gold);
}
.lightbox-image {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}
.lightbox-image img {
  max-height: 90vh;
  max-width: 100%;
  object-fit: contain;
}
.lightbox-info {
  padding: 2.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.lightbox-artist-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.lightbox-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.lightbox-year {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.lightbox-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  flex: 1;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 1001;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); }

/* ── Artist Page ───────────────────────────────────────────── */
.artist-page-header {
  padding: 5rem 0 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--gold-border);
}
.artist-page-header .container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}
.artist-page-badge {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.6;
}
.artist-page-title-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.artist-page-title { margin-bottom: 1rem; }
.artist-page-bio {
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.85;
}
.artwork-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  margin-top: 1rem;
}

.artist-nav {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.artist-nav-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.artist-nav-link {
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.artist-nav-link:hover { border-color: var(--gold-border); color: var(--gold); }
.artist-nav-link.current { border-color: var(--gold); color: var(--gold); background: var(--gold-subtle); }

/* ── Admin Panel ───────────────────────────────────────────── */
.admin-page {
  min-height: calc(100vh - 64px);
  background: var(--bg-primary);
}
.admin-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--gold-border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header h1 { font-size: 1.4rem; }
.admin-body { padding: 2rem; max-width: 1200px; margin: 0 auto; }

/* Login screen */
.login-screen {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}
.login-card h2 { text-align: center; margin-bottom: 0.5rem; }
.login-card p { text-align: center; margin-bottom: 2rem; font-size: 0.9rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold-border);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select option { background: var(--bg-secondary); }

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.tab-btn {
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Artworks table */
.artworks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.artworks-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gold-border);
  color: var(--gold);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.artworks-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.artworks-table tr:hover td { background: rgba(255,255,255,0.02); }
.artwork-thumb {
  width: 120px; height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.artwork-thumb-placeholder {
  width: 120px; height: 120px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}
.inline-edit {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  padding: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.inline-edit:focus {
  outline: none;
  border-bottom-color: var(--gold-border);
  background: rgba(255,255,255,0.03);
}
.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius);
}
.btn-danger {
  background: rgba(180,40,40,0.2);
  border: 1px solid rgba(180,40,40,0.4);
  color: #e06060;
}
.btn-danger:hover { background: rgba(180,40,40,0.4); color: #fff; }
.btn-save {
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  color: var(--gold);
}
.btn-save:hover { background: rgba(201,168,76,0.25); }

/* Batch import */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.batch-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}
.batch-file-list {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-height: 150px;
  overflow-y: auto;
}
.batch-file-list li {
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border);
}
.batch-file-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.import-result {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  display: none;
}
.import-result.show { display: block; }
.import-result h4 { color: var(--gold); margin-bottom: 0.5rem; }

/* Messages */
.msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.msg.show { display: block; }
.msg-success { background: rgba(50,150,80,0.15); border: 1px solid rgba(50,150,80,0.4); color: #6abf80; }
.msg-error   { background: rgba(180,40,40,0.15); border: 1px solid rgba(180,40,40,0.4); color: #e06060; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--gold-border);
  padding: 3rem 0;
  text-align: center;
}
.footer-logo {
  height: 48px;
  margin: 0 auto 1rem;
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 2rem;
}
.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-nav a:hover { color: var(--gold); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .artist-block,
  .artist-block.reverse {
    grid-template-columns: 1fr;
  }
  .artist-block.reverse .artist-portrait,
  .artist-block.reverse .artist-bio { order: unset; }
  .lightbox-inner { grid-template-columns: 1fr; }
  .lightbox-image { max-height: 55vh; }
  .artist-page-header .container { grid-template-columns: 1fr; text-align: center; }
  .artist-page-badge { margin: 0 auto; }
}
@media (max-width: 640px) {
  .gallery-grid { columns: 2 160px; }
  .stats-grid { gap: 2rem; }
  .admin-body { padding: 1rem; }

  /* Hide year/description columns in admin table on mobile */
  .artworks-table th:nth-child(4),
  .artworks-table td:nth-child(4),
  .artworks-table th:nth-child(5),
  .artworks-table td:nth-child(5) { display: none; }

  /* Lightbox: stack vertically on phones */
  .lightbox { padding: 0.5rem; align-items: flex-end; }
  .lightbox-inner { max-height: 95vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .lightbox-image { max-height: 45vh; }
  .lightbox-info  { padding: 1.25rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
}

/* ── Artists dropdown ──────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.15rem 0.2rem;
  font-size: 0.7rem;
  line-height: 1;
  transition: color var(--transition), transform var(--transition);
}
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle[aria-expanded="true"] { color: var(--gold); }
.nav-dropdown-toggle[aria-expanded="true"] { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 230px;
  background: rgba(4,4,4,0.98);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  list-style: none;
  padding: 1rem 0 0.5rem;  /* top padding acts as the visual gap */
  box-shadow: var(--shadow), var(--shadow-gold);
  z-index: 200;
}
/* Small gold triangle pointer */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: var(--gold-border);
}
/* Hover only on real pointer devices — not touch */
@media (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-menu a:hover { color: var(--gold); background: var(--gold-subtle); }
.nav-dropdown-menu a.active { color: var(--gold); font-weight: 500; }


/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--gold);
  color: #111;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; color: #111; }

/* ── Focus styles ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
/* Remove outline:none overrides */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.inline-edit:focus {
  outline: 2px solid var(--gold-border);
  outline-offset: 0;
  border-color: var(--gold);
}

/* ── Touch targets ─────────────────────────────────────────── */
.btn         { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.filter-btn  { min-height: 44px; min-width: 44px; }
.artist-nav-link { min-height: 44px; display: inline-flex; align-items: center; }
.tab-btn     { min-height: 44px; }

/* ── Hamburger / mobile nav ────────────────────────────────── */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  /* Show hamburger, hide desktop nav */
  .nav-toggle { display: flex; }
  .nav-logo span { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(4,4,4,0.98);
    border-bottom: 1px solid var(--gold-border);
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 0;
    max-height: calc(100svh - 64px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }

  /* Standard nav items */
  .nav-links > li:not(.nav-dropdown) {
    border-bottom: 1px solid var(--border);
  }
  .nav-links > li:not(.nav-dropdown) > a {
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
  .nav-links .nav-admin {
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 0.9rem 1.5rem;
  }

  /* Artists dropdown — inline expand */
  .nav-dropdown {
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
  }
  .nav-dropdown > a {
    flex: 1;
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
  .nav-dropdown-toggle {
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
  }
  .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100%;
    display: none;
    background: rgba(8,8,8,0.6);
    border: none;
    border-top: 1px solid var(--border);
    box-shadow: none;
    padding: 0;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu li { border-bottom: none; }
  .nav-dropdown-menu a {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
  }
}
