:root {
  --bg: #e2e2e2;
  --surface: #e2e2e2;
  --text: #3b3b3b;
  --muted: #4c4c4c;
  --accent: #4365e2;
  --accent-strong: #1e3fbc;
  --accent-soft: #e3e9ff;
  --danger: #f36365;
  --danger-strong: #c05239;
  --border: #dde3ea;
  --shadow: 0 18px 45px rgba(24, 39, 75, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 84px;
  color: var(--text);
  background: var(--bg);
  font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  margin: 0 auto;
  max-width: 1100px;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-link {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 10px;
}

.logo-link img {
  display: block;
  width: clamp(180px, 25vw, 320px);
  height: auto;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 8px;
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 999px;
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.menu-toggle span:not(.sr-only) + span:not(.sr-only) {
  margin-top: 6px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu {
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.menu a:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.menu a.active {
  color: #ffffff;
  background: var(--accent);
}

main {
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--bg);
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
  animation: fadeUp 0.65s ease;
}

main > * {
  width: min(1050px, 100%);
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeContent 0.55s ease forwards;
}

main > *:nth-child(1) {
  animation-delay: 0.04s;
}

main > *:nth-child(2) {
  animation-delay: 0.08s;
}

main > *:nth-child(3) {
  animation-delay: 0.12s;
}

main > *:nth-child(4) {
  animation-delay: 0.16s;
}

main > *:nth-child(5) {
  animation-delay: 0.2s;
}

main > *:nth-child(6) {
  animation-delay: 0.24s;
}

main > *:nth-child(7) {
  animation-delay: 0.28s;
}

main > *:nth-child(8) {
  animation-delay: 0.32s;
}

main > *:nth-child(9) {
  animation-delay: 0.36s;
}

main > *:nth-child(10) {
  animation-delay: 0.4s;
}

main > *:nth-child(11) {
  animation-delay: 0.44s;
}

main > *:nth-child(12) {
  animation-delay: 0.48s;
}

h1 {
  margin: 0 auto;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.01em;
}

.content-section > h1:first-child {
  padding-top: 4rem;
}

.content-section > h2.section-heading:first-child {
  padding-top: 2rem;
}

.content-section > h1:first-child + h2.section-heading {
  padding-top: 1rem;
}

main p {
  margin-top: 1rem;
  font-size: 1.07rem;
  color: var(--muted);
}

main li {
  font-size: 1.07rem;
  color: var(--muted);
  line-height: 1.5;
}

.section-heading {
  margin-top: 3rem;
}

.content-section {
  margin-top: 0;
  width: 100%;
  max-width: none;
  padding: 1rem 0 2rem;
  border-radius: 0;
}

.content-section > * {
  width: min(1050px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

main > .content-section:nth-of-type(odd) {
  background: #ececec;
  border: 0;
}

main > .content-section:nth-of-type(even) {
  background: #e8ecfb;
  border: 0;
}

main > .content-section + .content-section {
  margin-top: 0;
  border-top: 10px solid #ffffff;
}

.content-section .section-heading {
  margin-top: 0;
}

.aims-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

body.get-involved-page .get-involved-content {
  margin-top: 1.25rem;
}

body.get-involved-page .get-involved-block + .get-involved-block {
  margin-top: 1.5rem;
}

.aim-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.aim-icon {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  margin-bottom: 0.8rem;
}

.aim-icon svg {
  width: 1.85rem;
  height: 1.85rem;
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aim-card h2,
.aim-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.aim-card p {
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.funders-partners {
  margin-top: 0.5rem;
}

.funder-logos {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.funder-logos img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.partners-soon {
  margin-top: 1rem;
  font-weight: 500;
}

.project-team {
  margin-top: 0.5rem;
}

.team-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.team-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.team-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f5f5f5;
}

.team-card h3 {
  margin: 0.85rem 0 0;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--text);
}

.team-role {
  margin-top: 0.45rem;
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--muted);
}

.blog-list {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.blog-tools {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.blog-tool-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(260px, 100%);
}

.blog-tool-field-tags {
  min-width: min(360px, 100%);
}

.blog-tool-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #4d5464;
}

.blog-tool-input,
.blog-tool-select {
  width: 100%;
  padding: 0.52rem 0.62rem;
  border: 1px solid #c5ccda;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.blog-tool-input:focus,
.blog-tool-select:focus {
  outline: 2px solid #9cb0f4;
  outline-offset: 1px;
}

.blog-tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.blog-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.22rem;
  border-radius: 999px;
  border: 1px solid #cdd8ff;
  background: #f7f9ff;
  color: #2d4ab5;
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-tag-option input {
  accent-color: var(--accent);
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.25rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.blog-card[hidden] {
  display: none !important;
}

.blog-card-content {
  flex: 1;
  min-width: 0;
}

.blog-card-image {
  width: 220px;
  aspect-ratio: 1 / 1;
  height: auto;
  flex: 0 0 220px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f5f8ff;
  display: block;
  margin-bottom: 0;
}

.blog-meta {
  margin: 0;
  color: #5f6675;
  font-size: 0.95rem;
  font-weight: 600;
}

.blog-tags {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #cdd8ff;
  background: #f0f4ff;
  color: #2d4ab5;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.blog-card-title {
  margin: 0.55rem 0 0;
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  line-height: 1.25;
}

.blog-card-title a,
.blog-card-title a:visited {
  color: var(--accent-strong);
  text-decoration: none;
}

.blog-card-title a:hover,
.blog-card-title a:focus-visible {
  text-decoration: underline;
}

.blog-post {
  max-width: none;
}

.blog-post > * {
  width: min(1050px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.blog-post h1 {
  padding-top: 2.5rem;
}

.blog-post-image {
  width: 100%;
  max-width: 760px;
  display: block;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.image-carousel {
  margin: 1rem auto 0;
  width: min(520px, 50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.carousel-track {
  display: flex;
  transition: transform 0.28s ease;
  will-change: transform;
}

.carousel-image {
  width: 100%;
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.carousel-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #c2cbe2;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.carousel-breadcrumbs {
  width: min(520px, 50%);
  margin: 0.55rem auto 0;
  display: flex;
  justify-content: center;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #b9c7f5;
  background: #ffffff;
  padding: 0;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.blog-back {
  margin-top: 1rem;
}

.blog-back a,
.blog-back a:visited {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.blog-back a:hover,
.blog-back a:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.updates-empty {
  margin-top: 1rem;
}

.impact-coming-soon {
  margin-top: 0.75rem;
  color: #e26143;
  font-weight: 700;
}

@media (max-width: 760px) {
  .blog-card {
    flex-direction: column;
  }

  .blog-card-image {
    width: min(160px, 48%);
    flex: 0 0 auto;
  }

  .image-carousel {
    width: 100%;
  }

  .carousel-breadcrumbs {
    width: 100%;
  }
}

.aim-card:hover,
.aim-card:focus-within,
.team-card:hover,
.team-card:focus-within,
.funder-logos img:hover,
.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(24, 39, 75, 0.1);
  border-color: #c2cbe2;
}

.site-footer {
  margin-top: auto;
  text-align: center;
  padding: 1.4rem 1rem 1.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #ffffff;
  font-size: 0.95rem;
}

body.updates-page,
body.impact-page,
body.resources-page,
body.get-involved-page {
  min-height: 100dvh;
}

body.updates-page main,
body.impact-page main,
body.resources-page main,
body.get-involved-page main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body.updates-page main > .content-section,
body.impact-page main > .content-section,
body.resources-page main > .content-section,
body.get-involved-page main > .content-section {
  flex: 1;
}

body.updates-page .site-footer,
body.impact-page .site-footer,
body.resources-page .site-footer,
body.get-involved-page .site-footer {
  margin-top: 0;
}

.footer-text {
  margin: 0;
}

.footer-logos {
  margin-top: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.footer-logos img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

@keyframes fadeUp {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeContent {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 72px;
  }

  .header-inner {
    padding: 0.8rem 1rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    position: relative;
  }

  .logo-link img {
    width: min(230px, 66vw);
  }

  .menu-toggle {
    display: inline-block;
  }

  .menu {
    display: none;
    margin: 0;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.65rem 1rem 0.9rem;
    background: #ffffff;
    border-top: 1px solid var(--border);
    box-shadow: 0 14px 20px rgba(24, 39, 75, 0.08);
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .menu.open {
    display: flex;
  }

  .menu a {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-radius: 10px;
  }

  main {
    margin: 0;
    padding: 0;
  }

  .aims-grid {
    grid-template-columns: 1fr;
  }

  .aim-card,
  .team-card,
  .funder-logos img,
  .blog-card {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }

  .funder-logos {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 0.9rem 0 1rem;
  }

  body.updates-page .blog-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 980px) and (min-width: 641px) {
  .aims-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  main,
  main > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .aim-card,
  .team-card,
  .funder-logos img,
  .blog-card {
    transition: none;
  }
}
