body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  color: #e8e5dc;
  background: none; /*url('IMG_5506_adj.JPG') no-repeat center center fixed;
  background-size: cover;*/
  font-family: 'Georgia', serif;
  line-height: 1.1;
  position: relative;
}

.bg {
  position: fixed;
  inset: 0;
  background: url('IMG_5506_adj.JPG') no-repeat center center;
  background-size: cover;
  z-index: 0;
  pointer-events: none;

  /* helps mobile compositing */
  transform: translateZ(0);
  will-change: transform;
}

/* Optional: subtle overlay to improve readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
  pointer-events: none;
}

/* Ensure content layers above background */
main, header, footer {
  position: relative;
  z-index: 2;
}

/* BASE EPIGRAPH (applies everywhere) */
.epigraph {
  max-width: 600px;
  margin: 2vh auto 5vh;
  padding: 1rem 2rem;
  box-sizing: border-box;           /* important */
  background: rgba(0, 0, 0, 0.5);
  font-size: 1.2rem;
  line-height: 1.2;
  font-family: 'Centaur';
  text-align: center;
  border-top: 1px solid #bfa876;
  border-bottom: 1px solid #bfa876;
}

/* Optional: reduce default <p> margins inside epigraph */
.epigraph p {
  margin: 0.6rem 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: 5vh auto;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .note-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .note-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  /* mobile: keep inset from edges */
  .epigraph {
    margin: 2rem 1rem 2rem;  /* side margin gives “breathing room” */
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
  }
}

/* Desktop/default footer inset */
footer {
  padding-left: 50px;   /* match your h1 margin-left */
  padding-right: 50px;
  box-sizing: border-box;
}

/* Mobile override */
@media (max-width: 600px) {
  footer {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 0;      /* in case you had an older margin-left rule */
    text-align: center;
  }
}

@media (max-width: 480px) {
  .note-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }
}

.note-card h3 {
  font-family: 'Centaur', serif;
  font-size: 1.2rem;
  color: #bfa876;
  margin-bottom: 0.3rem;
}

.note-card h3 a:hover {
  color: #e0dbc3;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
.note-card h3.small-title {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  header h1 { margin-left: 1rem; }
  header h2 {
    margin-left: calc(1rem + clamp(6px, 1.5vw, 10px)); /* “mobile version” of your +10px */
  }
}

.note-card p {
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  color: #f5f2e8;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0.1rem;
}

a {
  color: #f0e6d2;
  touch-action: manipulation;
}

footer a:hover {
  color: #758662;
}
