:root {
  --ink-900: #071d2d;
  --ink-700: #26465c;
  --ink-500: #44697f;
  --sand-100: #f4f2eb;
  --sand-50: #fbfaf7;
  --sea-500: #1f9b8f;
  --sea-700: #14756d;
  --sun-400: #e7bb62;
  --white: #ffffff;
  --card-shadow: 0 12px 26px rgba(7, 29, 45, 0.12);
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-900);
  background:
    radial-gradient(1200px 520px at 90% -10%, rgba(31, 155, 143, 0.12), transparent 55%),
    radial-gradient(900px 500px at -8% 10%, rgba(231, 187, 98, 0.18), transparent 52%),
    linear-gradient(180deg, #fefdf9 0%, #f8f6f0 100%);
  font-family: "Avenir Next", Avenir, "Trebuchet MS", "Gill Sans", sans-serif;
  min-height: 100vh;
  line-height: 1.55;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: rgba(7, 29, 45, 0.9);
  backdrop-filter: blur(5px);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(7, 29, 45, 0.2);
}

.nav-logo {
  display: block;
  height: 42px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero {
  position: relative;
  min-height: 70vh;
  padding: 80px 24px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(7, 29, 45, 0.82) 0%, rgba(7, 29, 45, 0.5) 45%, rgba(7, 29, 45, 0.24) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  color: var(--white);
  animation: rise-in 0.8s ease;
}

.hero-kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  max-width: 760px;
}

.hero p {
  margin: 0;
  font-size: clamp(16px, 2vw, 21px);
  max-width: 720px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--sea-500);
  color: var(--white);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

.page-main {
  flex: 1;
}

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 58px 24px;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-subtitle {
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--ink-700);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.surface-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 22px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publication-topic-nav {
  justify-content: center;
  margin-bottom: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(31, 155, 143, 0.14);
  color: var(--sea-700);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(20, 117, 109, 0.18);
  box-shadow: 0 2px 10px rgba(15, 95, 88, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pill-button {
  cursor: pointer;
}

.pill-button:hover,
.pill-button:focus-visible {
  background: var(--sea-500);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(31, 155, 143, 0.2);
  transform: translateY(-1px);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 20px;
}

.card h3,
.card h4 {
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--ink-700);
}

.card + .card {
  margin-top: 14px;
}

.featured-project {
  border-top: 5px solid var(--sea-500);
}

.muted {
  color: var(--ink-500);
}

.divider-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 42px 0 22px;
  font-size: 28px;
}

.divider-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(38, 70, 92, 0.35);
}

.publication-section {
  scroll-margin-top: 90px;
}

.publication-list {
  display: grid;
  gap: 12px;
}

.publication-item {
  background: var(--white);
  box-shadow: var(--card-shadow);
  border-radius: 12px;
  padding: 16px;
}

.publication-description {
  margin: 0 0 8px;
  color: var(--ink-700);
  font-weight: 600;
}

.publication-citation {
  margin: 0;
  color: var(--ink-700);
}

.publication-actions {
  margin-top: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--card-shadow);
  aspect-ratio: 4 / 3;
}

.gallery-photo-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-section + .gallery-section {
  margin-top: 34px;
}

.team-group {
  margin-top: 30px;
}

.team-group h3 {
  margin-bottom: 12px;
}

.team-person {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
}

.team-image {
  width: 110px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 14px;
  display: block;
  flex-shrink: 0;
}

.team-image-link {
  display: block;
  width: 110px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: zoom-in;
}

.image-lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  color: var(--white);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox::backdrop {
  background: rgba(7, 29, 45, 0.86);
  backdrop-filter: blur(4px);
}

.image-lightbox-panel {
  width: fit-content;
  height: fit-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  border-radius: 22px;
  background: rgba(7, 29, 45, 0.08);
  box-shadow: 0 22px 54px rgba(7, 29, 45, 0.32);
  padding: 56px 72px 24px;
  box-sizing: border-box;
}

.image-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 140px);
  object-fit: contain;
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-900);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(7, 29, 45, 0.26);
  z-index: 1;
}

.image-lightbox-nav-prev {
  left: 16px;
}

.image-lightbox-nav-next {
  right: 16px;
}

.site-footer {
  margin-top: auto;
  background: var(--ink-900);
  color: var(--white);
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 24px;
}

.footer-title {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 24px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  align-items: center;
}

.partner-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.partner-logo {
  max-width: 100%;
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-nav {
    padding: 12px;
  }

  .nav-logo {
    height: 32px;
  }

  .nav-brand {
    padding: 5px 10px;
  }

  .hero {
    min-height: 58vh;
    padding: 56px 18px;
  }

  .section {
    padding: 44px 18px;
  }

  .grid-2,
  .grid-3,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .team-image {
    width: min(220px, 100%);
  }
}
/* ------------------------------------------------------------------
   SLOSH Projects page: featured images, project rows, and responsive layout.
   Scoped to project-specific classes to avoid changing other pages.
   ------------------------------------------------------------------ */

/* Give project section headings clear separation from the preceding cards.
   This overrides the generic .section h2 margin-top reset. */
.projects-page h2.divider-title {
  margin: 42px 0 22px;
}

/* Prevent the shared .card + .card rule from stair-stepping grid cards. */
.projects-featured-grid .card + .card,
.projects-list-grid .card + .card {
  margin-top: 0;
}

.projects-featured-grid .featured-project {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Featured project photo directly below the title. */
.project-feature-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 2px 0 14px;
}

/* Shared project metadata and action spacing. */
.card .project-team {
  margin-top: 10px;
}

.project-actions {
  margin-top: 12px;
}

.featured-project .project-actions {
  margin-top: auto;
  padding-top: 14px;
}

/* Archive cards are full-width unless a photo has been provided. */
.project-list-card {
  min-width: 0;
}

.project-list-card.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 24px;
}

.project-list-body {
  min-width: 0;
}

/* Compact right-side image for Current and Former projects. */
.project-list-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 680px) {
  .project-list-card.has-photo {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-list-image {
    aspect-ratio: 16 / 9;
    max-height: 260px;
  }
}

/* ------------------------------------------------------------------
   Homepage Current Priorities cards: inline photos.
   ------------------------------------------------------------------ */

.priority-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 12px 0 14px;
}
