/* ========== 顶部研究方向 ========== */
.research-hero-grid {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding-top: 42px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.research-wrapper {
  position: relative;
  z-index: 0;
  background: transparent;
  padding: 0;
  margin: 44px 0;
  overflow: hidden;
}

.research-wrapper:first-child {
  margin-top: 0;
}

.research-wrapper.alt {
  margin-top: 44px;
}

.research-wrapper + .research-wrapper {
  border-top: 0;
}

.research-title-row {
  width: calc(100% - 40px);
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
}

.research-title-row h2 {
  margin: 0;
  padding: 14px 48px 14px 18px;
  background: #0a5771;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.page__content .research-title-row h2 {
  margin: 0;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 0;
  background: #0a5771;
  color: #fff;
}

.research-title-row--left h2 {
  grid-column: 1;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%);
}

.research-title-row--right h2 {
  grid-column: 2;
  padding: 14px 18px 14px 48px;
  clip-path: polygon(28px 0, 100% 0, 100% 100%, 28px 100%, 0 50%);
}

/* 左右布局 */
.research-section {
  position: relative;
  width: calc(100% - 40px);
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}

.research-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.24;
  pointer-events: none;
}

.research-wrapper--decision .research-section::before {
  background-image: url("../images/research/main/backgrounds/decision-making_background.png");
}

.research-wrapper--collaborative .research-section::before {
  background-image: url("../images/research/main/backgrounds/collaborative-intelligence_background.png");
}

.research-wrapper--scaling .research-section::before {
  background-image: url("../images/research/main/backgrounds/computing-and-intelligence-scaling_background.png");
}

.research-text {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(105%);
}

.research-text p {
  font-size: 1.05em;
  color: #333;
  margin-bottom: 0.8em;
  line-height: 1.6;
}

.research-text ul {
  list-style: disc;
  padding-left: 20px;
  color: #444;
  text-align: left;
  display: inline-block;
}

.research-text li {
  padding-left: 2px;
  line-height: 1.7;
}

.research-image {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border-radius: 0;
  background: #fff;
  text-align: center;
}

.research-static-image img {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(0,0,0,0.1);
}

.research-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
}

.research-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.research-carousel-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.research-carousel-slide.active {
  opacity: 1;
}

.research-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #0a5771;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transform: translateY(-50%);
}

.research-carousel-control.prev {
  left: 12px;
}

.research-carousel-control.next {
  right: 12px;
}

.research-carousel-control:hover {
  background: #fff;
}

.research-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.research-carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 87, 113, 0.32);
  cursor: pointer;
}

.research-carousel-dots button.active {
  background: #0a5771;
}

.research-hex-grid {
  position: relative;
  width: 100%;
  aspect-ratio: 1.3300181838423573 / 1;
}

.research-hex-grid img {
  position: absolute;
  display: block;
  aspect-ratio: 1.154700538 / 1;
  object-fit: contain;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.14));
}

.research-hex-grid-models img:nth-child(1) {
  width: 68%;
  left: 0;
  top: 12%;
  z-index: 3;
}

.research-hex-grid-models img:nth-child(2) {
  width: 33%;
  left: 62.0387280478%;
  top: 13.6871074883%;
  z-index: 2;
}

.research-hex-grid-models img:nth-child(3) {
  width: 39%;
  left: 59.0464051057%;
  top: 54.0645149919%;
  z-index: 4;
}

.research-hex-grid-systems img:nth-child(1) {
  width: 68%;
  right: 0;
  top: 12%;
  z-index: 3;
}

.research-hex-grid-systems img:nth-child(2) {
  width: 39%;
  left: -0.000273688%;
  top: 7.8396935567%;
  z-index: 2;
}

.research-hex-grid-systems img:nth-child(3) {
  width: 33%;
  left: 6.9159775881%;
  top: 55.1288166502%;
  z-index: 4;
}

/* ========== 项目卡片（下半部分） ========== */
.project-grid {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-grid.show {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

.news-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease-in-out;
}

/* 响应式（上半部分） */
@media (max-width: 700px) {
  .research-wrapper {
    margin: 28px 0;
  }

  .research-section {
    gap: 10px;
  }

  .research-text,
  .research-image {
    min-height: 320px;
    padding: 20px;
  }

}

@media (max-width: 520px) {
  .research-wrapper {
    margin: 28px 0;
  }

  .research-section {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: left;
  }

  .research-title-row {
    grid-template-columns: 1fr;
  }

  .research-title-row--right h2,
  .research-title-row--left h2 {
    grid-column: 1;
    padding: 12px 18px;
    clip-path: none;
    white-space: normal;
  }

  .research-text,
  .research-image {
    min-height: 0;
    padding: 28px;
  }

  .research-wrapper.alt .research-image {
    order: 2;
  }

  .research-wrapper.alt .research-text {
    order: 1;
  }

}

.highlighted-papers-section {
  margin-top: 40px;
}

.highlighted-papers-title {
  margin: 0 0 18px;
}

.highlighted-papers-reset {
  -webkit-appearance: none;
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0a5771;
  cursor: pointer;
  font: inherit;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.highlighted-papers-reset:hover {
  color: #084e65;
}

.highlighted-papers-reset:focus {
  outline: none;
}

.highlighted-papers-reset:focus-visible {
  outline: none;
  box-shadow: 0 6px 14px rgba(10, 87, 113, .16);
  border-radius: 4px;
}

/* ========== Publication 风格的 Filter（完全同款 + 强特异性 + 外观重置） ========== */
.pub-filter-bar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  background: #f8fafc;
  padding: 12px 20px;
  border-radius: 8px;
  margin: 0 0 30px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.pub-filter-toggle {
  display: none;
}

.pub-year-toggle:focus,
.pub-year-option:focus,
.pub-load-more-btn:focus {
  outline: none;
}

.pub-year-toggle:focus-visible,
.pub-year-option:focus-visible,
.pub-load-more-btn:focus-visible {
  outline: none;
  box-shadow: 0 6px 14px rgba(10, 87, 113, .16);
}

.pub-year-filter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.pub-year-filter::before {
  content: "";
  width: 72px;
  height: 1px;
  background: #cfd6de;
}

.pub-year-toggle {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  min-width: 112px;
  padding: 7px 30px 7px 12px;
  border: 1px solid rgba(10, 87, 113, .18);
  border-radius: 6px;
  background: #fff;
  color: #0a5771;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(10, 87, 113, .06);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.pub-year-toggle::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #0a5771;
  border-bottom: 1.5px solid #0a5771;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.pub-year-filter.open .pub-year-toggle,
.pub-year-toggle:hover {
  background: #f7fbfd;
  border-color: rgba(10, 87, 113, .36);
  box-shadow: 0 5px 12px rgba(10, 87, 113, .1);
}

.pub-year-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 144px;
  padding: 6px;
  border: 1px solid #dce5eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.pub-year-filter.open .pub-year-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pub-year-option {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #3d4144;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.pub-year-option:hover,
.pub-year-option.active {
  background: #edf6fa;
  color: #0a5771;
}

@media (max-width: 820px) {
  .pub-filter-bar {
    justify-content: flex-end;
    padding: 10px 14px;
    min-height: 56px;
  }

  .pub-year-filter {
    width: 100%;
    margin-left: 0;
  }

  .pub-year-filter::before {
    flex: 1;
    width: auto;
  }

  .pub-year-toggle {
    min-width: 126px;
  }

  .pub-year-menu {
    left: 0;
    right: 0;
  }
}

.pub-item .pub-year,
.pub-item .pub-title,
.pub-item .pub-meta-row,
.pub-item .pub-keywords span,
.pub-item .pub-links a {
  color: #111;
}

.pub-item,
.pub-item:hover {
  transform: none;
  border-color: #e1e6eb;
  box-shadow: none;
  transition: none;
}

.research-hero-grid .news-card,
.research-hero-grid .news-card:hover {
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  transition: none;
}


/* ========== Publications 列表（从 publications.css 合并） ========== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pub-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.pub-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
}

.pub-year {
  color: #0a5771;
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1.2;
  margin: 0;
}

.pub-content {
  flex: 1;
  min-width: 0;
}

.pub-thumb {
  width: 184px;
  height: 184px;
  flex: 0 0 184px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1e7ed;
  background: #f6f8fa;
}

.pub-thumb img,
.pub-thumb-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
}

.pub-thumb img {
  display: block;
  object-fit: cover;
}

.pub-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a96a3;
  font-size: .82rem;
  font-weight: 600;
}

.pub-title {
  color: #111;
  font-size: 1.1em;
  line-height: 1.3;
  margin: 0 0 4px;
}

.pub-meta-row {
  display: block;
  margin-top: 8px;
  color: #0a5771;
  font-size: 1rem;
  line-height: 1.35;
}

.pub-keywords {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-weight: 400;
}

.pub-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(10, 87, 113, .18);
  border-radius: 999px;
  background: #edf6fa;
  color: #0a5771;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.15;
}

.pub-authors {
  color: #555;
  line-height: 1.35;
  margin: 0 0 8px;
}

.pub-venue {
  color: #666;
  font-style: italic;
  line-height: 1.35;
  margin: 0;
}

.pub-links {
  display: inline;
  line-height: inherit;
  margin: 0 0 0 14px;
  white-space: nowrap;
}

.pub-links a {
  display: inline;
  color: inherit;
  font-weight: 700;
  margin-right: 8px;
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
  text-decoration: none;
}

.pub-links a:hover { text-decoration: underline; }

.pub-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0 0;
}

.pub-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 42px;
  padding: 10px 22px;
  border: 1px solid rgba(0, 86, 120, .22);
  border-radius: 8px;
  background: #fff;
  color: #0a5771;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 87, 113, .08);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pub-load-more-btn:hover {
  background: #f3f9fc;
  border-color: rgba(0, 86, 120, .38);
  box-shadow: 0 5px 12px rgba(10, 87, 113, .12);
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .pub-item {
    gap: 14px;
    padding: 14px;
  }

  .pub-thumb {
    width: 108px;
    height: 108px;
    flex-basis: 108px;
  }

  .pub-meta-row {
    align-items: flex-start;
  }

  .pub-load-more-btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 820px) {
  .pub-keywords {
    display: none;
  }

  .pub-links {
    margin-left: 0;
  }
}

/* ========== JHU blue research treatment ========== */

.research-hero-grid {
  background: linear-gradient(180deg, var(--jhu-pale) 0%, #fff 34%);
  border-top: 0;
}

.research-title-row,
.page__content .research-title-row {
  background: transparent;
}

.research-title-row h2,
.page__content .research-title-row h2 {
  background: var(--jhu-spirit-blue);
  color: var(--jhu-blue-dark);
  box-shadow: none;
}

.research-text {
  background: rgba(255, 255, 255, .86);
  border-left: 0;
}

.research-wrapper.alt .research-text {
  border-right: 0;
  border-left: 0;
}

.research-image,
.research-carousel-track {
  background: linear-gradient(145deg, #fff 0%, var(--jhu-pale) 100%);
}

.research-carousel-control,
.highlighted-papers-reset,
.pub-year,
.pub-meta-row,
.pub-year-toggle,
.pub-links a {
  color: var(--jhu-blue);
}

.research-carousel-dots button {
  background: rgba(0, 45, 114, .25);
}

.research-carousel-dots button.active {
  background: var(--jhu-blue);
}

.highlighted-papers-section {
  padding: 0;
  border-top: 0;
  border-radius: 0;
  background: #fff;
}

.highlighted-papers-title {
  color: var(--jhu-blue);
}

.pub-filter-bar {
  background: #fff;
  border: 0;
  border-top: 1px solid #d7dde3;
  border-bottom: 1px solid #d7dde3;
  border-radius: 0;
  box-shadow: none;
}

.pub-year-toggle {
  border-color: rgba(0, 45, 114, .22);
  box-shadow: 0 2px 7px rgba(0, 45, 114, .08);
}

.pub-year-toggle::after {
  border-color: var(--jhu-blue);
}

.pub-year-filter.open .pub-year-toggle,
.pub-year-toggle:hover {
  background: var(--jhu-pale);
  border-color: rgba(0, 45, 114, .4);
}

.pub-year-option:hover,
.pub-year-option.active,
.pub-keywords span {
  color: var(--jhu-blue);
  background: var(--jhu-sky);
}

.pub-keywords span {
  border-color: rgba(0, 45, 114, .18);
}

.pub-item {
  border-color: #e1e6eb;
  border-left: 1px solid #e1e6eb;
  border-radius: 4px;
  box-shadow: none;
}

.pub-item:hover {
  border-color: #cfd8e1;
  box-shadow: 0 4px 12px rgba(15, 35, 60, .08);
}

.pub-load-more-btn {
  border-color: var(--jhu-spirit-blue);
  background: var(--jhu-spirit-blue);
  color: var(--jhu-blue-dark);
  box-shadow: none;
}

.pub-load-more-btn:hover {
  border-color: #4f9bd7;
  background: #5ca5df;
  color: var(--jhu-blue-dark);
}

@media (max-width: 700px) {
  .research-wrapper.alt .research-text,
  .research-text {
    border-right: 0;
    border-left: 0;
  }

  .highlighted-papers-section {
    padding: 0;
  }
}
