/* Research cards, modal and responsive rules. */



.research-archive-intro {
  max-width: 640px;
  font-size: clamp(16.5px, 1.4vw, 19px);
  margin: 0 0 64px;
}

.research-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 44px);
}

.research-card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px -26px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  transition:
    transform 0.5s cubic-bezier(0.19, 0.78, 0.24, 1),
    box-shadow 0.5s ease,
    opacity 0.8s cubic-bezier(0.19, 0.78, 0.24, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.research-card.in {
  opacity: 1;
  transform: translateY(0);
}

.research-card.reverse {
  grid-template-columns: 1fr 42%;
}

.research-card.reverse .research-card-media {
  order: 2;
}

.research-card.reverse .research-card-body {
  order: 1;
}

.research-card:hover,
.research-card:focus-within {
  transform: translateY(-8px) scale(1.012);
  box-shadow: 0 24px 60px -25px rgba(88, 18, 31, 0.55);
}

.research-card-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.research-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.19, 0.78, 0.24, 1);
}

.research-card:hover .research-card-media img,
.research-card:focus-within .research-card-media img {
  transform: scale(1.05);
}

.research-card-meta {
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 16px;
}

.research-card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
  color: #f4efe7;
}

.research-card-desc {
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 0 26px;
  color: rgba(244, 239, 231, 0.68);
}

.research-card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4efe7;
  transition: color 0.25s ease;
}

.research-card-link .arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.19, 0.78, 0.24, 1);
}

.research-card:hover .research-card-link .arrow,
.research-card:focus-within .research-card-link .arrow,
.research-card-link:hover .arrow,
.research-card-link:focus-visible .arrow {
  transform: translateX(7px);
}

.research-card-link:hover,
.research-card-link:focus-visible {
  color: var(--rose);
}

@media (max-width: 900px) {
  .research-card,
  .research-card.reverse {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .research-card.reverse .research-card-media,
  .research-card.reverse .research-card-body {
    order: initial;
  }

  .research-card-desc {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .research-card {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }

  .research-card:hover,
  .research-card:focus-within {
    transform: none !important;
    box-shadow: 0 14px 40px -26px rgba(0, 0, 0, 0.5) !important;
  }

  .research-card-media img {
    transition: none !important;
  }

  .research-card:hover .research-card-media img,
  .research-card:focus-within .research-card-media img {
    transform: none !important;
  }
}

.research-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(74, 17, 25, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.research-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.research-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--ivory);
  border-radius: 22px;
  border: 1px solid rgba(122, 31, 43, 0.16);
  box-shadow: 0 40px 100px rgba(13, 12, 12, 0.4);
  padding: clamp(28px, 4vw, 52px);
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity 0.45s cubic-bezier(0.19, 0.78, 0.24, 1),
    transform 0.45s cubic-bezier(0.19, 0.78, 0.24, 1);
}

.research-modal-overlay.is-open .research-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.research-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(13, 12, 12, 0.06);
  border: 1px solid rgba(13, 12, 12, 0.12);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.research-modal-close:hover {
  background: rgba(122, 31, 43, 0.12);
  transform: rotate(90deg);
}

.research-modal-media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0 0 28px;
  background: var(--rose);
}

.research-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.research-modal-meta {
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 14px;
}

.research-modal-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 20px;
}

.research-modal-desc {
  font-size: 16.5px;
  line-height: 1.8;
  white-space: pre-line;
  color: #57504d;
  margin: 0 0 30px;
}

.research-modal-pdf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--maroon);
  color: #f8f5f3;
  padding: 15px 26px;
  border-radius: 999px;
  font: 600 12.5px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.19, 0.78, 0.24, 1),
    box-shadow 0.3s ease;
  box-shadow: 0 16px 34px -16px rgba(88, 18, 31, 0.55);
}

.research-modal-pdf:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -16px rgba(88, 18, 31, 0.6);
}

.research-modal-pdf[hidden] {
  display: none;
}

body.research-modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .research-modal-overlay {
    padding: 12px;
  }

  .research-modal {
    width: 100%;
    max-height: 90vh;
    border-radius: 18px;
    padding: 24px 20px 28px;
  }

  .research-modal-close {
    top: 12px;
    right: 12px;
  }

  .research-modal-pdf {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .research-modal-overlay,
  .research-modal,
  .research-modal-close {
    transition: opacity 0.2s ease !important;
  }

  .research-modal {
    transform: none !important;
  }

  .research-modal-close:hover {
    transform: none !important;
  }
}
