/* ====== Base Styles ====== */
:root {
  /* Heading scale: adjust these to experiment with heading sizes */
  --h1-scale: 1.5;
  --h2-scale: 1.4;
  --h3-scale: 1.15;
  --h4-scale: 1.05;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ====== Headings ====== */
h1, h2, h3, h4 {
  color: #444;
  font-weight: bold;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}
h1 { font-size: calc(1rem * var(--h1-scale)); text-align: center; }
h2 { font-size: calc(1rem * var(--h2-scale)); }
h3 { font-size: calc(1rem * var(--h3-scale)); }
h4 { font-size: calc(1rem * var(--h4-scale)); }

/* Markdown content headings with backgrounds */
.markdown-content h1 {
  color: #000;
  background: #ffe082;
  border-radius: 10px;
  padding: 0.5em 1em;
}
.markdown-content h2 {
  color: #000;
  background: #b3e5fc;
  border-radius: 8px;
  padding: 0.45em 0.9em;
}
.markdown-content h3 {
  color: #000;
  background: #c8e6c9;
  border-radius: 6px;
  padding: 0.4em 0.8em;
}

/* ====== Links ====== */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: bold;
}
a:hover{
  text-decoration: underline;
   color: #fc031c;
  font-weight: bold;
}
a:focus {
  text-decoration: underline;
  font-weight: bold;
}
a:active {
  color: #003366;
  font-weight: bold;
}

/* ====== Lists ====== */
ul {
  padding: 0;
}
li {
  margin: 8px 0;
}
.two-column-list {
  column-count: 2;
  column-gap: 2em;
}

/* ====== Categories & Select ====== */
.categories {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.category-select {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}
.category-select label {
  font-weight: bold;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}
.category-select select {
  padding: 0.4em 0.6em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.3s;
}
.category-select select:hover,
.category-select select:focus {
  border-color: #0077cc;
  outline: none;
}

/* ====== Content Area ====== */
#content {
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

/* ====== Markdown Content ====== */
.markdown-content {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 20px;
  margin-top: 20px;
}

/* Accordion styles for markdown headings */
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.markdown-content h2::before,
.markdown-content h3::before,
.markdown-content h4::before {
  content: "▼";
  display: inline-block;
  margin-right: 10px;
  font-size: 0.8em;
}
.markdown-content h2.active::before,
.markdown-content h3.active::before,
.markdown-content h4.active::before {
  content: "▲";
}
.accordion-content {
  padding-left: 1rem;
  border-left: 2px solid #eee;
  margin-bottom: 1rem;
  display: none;
}
.accordion-content.active {
  display: block;
}

/* ====== Images & Captions ====== */
img {
  max-width: 100%;
  height: auto;
}
figcaption, .caption {
  display: block;
  margin-top: 0.5em;
}
figcaption .artist,
.caption .artist {
  font-weight: bold;
}
figcaption .title,
.caption .title {
  font-style: italic;
}
figcaption .year,
.caption .year {
  font-weight: normal;
  font-style: normal;
}
*, *::before, *::after {
  box-sizing: border-box;
}
.image-popover {
  position: relative;
  cursor: pointer;
  text-decoration: underline;
}
.image-popover .popover-img {
  display: none;
  position: absolute;
  top: 1.7em;
  left: 0;
  z-index: 999;
  background: #fff;
  border: 1px solid #888;
  padding: 3px;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.085);
  max-width: 300px;
}
.image-popover:hover .popover-img,
.image-popover:focus .popover-img {
  display: block;
}
.image-popover .popover-img img {
  max-width: 250px;
  max-height: 160px;
  display: block;
}
