/* =========================================================
   Global layout
========================================================= */

main.content {
  max-width: 1120px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

body {
  font-size: 16px;
  line-height: 1.65;
  color: #222;
}

a {
  color: #2f4bb8;
}

/* =========================================================
   Homepage layout
========================================================= */

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  max-width: 1120px;
  margin: 28px auto 0 auto;
}

.sidebar {
  position: sticky;
  top: 36px;
  height: fit-content;
}

.profile-photo {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 18px;
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.8rem;
}

.sidebar .title {
  color: #444;
  margin-bottom: 10px;
}

.sidebar .keywords {
  color: #555;
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 16px;
}

.sidebar a {
  text-decoration: none;
  font-weight: 500;
}

.sidebar a:hover {
  text-decoration: underline;
}

.sidebar-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e5e5e5;
}

.sidebar-section h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.sidebar-section ul {
  padding-left: 18px;
  margin-top: 0;
}

.main {
  max-width: 720px;
}

.news-list {
  padding-left: 18px;
}

.news-list li {
  margin-bottom: 0.5rem;
}

/* =========================================================
   Research hero
========================================================= */

.research-hero {
  padding: 28px 34px 32px 34px;
  margin: 18px auto 42px auto;
  max-width: 1060px;
  background: linear-gradient(135deg, #f7f8fb 0%, #eef2f8 100%);
  border-radius: 22px;
  border: 1px solid #e1e5ee;
}

.research-hero h1 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 2.45rem;
  line-height: 1.15;
}

.hero-figure-full {
  margin: 8px auto 24px auto;
  max-width: 980px;
}

.hero-figure-full img {
  width: 100%;
  display: block;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.hero-text {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-text p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #2f3338;
}

.hero-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-tags span {
  background: #ffffff;
  border: 1px solid #e2e6f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
  color: #3a3f46;
}

/* =========================================================
   Selected research projects
========================================================= */

.project-grid {
  max-width: 980px;
  margin: 30px auto 72px auto;
}

.research-project {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.35fr);
  gap: 36px;
  align-items: center;
  margin: 44px auto 64px auto;
  padding-bottom: 50px;
  border-bottom: 1px solid #e5e7eb;
}

.research-project:last-child {
  border-bottom: none;
}

.research-project-figure img {
  display: block;
  width: 100%;
  max-width: 430px;
  margin: 0 auto 16px auto;
  padding: 8px;
  background: #f8fafc;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}

.research-project-text h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.55rem;
  line-height: 1.25;
  color: #1f2430;
}

.research-project-text p {
  font-size: 0.99rem;
  line-height: 1.68;
  color: #343a46;
}

.research-project-text strong {
  color: #1f2430;
}

.research-project-text a {
  font-weight: 500;
}

.figure-caption {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 16px;
}

.highlight-box {
  border-left: 4px solid #3b4cc0;
  background: #f7f8fb;
  padding: 12px 15px;
  margin: 20px 0;
  border-radius: 9px;
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 1050px) {
  .research-project {
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
    gap: 30px;
  }
}

@media (max-width: 800px) {
  .research-project {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 36px auto 52px auto;
    padding-bottom: 42px;
  }

  .research-project-figure img {
    max-width: 100%;
  }

  .research-project-text h3 {
    font-size: 1.38rem;
  }
}

@media (max-width: 700px) {
  main.content {
    max-width: 100%;
  }

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

  .sidebar {
    position: static;
  }

  .research-hero {
    padding: 24px 20px;
  }

  .research-hero h1 {
    font-size: 2.05rem;
  }
}

/* Wider Quarto content area without breaking centering */
body .page-columns {
  display: grid;
}

body .page-columns .content,
body main.content {
  max-width: 1120px !important;
  width: min(92vw, 1120px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  grid-column: 1 / -1 !important;
  justify-self: center !important;
}

/* Keep main sections centered */
.research-hero,
.project-grid {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   Impact page
========================================================= */

.impact-hero-map {
  position: relative;
  max-width: 980px;
  min-height: 330px;
  margin: 24px auto 42px auto;
  padding: 42px 46px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e1e5ee;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.80) 45%, rgba(255,255,255,0.30) 100%),
    url("images/map.jpg") center 70% / cover no-repeat;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
}

.impact-hero-content {
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.impact-hero-content h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 2rem;
  line-height: 1.15;
  color: #1f2430;
}

.impact-hero-content p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #343a46;
}

.impact-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.impact-hero-tags span {
  background: rgba(255,255,255,0.88);
  border: 1px solid #dfe5f0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
  color: #3a3f46;
}

.impact-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 900px;
  margin: 0 auto 44px auto;
}

.impact-card {
  border: 1px solid #e4e6eb;
  border-radius: 20px;
  background: #ffffff;
  padding: 24px 28px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.055);
}

.impact-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.42rem;
  line-height: 1.25;
  color: #1f2430;
}

.impact-card p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #343a46;
}

.impact-card-featured {
  max-width: 900px;
  margin: 0 auto 28px auto;
}

.impact-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 24px;
  align-items: center;
}

.impact-figure {
  margin: 10px auto 20px auto;
}

.impact-figure img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 6px auto 10px auto;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
}

.impact-figure-wide img {
  max-width: 680px;
}

.impact-highlight {
  border-left: 4px solid #3b4cc0;
  background: #f7f8fb;
  padding: 12px 15px;
  margin: 18px 0;
  border-radius: 9px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #2f3338;
}

.report-list {
  margin-top: 12px;
  padding: 14px 18px 4px 18px;
  background: #fafbfe;
  border: 1px solid #e8ebf2;
  border-radius: 14px;
  max-height: 390px;
  overflow-y: auto;
}

.report-list ol,
.report-list ul {
  margin-top: 0;
}

.report-list li,
.report-list p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3f4652;
}

.impact-summary {
  max-width: 760px;
  margin: 18px auto 70px auto;
  text-align: center;
  font-size: 1.02rem;
  color: #2f3338;
}

@media (max-width: 800px) {
  .impact-hero-map {
    min-height: auto;
    padding: 30px 24px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.86) 100%),
      url("images/map.jpg") center bottom / contain no-repeat;
  }

  .impact-hero-content h3 {
    font-size: 1.65rem;
  }

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

  .impact-card {
    padding: 22px 20px;
  }

  .impact-figure-wide img {
    max-width: 100%;
  }
}

/* =========================================================
   Teaching page
========================================================= */

.teaching-hero {
  max-width: 920px;
  margin: 26px auto 34px auto;
  padding: 48px 52px;
  border-radius: 26px;
  background: linear-gradient(135deg, #f7f8fb 0%, #eef2f8 100%);
  border: 1px solid #e1e5ee;
  text-align: center;
}

.teaching-hero h3 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 2.25rem;
  line-height: 1.15;
  color: #1f2430;
}

.teaching-hero p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.08rem;
  line-height: 1.75;
  color: #343a46;
}

.teaching-quotes {
  max-width: 820px;
  margin: 18px auto 48px auto;
  display: grid;
  gap: 24px;
}

.teaching-quote {
  position: relative;
  padding: 6px 36px;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.65;
  font-style: italic;
  color: #2f3338;
}

.teaching-quote-short {
  font-size: 1.25rem;
  font-weight: 500;
}

.teaching-quote::before {
  content: "“";
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 2.4rem;
  color: #3b4cc0;
  opacity: 0.18;
}

.teaching-quote::after {
  content: "”";
  position: absolute;
  right: 0;
  bottom: -14px;
  font-size: 2.4rem;
  color: #3b4cc0;
  opacity: 0.18;
}

.teaching-section {
  max-width: 900px;
  margin: 0 auto 54px auto;
}

.teaching-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.75rem;
  color: #1f2430;
  border-bottom: 1px solid #e4e6eb;
  padding-bottom: 10px;
}

.teaching-card {
  border: 1px solid #e4e6eb;
  border-radius: 20px;
  background: #ffffff;
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.055);
}

.teaching-card h4 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.28rem;
  color: #1f2430;
}

.teaching-card p {
  font-size: 0.99rem;
  line-height: 1.7;
  color: #343a46;
}

.teaching-card ul {
  margin-top: 12px;
}

.teaching-card li {
  margin-bottom: 6px;
}

.teaching-card strong {
  color: #222;
}

.teaching-closing {
  max-width: 760px;
  margin: 10px auto 72px auto;
  text-align: center;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #2f3338;
}

@media (max-width: 800px) {
  .teaching-hero {
    padding: 34px 24px;
  }

  .teaching-hero h3 {
    font-size: 1.75rem;
  }

  .teaching-quote {
    font-size: 1.18rem;
    padding: 6px 30px;
  }

  .teaching-quote-short {
    font-size: 1.35rem;
  }

  .teaching-card {
    padding: 22px 20px;
  }
}

/* =========================================================
   Beyond research photos
========================================================= */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 30px auto 60px auto;
}

.photo-grid img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  height: 260px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.photo-grid img:hover {
  transform: scale(1.02);
}

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

  .photo-grid img {
    height: auto;
  }
}