/* Research layout. Shared palette and typography are in site.css. */
.research-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding-bottom: 3rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--home-secondary);
}

.research-page h1,
.research-page h2,
.research-page h3,
.research-page h4,
.research-page p {
  margin: 0;
}

.research-page h1,
.research-page h2 {
  font-family: Lora, Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--home-text);
  border: 0;
  padding: 0;
}

.research-page h1 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.research-page h2 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.research-page h3,
.research-page h4 {
  font-family: Inter, sans-serif;
  font-weight: 600;
  line-height: 1.5;
  color: var(--home-text);
}

.research-page h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.research-page h4 {
  font-size: 0.875rem;
}

.research-page strong {
  font-weight: 600;
}

.research-page a {
  color: var(--home-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.research-page a:hover {
  color: #6d4630;
  border-bottom-color: currentColor;
}

.research-page a:focus-visible {
  outline: 2px solid var(--home-link);
  outline-offset: 4px;
}

.research-index {
  position: sticky;
  top: 7rem;
}

.research-index nav {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.research-direction {
  scroll-margin-top: 7rem;
}

.research-direction + .research-direction {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--home-rule);
}

.research-page .research-question {
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--home-text);
}

.research-method {
  margin-top: 1.5rem;
}

.research-projects {
  margin-top: 1.5rem;
}

.research-page .project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.project-list li + li {
  margin-top: 0.875rem;
}

.project-list h4 {
  margin-bottom: 0.15rem;
}

.paper-link {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
}

.project-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

.project-group > h4 {
  margin-bottom: 0.6rem;
}

.project-name {
  font-weight: 500;
}

.research-page .research-foundations {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

@media (max-width: 900px) {
  .research-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .research-index {
    position: static;
  }

  .research-index nav {
    margin-bottom: 0.875rem;
  }
}

@media (max-width: 600px) {
  .project-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

.research-page .stack-explanation {
  margin-top: 1rem;
}
