.research-hero {
  position: relative;
  height: clamp(360px, 37.5vw, 650px);
  background: #000;
  color: #fff;
}

.research-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgb(0 0 0 / 58%) 118px, rgb(0 0 0 / 10%) 52%, rgb(0 0 0 / 44%) 73%),
    var(--hero-photo);
  background-size: cover;
  background-repeat: no-repeat;
}

.research-hero--publications::before {
  --hero-photo: url("assets/research/publications-proceedings.webp");
  background-position: 22% center;
  transform: scaleX(-1);
}

.research-hero--projects::before {
  --hero-photo: url("assets/research/projects-server-aisle.webp");
  background-position: 35% center;
}

.research-search-panel {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-end: 16.48%;
  width: clamp(360px, 44.4444%, 800px);
  transform: translateX(-50%);
  font-size: clamp(32px, 3.125vw, 48px);
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: -0.042em;
}

.research-search-panel h1 {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

.research-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  border-bottom: 2px solid currentColor;
  color: #fff;
}

.research-search input {
  width: 100%;
  min-width: 0;
  height: 1.09em;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  color-scheme: dark;
}

.research-search input::placeholder { color: inherit; opacity: 1; }
.research-search input:focus::placeholder { opacity: 0; }
.research-search:focus-within { box-shadow: 0 2px 0 currentColor; }

.research-search button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-content: center end;
  padding-inline-end: 4px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.research-search button:focus-visible,
.research-entry a:focus-visible,
.research-clear:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.research-hero [hidden],
.research-directory [hidden] { display: none !important; }

.research-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.research-directory {
  padding: clamp(56px, 6.18056vw, 104px) 25% 63px clamp(24px, 2.77778vw, 56px);
  background: #fff;
  color: #000;
}

.research-directory:focus { outline: none; }

.research-entries {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.research-entries > li {
  padding-bottom: 19px;
  border-bottom: 1px solid #dadada;
  scroll-margin-top: 24px;
}

.research-entry {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.research-copy {
  display: grid;
  gap: 7px;
  width: min(100%, 680px);
  min-width: 0;
}

.research-copy p,
.research-copy h2,
.research-notes p {
  margin: 0;
}

.research-type,
.research-venue {
  font-size: 13px;
  font-weight: 400;
  color: #555;
}

.research-type { line-height: 17px; }
.research-venue { line-height: 18px; }

.research-copy h2 {
  padding-bottom: 1px;
  font-size: 22px;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: -0.55px;
  text-wrap: wrap;
}

.research-entry h2 a { color: #000; text-decoration: none; }
.research-entry h2 a::after { position: absolute; inset: 0; content: ""; }
.research-entry h2 a:hover,
.research-entry h2 a:focus-visible { text-decoration: underline; text-underline-offset: 0.13em; }

.research-byline {
  color: #555;
  font-size: 16px;
  line-height: 21px;
}

.research-thumbnail {
  position: relative;
  flex: 0 0 80px;
  color: #000;
}

.research-thumbnail img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.research-caption {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  width: max-content;
  max-width: 230px;
  padding: 4px 7px;
  background: #191919;
  color: white;
  font-size: 12px;
  line-height: 16px;
  pointer-events: none;
  visibility: hidden;
}

.research-thumbnail:is(:hover, :focus) .research-caption { visibility: visible; }

.research-feedback {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.4;
}

.research-clear {
  border: 0;
  padding: 0;
  font: inherit;
  color: #333;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  background: none;
  cursor: pointer;
}

.research-notes {
  display: grid;
  gap: 6px;
  margin-top: 63px;
  margin-bottom: -9px;
  color: #555;
  font-size: 14px;
  line-height: 20px;
}

.research-notes p:first-child span + span { margin-inline-start: 1em; }

@media (max-width: 700px) {
  .research-search-panel {
    inset-inline: var(--gutter);
    width: auto;
    transform: none;
    font-size: clamp(26px, 8vw, 32px);
  }
  .research-search button { flex: 0 0 44px; }
  .research-directory { padding-inline: var(--gutter); }
  .research-entries { grid-template-columns: minmax(0, 1fr); }
  .research-entry { gap: 16px; }
}
