/* ========================================================================
   Project list (home page) — 2-column grid with cover images on top.
   Matches the Brandon Lee work layout: image first, then title, tags,
   summary, and a pill-revealed "VIEW PROJECT" on hover.
   ======================================================================== */
#projects {
  padding: 40px 0 100px;
}

/* Standalone projects.html — big section heading under the
   "Projects" label, mirroring .papers_heading in css/papers.css. */
#projects .projects_heading {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 40px;
  max-width: 820px;
}

#projects .projects_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 80px;
  row-gap: 80px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#projects .project_row {
  padding: 0;
}

#projects .project_link {
  display: block;
  color: var(--text);
  border-bottom: none;
  position: relative;
}

/* Cover image — sits on a soft colored panel, fills the card width */
#projects .project_cover {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 28px;
  padding: 40px 24px;
  background: #f0eee8;
  border-radius: 6px;
  overflow: hidden;
}

#projects .project_cover img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease;
}

#projects .project_link:hover .project_cover img {
  transform: translateY(-3px);
}

#projects .project_title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
  display: block;
  line-height: 1.15;
  transition: transform 0.25s ease;
}

#projects .project_link:hover .project_title {
  transform: translateX(4px);
}

#projects .project_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

#projects .project_tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

#projects .project_summary {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 460px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#projects .projects_empty {
  font-size: 15px;
  color: var(--muted);
  padding: 40px 0;
}

@media (max-width: 820px) {
  #projects .projects_list {
    grid-template-columns: 1fr;
    row-gap: 56px;
  }
  #projects .project_title {
    font-size: 26px;
  }
  #projects .project_cover {
    padding: 28px 18px;
  }
}

/* ========================================================================
   Case-study page styles
   ======================================================================== */

/* Case-study pages — content is constrained, hero is full-bleed */
.case_study_page main {
  max-width: 1100px;
}

.case_study {
  padding: 40px 0 120px;
}

.case_study_back {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: inline-block;
  margin: 0 0 56px;
  border-bottom: 1px solid transparent;
}

.case_study_back:hover {
  border-bottom-color: var(--text);
  color: var(--text);
}

.case_study_title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 24px;
  max-width: 820px;
}

/* Pill-shaped meta tags */
.case_study_tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 80px;
}

.case_study_tag {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text);
  background: transparent;
}

/* Hero — full-bleed colored panel. Uses a wrapper that breaks out of
   main's max-width so the background runs to the viewport edges. */
.case_study_hero_panel {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 80px;
  padding: 100px 48px;
  background: #d8ebf7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case_study_cover {
  display: block;
  width: 100%;
  max-width: 1040px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.18);
}

/* Body — main text */
.case_study_body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  max-width: 720px;
}

.case_study_body p {
  margin: 0 0 26px;
}

/* Section sub-headers within the body */
.case_study_section {
  margin: 80px 0;
}

.case_study_section_label {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 20px;
}

.case_study_section_heading {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0 0 20px;
  max-width: 760px;
}

/* Highlight cards (3-column) */
.case_study_highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 32px 0 0;
}

.case_study_highlight_card {
  background: var(--card-bg, #f6f5f1);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 26px;
}

.case_study_highlight_num {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #6b8af0;
  display: inline-block;
  margin-right: 6px;
}

.case_study_highlight_title {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.case_study_highlight_body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 14px 0 0;
  opacity: 0.85;
}

@media (min-width: 720px) {
  .case_study_highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Callout box */
.case_study_callout {
  margin: 60px 0;
  padding: 32px 36px;
  background: #e8eef9;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.case_study_callout_emoji {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.case_study_callout_text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.2px;
}

/* In-body images */
.case_study_image_figure {
  margin: 64px 0;
}

.case_study_image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.case_study_caption {
  margin: 14px 0 0;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* Footer actions */
.case_study_actions {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Pill-style buttons rendered from `actions` / `reportUrl` etc. */
.case_study_btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--text);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.case_study_btn:hover {
  background: var(--text);
  color: var(--bg, #f6f5f1);
  transform: translateY(-1px);
}

/* Primary variant — solid filled, used for the main call-to-action
   like "Download Report" or "View Case Study". */
.case_study_btn_primary {
  background: var(--text);
  color: var(--bg, #f6f5f1);
}

.case_study_btn_primary:hover {
  background: transparent;
  color: var(--text);
}
