/* ==========================================================================
   RESEARCH HUB & SCIENTIFIC PAPERS STYLES - EDUARDO PEIRO THEME
   Executive Dark-Luxe Theme Architecture (2026 Edition)
   ========================================================================== */

:root {
  --res-bg-card: rgba(18, 24, 38, 0.95);
  --res-border: rgba(255, 255, 255, 0.08);
  --res-border-highlight: rgba(16, 185, 129, 0.35);
  --res-emerald: #10b981;
  --res-cyan: #06b6d4;
  --res-violet: #8b5cf6;
  --res-blue: #3b82f6;
  --res-text-main: #f8fafc;
  --res-text-muted: #94a3b8;
}

.research-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
  color: var(--res-text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Centerpiece Above-The-Fold (0-600px) */
.research-centerpiece-wrapper {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.96) 0%, rgba(12, 16, 26, 0.98) 100%);
  border: 1px solid var(--res-border-highlight);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.12);
  margin-bottom: 3rem;
}

.research-attribute-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--res-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.res-pill.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--res-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.res-pill.violet {
  background: rgba(139, 92, 246, 0.12);
  color: var(--res-violet);
  border-color: rgba(139, 92, 246, 0.3);
}

.res-pill.blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--res-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Centerpiece Grid */
.research-centerpiece-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .research-centerpiece-grid {
    grid-template-columns: 1fr;
  }
}

.author-kicker {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--res-emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.research-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.research-triad-summary {
  font-size: 1.05rem;
  color: var(--res-text-muted);
  line-height: 1.65;
  margin-bottom: 1.8rem;
}

.research-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-cta-emerald {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 650;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  border: 1px solid #10b981;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5);
}

.btn-cta-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--res-border);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-cta-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-cta-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981 !important;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-cta-wa:hover {
  background: rgba(16, 185, 129, 0.18);
}

/* Interactive Patent & Layout Simulator Widget */
.patent-interactive-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--res-border);
  border-radius: 12px;
  padding: 1.4rem;
  backdrop-filter: blur(10px);
}

.patent-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--res-border);
  padding-bottom: 0.75rem;
}

.patent-box-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.patent-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--res-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.patent-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ptab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--res-border);
  color: var(--res-text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ptab-btn.active, .ptab-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #ffffff;
  border-color: var(--res-emerald);
}

.patent-output-panel {
  display: block;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
}

/* Companion Treatise Box */
.treatise-banner {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-left: 4px solid var(--res-emerald);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.treatise-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.treatise-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.treatise-text a {
  color: var(--res-cyan);
  font-weight: 700;
  text-decoration: underline;
}

/* Infographic Section */
.infographic-wrapper {
  background: var(--res-bg-card);
  border: 1px solid var(--res-border);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 3.5rem;
}

.infographic-header {
  margin-bottom: 1.8rem;
}

.infographic-header h2 {
  font-size: 1.5rem;
  font-weight: 750;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
}

.infographic-header p {
  font-size: 0.95rem;
  color: var(--res-text-muted);
  margin: 0;
}

.svg-canvas-container {
  width: 100%;
  overflow-x: auto;
  background: #070b14;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Academic Sections */
.paper-body-section {
  background: var(--res-bg-card);
  border: 1px solid var(--res-border);
  border-radius: 14px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2.5rem;
}

.paper-body-section h2 {
  font-size: 1.6rem;
  font-weight: 750;
  color: #ffffff;
  border-bottom: 1px solid var(--res-border);
  padding-bottom: 0.75rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.paper-body-section h3 {
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--res-cyan);
  margin-top: 1.8rem;
  margin-bottom: 0.75rem;
}

.paper-body-section p, .paper-body-section li {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.paper-body-section ul, .paper-body-section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.math-card {
  background: rgba(11, 16, 27, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.2rem;
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
  color: #38bdf8;
}

/* Data Tables */
.res-table-wrap {
  overflow-x: auto;
  margin: 1.8rem 0;
}

.res-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.res-data-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  padding: 0.9rem 1.1rem;
  font-weight: 650;
  border-bottom: 2px solid var(--res-border);
}

.res-data-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--res-border);
  color: #cbd5e1;
}

.res-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.gain-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 700;
  font-size: 0.88rem;
}

/* BibTeX Terminal Box */
.bibtex-terminal {
  background: #070b14;
  border: 1px solid var(--res-border);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  margin-top: 1.5rem;
}

.bibtex-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  color: #a5f3fc;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  display: block;
}

.btn-copy-bib {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--res-border);
  color: #ffffff;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-bib:hover {
  background: var(--res-emerald);
  color: #0f172a;
}
