/* ==========================================================================
   RESEARCH SECTION VANILLA CSS
   ========================================================================== */

/* --- Keyframe Animations --- */
@keyframes researchOrbBlob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes researchPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes researchFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Hero Section --- */
.research-hero {
  position: relative;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 40%, #4338ca 100%);
  color: #ffffff;
  padding-top: 6rem;
  padding-bottom: 6rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-bottom-left-radius: 3rem;
  border-bottom-right-radius: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .research-hero {
  background: linear-gradient(135deg, #4c1d95 0%, #581c87 50%, #134e4a 100%);
}

.sepia .research-hero {
  background: linear-gradient(135deg, #78350f 0%, #92400e 50%, #b45309 100%);
}

.midnight .research-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #064e3b 100%);
}

.high-contrast .research-hero {
  background: #000000;
  border-bottom: 2px solid #ffff00;
}

.research-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.25;
}

.research-hero-icon {
  position: absolute;
  opacity: 0.5;
  animation: researchPulse 4s ease-in-out infinite;
}

.research-hero-icon.microscope {
  top: 5rem;
  left: 2.5rem;
  font-size: 10rem;
  color: #c4b5fd;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.8));
}

.research-hero-icon.brain {
  bottom: 2.5rem;
  right: 5rem;
  font-size: 14rem;
  color: #a5b4fc;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8));
}

.research-hero-icon.dna {
  top: 33%;
  right: 25%;
  font-size: 8rem;
  transform: rotate(-12deg);
  color: #d8b4fe;
}

.research-orb {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  filter: blur(64px);
  opacity: 0.4;
  animation: researchOrbBlob 7s infinite ease-in-out;
}

.research-orb-1 {
  top: 0;
  left: 25%;
  background-color: #c084fc;
}

.research-orb-2 {
  top: 0;
  right: 25%;
  background-color: #818cf8;
  animation-delay: 2s;
}

.research-orb-3 {
  bottom: -8rem;
  left: 50%;
  background-color: #2dd4bf;
  animation-delay: 4s;
}

.research-hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.research-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.research-hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .research-hero-title {
    font-size: 4.5rem;
  }
}

.hero-title-shadow {
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}

.hero-title-gradient {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(to right, #ddd6fe, #99f6e4);
}

.high-contrast .hero-title-gradient {
  color: #ffff00;
  background: none;
}

.research-hero-desc {
  font-size: 1.25rem;
  color: #eff6ff;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.625;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (min-width: 768px) {
  .research-hero-desc {
    font-size: 1.5rem;
  }
}

/* --- Controls Section (Search & Filter Bar) --- */
.research-controls-section {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.research-controls-bar {
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 5rem;
  z-index: 30;
}

.dark .research-controls-bar {
  background-color: rgba(30, 41, 59, 0.65);
}

@media (min-width: 768px) {
  .research-controls-bar {
    flex-direction: row;
  }
}

.research-search-wrap {
  position: relative;
  width: 100%;
}

.research-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.research-search-input {
  width: 100%;
  padding-left: 3.25rem;
  padding-right: 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  border-radius: 9999px;
  background-color: var(--color-bg-surface);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  font-size: 1.125rem;
  color: var(--color-text-main);
  transition: all 0.2s ease;
}

.research-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.research-search-wrap:focus-within .research-search-icon {
  color: var(--color-primary);
}

.research-select-wrap {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .research-select-wrap {
    width: 12rem;
  }
}

.research-sort-select {
  width: 100%;
  appearance: none;
  padding-left: 1.5rem;
  padding-right: 2.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  color: var(--color-text-main);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.research-sort-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.research-select-arrow {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Category Pills */
.research-category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.category-pill-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  background-color: var(--color-bg-surface);
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.category-pill-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.category-pill-btn.active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.active-filter-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.clear-filter-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: 0.25rem;
  transition: color 0.2s ease;
}

.clear-filter-btn:hover {
  color: var(--color-error);
}

/* --- Research Grid & Cards --- */
.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .research-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.research-grid.two-cols {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .research-grid.two-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

.research-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  animation: researchFadeIn 0.4s ease-in-out;
}

.dark .research-card {
  background-color: rgba(30, 41, 59, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.research-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(79, 70, 229, 0.3);
}

.card-image-wrap {
  position: relative;
  height: 18rem;
  overflow: hidden;
  background-color: var(--color-bg-base);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed 0%, #4338ca 100%);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

.card-placeholder-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover .card-placeholder-content {
  transform: scale(1.05);
}

.card-placeholder-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.peer-reviewed-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.card-tags-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 10;
}

.tag-chip {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.tag-chip:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

.tag-chip.interactive {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  cursor: pointer;
}

.tag-chip.interactive:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.card-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 100%);
}

.dark .card-body {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.research-card:hover .card-title,
.card-title.read-trigger:hover {
  color: var(--color-primary);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.card-desc {
  color: var(--color-text-muted);
  line-height: 1.625;
  margin-bottom: 2rem;
  flex: 1;
}

.card-desc.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta-wrap {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.card-cta-text {
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.research-card:hover .card-cta-text {
  color: var(--color-primary-hover);
}

.card-cta-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: rgba(79, 70, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.research-card:hover .card-cta-icon {
  background-color: var(--color-primary);
  color: #ffffff;
}

.card-cta-icon i {
  transition: transform 0.2s ease;
}

.research-card:hover .card-cta-icon i {
  transform: translateX(3px);
}

/* Coming Soon Card */
.coming-soon-card {
  height: 100%;
  background-color: rgba(248, 250, 252, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 2rem;
  border: 2px dashed var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  opacity: 0.75;
  transition: all 0.4s ease;
}

.dark .coming-soon-card {
  background-color: rgba(30, 41, 59, 0.3);
}

.coming-soon-card:hover {
  opacity: 1;
  border-color: rgba(79, 70, 229, 0.5);
  background-color: rgba(79, 70, 229, 0.05);
}

.coming-soon-icon-wrap {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin-bottom: 1.5rem;
}

.coming-soon-ping {
  position: absolute;
  inset: 0;
  background-color: rgba(79, 70, 229, 0.2);
  border-radius: 9999px;
  animation: researchPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.coming-soon-icon-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-surface);
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  transition: transform 0.4s ease;
}

.coming-soon-card:hover .coming-soon-icon-inner {
  transform: scale(1.1);
}

.coming-soon-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
}

.coming-soon-desc {
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Research Modal Dialog --- */
.research-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.research-modal.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-panel {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  border-radius: 2.5rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 56rem;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.dark .modal-panel {
  background-color: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.research-modal.active .modal-panel {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.5);
}

.dark .modal-header {
  background-color: rgba(30, 41, 59, 0.5);
}

.modal-header-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-text-main);
  line-height: 1.25;
}

.close-modal-btn {
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  color: var(--color-error);
  background-color: rgba(239, 68, 68, 0.1);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.abstract-callout-box {
  background-color: rgba(79, 70, 229, 0.05);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.abstract-callout-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.abstract-callout-text {
  color: var(--color-text-main);
  font-style: italic;
  line-height: 1.625;
  font-size: 1.125rem;
}

.modal-footer {
  padding: 1.25rem 2rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.dark .modal-footer {
  background-color: rgba(30, 41, 59, 0.5);
}

@media (min-width: 640px) {
  .modal-footer {
    flex-direction: row;
  }
}

/* Pagination */
.pagination-wrap {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.page-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  color: var(--color-text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
}

.page-btn.active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Research Paper Reader Page --- */
.paper-sticky-header {
  position: sticky;
  top: 4.5rem;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  padding: 1rem 1.5rem;
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
}

.dark .paper-sticky-header {
  background-color: rgba(30, 41, 59, 0.7);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.paper-header-inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .paper-header-inner {
    flex-direction: row;
    align-items: center;
  }
}

.paper-header-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.2;
}

.paper-header-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.paper-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .paper-header-actions {
    width: auto;
  }
}

.paper-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
}

@media (min-width: 1024px) {
  .paper-layout {
    flex-direction: row;
  }
}

.paper-toc-sidebar {
  width: 100%;
  padding: 1.5rem;
  border-radius: 2rem;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.dark .paper-toc-sidebar {
  background-color: rgba(30, 41, 59, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
  .paper-toc-sidebar {
    width: 25%;
    position: sticky;
    top: 10rem;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
  }
}

.paper-toc-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 1rem;
}

.toc-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.toc-link:hover {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
}

.toc-link.toc-active {
  font-weight: 600;
  color: var(--color-primary);
  background-color: rgba(79, 70, 229, 0.15);
  border-left: 4px solid var(--color-primary);
  padding-left: 0.75rem;
}

.paper-content-area {
  width: 100%;
  padding: 2rem;
  border-radius: 2rem;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  color: var(--color-text-main);
  line-height: 1.8;
}

.dark .paper-content-area {
  background-color: rgba(30, 41, 59, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
  .paper-content-area {
    width: 75%;
  }
}

.paper-content-area h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.paper-content-area h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.paper-content-area p {
  margin-bottom: 1.25rem;
}

.paper-content-area ul,
.paper-content-area ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.paper-content-area li {
  margin-bottom: 0.5rem;
}

/* Generic Research Buttons */
.btn-research {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn-research:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-research-secondary {
  background-color: var(--color-bg-surface);
  color: var(--color-text-main);
  border-color: var(--color-border);
}

.btn-research-secondary:hover {
  background-color: var(--color-bg-base);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-research-success {
  background-color: #16a34a;
  color: #ffffff;
}

.btn-research-success:hover {
  background-color: #15803d;
}

/* Floating Actions */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  z-index: 45;
}

.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
}

.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text-main);
  color: var(--color-bg-surface);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
}
