/* ==========================================================================
   Void Walkers — Research & Innovation
   Astrometric observatory hero: canvas star system, scientific folios and
   telemetry hardware drawn in the site's existing cyan / amber language.
   ========================================================================== */

body[data-department="research"] #blackhole { display: none; }

body[data-department="research"] .dept-hero {
  min-height: 100svh;
  justify-content: flex-end;
  padding-bottom: clamp(44px, 7vh, 86px);
  overflow: hidden;
  border-bottom-color: rgba(0, 240, 255, 0.14);
}
body[data-department="research"] .dept-hero__inner {
  position: relative;
  z-index: 4;
  width: 100%;
  margin-inline: 0 auto;
}
body[data-department="research"] .dept-hero__title {
  max-width: 14ch;
  text-wrap: balance;
  text-shadow: 0 8px 70px rgba(0, 0, 0, 0.94);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
}
body[data-department="research"] .dept-hero__blurb {
  max-width: 48ch;
  color: #b9bec8;
}

.research-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #04050b;
  animation: research-scene-in 2.4s ease-out both;
}
.research-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 11, 0.94) 0, rgba(4, 5, 11, 0.55) 27%, transparent 61%),
    linear-gradient(0deg, rgba(4, 5, 11, 0.98) 0, rgba(4, 5, 11, 0.48) 29%, transparent 58%);
}
.research-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.research-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 61% 44%, transparent 27%, rgba(4, 5, 11, 0.28) 63%, rgba(4, 5, 11, 0.78) 100%),
    linear-gradient(180deg, rgba(4, 5, 11, 0.28), transparent 20%, transparent 78%, rgba(4, 5, 11, 0.4));
}
.research-reticle {
  position: absolute;
  inset: calc(var(--nav-height) + 18px) var(--gutter) 24px;
  z-index: 2;
  border: 1px solid rgba(99, 104, 126, 0.15);
  pointer-events: none;
}
.research-reticle i {
  position: absolute;
  display: block;
  width: 16px;
  height: 16px;
  border-color: rgba(0, 240, 255, 0.52);
  border-style: solid;
}
.research-reticle i:nth-child(1) { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.research-reticle i:nth-child(2) { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.research-reticle i:nth-child(3) { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.research-reticle i:nth-child(4) { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

/* ---------- top-left observatory identity ---------- */
.research-brand {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-height) + 24px);
  left: var(--gutter);
  width: min(356px, calc(100vw - var(--gutter) * 2));
  padding: 12px 14px;
  border: 1px solid rgba(27, 31, 51, 0.95);
  background: rgba(11, 13, 22, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  color: #8d99a6;
  font-family: var(--font-mono);
  font-size: 0.53rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.research-brand__head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #ffb691;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.research-brand__head strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.research-brand__head strong span { color: #00f0ff; font-weight: 400; }
.research-brand__head em {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid rgba(255, 140, 66, 0.32);
  color: #ff9e66;
  font-size: 0.47rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.research-brand__led {
  position: relative;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c87243;
}
.research-brand__led::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(200, 114, 67, 0.55);
  border-radius: 50%;
  animation: research-ping 2.2s ease-out infinite;
}
.research-brand > p {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(27, 31, 51, 0.8);
  color: #6f7d8d;
  font-size: 0.51rem;
  letter-spacing: 0.06em;
}
.research-brand__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 6px;
  color: #687583;
  font-size: 0.47rem;
}
.research-brand__metrics b { color: #00f0ff; font-weight: 400; }

/* ---------- top-centre spectrophotometry ---------- */
.research-spectrum {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-height) + 18px);
  left: 50%;
  width: 306px;
  padding: 9px 11px 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(27, 31, 51, 0.95);
  background: rgba(11, 13, 22, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: #6f7c8a;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.research-spectrum__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #84f4f7;
  font-size: 0.48rem;
}
.research-spectrum__head b { color: #ff9e66; font-weight: 400; }
.research-spectrum svg { display: block; width: 100%; height: 42px; margin-top: 5px; }
.research-spectrum__labels {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 3px;
  color: #5f6b78;
  font-size: 0.43rem;
  letter-spacing: 0.03em;
}
.research-spectrum__labels span:nth-child(2) { color: rgba(0, 240, 255, 0.7); }

/* ---------- top-right celestial coordinates ---------- */
.research-coord {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-height) + 24px);
  right: var(--gutter);
  width: min(306px, calc(100vw - var(--gutter) * 2));
  padding: 10px 12px;
  border: 1px solid rgba(27, 31, 51, 0.95);
  background: rgba(11, 13, 22, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: #6f7c8a;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.55;
  letter-spacing: 0.07em;
  text-align: right;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.research-coord p:first-child { color: #84f4f7; }
.research-coord p:first-child span { color: #ff8c42; }
.research-coord p:nth-child(2) { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(27, 31, 51, 0.8); }
.research-coord b { color: #5ce0b0; font-weight: 400; }
.research-coord p:last-child { color: #ff9e66; font-size: 0.47rem; }

/* ---------- left: topology + tensor fields ---------- */
.research-left {
  position: absolute;
  z-index: 3;
  top: 47%;
  left: var(--gutter);
  display: grid;
  gap: 10px;
  width: 224px;
  transform: translateY(-50%);
}
.research-panel {
  padding: 9px 10px;
  border: 1px solid rgba(27, 31, 51, 0.95);
  background: rgba(11, 13, 22, 0.86);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
  color: #6a7887;
  font-family: var(--font-mono);
  font-size: 0.45rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.research-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(27, 31, 51, 0.8);
  color: #84f4f7;
  font-size: 0.47rem;
}
.research-panel__head b { color: #ff9e66; font-weight: 400; }
.research-panel svg { display: block; width: 100%; height: 74px; margin: 5px 0 4px; }
.research-panel p { color: #687583; }
.research-panel p b { color: #84f4f7; font-weight: 400; }
.research-formula {
  padding: 7px 0 6px;
  color: #84f4f7;
  font-size: 0.58rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-transform: none;
}
.research-formula span { color: #ffb691; font-size: 0.48rem; }
.research-bar {
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}
.research-bar i {
  display: block;
  width: 84%;
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #ff8c42, #c87243);
  animation: research-bar 4.6s ease-in-out infinite;
}

/* ---------- right: autonomous monograph ---------- */
.research-paper {
  position: absolute;
  z-index: 3;
  top: 47%;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  width: min(390px, 27vw);
  height: clamp(420px, 59vh, 540px);
  overflow: hidden;
  transform: translateY(-50%);
  border: 1px solid rgba(27, 31, 51, 0.95);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(18, 21, 36, 0.94), rgba(7, 9, 16, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  color: #81909e;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.55;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.research-paper__head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px 9px;
  border-bottom: 1px solid rgba(27, 31, 51, 0.8);
}
.research-paper__head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.research-paper__head strong {
  color: #84f4f7;
  font-size: 0.57rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.research-paper__head span {
  color: #5d6976;
  font-size: 0.44rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.research-paper__head em {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid rgba(92, 224, 176, 0.28);
  color: #5ce0b0;
  font-size: 0.42rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.research-paper__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.research-paper__track {
  display: flex;
  flex-direction: column;
  animation: research-paper-scroll 38s linear infinite;
}
.research-paper__copy { display: flex; flex-direction: column; gap: 10px; padding: 12px 13px 18px; }
.research-paper__copy h3 {
  color: #ffb691;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.research-paper__meta {
  margin-top: -4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(27, 31, 51, 0.8);
  color: #00f0ff;
  font-size: 0.46rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.research-paper__meta span {
  display: block;
  margin-top: 2px;
  color: #5d6976;
  letter-spacing: 0.04em;
}
.research-paper__section { padding-left: 8px; border-left: 1px solid rgba(0, 240, 255, 0.4); }
.research-paper__section:nth-of-type(2n) { border-left-color: rgba(255, 140, 66, 0.45); }
.research-paper__section:nth-of-type(3n) { border-left-color: rgba(255, 182, 145, 0.48); }
.research-paper__section h4 {
  color: #d8edf2;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.research-paper__section p { margin-top: 3px; color: #8b99a4; font-size: 0.52rem; line-height: 1.55; }
.research-paper__foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 13px;
  border-top: 1px solid rgba(27, 31, 51, 0.8);
  color: #5f6c79;
  font-size: 0.43rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.research-paper__foot span { display: inline-flex; align-items: center; gap: 5px; }
.research-paper__foot span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 7px #00f0ff;
}
.research-paper__foot b { color: #ff9e66; font-weight: 400; }

/* ---------- bottom-right status strip ---------- */
.research-status {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 7%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(27, 31, 51, 0.9);
  background: rgba(11, 13, 22, 0.86);
  color: #6d7a86;
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.research-status b { color: #ff9e66; font-weight: 400; }
.research-status i { width: 4px; height: 4px; border-radius: 50%; background: #00f0ff; box-shadow: 0 0 8px #00f0ff; }

@keyframes research-scene-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes research-ping { 0% { opacity: 0.8; transform: scale(0.7); } 80%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes research-bar { 0%, 100% { width: 64%; } 55% { width: 88%; } }
@keyframes research-paper-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

@media (max-width: 1300px) {
  .research-paper { display: none; }
  .research-spectrum { display: none; }
}

@media (max-width: 1100px) {
  .research-left { display: none; }
  .research-coord { width: 286px; }
}

@media (max-width: 900px) {
  .research-coord { display: none; }
  .research-status { display: none; }
  .research-brand { width: min(330px, calc(100vw - var(--gutter) * 2)); }
  .research-reticle { inset: calc(var(--nav-height) + 12px) var(--gutter) 18px; }
  body[data-department="research"] .dept-hero__title { font-size: clamp(2.55rem, 10.5vw, 4.2rem); }
}

@media (max-width: 640px) {
  body[data-department="research"] .dept-hero { min-height: 100svh; padding-bottom: 38px; }
  .research-brand { display: none; }
  .research-reticle { display: none; }
  .research-scene::after {
    background:
      linear-gradient(0deg, rgba(4, 5, 11, 0.99) 0, rgba(4, 5, 11, 0.68) 30%, transparent 64%),
      linear-gradient(180deg, rgba(4, 5, 11, 0.74), transparent 34%);
  }
  body[data-department="research"] .dept-hero__blurb { max-width: 38ch; font-size: var(--fs-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .research-scene,
  .research-brand__led::after,
  .research-bar i,
  .research-paper__track { animation: none !important; }
}

html[data-fx="reduced"] .research-scene,
html[data-fx="reduced"] .research-brand__led::after,
html[data-fx="reduced"] .research-bar i,
html[data-fx="reduced"] .research-paper__track { animation: none !important; }
