:root {
  --bg-main: #f4f1e8;
  --bg-panel: #e9e5da;
  --text-main: #2e2a25;
  --accent-dark: #5d4b3c;
  --accent-mid: #7a5e3b;
  --link-color: #4a6447;
}

body {
  margin: 0;
  font-family: 'Georgia', serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background-color: var(--accent-dark);
  color: var(--bg-main);
  padding: 12px 20px;
  display: flex;
  gap: 25px;
  font-size: 1.1em;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header a {
  color: var(--bg-main);
  text-decoration: none;
  cursor: pointer;
}

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

.main {
  display: flex;
  flex: 1;
  height: 100%;
}

.sidebar {
  width: 240px;
  background-color: var(--bg-panel);
  padding: 15px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--accent-mid);
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  box-sizing: border-box;
  overflow-y: auto;
}

.left-links a {
  display: block;
  margin-bottom: 8px;
  color: #ddd;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95em;
  cursor: pointer;
}

.left-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.other-links {
  margin-top: 15px;
  padding: 10px;
  border-top: 1px solid #444;
}

.other-links a {
  display: block;
  color: #ddd;
  text-decoration: none;
  margin: 5px 0;
}

.other-links a:hover {
  color: #fff;
}
.secondary-links {
  margin-top: 15px;
  padding: 10px;
  border-top: 1px solid #444;
}

.secondary-links a {
  display: block;
  color: #ddd;
  text-decoration: none;
  margin: 5px 0;
}

.secondary-links a:hover {
  color: #fff;
}

.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

h1, h2 {
  color: var(--accent-dark);
}

p {
  line-height: 1.6;
}

ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  margin-bottom: 8px;
}

/* ==== Image Grid & Modal CSS ==== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.image-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

/* BLUR CLASS — works on desktop & mobile */
.image-grid img.blurred {
  filter: blur(20px);
  pointer-events: auto;
  transition: filter 0.6s ease;
}

.image-grid img:hover {
  transform: scale(1.05);
}

.modal {
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
}

.modal-content {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.modal-caption {
  color: #ddd;
  text-align: center;
  margin-top: 8px;
  font-size: 1.1rem;
  max-width: 90vw;
}

@media (max-width: 600px) {
  .main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--accent-mid);
  }
}