:root {
  --bg: #faf7e2;
  --ink: #251544;
  --accent: #9d675b;
  --overlay: rgba(255, 0, 0, 0.18); /* very transparent red */
  --card-bg: #faf7e2;
  --border: #e6e0cf;
  --header-font: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  --content-font: "Roboto", system-ui, -apple-system, Segoe UI, Helvetica, Arial,
    sans-serif;
}
body {
  overflow-x: hidden;
  font-family: var(--content-font);
  color: var(--ink);
}
#research {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-top: 2px solid #ddd;
  padding: 4rem 6vw;
  align-items: center;
}

#research-top-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  text-align: center;
  margin-bottom: 3rem;
}
#research-top-content h2 {
  font-size: clamp(14px, 3.5vw, 35px);
  margin: 0 0 1rem;
  font-weight: 900;
  font-family: var(--header-font);
}
#research-top-content p {
  color: var(--ink);
  font-weight: 300;
  width: min(850px, 100%);
  font-size: clamp(14px, 1.3vw, 18px);
  margin: 0;
  line-height: 1.6;
}

/* Tabs - Unchanged as requested */
#research-cards {
  width: 100%;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.research-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.research-card .rc-img {
  position: relative;
}
.research-card .rc-img img {
  width: clamp(68px, 13vw, 200px);
  height: auto;
  display: block;
  border-radius: 8px;
}
.research-card p {
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 800;
  color: var(--accent);
  margin: 0;
}
.research-card.active .rc-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
  border-radius: 8px;
  pointer-events: none;
}
.research-card[role="tab"]:focus-visible {
  outline: 3px solid #b07;
  outline-offset: 4px;
  border-radius: 10px;
}

/* Papers list container */
#papers {
  width: 100%;
  margin-top: 3.5rem;
  display: grid;
  gap: 24px;
}

/* Paper row layout */
.paper {
  display: grid;
  /* Increased the thumbnail column width from 20% to 30% */
  grid-template-columns: 30% 1fr;
  gap: 24px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  align-items: center;
}

.paper__thumb {
  width: 100%;
  /* Increased the max-width to allow the thumbnail to become larger */
  max-width: 300px;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

/* Clickable text column */
.paper__textlink {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  height: 100%;
  gap: 10px;
}

.paper__title {
  font-size: clamp(14px, 1.6vw, 20px);
  margin: 0 0 6px;
  line-height: 1.3;
}
.paper__desc {
  margin: 0 0 8px;
  font-size: clamp(11px, 1.2vw, 15px);
  color: #3b2c5c;
  text-align: justify;
}
.paper__authors {
  margin: 0;
  font-size: clamp(12px, 1vw, 16px);
  color: #5a496f;
  padding-top: 2%;
}

/* Responsive: stack on small screens */
@media (max-width: 720px) {
  #research-top-content h2 {
    font-size: clamp(12px, 6vw, 30px);
  }
  .paper__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .research-card .rc-img img {
    width: clamp(50px, 8vw, 60px);
  }
  #research-top-content p {
    font-size: clamp(10px, 2vw, 20px);
  }
  .research-card p {
    font-size: clamp(10px, 1.2vw, 12px);
  }

  #research {
      padding: 2rem 4vw; 
  }
}
