@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

html,
body,
button,
input,
select,
textarea {
  font-family: 'Montserrat', sans-serif !important;
}

body {
  background: #ffffff;
  color: #20242a;
  font-weight: 400;
}

.top-nav {
  background: rgba(255,255,255,.97);
}

.site-shell,
.page-shell {
  max-width: 1580px;
}

.page-shell {
  padding: 48px 34px 72px;
}

.page-header {
  max-width: none;
  margin: 0 0 30px;
}

.page-header h1 {
  color: #111111;
  font-size: 2.7rem;
  font-weight: 600;
}

.page-content-card {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-content-card p,
.page-content-card li {
  font-weight: 400;
  line-height: 1.75;
}

.page-content-card h2 {
  color: #111111;
  border-bottom: 0;
  padding-bottom: 0;
  font-weight: 600;
}

.page-content-card h3 {
  color: #20242a;
  font-weight: 600;
}

/* Flatten legacy card-like elements across the site. */
.profile-card,
.content-card,
.page-content-card,
.quick-nav-box,
.callout-box,
.tool-card,
.research-grid-card,
.research-card,
.publication-entry {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.quick-nav-box,
.callout-box {
  background: #edf2f4;
}

/* Homepage */
.home-flat-shell {
  max-width: 1940px;
  margin: 0 auto;
  padding: 56px 34px 80px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.home-flat-profile {
  min-width: 0;
}

.home-flat-profile-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 0 24px;
  border-radius: 0;
}

.home-flat-name {
  margin: 0 0 18px;
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 600;
  color: #111111;
}

.home-flat-role-block,
.home-flat-affiliations {
  margin: 0 0 24px;
}

.home-flat-role-block p,
.home-flat-affiliations p,
.home-flat-contact {
  margin: 0 0 5px;
  line-height: 1.55;
  font-size: .95rem;
  font-weight: 400;
  color: #333333;
}

.home-flat-label,
.home-flat-role {
  font-weight: 600 !important;
  color: #111111 !important;
}

.home-flat-label {
  margin-bottom: 8px !important;
}

.home-flat-icons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.home-flat-icons a {
  border: 0;
  background: transparent;
  color: #2f4858;
  font-size: 1.15rem;
}

.home-flat-main {
  min-width: 0;
}

.home-flat-main > p:first-of-type {
  margin-top: 0;
  font-size: 1.08rem;
  line-height: 1.8;
}

.home-flat-main p,
.home-flat-main li {
  font-weight: 400;
  line-height: 1.75;
}

.home-flat-main h2 {
  margin: 46px 0 22px;
  border: 0;
  padding: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #111111;
}

.home-flat-main a {
  color: #1f5f7a;
}

.home-research-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin: 0 0 34px;
}

.home-research-item {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 32px;
  min-height: 220px;
  padding: 22px;
  background: #e5edf1;
}

.home-research-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f7f9fa;
}

.home-research-image {
  width: 100%;
  height: 100%;
  max-height: 190px;
  object-fit: contain;
}

.home-research-copy {
  padding: 20px 34px 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-research-copy h3 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 500;
  color: #000000;
}

.home-research-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* Research page: one wide flat section per area. */
.research-grid {
  grid-template-columns: 1fr !important;
  gap: 28px !important;
}

.research-grid-card {
  background: #e5edf1 !important;
  overflow: visible !important;
}

.research-grid-card-body {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  column-gap: 34px;
  row-gap: 12px;
  padding: 24px !important;
}

.research-grid-card-body > h2,
.research-grid-card-body > .research-grid-section,
.research-grid-card-body > .research-publications-link {
  grid-column: 2;
}

.research-grid-card-body > .research-grid-image {
  grid-column: 1;
  grid-row: 1 / span 8;
  margin: 0 !important;
  padding: 10px;
  background: #f7f9fa;
  border: 0 !important;
}

.research-grid-image img {
  height: auto !important;
  max-height: 260px;
  object-fit: contain !important;
}

/* Tools page: same horizontal section language. */
.tools-grid {
  grid-template-columns: 1fr !important;
  gap: 28px !important;
}

.tool-card {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 24px;
  background: #e5edf1 !important;
  overflow: visible !important;
}

.tool-card-image {
  padding: 10px;
  background: #f7f9fa !important;
  border: 0 !important;
}

.tool-card-image img {
  height: 220px !important;
  object-fit: contain !important;
}

.tool-card-body {
  padding: 8px 24px 8px 0 !important;
}

.tool-contributors {
  border-top: 1px solid #cfd9de !important;
}

/* Publications: retain filters, remove card treatment. */
.pub-filter-panel {
  background: #edf2f4 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 24px 26px !important;
}

.pub-year-toggle {
  border-radius: 0 !important;
  background: #e5edf1 !important;
}

.publication-entry {
  background: transparent !important;
  padding: 18px 4px 20px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid #d9e0e4 !important;
}

.publication-entry:last-child {
  border-bottom: 0 !important;
}

.pub-note {
  display: none !important;
}

@media (max-width: 900px) {
  .home-flat-shell {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 38px 22px 60px;
  }

  .home-flat-profile {
    max-width: 540px;
  }

  .research-grid-card-body,
  .tool-card {
    grid-template-columns: 1fr !important;
  }

  .research-grid-card-body > h2,
  .research-grid-card-body > .research-grid-section,
  .research-grid-card-body > .research-publications-link,
  .research-grid-card-body > .research-grid-image {
    grid-column: 1;
  }

  .research-grid-card-body > .research-grid-image {
    grid-row: auto;
  }

  .tool-card-body {
    padding: 4px 4px 8px !important;
  }
}

@media (max-width: 650px) {
  .page-shell {
    padding: 30px 18px 52px;
  }

  .page-header h1 {
    font-size: 2.1rem;
  }

  .home-research-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .home-research-copy {
    padding: 8px;
  }

  .home-research-copy h3 {
    font-size: 1.35rem;
  }
}
