/* Gong Lab — Yale branding */

.navbar-brand-container {
  margin-left: 0 !important;
  margin-right: 1rem !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand.navbar-brand-logo {
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand img,
.navbar-logo img {
  max-height: 40px;
  width: auto;
}

.navbar-brand:not(.navbar-brand-logo) {
  color: #ffffff !important;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand .navbar-title,
.navbar .navbar-brand .navbar-title,
.navbar[data-bs-theme="dark"] .navbar-brand .navbar-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  opacity: 1 !important;
}

.navbar-brand:hover,
.navbar-brand:hover .navbar-title {
  color: #ffffff !important;
  opacity: 1 !important;
}

h2 {
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--bs-primary);
}

h3 {
  margin-top: 1.5rem;
  color: var(--bs-primary);
}

.page-footer {
  font-size: 0.9rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  line-height: 1.6;
}

.nav-footer-center {
  text-align: center;
}

table {
  margin-top: 1rem;
}

hr {
  margin: 2rem 0;
  opacity: 0.2;
}

blockquote {
  border-left: 4px solid var(--bs-secondary);
  padding-left: 1rem;
  color: #555;
}

/* Home page */
.home-page {
  margin: 0 -1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body:has(.home-page) #title-block-header {
  display: none;
}

body:has(.home-page) main.content {
  padding-top: 0;
}

.home-page h2,
.home-page h3 {
  color: #00356B;
  border: none;
  margin-top: 0;
}

.home-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 53, 107, 0.92) 0%, rgba(0, 26, 51, 0.78) 45%, rgba(0, 53, 107, 0.55) 100%);
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: 4rem 2rem 4.5rem;
}

.home-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.home-headline {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: #fff !important;
  border: none;
}

.home-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 640px;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.home-btn-primary {
  background: #fff;
  color: #00356B !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.home-btn-primary:hover {
  color: #00356B !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.home-btn-secondary {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.home-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e8eef4;
  border-bottom: 1px solid #e8eef4;
}

.home-stat {
  background: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

.home-stat-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #00356B;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.home-stat-label {
  display: block;
  font-size: 0.9rem;
  color: #5a6570;
  line-height: 1.4;
}

.home-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.home-section-alt {
  background: #f7f9fc;
  max-width: none;
  padding-left: max(2rem, calc((100vw - 1200px) / 2));
  padding-right: max(2rem, calc((100vw - 1200px) / 2));
}

.home-section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.home-section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.home-section-header p {
  font-size: 1.1rem;
  color: #5a6570;
  margin: 0;
  line-height: 1.6;
}

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

.home-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(0, 53, 107, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 53, 107, 0.14);
  text-decoration: none;
  color: inherit;
}

.home-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.home-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.home-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #00356B;
}

.home-card-body p {
  font-size: 0.95rem;
  color: #5a6570;
  margin: 0;
  line-height: 1.5;
}

.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.home-split-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.home-split-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #3d4852;
  margin-bottom: 1.5rem;
}

.home-split-text a {
  color: #286DC0;
  font-weight: 600;
}

.home-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-highlights li {
  padding: 0.85rem 0;
  border-top: 1px solid #e0e6ed;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #3d4852;
}

.home-highlights li:last-child {
  border-bottom: 1px solid #e0e6ed;
}

.home-split-visual img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0, 53, 107, 0.12);
}

.home-affiliations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 2rem;
  background: #00356B;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.home-affiliations span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.home-affiliations a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
}

.home-affiliations a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-split {
    grid-template-columns: 1fr;
  }

  .home-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-hero {
    min-height: 65vh;
  }

  .home-hero-content {
    padding: 3rem 1.25rem 3.5rem;
  }

  .home-section {
    padding: 3rem 1.25rem;
  }

  .home-section-alt {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* People page */
.person-profile {
  margin: 1.5rem 0 2rem;
  align-items: start;
}

.person-profile h3 {
  margin-top: 0;
}

.person-photo {
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1;
  box-shadow: 0 2px 8px rgba(0, 53, 107, 0.15);
  max-width: 220px;
}

/* Projects page */
.project-profile {
  margin: 1.5rem 0 2.5rem;
  align-items: start;
}

.project-image {
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 53, 107, 0.12);
}

@media (max-width: 768px) {
  .person-photo {
    max-width: 220px;
    margin-bottom: 1rem;
  }
}

/* Funding page */
.funding-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  align-items: center;
  justify-items: center;
  margin: 2rem 0 3rem;
  padding: 0;
}

.funding-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: opacity 0.2s ease;
}

.funding-grid a:hover {
  opacity: 0.8;
}

.funding-grid img {
  display: block;
  max-height: 100px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 992px) {
  .funding-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .funding-grid {
    grid-template-columns: 1fr;
  }

  .funding-grid a {
    min-height: 110px;
  }
}
