/* Research page specific styles */



/* Force Montserrat on this page */
.research-main, .research-main * {
  font-family: var(--font-montserrat) !important;
}

/* Only two weights used on this page */
.bold, .text-emphasis, .emphasis-big, .emphasis-small {
  font-weight: 700 !important;
}

.regular, .text, .text-small, .note {
  font-weight: 300 !important;
}

.research-container {
  display: flex;
  width: 100%;
  flex-direction: row;
  align-items: flex-start;
  gap: 60px;
  padding: 0;
}

.research-title {
  color: var(--color-text);
  font-family: var(--font-montserrat);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Left column (sticky sidebar) */
.research-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  width: 240px;
  position: sticky;
  top: 96px; /* align with right column top under fixed header */
  align-self: flex-start; /* Required for sticky to work in flex container */
  height: fit-content; /* Prevents overflow issues */
}

/* Right column (main content) */
.research-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  flex: 1 0 0;
}

/* Reduce gap between section-heading and filter tags */
.research-right .section-heading {
  margin-bottom: -24px; /* reduces 36px gap to 12px */
}

/* Filter tags line */
.filter-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: -24px; /* reduces 36px gap to 12px before publication section */
}

.filter-tag {
  display: flex;
  padding: 4px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 24px;
  border: 0.3px solid #4D5E81;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  color: #4D5E81;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  background: rgba(77, 94, 129, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.filter-tag.active {
  border-radius: 24px;
  border: 1px solid #4D5E81;
  background: rgba(77, 94, 129, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 700;
}

.sticky-card, .profile-card {
  display: flex;
  gap: 24px;
  border-radius: 24px;
  /* backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
}

.sticky-card p {
  color: var(--color-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.note-card {
  display: flex;
  padding: 24px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 24px;
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  background: rgba(77, 94, 129, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.profile-card {
  flex-direction: column;
  align-items: flex-start;
}

.profile-spec {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}

.profile-photo {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  background: #ffffff url('../../assets/images/projects/research/Profile.png') center/cover no-repeat;
}

.profile-name {
  font-size: 32px;
  font-style: normal;
  font-weight: 700; /* bold weight */
  line-height: normal;
  letter-spacing: 0.6spx;
}

.profile-role {
  text-align: justify;
  font-size: 16px;
  font-style: normal;
  font-weight: 300; /* regular weight */
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.1px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap:0px;
  margin: 4px 0px 8px 0px;
}

/* Left sidebar tag text style */
.profile-tags .tag {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--color-tietary, #868686);
  text-align: justify;
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 300; /* regular */
  line-height: 140%; /* 22.4px */
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons spec for Email/LinkedIn/Github */
.profile-actions .btn {
  border-radius: 24px;
  border: 0.3px solid #4D5E81;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  padding: 4px 12px;
  justify-content: center;
  align-items: center;
  width: max-content;
  text-align: center;
  gap: 10px;
  flex: 1 0 0;
  font-weight: 300; /* regular */
}

/* Right-column intro text styles */
.intro-block p {
  color: var(--Black-Primary, #1C1C1C);
  text-align: justify;
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 300; /* regular */
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.16px;
}

/* Emphasis styles per spec */
.highlight-primary {
  color: var(--Blue-1, #4D5E81);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 700; /* bold */
  line-height: 140%;
  letter-spacing: -0.16px;
}

.highlight-secondary {
  color: var(--Black-Primary, #1C1C1C);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 700; /* bold */
  line-height: 140%;
  letter-spacing: -0.16px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-heading h2 {
  color: var(--Blue-1, #4D5E81);
  font-family: 'Montserrat Alternates', 'Inter';
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.36px;
}

.section-heading small {
  color: var(--Black-Primary, #1C1C1C);
  text-align: justify;
  font-family: var(--font-montserrat);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 14px */
  letter-spacing: -0.1px;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Publication section */
.publication-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
}

.publication-card {
  display: flex;
  padding: 24px;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
  border-radius: 24px;
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(2px);
  transition: box-shadow 0.28s ease, background 0.28s ease;
}

.publication-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
  max-height: 240px; /* match media height to keep card height stable */
  min-height: 0; /* enable children to compute scrollable height */
}

.publication-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0; /* enable children to compute scrollable height */
}

.publication-heading {
  color: var(--Blue-1, #4D5E81);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.16px;
}

.publication-heading .title-long {
  font-weight: 500;
}

.publication-subtitle {
  color: var(--Black-Primary, #1C1C1C);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.16px;
}

.publication-subtitle strong {
  font-weight: 700;
}

.publication-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.publication-tags .tag.active {
  border-radius: 24px;
  border: 1px solid #4D5E81;
  background: rgba(77, 94, 129, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 700;
}

.publication-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.publication-media {
  height: 240px; /* per requirement */
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border-color: rgba(77, 94, 129, 0.30);
  border-width: 0.3px;
  border-style: solid;
  overflow: hidden;
  background: #f2f2f200;
  flex: 0 0 auto;
}

.publication-media img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
  align-self: center;
  align-content: center;
  align-items: center;
  background-color: #ffffff00;
}

/* Publication cards: grayscale default; color + shadow on hover */
.publication-section .publication-card .publication-media img {
  filter: grayscale(100%) saturate(0%) !important;
  -webkit-filter: grayscale(100%) saturate(0%) !important;
  transition: filter 0.35s ease, -webkit-filter 0.35s ease;
}

.publication-section .publication-card:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

.publication-section .publication-card:hover .publication-media img {
  filter: grayscale(0%) saturate(100%) !important;
  -webkit-filter: grayscale(0%) saturate(100%) !important;
}

/* Publication abstract toggle */
.publication-text .publication-abstract {
  display: none;
  padding: 12px;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
  color: var(--Black-Primary, #1C1C1C);
  font-family: var(--font-montserrat);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 16.8px */
  letter-spacing: -0.12px;
  border-radius: 12px;
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: auto; /* scroll if too long */
  margin-top: 12px; /* 12px gap to title */
  margin-bottom: 12px; /* 12px gap to actions */
  flex: 1 1 auto; /* take remaining vertical space */
  max-width: 100%;
  min-height: 0; /* allow flexbox to size correctly */
}

.publication-heading { cursor: pointer; }

/* Hover reveal removed; abstract shows only on click via class */

/* When showing abstract via class (legacy support) */
.publication-card.showing-abstract .publication-subtitle,
.publication-card.showing-abstract .publication-tags { display: none !important; }
.publication-card.showing-abstract .publication-text .publication-abstract { display: flex; }

/* Tag and generic button styles */
.tag,
.btn {
  display: flex;
  padding: 4px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 24px;
  border: 0.3px solid #4D5E81;
  font-size: 12px;
  color: #4D5E81;
  font-weight: 300; /* regular */
}

.tag {
  background: rgba(77, 94, 129, 0.05); /* primary style */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn {
  background: rgba(255, 255, 255, 0.10); /* secondary style */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Projects section (two columns, 12px gap) */
.projects-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-self: stretch;
  width: 100%;
}

/* Ensure research page project cards don't inherit homepage card shadows/hover */
.projects-section .project-card {
  box-shadow: none;
  transform: none;
  background: rgba(255, 255, 255, 0.10);
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  transition: box-shadow 0.28s ease, background 0.28s ease;
}

.project-card {
  display: flex;
  flex-direction: column; /* vertical layout: text then image at bottom */
  padding: 24px;
  align-items: flex-start;
  gap: 12px;
  flex: 1 0 0;
  border-radius: 24px;
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  background: rgba(255, 255, 255, 0.01); /* same as publication card */
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.project-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  flex: 1 1 auto;
}

/* Ensure project title row spans full width; title left, button right */
.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.project-heading {
  color: var(--Blue-1, #4D5E81);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 140%;
  letter-spacing: -0.16px;
}

.project-description,
.project-subtitle {
  color: var(--Black-Primary, #1C1C1C);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 140%;
  letter-spacing: -0.16px;
}

.project-media {
  width: 100%;
  height: 240px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #F2F2F2;
  flex: 0 0 auto;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project cards: grayscale by default; color + shadow on hover */
.projects-section .project-card .project-media img {
  filter: grayscale(100%) saturate(0%) !important;
  -webkit-filter: grayscale(100%) saturate(0%) !important;
  transition: filter 0.35s ease, -webkit-filter 0.35s ease;
}

.projects-section .project-card:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

.projects-section .project-card:hover .project-media img {
  filter: grayscale(0%) saturate(100%) !important;
  -webkit-filter: grayscale(0%) saturate(100%) !important;
}

/* Honors / Awards / Accreditation */
.honors-section {
  display: flex;
  padding: 24px;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
  border-radius: 24px;
  border: 0.3px solid rgba(77, 94, 129, 0.50);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.honors-list {
  display: grid;
  grid-template-columns: 90px 1fr; /* time | description */
  column-gap: 12px;
  row-gap: 12px;
  width: 100%;
}

.honor-time {
  color: var(--Black-Primary, #1C1C1C);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.16px;
  width: 90px;
}

.honor-desc {
  color: var(--Blue-1, #4D5E81);
  font-family: var(--font-montserrat);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 22.4px */
  letter-spacing: -0.16px;
}

.honor-desc strong {
  color: var(--Blue-1, #4D5E81);
  font-weight: 700;
}

/* Stack publication cards vertically to avoid overlap when width < 1400px */
@media (max-width: 1400px) {
  .publication-card { flex-direction: column; gap: 12px; }
  .publication-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px; /* 12px between text and actions */
    max-height: none; /* remove fixed height so content doesn't clip */
    flex: 0 0 auto; /* take natural height, don't overlap media */
    align-self: stretch;
    position: static;
  }
  .publication-text {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 12px between heading, abstract/subtitle, and tags */
  }
  .publication-text .publication-abstract { margin-top: 0; margin-bottom: 0; }
  .publication-media {
    width: 100%;
    min-width: 0;
    height: auto;
    flex: 0 0 auto; /* prevent shrinking/overlap */
    position: static;
  }
  /* Make profile card centered and same width as photo when stacked */
  .research-left { width: 100%; align-items: center; }
  .profile-card { width: 240px; margin: 0 auto; align-items: center; }
  .profile-spec { align-items: center; }
}

/* Responsive: stack to one column, keep 12px gaps; media full width */
@media (max-width: 992px) {
  .research-container {
    flex-direction: column;
  }
  .research-left {
    position: sticky;
    top: 70px; /* match reduced header clearance */
    width: 100%;
    align-items: center; /* center contents on smaller screens */
  }
  .profile-card {
    margin: 0 auto;
    align-items: center;
  }
  .publication-card {
    flex-direction: column;
  }
  .publication-content {
    display: flex; /* revert to flex stack on small screens */
    justify-content: flex-start; /* remove space-between on small screens */
    gap: 24px; /* gap between tags and buttons */
    max-height: none; /* allow natural growth on small screens */
  }
  .publication-text {
    display: flex; /* revert to flex on small screens */
    flex-direction: column;
    gap: 4px;
  }
  .publication-media {
    width: 100%;
    min-width: 0;
    height: auto;
  }
  .projects-section {
    grid-template-columns: 1fr;
  }
  .project-card {
    flex-direction: column;
  }
  .project-media {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .research-title {
    font-size: 28px;
  }
  .publication-heading {
    font-size: 16px;
  }
  .honors-list { grid-template-columns: 120px 1fr; }
}

@media (min-width: 1201px) {
  /* Fix the left column in place on desktop */
  .research-left {
    position: fixed;
    top: 96px;
    left: calc((100vw - 1440px) / 2 + 60px); /* container left edge on desktop */
    width: 240px;
    height: auto;
  }
  /* Push right column to account for fixed left column width + gap (60px) */
  .research-right {
    margin-left: calc(240px + 60px);
  }
}

/* When viewport <= 1440px but > 1200px, the container hugs sides with 60px padding */
@media (max-width: 1440px) and (min-width: 1201px) {
  .research-left { left: 60px; }
}


