/* ============================================================
   research-page.css — research page specific styles
   ============================================================ */

/* ---------- RESEARCH HERO ADJUSTMENTS ---------- */
.hx-research-hero .hx-title {
  font-size: clamp(42px, 7vw, 96px);
}

.hx-research-hero .hx-poster::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #4cc9f0, #9d7bff, #4ad6c4);
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(12px);
}

.hx-research-hero .hx-poster:hover::before {
  opacity: 0.4;
  animation: hxGlowPulse 2s ease-in-out infinite;
}

@keyframes hxGlowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ---------- RESEARCH DIRECTIONS ---------- */
.hx-research-dirs {
  padding: 80px 0;
}

.hx-dirs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 32px;
  margin-top: 48px;
}

.hx-dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(76, 201, 240, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
  text-decoration: none;
}

.hx-dir-card:hover {
  border-color: rgba(76, 201, 240, 0.5);
  background: rgba(76, 201, 240, 0.04);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(76, 201, 240, 0.15);
}

.hx-dir-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.08), rgba(157, 123, 255, 0.08));
}

.hx-dir-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(76, 201, 240, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hx-dir-card:hover .hx-dir-visual::after {
  opacity: 1;
}

.hx-dir-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}

.hx-dir-card:hover .hx-dir-visual img {
  transform: scale(1.05);
}

.hx-dir-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 22, 47, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(76, 201, 240, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hx-dir-card:hover .hx-dir-overlay {
  border-color: rgba(76, 201, 240, 0.8);
  box-shadow: 0 0 20px rgba(76, 201, 240, 0.4);
  transform: scale(1.05);
}

.hx-dir-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #4cc9f0;
  text-shadow: 0 0 10px rgba(76, 201, 240, 0.6);
}

.hx-dir-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hx-dir-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(220, 230, 250, 0.5);
  text-transform: uppercase;
}

.hx-dir-content h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #eaf1ff;
  margin: 0;
  line-height: 1.2;
}

.hx-dir-content p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(220, 230, 250, 0.7);
  margin: 0;
}

.hx-dir-arrow {
  margin-top: 8px;
  font-size: 20px;
  color: #4cc9f0;
  transition: transform 0.3s ease;
}

.hx-dir-card:hover .hx-dir-arrow {
  transform: translateX(6px);
}

/* ---------- KEY QUESTIONS ---------- */
.hx-questions {
  padding: 80px 0;
}

.hx-questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 28px;
  margin-top: 48px;
}

.hx-question {
  position: relative;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(157, 123, 255, 0.15);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(.2,.7,.2,1);
  overflow: hidden;
}

.hx-question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, #9d7bff, #4cc9f0);
  transition: height 0.4s cubic-bezier(.2,.7,.2,1);
}

.hx-question:hover::before {
  height: 100%;
}

.hx-question::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(157, 123, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hx-question:hover::after {
  opacity: 1;
}

.hx-question:hover {
  border-color: rgba(157, 123, 255, 0.4);
  background: rgba(157, 123, 255, 0.04);
  transform: translateY(-2px);
}

.hx-q-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9d7bff;
  padding: 6px 12px;
  background: rgba(157, 123, 255, 0.1);
  border: 1px solid rgba(157, 123, 255, 0.3);
  border-radius: 6px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.hx-question:hover .hx-q-num {
  background: rgba(157, 123, 255, 0.2);
  border-color: rgba(157, 123, 255, 0.6);
  box-shadow: 0 0 16px rgba(157, 123, 255, 0.3);
}

.hx-question h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #eaf1ff;
  margin: 0 0 12px;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.hx-question:hover h3 {
  color: #fff;
  text-shadow: 0 0 20px rgba(157, 123, 255, 0.4);
}

.hx-question p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(220, 230, 250, 0.7);
  margin: 0;
}

/* ---------- MODEL LIBRARY ---------- */
.hx-library {
  padding: 80px 0 100px;
}

.hx-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 48px;
}

.hx-lib-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(74, 214, 196, 0.15);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
  overflow: hidden;
}

.hx-lib-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(74, 214, 196, 0.1), transparent);
  transition: left 0.5s ease;
}

.hx-lib-link:hover::before {
  left: 100%;
}

.hx-lib-link:hover {
  border-color: rgba(74, 214, 196, 0.5);
  background: rgba(74, 214, 196, 0.04);
  transform: translateX(4px);
}

.hx-lib-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(220, 230, 250, 0.5);
  text-transform: uppercase;
}

.hx-lib-link strong {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #eaf1ff;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
}

.hx-lib-link:hover strong {
  color: #4ad6c4;
}

.hx-lib-link svg {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #4ad6c4;
  opacity: 0;
  transition: all 0.25s ease;
}

.hx-lib-link:hover svg {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .hx-research-dirs,
  .hx-questions,
  .hx-library {
    padding: 60px 0;
  }

  .hx-dirs-grid,
  .hx-questions-grid,
  .hx-library-grid {
    margin-top: 32px;
  }

  .hx-dir-content {
    padding: 22px;
  }

  .hx-dir-content h3 {
    font-size: 20px;
  }

  .hx-question {
    padding: 24px 20px;
  }

  .hx-question h3 {
    font-size: 18px;
  }

  .hx-library-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx-dir-card,
  .hx-question,
  .hx-lib-link {
    transition: none;
  }

  .hx-dir-card:hover,
  .hx-question:hover,
  .hx-lib-link:hover {
    transform: none;
  }

  .hx-dir-visual img {
    transition: none;
  }

  .hx-dir-card:hover .hx-dir-visual img {
    transform: none;
  }

  .hx-research-hero .hx-poster::before,
  .hx-question::before,
  .hx-question::after,
  .hx-lib-link::before {
    display: none;
  }
}

/* ---------- ENHANCED PIPELINE STYLES ---------- */
.hx-pipeline .hx-stage {
  position: relative;
}

.hx-pipeline .hx-stage::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4cc9f0, #9d7bff);
  opacity: 0;
  z-index: -1;
  filter: blur(16px);
  transition: opacity 0.4s ease;
}

.hx-pipeline .hx-stage:hover::after {
  opacity: 0.3;
  animation: hxStagePulse 2s ease-in-out infinite;
}

@keyframes hxStagePulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.02); }
}

.hx-pipeline .hx-stage-icon svg {
  filter: drop-shadow(0 0 8px currentColor);
  transition: filter 0.3s ease;
}

.hx-pipeline .hx-stage:hover .hx-stage-icon svg {
  filter: drop-shadow(0 0 16px currentColor);
}

/* ---------- SECTION HEADERS GLOW ---------- */
.hx-section-head .hx-section-tag {
  position: relative;
  display: inline-block;
}

.hx-section-head .hx-section-tag::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(90deg, #4cc9f0, #9d7bff);
  opacity: 0;
  filter: blur(12px);
  z-index: -1;
  transition: opacity 0.4s ease;
}

.hx-section-head:hover .hx-section-tag::before {
  opacity: 0.4;
}
