/* Interactive research-map section.  This file is intentionally independent
   from the HTML5 UP template so the map can be removed without touching the
   rest of the site. */
#papers.research-map-section .inner {
  max-width: 96rem;
}

.research-map-intro {
  max-width: 66rem;
  margin: 0 auto 1.25rem auto;
  color: rgba(0, 0, 0, 0.70);
}

.research-map-layout {
  display: block;
  margin-top: 1rem;
}

.research-map-canvas-wrap {
  position: relative;
  min-height: 42rem;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 1.1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(102, 153, 255, 0.13), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(255, 187, 102, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,250,0.95));
}

#research-map-canvas {
  width: 100%;
  height: 42rem;
  display: block;
}

.research-map-bottom-panel {
  margin: 0.9rem auto 1rem auto;
  padding: 0.95rem 1.1rem;
  max-width: 72rem;
  min-height: 5rem;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  text-align: center;
}

.research-map-bottom-panel h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1.08rem;
}

.research-map-bottom-panel .paper-meta {
  margin: 0.3rem 0 0.55rem 0;
  color: rgba(0,0,0,0.65);
  font-size: 0.95rem;
}

.research-map-bottom-panel a.paper-link {
  display: inline-block;
  margin-top: 0.45rem;
}

.research-topic-badge,
.research-subject-badge {
  display: inline-block;
  margin: 0.15rem 0.2rem 0.15rem 0;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.035);
  font-size: 0.78rem;
  white-space: nowrap;
}

.research-subject-badge {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.055);
}

.research-map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 0.95rem auto;
}

.research-map-controls button,
.research-map-controls select,
.research-map-controls input {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  padding: 0.45rem 0.85rem;
  min-height: 2.4rem;
  font: inherit;
  box-shadow: none;
}

.research-map-controls button {
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.research-map-controls button:hover,
.research-map-controls button.is-active {
  background: #222;
  border-color: #222;
  color: #fff;
  transform: translateY(-1px);
}

.research-map-controls input {
  min-width: min(24rem, 92vw);
}

.research-map-status {
  min-height: 1.5rem;
  margin: 0.1rem auto 0.8rem auto;
  font-size: 0.92rem;
  color: rgba(0, 0, 0, 0.62);
}

.research-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.4rem 0 1.1rem 0;
  color: rgba(0, 0, 0, 0.62);
  font-size: 0.85rem;
}

.research-map-legend span::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: -0.05rem;
  background: #777;
}

.research-map-legend .legend-root::before { border-radius: 0.25rem; background: #222; }
.research-map-legend .legend-topic::before { background: #5b7bd5; }
.research-map-legend .legend-paper::before { background: #d58139; }

.publication-list-fallback {
  margin-top: 1.75rem;
  text-align: left;
}

.publication-list-fallback h2 {
  text-align: center;
  margin-top: 1.4rem;
}

.publication-list-fallback details {
  margin: 0.65rem 0;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.8);
  padding: 0.65rem 0.85rem;
}

.publication-list-fallback summary {
  cursor: pointer;
  font-weight: 600;
}

.research-node {
  cursor: pointer;
}

.research-node text {
  pointer-events: none;
  font-family: inherit;
}

.research-node.paper text {
  display: none;
}

.research-link {
  pointer-events: none;
}

@media screen and (max-width: 980px) {
  .research-map-canvas-wrap {
    min-height: 34rem;
  }
  #research-map-canvas {
    height: 34rem;
  }
}

@media screen and (max-width: 640px) {
  .research-map-controls {
    align-items: stretch;
  }
  .research-map-controls button,
  .research-map-controls select,
  .research-map-controls input {
    width: 100%;
  }
  .research-map-canvas-wrap {
    min-height: 32rem;
  }
  #research-map-canvas {
    height: 32rem;
  }
}

/* Full-width research map and dynamic home-page lists. */
#papers.research-map-section .inner {
  width: min(100%, calc(100vw - 3rem));
  max-width: none;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.research-map-canvas-wrap {
  width: 100%;
  min-height: clamp(38rem, 58vw, 54rem);
}

#research-map-canvas {
  width: 100%;
  height: clamp(38rem, 58vw, 54rem);
}

.dynamic-paper-list,
.dynamic-talk-list {
  margin: 1rem 0;
}

.dynamic-paper-item {
  margin-bottom: 1.05rem;
}

.dynamic-paper-item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.dynamic-paper-item p,
.dynamic-talk-list li {
  margin-bottom: 0.35rem;
}

@media screen and (min-width: 1280px) {
  #papers.research-map-section .inner {
    width: calc(100vw - 5rem);
  }
}

/* v4 layout polish. */
#papers.research-map-section.research-map-wide > .inner {
  width: min(100vw, 1720px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(1rem, 3vw, 3rem) !important;
  padding-right: clamp(1rem, 3vw, 3rem) !important;
  box-sizing: border-box;
}

#papers.research-map-section.research-map-wide .research-map-canvas-wrap {
  min-height: clamp(42rem, 54vw, 60rem);
}

#papers.research-map-section.research-map-wide #research-map-canvas {
  height: clamp(42rem, 54vw, 60rem);
}

.upcoming-talk-inline {
  margin-top: 1.25rem;
}

.upcoming-talk-inline h3 {
  margin-bottom: 0.6rem;
}

.talk-bubble-wrap {
  margin-top: 0.5rem;
}

.talk-bubble {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 1.15rem;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.talk-bubble:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.24);
  box-shadow: 0 0.75rem 1.8rem rgba(0, 0, 0, 0.085);
}

.talk-bubble span,
.talk-bubble strong {
  display: block;
}

.talk-bubble strong {
  margin: 0.15rem 0 0.25rem 0;
  color: rgba(0, 0, 0, 0.88);
}

.talk-bubble span {
  color: rgba(0, 0, 0, 0.62);
}

.talk-bubble-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: rgba(0, 0, 0, 0.52) !important;
}

.seminar-video iframe {
  max-width: 100%;
  border-radius: 1rem;
}

/* Full-width footer photo. */
.perfect-day-footer {
  width: min(100%, calc(100vw - 2rem));
  max-width: 118rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
}

.perfect-day-footer b {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
}

.perfect-day-footer img {
  display: block;
  width: 100%;
  height: clamp(24rem, 56vw, 56rem);
  object-fit: cover;
  object-position: center;
  border-radius: 1.1rem;
  box-shadow: 0 0.85rem 2.4rem rgba(0, 0, 0, 0.10);
}


/* Team gallery: crop every portrait to the same square frame as Ruiyang's image. */
#theteam.gallery.style1 article .image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

#theteam.gallery.style1 article .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#theteam.gallery.style1 article .caption {
  min-height: 100%;
}

@media screen and (max-width: 480px) {
  .perfect-day-footer {
    width: min(100%, calc(100vw - 1rem));
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .perfect-day-footer img {
    height: clamp(18rem, 78vw, 34rem);
  }
}

/* Student profile links */
.student-profile-link {
  color: inherit;
  border-bottom: none;
  text-decoration: none;
}

.student-profile-link:hover {
  border-bottom: none;
  text-decoration: underline;
}
