:root {
  --bg: #17110c;
  --bg-alt: #1f1712;
  --ember: #ff9d42;
  --ember-dim: #c96f2b;
  --gold: #f2c879;
  --text: #f0e3d0;
  --text-dim: #cbb79c;
  --card-bg: #241a13;
  --border: #3a2a1d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--ember);
  text-decoration: underline;
}

.site-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-alt) 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  color: var(--ember);
  text-shadow: 0 0 18px rgba(255, 157, 66, 0.35);
}

.subtitle {
  margin: 0.3rem 0 1rem;
  color: var(--text-dim);
  font-style: italic;
}

.topnav {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.topnav .sep {
  margin: 0 0.5rem;
  color: var(--border);
}

main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  width: 100%;
}

.intro {
  color: var(--text-dim);
  text-align: center;
  max-width: 720px;
  margin: 1.5rem auto 0;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--ember-dim);
  transform: translateY(-2px);
  text-decoration: none;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-title {
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 1rem;
}

.viewer {
  text-align: center;
}

.viewer img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.viewer h2 {
  margin: 1.2rem 0 0.3rem;
  color: var(--gold);
}

.caption {
  color: var(--text-dim);
  font-style: italic;
  margin: 0 auto 1rem;
  max-width: 640px;
}

.prevnext-row {
  display: flex;
  justify-content: space-between;
  max-width: 700px;
  margin: 1rem auto 0;
  gap: 1rem;
}

.prevnext {
  flex: 1;
}

.prevnext.disabled {
  color: var(--border);
}

.site-footer {
  text-align: center;
  padding: 1.2rem 1rem 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 1.6rem;
  }
  .topnav {
    font-size: 0.85rem;
  }
  .prevnext-row {
    flex-direction: column;
    text-align: center;
  }
}
