/* ===================================================
   RESEARCH PAGE STYLES
   MD Saib Hossain Portfolio
   =================================================== */

:root {
  --table-bg: var(--surface);
  --success: #10b981;
  --accent-ongoing: #f59e0b;
  --accent-journal: #8b5cf6;
}

/* Stats Table */
.stats-table-wrapper {
  padding: 1.75rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.stats-table th, .stats-table td {
  padding: 1.1rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.stats-table th {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background: var(--surface-active);
}

.stats-table tr:last-child td { border-bottom: none; }

.stats-table tr:hover td {
  background: var(--surface-hover);
}

.index-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.idx-badge {
  padding: 0.25rem 0.65rem;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
}

[data-theme="light"] .idx-badge {
  color: var(--primary);
}

/* Ongoing Papers & Progress */
.ongoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.ongoing-card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.ongoing-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-ongoing);
  box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.15);
}

.ongoing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.venue-tag {
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  font-weight: 700;
  white-space: nowrap;
}

.ongoing-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.ongoing-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}

.progress-wrapper {
  margin-top: auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: var(--surface-active);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-ongoing), #fbbf24);
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1s ease-out;
}

.stage-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Published Papers */
.pub-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.pub-card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.pub-card:hover {
  transform: translateY(-4px);
  border-color: var(--success);
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.15);
}

.pub-card.journal:hover {
  border-color: var(--accent-journal);
  box-shadow: var(--shadow-md), 0 0 20px rgba(139, 92, 246, 0.15);
}

.pub-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.tick-icon {
  width: 22px;
  height: 22px;
  fill: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.pub-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.pub-title a:hover {
  color: var(--primary);
}

.pub-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

[data-theme="light"] .pub-meta {
  color: var(--primary);
}

.pub-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}

.pub-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

/* Collaboration CTA */
.collab-section {
  text-align: center;
}

.collab-text {
  max-width: 700px;
  margin: 1.5rem auto 2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.collab-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-table-wrapper { padding: 1rem; }
  .stats-table th, .stats-table td { padding: 0.85rem 1rem; font-size: 0.88rem; }
  .ongoing-header { flex-direction: column; gap: 0.5rem; }
  .collab-actions { flex-direction: column; align-items: center; }
  .collab-actions .btn { width: 100%; max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
}