/* =========================================================
   JOURNAL PAGE (Mobile-first base)
========================================================= */
/* 1️⃣ Full page background: constellation */
.main-content.journal-page {
  background-image: url('../images/constellation-bg.jpg');
  background-repeat: repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 2️⃣ Full paper wrapper – more fluid progression */
.paper-wrapper {
  background-image: url('../images/paper-blue-texture.jpg');
  background-repeat: repeat-y;
  background-size: auto;
  background-position: top center;
  width: 100%;
  max-width: 92%;                   /* MOBILE: comfortable margins */
  padding: 2rem 1.25rem;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  margin-bottom: 0.5in;
}

/* 3️⃣ Text wrapper inside paper */
.journal-text-wrapper {
  max-width: 620px;
  margin: 0 auto;
}

/* Journal grid - mobile-first: 1 column */
.journal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 28px auto 0;
  width: 100%;
  max-width: 1400px;
  padding: 0 14px;
}

/* Whole card is clickable */
.journal-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Card base */
.journal-card {
  background-image: url("../images/paper-blue-texture-02.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1.6rem 1.1rem;
  border-radius: 0;
  aspect-ratio: 8.5 / 11;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
}

/* Hover & focus */
.journal-card-link:hover .journal-card {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.journal-card-link:focus-visible .journal-card {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

/* Title, date, intro – mobile base */
.journal-card-title {
  font-family: "Allura", "Dancing Script", cursive;
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0 0 0.4rem;
  color: #333;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.journal-card-date {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.7rem;
  color: #333;
}

.journal-card-intro {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  color: #333;
}

/* =========================================================
   JOURNAL ENTRY PAGE (Mobile-first base)
========================================================= */
.journal-article h1 {
  font-family: "Dancing Script", cursive;
  font-weight: 600;
  font-size: 2.05rem;
  margin-bottom: 0.3rem;
}

.journal-date {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: #3a3a3a;
  margin-bottom: 2rem;
}

/* Images */
.journal-content-img,
.journal-featured-image img {
  border-radius: 8px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
  display: block;
  margin: 0 auto 20px;
  max-width: 100%;
  height: auto;
}

.journal-featured-image figcaption {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: #333;
  text-align: center;
  margin-top: 0.75rem;
}

.journal-article p {
  font-family: "Libre Baskerville", serif;
  font-weight: 500;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #202020;
  margin-bottom: 1.6rem;
}

/* Nav, related, notes – mobile base */
.journal-nav {
  margin-top: 2.4rem;
  text-align: center;
}

.journal-nav a {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  color: #1f1f1f;
  text-decoration: none;
  margin: 0 0.5rem;
}

.journal-nav a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .journal-nav a {
    font-size: 0.9rem;       /* slightly smaller on phones */
    margin: 0 0.25rem;      /* tighter spacing */
    white-space: nowrap;   /* prevents awkward wrapping */
  }
}

.related-entries h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  text-align: left;
  color: #1f1f1f;
}

.related-entries ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.related-entries li {
  margin-bottom: 0.5rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
}

.related-entries a {
  color: #1f1f1f;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

.related-entries a:hover {
  text-decoration: underline;
  color: #3a3a3a;
}

.related-links {
  font-size: 1rem;
  font-style: italic;
  margin-top: 1.2rem;
  line-height: 1.4;
  color: #3a3a3a;
}

.journal-note {
  max-width: 520px;
  margin: 2.2rem auto;
  padding-left: 1rem;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
  color: #3a3a3a;
  border-left: 2px solid rgba(0,0,0,0.12);
}

/* Header override */
.journal-header {
  position: static !important;
  top: auto !important;
}

/* =========================================================
   Progressive Enhancements
========================================================= */
@media (min-width: 640px) {
  .main-content.journal-page { padding: 3rem 0; }
  .paper-wrapper {
    padding: 3rem 2rem;
    max-width: 90%;
  }
  .journal-grid {
    gap: 26px;
    padding: 0 18px;
  }
  .journal-card-title { font-size: 1.6rem; }
  .journal-card-intro { font-size: 0.95rem; }
}

@media (min-width: 768px) {
  .main-content.journal-page { padding: 4rem 0; }
  .paper-wrapper {
    max-width: 900px;
    padding: 5rem 4rem;
  }
  .journal-grid {
    grid-template-columns: repeat(3, 1fr);  /* Exactly 3 columns on desktop */
    gap: 30px;
    margin-top: 40px;
    padding: 0 20px;
  }
  /* Restore your original entry typography */
  .journal-article h1 { font-size: 2.6rem; }
  .journal-date { font-size: 1.1rem; margin-bottom: 2.5rem; }
  .journal-article p { font-size: 1.2rem; line-height: 1.85; margin-bottom: 1.8rem; }
  .journal-nav a { font-size: 1.1rem; }
  .related-entries h3 { font-size: 1.1rem; }
  .related-entries li { font-size: 1.1rem; }
  /* Restore your original image caps */
  .journal-content-img { max-width: 400px; }
  .journal-featured-image img { max-width: 420px; }
  .journal-featured-image figcaption { font-size: 1.05rem; }
  .journal-note { font-size: 1.05rem; padding-left: 1.2rem; }
}

/* Optional: Extra-large screens – keep 3 columns, but allow more breathing room */
@media (min-width: 1200px) {
  .paper-wrapper {
    max-width: 1100px;
    padding: 5rem 5rem;
  }
  .journal-grid {
    gap: 40px;  /* Slightly larger gaps on very wide screens */
    max-width: 1000px;  /* Optional: cap the grid width so cards don't get too stretched */
  }
  .journal-card {
    max-width: 320px;  /* Keeps mini cards feeling compact even on ultra-wide */
  }
}