/* ========================================
   Research Portfolio Theme
   ======================================== */

:root {
  /* Primary Palette - Bridging both projects */
  --rp-primary: #6366f1;
  --rp-primary-light: #818cf8;
  --rp-primary-dark: #4f46e5;
  
  /* Accent Colors */
  --rp-ai: #0ea5e9;
  --rp-ai-light: #38bdf8;
  --rp-scale: #8b5cf6;
  --rp-scale-light: #a78bfa;
  
  /* Neutrals */
  --rp-bg: #0f172a;
  --rp-bg-light: #1e293b;
  --rp-card: #1e293b;
  --rp-text: #f8fafc;
  --rp-text-secondary: #cbd5e1;
  --rp-text-muted: #94a3b8;
  --rp-border: rgba(255, 255, 255, 0.1);
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  --gradient-ai: linear-gradient(135deg, #0ea5e9, #6366f1);
  --gradient-scale: linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-text: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
}

/* Base */
.research-theme {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--rp-bg);
  color: var(--rp-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: var(--rp-ai);
  top: -200px;
  right: -200px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: var(--rp-scale);
  bottom: -100px;
  left: -100px;
}

/* Navigation */
.research-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rp-border);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--rp-text);
}

.logo-symbol {
  width: 36px;
  height: 36px;
  background: var(--gradient-ai);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--rp-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--rp-primary-light);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: var(--rp-primary-light);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--rp-primary-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.gradient-1 {
  background: var(--gradient-ai);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-2 {
  background: var(--gradient-scale);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--rp-text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--rp-text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--rp-border);
}

.hero-scroll {
  margin-top: 2rem;
}

.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--rp-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

.scroll-indicator:hover {
  color: var(--rp-primary-light);
}

.scroll-indicator i {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Section Header */
.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
}

.section-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: var(--rp-primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rp-text);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--rp-text-muted);
  font-size: 1.1rem;
}

/* Topics Section */
.topics-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.topic-card {
  display: flex;
  background: var(--rp-card);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--rp-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.4s ease;
}

.topic-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.topic-ai:hover {
  border-color: rgba(14, 165, 233, 0.3);
}

.topic-scale:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.topic-visual {
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.topic-ai .topic-visual {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(14, 165, 233, 0.2));
}

.topic-scale .topic-visual {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.2));
}

.topic-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  z-index: 1;
}

.topic-ai .topic-icon {
  background: var(--gradient-ai);
}

.topic-scale .topic-icon {
  background: var(--gradient-scale);
}

.topic-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle, white 1px, transparent 1px);
  background-size: 20px 20px;
}

.topic-content {
  flex: 1;
  padding: 2rem;
}

.topic-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rp-text-muted);
  margin-bottom: 0.5rem;
}

.topic-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rp-text);
  margin-bottom: 1rem;
}

.topic-desc {
  color: var(--rp-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.topic-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: var(--rp-text-muted);
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
}

.topic-arrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.topic-ai .topic-arrow {
  color: var(--rp-ai-light);
}

.topic-scale .topic-arrow {
  color: var(--rp-scale-light);
}

/* Detail Sections */
.detail-section {
  padding: 6rem 0;
}

.section-ai {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.05) 0%, transparent 100%);
}

.section-scale {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
}

.detail-header {
  text-align: center;
  margin-bottom: 3rem;
}

.detail-badge {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 1.5rem;
}

.ai-badge {
  background: var(--gradient-ai);
}

.scale-badge {
  background: var(--gradient-scale);
}

.detail-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--rp-text);
  margin-bottom: 0.75rem;
}

.detail-subtitle {
  color: var(--rp-text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Paper Cards */
.papers-list {
  max-width: 900px;
  margin: 0 auto;
}

.paper-card {
  background: var(--rp-card);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--rp-border);
  margin-bottom: 1.5rem;
  transition: all 0.3s;
}

.paper-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.3);
}

.paper-status {
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.paper-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rp-text);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.paper-authors {
  color: var(--rp-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.paper-abstract {
  color: var(--rp-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.paper-abstract strong {
  color: var(--rp-text);
  font-weight: 600;
}

.paper-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.highlight-tag {
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rp-border);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--rp-text-secondary);
}

.highlight-best {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--rp-primary);
  color: var(--rp-primary-light);
  font-weight: 600;
}

.paper-actions {
  display: flex;
  gap: 1rem;
}

.btn-paper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--rp-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--rp-primary-light);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--rp-text);
  border: 1px solid var(--rp-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-tertiary {
  color: var(--rp-text-muted);
}

.btn-tertiary:hover {
  color: var(--rp-text);
}

/* Summary Section */
.summary-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%);
}

.papers-table-wrapper {
  background: var(--rp-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--rp-border);
  overflow-x: auto;
}

.papers-table {
  width: 100%;
  border-collapse: collapse;
}

.papers-table th {
  text-align: left;
  padding: 1rem;
  color: var(--rp-text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--rp-border);
}

.papers-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--rp-border);
  vertical-align: middle;
}

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

.paper-name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.paper-name strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: var(--rp-text);
}

.paper-subtitle {
  font-size: 0.85rem;
  color: var(--rp-text-muted);
}

.venue-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.venue-iclr {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.venue-icml {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.venue-arxiv {
  background: rgba(88, 5, 4, 0.15);
  color: #fad7c4;
}


.topic-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-ai {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}

.tag-scale {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.key-result {
  font-weight: 600;
  color: #34d399;
}

.paper-links {
  display: flex;
  gap: 1rem;
}

.paper-links a {
  color: var(--rp-text-muted);
  font-size: 1.25rem;
  transition: color 0.3s;
}

.paper-links a:hover {
  color: var(--rp-primary-light);
}

/* Footer */
.research-footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--rp-border);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rp-text);
}

.footer-brand p {
  color: var(--rp-text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rp-text);
  font-size: 1.25rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  background: var(--rp-primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rp-border);
  color: var(--rp-text-muted);
  font-size: 0.85rem;
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--rp-primary);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--rp-primary-light);
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .topics-grid {
    grid-template-columns: 1fr;
  }
  
  .topic-card {
    flex-direction: column;
  }
  
  .topic-visual {
    width: 100%;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .stat-divider {
    display: none;
  }
  
  .nav-links {
    display: none;
  }
  
  .paper-actions {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}
