/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Styling */

:root {
  --c-pink: #f90c61;
  --c-black: #000000;
  --c-gray: #424241;
  --c-beige-dark: #e8e8d8;
  --c-beige: #f8f8ec;
  --c-beige-light: #fefef8;
  --c-white: #ffffff;
}

/* fonts */

@font-face {
  font-family: "CM_Serif";
  src: url("/static/fonts/cmunrm.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "CM_Serif";
  src: url("/static/fonts/cmunbx.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "CM_Serif";
  src: url("/static/fonts/cmunti.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "CM_Serif";
  src: url("/static/fonts/cmunbi.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "CM_Concrete";
  src: url("/static/fonts/cmunorm.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "CM_Serif_Slanted";
  src: url("/static/fonts/cmunsl.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

/* global */

html {
  overflow-x: hidden;
}

body {
  background-color: var(--c-beige-light);
  color: var(--c-black);
  font-family: "CM_Serif";
  width: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-weight: 500;
  font-size: 32px;
  line-height: 1.3;
}

h2 {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
}

h3 {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

body,
p {
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.3px;
}

p {
  text-align: justify;
  margin: 24px 0;
}

@media (min-width: 480px) {
  body,
  p {
    font-size: 16px;
  }
}

label,
.label {
  font-family: "CM_Concrete", Monaco, monospace;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 1px;
}

a {
  text-decoration: none;
  color: var(--c-pink);
}

.un {
  background-image: linear-gradient(var(--c-pink), var(--c-pink));
  background-size: 100% 1px;
  background-position: 0 calc(100% - 1.5px);
  background-repeat: no-repeat;
  transition: background-position 0.2s;
}

.un:hover,
a:hover .un {
  background-position: 0 100%;
}

footer .socials {
  display: flex;
  flex-direction: column;
}

.visuallyhidden {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* spacing */

.outer-container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.container {
  width: 100%;
  padding: 0 16px;
  max-width: 900px;
}

.small-container {
  max-width: 600px;
}

section {
  margin: 96px 0;
}

@media (min-width: 768px) {
  section {
    margin: 80px 0;
  }
}
@media (min-width: 768px) {
  .hero-cta {
    margin-top: 32px;
  }
}


.with-arrow::after {
  content: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.4517 8L4.94886 7.50142L7.91477 4.53977H0.5V3.82386H7.91477L4.94886 0.862216L5.4517 0.363636L9.26989 4.18182L5.4517 8Z' fill='black'/%3E%3C/svg%3E");
  display: inline-block;
  width: 12px;
  height: 16px;
  margin-left: 8px;
  transition: transform 0.3s;
}

.with-arrow:hover:after {
  transform: translateX(8px);
}

.with-arrow-pink::after {
  content: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.4517 8L4.94886 7.50142L7.91477 4.53977H0.5V3.82386H7.91477L4.94886 0.862216L5.4517 0.363636L9.26989 4.18182L5.4517 8Z' fill='%23F90C61'/%3E%3C/svg%3E");
}

.with-arrow-beige::after {
  content: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.4517 8L4.94886 7.50142L7.91477 4.53977H0.5V3.82386H7.91477L4.94886 0.862216L5.4517 0.363636L9.26989 4.18182L5.4517 8Z' fill='%23f8f8ec'/%3E%3C/svg%3E");
}

.with-arrow-down::after {
  content: url("data:image/svg+xml,%3Csvg width='8' height='9' viewBox='0 0 8 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 4.9517L0.49858 4.44886L3.46023 7.41477V0H4.17614L4.17614 7.41477L7.13778 4.44886L7.63636 4.9517L3.81818 8.76989L0 4.9517Z' fill='%23424241'/%3E%3C/svg%3E");
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 8px;
  transition: transform 0.3s;
}

/* Buttons – "Partner with us" (desktop + mobile) */
.mbtn.mbtn-primary {
  background-color: var(--c-pink);
  color: var(--c-beige);
}
/* Buttons - enlarge "Partner with us" on desktop */
.hero-cta .mbtn {
  padding: 12px 24px;
  font-size: 16px;
}

@media (max-width: 479px) {
  .mbtn {
    padding: 12px 16px;
    background-color: var(--c-beige);
    border-radius: 4px;
    display: inline-block;
  }

  .mbtn-fit {
    width: 100%;
    display: inline-flex;
    justify-content: center;
  }
}

/* header */

header {
  margin: 120px 0 80px;
}

.header__company-name,
.header__company-name h2 {
  font-family: "CM_Concrete";
  font-size: 20px;
  color: var(--c-black);
  text-decoration: none !important;
  font-style: normal;
  display: inline-block;
}
.header__company-name {
  display: inline-flex;
  align-items: center;
}

.header__logo {
  display: block;
  height: 24px;
  width: auto;
}

.header__company-name span {
  color: var(--c-pink);
}

header nav {
  margin-top: 20px;
  font-size: 14px;
  color: #333;
  display: flex;
  gap: 30px;
}

header nav a {
  color: #333;
}

header nav a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  header {
    display: flex;
    align-items: center;
  }

  header nav {
    margin-top: 0;
    margin-left: 40px;
  }
}

/* condense navigation on mobile */
@media (max-width: 767px) {
  header nav {
    flex-wrap: wrap;
    gap: 12px 16px;
    justify-content: flex-start;
  }
}

/* graphic */

.logo-graphic {
  position: absolute;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  top: 0;
  right: 0;
  width: 450px;
  height: 450px;
  z-index: -1;
}

.logo-graphic img {
  mix-blend-mode: multiply;
  opacity: 0.03;
  position: absolute;
  max-width: unset;
  width: 450px;
  height: 450px;
  top: -150px;
  right: -150px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .logo-graphic,
  .logo-graphic img {
    width: 720px;
    height: 720px;
  }
}

.logo-graphic__clip {
  position: absolute;
  top: 0;
  opacity: 0.3 !important;
}

/* footer */

footer {
  padding: 60px 0 120px;
  border-top: 1px solid var(--c-beige-dark);
  text-align: center;
}

.footer__easter-egg {
  position: relative;
  width: 240px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 60px auto 0;
}

.footer__easter-egg > * {
  position: absolute;
  visibility: hidden;
}

.footer__easter-egg p {
  font-style: italic;
  font-weight: 700;
  font-size: 12px;
  color: var(--c-gray);
  opacity: 0.5;
  text-align: center;
  max-width: 240px;
}

@media (min-width: 480px) {
  footer {
    padding: 40px 0 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .footer__easter-egg {
    margin: 0;
    justify-content: flex-end;
  }
  .footer__easter-egg p {
    text-align: right;
  }
}

/* team section on the homepage */

.team-avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, 60px);
  grid-gap: 8px;
  margin-top: 24px;
}

@media (min-width: 480px) {
  .team-avatars {
    grid-gap: 16px;
  }
}

.team-avatars img,
.team-avatars .skeleton {
  border-radius: 30px;
}

.team-avatars img {
  filter: grayscale(1);
  transition: all 0.3s ease-in-out;
}

.team-avatars img:hover {
  filter: grayscale(0);
}

/* team members on the team page */

.team-member {
  padding: 40px 0;
  border-top: 1px solid var(--c-beige-dark);
  display: flex;
}

/* mobile and desktop images */
.team-member img {
  object-fit: cover;
  mix-blend-mode: luminosity;
  border-radius: 4px;
}

.team-member__summary {
  display: flex;
  align-items: center;
}

.team-member__summary img,
.team-member__summary .skeleton {
  margin-right: 16px;
}

.team-member > img,
.team-member > .loading-container .skeleton {
  margin-right: 32px;
  display: none;
}

/* implicitly applying .un class to all links */

.team-member a {
  background-image: linear-gradient(var(--c-pink), var(--c-pink));
  background-size: 100% 1px;
  background-position: 0 calc(100% - 1.5px);
  background-repeat: no-repeat;
  transition: background-position 0.2s;
}

.team-member a:hover {
  background-position: 0 100%;
}

/* NEW helpers for Department filter– JS will add .left / .right on every render */
.team-member.left  { 
  flex-direction: row; }
.team-member.right { 
  flex-direction: row-reverse; }
.team-member.right > img,
.team-member.right > .loading-container .skeleton {
  margin-right: 0;
  margin-left: 32px;
}

@media (min-width: 660px) {
  .team-member {
    padding: 60px 0;
  }
  .team-member__summary img,
  .team-member__summary .skeleton {
    display: none;
  }
  .team-member > img,
  .team-member > .loading-container .skeleton {
    display: block;
  }
}

/* clients & grants */

.clients, .grants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
}

a.clients__card, a.grants__card {
  display: flex;
  height: 120px;
  justify-content: center;
  align-items: center;
  background-color: var(--c-beige);
  color: var(--c-gray);
  border-radius: 4px;
  -webkit-user-select: none;
  user-select: none;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.clients__card:hover,
.grants__card:hover {
  background-color: var(--c-pink);
  color: var(--c-white);
}

.clients__card svg,
.grants__card svg {
  width: 150px;
  max-width: 80%;
  mix-blend-mode: luminosity;
  opacity: 0.4;
}

.clients__card:hover svg,
.grants__card:hover svg {
  mix-blend-mode: none;
  opacity: 1;
}

/* client & grantor page */

.client__logo,
.grantor__logo {
  max-width: 180px;
  color: var(--c-gray);
  mix-blend-mode: luminosity;
}

/* next client & next grantor section */

.client__next-client,
.grantor__next-grantor {
  border-top: 1px solid var(--c-beige-dark);
  padding: 40px 0;
  text-align: center;
}

.client__next-client label,
.grantor__next-grantor label {
  display: block;
  margin-bottom: 8px;
}

.careers-link, .careers-link a {
  font-weight: 700;
  color: var(--c-pink);
}

.client__next-client a,
.grantor__next-grantor a {
  text-decoration: none;
  color: var(--c-black);
  font-style: normal;
  font-family: "CM_Serif";
  display: inline-block;
}

.client__next-client .with-arrow::after,
.grantor__next-grantor .with-arrow::after {
  top: -3px;
  position: relative;
}

@media (min-width: 480px) {
  .client__next-client,
  .grantor__next-grantor {
    text-align: left;
    padding: 40px 0 80px;
  }
}

/* findings */

.findings {
  border-radius: 4px;
}

a.finding {
  display: flex;
  align-items: center;
  background-color: var(--c-beige);
  padding: 16px;
  margin: 24px 0;
  font-size: 16px;
  text-decoration: none;
}

.finding__name {
  margin-right: 8px;
}

.finding__date {
  display: block;
  color: var(--c-black);
}

.finding__ext {
  margin-left: auto;
  color: var(--c-black);
  text-decoration: none !important;
  font-weight: 500;
  font-size: 14px;
  font-style: italic;
  flex-shrink: 0;
}

.finding .with-arrow-down:after,
.finding .with-arrow:after {
  transition: transform 0.3s;
}

.finding:hover .with-arrow-down:after {
  transform: translateY(4px);
}

.finding:hover .with-arrow:after {
  transform: translateX(4px);
}

@media (min-width: 480px) {
  .findings {
    background-color: var(--c-beige);
    padding: 8px 16px;
  }
  .findings > div {
    padding: 16px 0;
  }
  .findings p {
    margin: 24px 0 8px;
  }
  a.finding {
    padding: 16px 0;
    margin: 0;
    border-top: 1px solid var(--c-beige-dark);
  }
}

.team-avatars a,
.team-member {
  position: relative;
}

.loading-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* research */

.research {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 16px;
  width: 100%;
}

.paper__card {
  display: flex;
  padding: 15px;
  flex-direction: column;
  justify-content: flex-start;
  background-color: var(--c-beige);
  color: var(--c-gray);
  border-radius: 4px;
  gap: 6px;
}

.paper__card[hidden="true"] {
  display: none;
}

.paper__card h1 {
  font-size: 21px;
}

.paper__card h1:hover {
  cursor: pointer;
  text-decoration: underline;
}

.paper__card h2,
.paper__card h3 {
  font-size: 16px;
}

.paper__card .conference:hover,
.paper__card .authors span:hover {
  cursor: pointer;
  text-decoration: underline;
}

.paper__card .authors sup {
  font-size: 11px;
  /* font-style: italic; */
  -webkit-font-feature-settings: "sups" on;
  font-feature-settings: "sups" on;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.paper__card .authors sup:hover {
  text-decoration: underline;
}

.paper__card .tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 8px;
}

.paper__card .tags button {
  padding: 2px 5px;
  border-radius: 4px;
  box-shadow: none;
  border: none;
  cursor: pointer;
}

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

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

/* Research filters */

.research__filters {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  flex-wrap: wrap;
}

.research__filters p,
.research__filters .clear-all {
  font-size: 14px;
  font-style: italic;
}

.research__filters .filter {
  background-color: var(--c-beige);
  border-radius: 4px;
  padding: 9px 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.research__filters .filter .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  height: 188px;
  background: var(--c-beige);
  margin-top: 6px;
  border-radius: 4px;
  overflow-y: auto;
  padding: 6px 10px;
  z-index: 10;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.research__filters .filter .dropdown button {
  display: block;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  text-align: left;
  text-overflow: ellipsis;
  width: 100%;
  font-size: 14px;
}

.research__filters .filter .dropdown button:hover {
  text-decoration: underline;
}

.research__filters .filter .dropdown button.active {
  font-weight: bold;
}

.research__filters .value span {
  color: var(--c-beige-dark);
  background-color: var(--c-gray);
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  margin-right: 2px;
}

.research__filters .value i {
  margin-right: 5px;
  font-size: 14px;
}

.research__filters .value > *:last-child {
  margin-right: 0;
}

.research__filters button {
  appearance: none;
  border: none;
  box-shadow: none;
  background: none;
  cursor: pointer;
  padding: 0 2px;
}

.research__filters .filter button {
  height: 22px;
  font-size: 16px;
}

.research button,
.research__filters button {
  color: var(--c-black);
}

/* Blog */

.blog-post h1 {
  margin-bottom: 40px;
}

.blog-post__authors {
  display: flex;
  align-items: center;
  gap: 20px;
}

.blog-post .footnotes {
  margin-top: 24px;
}

.blog-figure {
  margin-bottom: 50px;
}

.blog-figure:last-child {
  margin-bottom: 0;
}

.blog-figure figcaption {
  font-size: 26px;
  color: var(--c-black);
}

.blog-figure p {
  margin: 0;
  color: var(--c-gray);
}

.blog-figure p a {
  color: var(--c-black);
}

.blog-figure p a:hover {
  text-decoration: underline;
}

.blog-figure small {
  color: var(--c-gray);
  opacity: 0.8;
  font-style: italic;
}

/* Bridges page */

.bridges-quotes {
  position: relative;
  margin: 0 10px;
}

.bridges-quotes p:first-child::first-letter {
  -webkit-initial-letter: 2;
  initial-letter: 2;
  margin-right: 0.75em;
}

.bridges-quotes:before,
.bridges-quotes:after {
  font-family: "Times New Roman";
  font-size: 40px;
  position: absolute;
}

.bridges-quotes:before {
  content: "“";
  left: -15px;
  top: -20px;
}

.bridges-quotes:after {
  content: "”";
  right: -15px;
  bottom: -40px;
}

@media (min-width: 1100px) {
  .bridges-quotes {
    margin: 0 10px;
  }

  .bridges-quotes:before,
  .bridges-quotes:after {
    font-size: 68px;
  }

  .bridges-quotes:before {
    left: -30px;
    top: -40px;
  }

  .bridges-quotes:after {
    right: -28px;
    bottom: -60px;
  }
}

/* Careers Page Styles */
.openings-list {
    margin: 2rem 0;
}

.opening-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.opening-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.opening-content h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.opening-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.opening-details span {
    font-size: 0.9rem;
    color: #666;
}

.opening-description {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Perks Section */
.perks-section {
    margin: 4rem 0;
}

.perks-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.perk {
    text-align: center;
    padding: 1.5rem;
}

.perk h4 {
    margin: 1rem 0;
    color: #333;
}

.perk p {
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .opening-card {
        padding: 1.5rem;
    }
    
    .perks-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Podcast page */
.podcast {
	margin: 2rem auto;
	background: var(--c-white);
	padding: 4rem 5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.podcast-header {
	text-align: center;
	margin-bottom: 2rem;
}
.podcast-links {
	display: flex;
	justify-content: center;
	gap: 1rem;
	font-size: 0.95rem;
}
.podcast-links a {
	text-decoration: none;
	color: var(--c-text-primary);
	padding: 0 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.podcast-links img {
	height: 1.2em;
}
.podcast-authors {
	text-align: center;
	margin-top: 2rem;
}
.podcast-affiliations {
	text-align: center;
	margin-top: 1rem;
	font-size: 0.85rem;
	color: #666;
}
.podcast-section {
	margin-top: 1.5rem;
}
.podcast-section h2 {
	margin-bottom: 0.5rem;
}
.podcast-episode {
	margin-top: 1rem;
}
.podcast-episode h3 {
	margin-bottom: 0.25rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.podcast-episode h3 img {
	height: 0.9em;
}

/* decrease padding for the podcast page on mobile */
@media (max-width: 768px) {
	.podcast {
		padding: 2rem 1.5rem;
		margin: 1rem auto;
	}
}
