/* Base / Default Dark Theme */
:root, [data-theme="dark"] {
  /* Color Palette (High-contrast urban monochrome) */
  --bg-color: #0d0d0d;
  --text-main: #f0f0f0;
  --text-p: #cccccc;
  --text-muted: #888888;
  --border-color: #222222;
  --lightbox-bg: rgba(0, 0, 0, 0.95);
  /* FONT CONFIGURATION: Change typography here */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-color: #ffffff;
  --text-main: #111111;
  --text-p: #444444;
  --text-muted: #666666;
  --border-color: #e5e5e5;
  --lightbox-bg: rgba(255, 255, 255, 0.97);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Links */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--text-main);
}

/* Typography */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 3.5rem 0 1.5rem 0;
  border-bottom: 1px solid #F01616;
  padding-bottom: 0.5rem;
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

p {
  max-width: 700px;
  font-size: 1.1rem;
  color: var(--text-p);
  margin-bottom: 2rem;
}

hr {
  border: none;
  border-top: 1px solid #F01616;
  margin: 4rem 0 2rem 0;
}

/* Hero Image */
#hero {
  margin: 0 0 2.5rem 0;
}

#hero img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}

#hero figcaption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Gallery Grid */
.gallery {
  display: grid;
  /* Slightly wider minimum card size (320px) */
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Ensures layout doesn't break if images ever get wrapped in a <p> */
.gallery > p {
  display: contents;
}

.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.gallery img {
  width: 100%;
  height: 360px; /* Made slightly larger */
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: block;
}

.gallery img:hover {
  opacity: 0.85;
}

.gallery figcaption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

/* Exhibition Index List */
.exhibition-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.exhibition-list li {
  border-bottom: 1px solid var(--border-color);
}

.exhibition-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  gap: 0.75rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.exhibition-list li a:hover {
  transform: translateX(4px);
  opacity: 0.8;
}

.exhibition-list .date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Lightbox Overlay */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--lightbox-bg);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 1.5rem;
}

.lightbox-content {
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
  cursor: zoom-out;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  cursor: zoom-out; /* Clicking the image also signals closing */
}

.lightbox-content p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1rem auto 0 auto;
}

/* Footer Section */
.footer-logo,
.footer img {
  width: 125px;
  height: auto;
  display: block;
  margin-bottom: 1.25rem;
}

.footer p,
.footer .line-block {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}
