/* ============================================================
   Research Section Styles — j1.silva Portfolio
   ============================================================ */

/* ── Section ── */
.research-section {
  position: relative;
  z-index: 3;
  padding: 0;
  margin-top: 24px;
  background: #fff;
  color: #000;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
  font-family: var(--font-display);
}
body.research-active .research-section {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
body.research-active.scrolled .research-section {
  padding-top: 48px;
}

.research-container {
  padding: 0 28px 0 64px;
}

/* ── List ── */
.research-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  overflow: visible;
  padding-bottom: 24vh;
}

/* ── Item ── */
.research-item {
  --transition-ease: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  cursor: pointer;
  background: #fff;
  border-bottom: 1px solid #000;
  z-index: 1;
  /* Entry animation */
  opacity: 0;
  transform: translateY(12px);
  transition: transform 350ms var(--transition-ease),
              opacity 350ms var(--transition-ease),
              z-index 0ms;
}
.research-item:first-child {
  border-top: 1px solid #000;
}
.research-item.visible {
  opacity: 1;
  transform: none;
}
/* Pull-up effect: item rises over the one above */
.research-item:hover {
  z-index: 5;
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
}

/* ── Content row ── */
.research-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  gap: 32px;
  transition: background-color 250ms ease;
}
.research-item:hover .research-content {
  background-color: rgba(0,0,0,0.018);
}

/* ── Left group (number + swatch + title) ── */
.research-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  min-width: 0;
}

/* ── Number ── */
.research-number {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: #000;
  letter-spacing: -0.6px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 36px;
}

/* ── Color swatch ── */
.research-swatch {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.research-item:hover .research-swatch {
  transform: scale(1.3);
}

/* ── Title ── */
.research-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: #000;
  letter-spacing: -0.5px;
  line-height: 1.4;
  min-width: 0;
}
.research-title strong {
  font-weight: 700;
}

/* ── Right group (type + year + badge + arrow) ── */
.research-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* ── Type (Tesis / Article) ── */
.research-type {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: #000;
  letter-spacing: -0.5px;
  white-space: nowrap;
  width: 96px;
}

/* ── Year ── */
.research-year {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: #000;
  letter-spacing: -0.5px;
  white-space: nowrap;
  width: 44px;
}

/* ── Status badge (with wipe effect) ── */
.research-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.39px;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
.research-badge.available {
  background: var(--neon);
  color: #000;
}
.research-badge.soon {
  border: 1px solid #000;
  color: #000;
  background: transparent;
}

/* Badge text layers */
.research-badge .badge-text {
  position: relative;
  z-index: 1;
  padding: 5px 10px;
  transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1),
              color 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.research-badge .badge-text-hidden {
  position: absolute;
  z-index: 1;
  padding: 5px 10px;
  color: #fff;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.research-badge .badge-wipe {
  position: absolute;
  inset: auto 0 0 0;
  background: #000;
  height: 0%;
  transition: height 300ms cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 0;
}

/* Badge hover */
.research-badge:hover .badge-wipe { height: 100%; }
.research-badge:hover .badge-text { transform: translateY(-100%); }
.research-badge:hover .badge-text-hidden { transform: translateY(0%); }
.research-badge.available:hover .badge-text-hidden { color: var(--neon); }

/* ── Arrow icon ── */
.research-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  transition: opacity 200ms ease, transform 200ms ease;
}
.research-item:hover .research-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}
.research-arrow svg {
  width: 16px;
  height: 16px;
}

/* ── Meta text (revealed on hover) ── */
.research-meta {
  display: none;
  font-family: var(--font-display);
  font-size: 13px;
  color: #000;
  opacity: 0;
  padding: 0 0 14px 82px;
  letter-spacing: -0.4px;
}
.research-item:hover .research-meta {
  display: block;
  animation: researchFadeInDown 250ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes researchFadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 0.5; transform: translateY(0); }
}

/* ── Preview card (emerges from bottom of item) ── */
.research-preview {
  position: absolute;
  bottom: 0;
  right: 22%;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  width: 20vw;
  height: 22vh;
  border-radius: 0 0 10px 10px;
  background: #000;
  transform: rotate(1deg) scaleY(0) translateY(0);
  transform-origin: center top;
  transition: transform 380ms cubic-bezier(0.23, 1, 0.32, 1),
              opacity 280ms cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.research-item:hover .research-preview {
  transform: rotate(1deg) scaleY(1) translateY(100%);
  opacity: 1;
}
.research-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.85);
}
.research-preview .preview-label {
  position: absolute;
  bottom: 8%;
  left: 5%;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 50vw;
  background: #fff;
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  mix-blend-mode: hard-light;
}

/* ── RESPONSIVE ── */

@media (max-width: 1200px) {
  .research-container { padding: 0 28px 0 32px; }
}

@media (max-width: 1024px) {
  .research-container { padding: 0 24px; }
  .research-content { padding: 22px 0; gap: 20px; }
  .research-left { gap: 20px; }
  .research-number { font-size: 15px; }
  .research-title { font-size: 15px; }
  .research-type { font-size: 14px; width: auto; }
  .research-year { font-size: 14px; width: auto; }
  .research-meta { padding-left: 60px; }
}

@media (max-width: 768px) {
  .research-container { padding: 0 20px; }
  .research-content {
    flex-wrap: wrap;
    padding: 18px 0;
    gap: 12px;
  }
  .research-left { flex: 1 1 100%; gap: 14px; }
  .research-right {
    padding-left: 50px;
    gap: 12px;
  }
  .research-number { font-size: 14px; min-width: 30px; }
  .research-swatch { width: 14px; height: 14px; }
  .research-title { font-size: 14px; }
  .research-type { font-size: 13px; width: auto; }
  .research-year { font-size: 13px; width: auto; }
  .research-badge { font-size: 11px; }
  .research-badge .badge-text,
  .research-badge .badge-text-hidden { padding: 3px 7px; }
  .research-arrow { width: 20px; height: 20px; }
  .research-meta { padding-left: 44px; font-size: 11px; }
  .research-preview {
    width: 35vw;
    height: 16vh;
    right: 10%;
  }
}

@media (max-width: 480px) {
  .research-container { padding: 0 16px; }
  .research-content { padding: 16px 0; gap: 10px; }
  .research-left { gap: 10px; }
  .research-number { font-size: 13px; min-width: 26px; }
  .research-swatch { width: 12px; height: 12px; }
  .research-title { font-size: 13px; }
  .research-right { padding-left: 36px; gap: 10px; }
  .research-meta { padding-left: 36px; }
  .research-preview {
    width: 45vw;
    right: 5%;
  }
}
