/* ============ Research & Studies — page-specific styles ============
   Loaded AFTER ../assets/css/style.css and relies on its variables,
   reset, header, footer, buttons and .section styles. */

/* Active nav link */
.site-nav .nav-active { color: var(--purple); font-weight: 600; }

/* ============ Hero ============ */
.r-hero {
  background:
    radial-gradient(700px 300px at 85% -20%, rgba(167, 92, 190, 0.35), transparent 60%),
    linear-gradient(150deg, #2a1a3d, var(--dark) 60%, #31173f);
  color: #fff;
  padding: 74px 0 64px;
  text-align: center;
}
.r-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 14px; line-height: 1.2; }
.r-lead {
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.02rem;
}

/* ============ Toolbar ============ */
.r-list { background: var(--bg-alt, #f8f6fa); }
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.searchbox { position: relative; flex: 1; min-width: 240px; max-width: 420px; }
.searchbox svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: #a89fb3;
  pointer-events: none;
}
.searchbox input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 12px 18px 12px 46px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.searchbox input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(123, 47, 143, 0.10); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { border-color: var(--purple); color: var(--purple); }
.filter.on { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ============ Cards ============ */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.pub-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}
.pub-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #2a1a3d, var(--dark));
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.cover.nocover img { display: none; }
.pub-card:hover .cover img { transform: scale(1.04); }
.read-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(34, 22, 49, 0.55);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.read-hint svg { width: 21px; height: 21px; }
.cover:hover .read-hint { opacity: 1; }

.pub-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pub-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chip {
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 13px;
}
.pub-meta time { font-size: 0.8rem; color: var(--muted); }
.pub-body h3 { font-size: 1.06rem; line-height: 1.45; margin-bottom: 8px; }
.pub-body h3 a:hover { color: var(--purple); }
.authors { font-size: 0.84rem; color: var(--purple-dark); font-weight: 500; margin-bottom: 10px; }
.abstract {
  font-size: 0.88rem;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}
.pub-actions { margin-top: auto; display: flex; gap: 10px; }
.btn-read {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--purple);
  color: #fff;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.btn-read:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-read svg { width: 18px; height: 18px; }
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.btn-dl:hover { border-color: var(--purple); color: var(--purple); }
.btn-dl svg { width: 17px; height: 17px; }

/* ============ Empty state ============ */
.empty { text-align: center; padding: 70px 0; color: var(--muted); }
.empty svg { width: 54px; height: 54px; margin: 0 auto 14px; color: #c9c0d4; display: block; }

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .r-hero { padding: 56px 0 48px; }
  .pub-grid { grid-template-columns: 1fr; }
}
