:root{
  --rose-100:#ffe4ea;
  --ink:#3a2f28;
  --muted:#6e655f;
  --border:#e5e7eb;
  --bg:#fff;
  --pill:#f6f6f6;
  --accent:#8a6f63;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
}

/* ===== Header with banner ===== */
.journal-header .banner-wrap{
  position:relative; overflow:hidden;
  display:grid; place-items:center;
  height:120px;
}

.journal-header img{
  width:100%; height:100%; object-fit:cover; filter:brightness(0.97);
}
.journal-header h1{
  position:absolute; inset:auto 0 12px 0;
  margin:0; text-align:center;
  font-family:'Playfair Display', serif; font-size:32px; letter-spacing:.5px;
  color:#5a4e48; text-shadow:0 2px 0 rgba(255,255,255,.9);
}

/* ===== Layout ===== */
.container{ max-width:1100px; margin:20px auto 60px; padding:0 16px; }

/* ===== Controls ===== */
.controls{ margin:18px 0 14px; }
.controls-row{
  display:flex; flex-wrap:wrap; gap:10px;
  align-items:center; justify-content:space-between;
}
.search{
  flex:1 1 280px; min-width:220px;
  padding:10px 12px; border:1px solid var(--border); border-radius:12px;
}
.select{
  flex:0 0 auto; padding:10px 12px; border:1px solid var(--border); border-radius:12px;
  background:#fff;
}
@media (max-width:680px){
  .controls-row{ gap:8px; }
  .select{ flex:1 1 calc(50% - 8px); }
}

/* ===== Grid of cards ===== */
.grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card{
  border:1px solid var(--border); border-radius:16px; background:#fff; overflow:hidden;
  display:flex; flex-direction:row; gap:0;
}
.thumb{ width:140px; height:160px; object-fit:cover; background:#fafafa; }
.card-body{ padding:14px 14px 12px; display:flex; flex-direction:column; gap:8px; }
.title{ margin:0; font-size:18px; line-height:1.25; }
.meta{ margin:0; color:var(--muted); font-size:13px; }
.abstract{ margin:0; color:#333; font-size:14px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.actions{ display:flex; gap:10px; margin-top:auto; }

.btn-primary, .btn-secondary{
  display:inline-block; padding:8px 12px; border-radius:12px; font-weight:600; text-decoration:none;
  border:1px solid var(--border);
}
.btn-primary{ background:#f4ede8; color:#4a3f39; }
.btn-primary:hover{ filter:brightness(.98); background:#ffd6e8; }
.btn-secondary{ background:var(--pill); color:#333; }

.empty{ text-align:center; color:var(--muted); margin:28px 0; }

/* ===== Paper page ===== */
.paper-title{ font-family:'Playfair Display',serif; font-size:28px; margin:8px 0 6px; }
.paper-meta{ color:var(--muted); margin:0 0 12px; }
.paper-subhead{ font-size:18px; margin:18px 0 8px; }
.paper-abstract{ line-height:1.8; margin:0; }
.paper-actions{ margin:12px 0 16px; }

.crumbs{ margin:10px 0 6px; }
.crumbs a{ color:#4a3f39; text-decoration:none; }
.crumbs a:hover{ text-decoration:underline; }

/* a11y */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Footer */
.site-footer{ border-top:1px solid var(--border); padding:18px 0; text-align:center; color:var(--muted); }

.btn-secondary:hover{ background:#ffeaf2; }


@media (max-width:680px){
  .journal-header .banner-wrap{ height:80px; }
  .journal-header img{ object-fit:contain; }
}






/* Prevent text cut-offs and ensure wrapping inside cards */
.card{ overflow:hidden; }
.card .title, .card .meta, .card .abstract{ margin:0; color:#333; font-size:14px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.card .card-body{ min-width:0; } /* allow flex children to shrink without cutting */


/* Ensure full visibility/wrapping for titles */
.card .title{
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  max-height: none;
}



.card .title a.title-link{
  color: inherit;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
  border-radius: 6px;
  padding: 2px 4px;
  margin-left: -4px; /* to balance padding visually */
  margin-right: -4px;
}
.card .title a.title-link:hover,
.card .title a.title-link:focus{
  color: #e85c73; /* pink */
  background-color: rgba(232, 92, 115, 0.12);
  text-decoration: none;
  outline: none;
  box-shadow: 0 0 0 2px rgba(232, 92, 115, 0.18);
}
.card .title a.title-link:active{
  color: #d94a64; /* slightly deeper pink on active click */
  background-color: rgba(232, 92, 115, 0.18);
}
.card .title a.title-link:visited{
  color: #c2465c; /* visited pink tone */
}


/* Keep all content inside the card cleanly */
.card{ overflow:hidden; }
.card .card-body{ min-width:0; }



.card .title a.title-link{
  color: inherit;
  text-decoration: none;
  transition: color .15s ease, text-decoration .15s ease;
}
.card .title a.title-link:hover,
.card .title a.title-link:focus,
.card .title a.title-link:active{
  color: #e85c73; /* pink */
  text-decoration: underline;
}
.card .title a.title-link:visited{
  color: #c2465c; /* visited pink */
  text-decoration: underline;
}


/* Title link: neutral text, underline only on hover/focus/active */
.card .title a.title-link{
  color: inherit;
  text-decoration: none;
}
.card .title a.title-link:hover,
.card .title a.title-link:focus,
.card .title a.title-link:active{
  text-decoration: underline;
}


/* Neutral title link: underline only on interaction, no color change */
.card .title a.title-link{
  color: inherit;
  text-decoration: none;
  background: none !important;
  box-shadow: none !important;
}
.card .title a.title-link:hover,
.card .title a.title-link:focus,
.card .title a.title-link:active{
  color: inherit;
  text-decoration: underline;
  background: none !important;
  box-shadow: none !important;
}
.card .title a.title-link:visited{
  color: inherit;
  text-decoration: none;
}


/* Smaller date text inside card meta */
.card .meta .date{
  font-size: 12px;
  color: var(--muted);
}

/* Slightly larger authors than date */
.card .meta .authors{ font-size:13px; }
