/* Radar — Full Styles */

/* ========== Variables (Dark — default) ========== */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #1e1e1e;
  --text: #e8e4df;
  --text-secondary: #8a8580;
  --accent: #c9a87c;
  --accent-hover: #d4b88a;
  --status-current: #4a9e6e;
  --status-upcoming: #5b8dd4;
  --status-past: #6b6560;
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-type-bg: rgba(201, 168, 124, 0.12);
  --badge-free-bg: rgba(74, 158, 110, 0.12);
  --badge-dedicated-bg: rgba(201, 168, 124, 0.15);
  --badge-significant-bg: rgba(91, 141, 212, 0.15);
  --medium-tag-bg: rgba(232, 228, 223, 0.05);
  --filter-bg: #141414;
  --filter-border: #1e1e1e;
  --filter-bar-bg: rgba(10, 10, 10, 0.85);
  --card-hover-glow: rgba(201, 168, 124, 0.15);
  --badge-status-text: #fff;
  --radius: 8px;
  --radius-sm: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== Light theme ========== */
[data-theme="light"] {
  --bg: #f5f3f0;
  --surface: #ffffff;
  --border: #e5e2dd;
  --text: #1a1815;
  --text-secondary: #6b6560;
  --accent: #8b6b3d;
  --accent-hover: #725530;
  --status-current: #2d7a4a;
  --status-upcoming: #3a6db5;
  --status-past: #8a8580;
  --badge-bg: rgba(0, 0, 0, 0.06);
  --badge-type-bg: rgba(139, 107, 61, 0.12);
  --badge-free-bg: rgba(45, 122, 74, 0.12);
  --badge-dedicated-bg: rgba(139, 107, 61, 0.15);
  --badge-significant-bg: rgba(58, 109, 181, 0.15);
  --medium-tag-bg: rgba(0, 0, 0, 0.04);
  --filter-bg: #ffffff;
  --filter-border: #e5e2dd;
  --filter-bar-bg: rgba(245, 243, 240, 0.85);
  --card-hover-glow: rgba(139, 107, 61, 0.12);
  --badge-status-text: #fff;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.hero-stats {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.hero-stats .stat-num {
  color: var(--text);
  font-weight: 600;
}

/* ========== Theme Toggle ========== */
.theme-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  z-index: 10;
  padding: 0;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ========== Filter Bar ========== */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--filter-bar-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
}

.filter-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-group {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-search {
  width: 100%;
  min-width: 200px;
  background: var(--filter-bg);
  color: var(--text);
  border: 1px solid var(--filter-border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.filter-search::placeholder {
  color: var(--text-secondary);
}

.filter-search:focus {
  border-color: var(--accent);
}

.filter-bar select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--filter-bg);
  color: var(--text);
  border: 1px solid var(--filter-border);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%238a8580' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  text-overflow: ellipsis;
}

[data-theme="light"] .filter-bar select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236b6560' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.filter-bar select:hover,
.filter-bar select:focus {
  border-color: var(--accent);
}

.filter-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ========== Main ========== */
main {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
  width: 100%;
}

/* ========== Exhibition Grid ========== */
.exhibition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* ========== Cards ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--card-hover-glow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.card-toggle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform 0.25s;
}

.card.expanded .card-toggle {
  transform: rotate(180deg);
}

.card-artists {
  font-size: 0.8125rem;
  color: var(--accent);
  margin-top: 0.375rem;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.card-venue {
  font-weight: 500;
  color: var(--text-secondary);
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
  align-items: center;
}

/* ========== Badges ========== */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-status {
  color: var(--badge-status-text);
}

.badge-status.current {
  background: var(--status-current);
}

.badge-status.upcoming {
  background: var(--status-upcoming);
}

.badge-status.past {
  background: var(--status-past);
}

.badge-type {
  background: var(--badge-type-bg);
  color: var(--accent);
}

.badge-admission {
  background: var(--badge-bg);
  color: var(--text-secondary);
}

.badge-admission.free {
  background: var(--badge-free-bg);
  color: var(--status-current);
}

/* ========== Focus Badges ========== */
.badge-focus {
  text-transform: capitalize;
}

.badge-focus.dedicated {
  background: var(--badge-dedicated-bg);
  color: var(--accent);
}

.badge-focus.significant {
  background: var(--badge-significant-bg);
  color: var(--status-upcoming);
}

.badge-focus.featured {
  background: var(--badge-bg);
  color: var(--text-secondary);
}

/* ========== Medium Tags ========== */
.card-mediums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.625rem;
}

.medium-tag {
  font-size: 0.6875rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: var(--medium-tag-bg);
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: nowrap;
}

/* ========== Card Expanded ========== */
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}

.card.expanded .card-body {
  max-height: 400px;
  opacity: 1;
}

.card-description {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.875rem;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.card-link:hover {
  background: var(--accent-hover);
}

.card-link-arrow {
  font-size: 0.75rem;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.empty-state[hidden] {
  display: none;
}

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

.footer-brand {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  margin-top: 0.35rem;
}

.footer-about-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-about-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ========== Card Body Links ========== */
.card-body-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
  align-items: center;
}

.card-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.card-detail-link:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ========== Exhibition Detail Pages ========== */
.exh-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  background: var(--filter-bar-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.exh-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.exh-back:hover {
  color: var(--accent);
}

.exh-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.exh-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.exh-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0;
}

.exh-dates {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.exh-status-label {
  font-weight: 600;
  text-transform: capitalize;
}

.exh-status-label.current {
  color: var(--status-current);
}

.exh-status-label.upcoming {
  color: var(--status-upcoming);
}

.exh-status-label.past {
  color: var(--status-past);
}

.exh-venue {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.exh-venue h2,
.exh-artists h2,
.exh-description h2,
.exh-details h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.exh-venue a {
  color: var(--accent);
  text-decoration: none;
}

.exh-venue a:hover {
  text-decoration: underline;
}

.exh-venue p {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.exh-venue-type {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.exh-artists {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.exh-artist-list {
  list-style: none;
  padding: 0;
}

.exh-artist-list li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
}

.exh-artist-origin {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.exh-description {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.exh-description p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
}

.exh-mediums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 1.25rem;
}

.exh-details {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.exh-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1.5rem;
}

.exh-details-grid dt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.exh-details-grid dd {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.exh-cta-wrap {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.exh-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.exh-cta:hover {
  background: var(--accent-hover);
}

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

/* ========== About Page ========== */
.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.about-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 1.5rem;
}

.about-section {
  margin-bottom: 0.5rem;
}

.about-section h2 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.about-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-filter-list p {
  margin-bottom: 0.625rem;
}

.about-filter-list em {
  color: var(--accent);
  font-style: italic;
}

.about-focus-values {
  padding-left: 1.25rem;
  margin-top: 0.375rem;
  margin-bottom: 1rem;
}

.about-focus-values p {
  margin-bottom: 0.375rem;
}

.about-link {
  color: var(--accent);
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
}

.about-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0 1.5rem;
}

.about-built-with {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.tech-stack {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  line-height: 1.8;
  white-space: pre-line;
}

/* ========== Submission Form ========== */
.submit-form {
  margin-top: 1.5rem;
}

.submit-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.submit-legend {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding: 0;
}

.submit-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.875rem;
}

.submit-field label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.submit-req {
  color: var(--accent);
}

.submit-field input,
.submit-field select,
.submit-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

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

.submit-field input::placeholder,
.submit-field textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.submit-field textarea {
  resize: vertical;
}

.submit-field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%238a8580' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

[data-theme="light"] .submit-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236b6560' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.submit-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.submit-actions {
  margin-top: 0.5rem;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--accent-hover);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-status {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
}

.submit-success {
  background: rgba(74, 158, 110, 0.15);
  color: var(--status-current);
}

.submit-error {
  background: rgba(220, 50, 50, 0.15);
  color: #e05555;
}

/* ========== Responsive: Tablet ========== */
@media (min-width: 640px) {
  .hero {
    padding: 4rem 2rem 2.75rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .filter-bar {
    padding: 0.875rem 2rem;
  }

  .filter-group {
    flex: 0 1 auto;
    min-width: 140px;
  }

  .filter-search {
    min-width: 220px;
  }

  main {
    padding: 2rem 2rem 3.5rem;
  }

  .exhibition-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exh-page,
  .about-page {
    padding: 2.5rem 2rem 3.5rem;
  }

  .submit-row {
    grid-template-columns: 1fr 1fr;
    gap: 0 0.75rem;
  }

  .exh-title {
    font-size: 1.75rem;
  }

  .exh-details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========== Responsive: Desktop ========== */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .filter-group {
    min-width: 130px;
  }

  .filter-search {
    min-width: 260px;
  }

  .exhibition-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
