/* ===== Papers Page Styles ===== */

/* --- Nav link active state --- */
.nav-link.active {
  color: #3b82f6;
  font-weight: 600;
}

/* --- Papers Hero --- */
.papers-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  background: #fafafa;
}

.papers-hero-bg {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.papers-hero::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.papers-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.papers-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.papers-hero-title {
  font-size: 44px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.papers-hero-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 24px;
}

/* --- Main Content --- */
.papers-main {
  padding: 40px 0 80px;
  background: #fff;
}

.papers-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* --- Sidebar Navigation --- */
.papers-sidebar {
  position: sticky;
  top: 80px;
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  background: #fafbfc;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sidebar-link.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.sidebar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-count {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
}

.sidebar-link.active .sidebar-count {
  color: #93c5fd;
}

/* --- Papers Content Area --- */
.papers-content {
  flex: 1;
  min-width: 0;
}

/* --- Paper Section --- */
.paper-section {
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}

.paper-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.section-subtitle {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 400;
}

/* --- Paper Grid --- */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* --- Paper Card --- */
.paper-card {
  display: block;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.25s;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.paper-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.paper-card:hover .paper-link-icon {
  opacity: 1;
  color: #3b82f6;
}

.paper-link-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  opacity: 0;
  transition: all 0.25s;
}

.paper-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.paper-year {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 2px 8px;
  border-radius: 5px;
}

.paper-impact {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
}

.paper-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.paper-authors {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-source {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-style: italic;
}

.paper-abstract {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Paper Tags --- */
.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.paper-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

.paper-tag.blue {
  color: #2563eb;
  background: #eff6ff;
}

.paper-tag.purple {
  color: #7c3aed;
  background: #f5f3ff;
}

.paper-tag.green {
  color: #16a34a;
  background: #f0fdf4;
}

.paper-tag.orange {
  color: #ea580c;
  background: #fff7ed;
}

.paper-tag.pink {
  color: #db2777;
  background: #fdf2f8;
}

.paper-tag.cyan {
  color: #0891b2;
  background: #ecfeff;
}

.paper-tag.yellow {
  color: #b45309;
  background: #fffbeb;
}

.paper-tag.indigo {
  color: #4f46e5;
  background: #eef2ff;
}

.paper-tag.teal {
  color: #0d9488;
  background: #f0fdfa;
}

.paper-tag.fuchsia {
  color: #a21caf;
  background: #fdf4ff;
}

.paper-tag.emerald {
  color: #059669;
  background: #ecfdf5;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  .papers-sidebar {
    display: none;
  }

  .papers-main-inner {
    max-width: 1200px;
  }
}

@media (max-width: 900px) {
  .papers-hero-title {
    font-size: 32px;
  }

  .paper-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 600px) {
  .papers-hero {
    padding: 40px 0 32px;
  }

  .papers-hero-inner {
    padding: 0 16px;
  }

  .papers-hero-title {
    font-size: 26px;
  }

  .papers-main-inner {
    padding: 0 16px;
  }

  .paper-card {
    padding: 14px;
  }

  .section-header {
    gap: 12px;
  }

  .section-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
