/* Project (case study) page — builds on styles.css + about.css */

/* Long-form reading: no section snapping, no sideways scroll from the big marks */
html:has(.page-project) { scroll-snap-type: none; }
.page-project { overflow-x: clip; }

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

.page-project .sec--intro { padding-top: 40px; }

/* Intro */
.lead--intro { max-width: 720px; }
.facts { display: flex; flex-direction: column; gap: 32px; margin-top: 40px; }
.facts dt { font-size: 24px; font-weight: 400; color: var(--black); }
.facts dd { margin-top: 12px; font-size: 16px; font-weight: 300; line-height: 1.5; color: var(--text); }

/* Intro photo under the facts: its height takes what is left of the first
   screen (header + section padding + intro text ≈ 64 + 80 + 400px) */
.intro-photo { margin: 40px 0 0; }
.intro-photo img {
  display: block; width: 100%; height: clamp(200px, calc(100svh - 64px - 80px - 400px), 480px);
  object-fit: cover; object-position: center 40%; border-radius: 12px; background: var(--media-bg);
}

/* Challenges / approach */
.lead + .points { margin-top: 36px; }
.points { display: flex; flex-direction: column; gap: 32px; }
.point h3 { font-size: 24px; font-weight: 400; line-height: 1.3; color: var(--black); }
.point p { margin-top: 12px; font-size: 16px; font-weight: 300; line-height: 1.5; color: var(--text); }

.canvas { margin: 40px 0 0; }
.canvas img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--media-bg); }
.canvas figcaption { margin-top: 14px; text-align: center; font-size: 14px; font-style: italic; font-weight: 300; color: var(--grey-1); }

/* Explore other works — lives inside <main> (row 2) so the sticky menu + Back
   stay pinned all the way to the bottom of the page. */
.page-project .about__side { grid-column: 1; grid-row: 1 / span 2; }
.page-project .about__content { grid-column: 2; grid-row: 1; }
.others {
  grid-column: 1 / -1; grid-row: 2;
  display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 60px; align-items: end;
}
.others__title { grid-column: 1; font-size: 32px; font-weight: 400; line-height: 1.2; color: var(--black); }
.others > .grid { grid-column: 2; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .page-project .about__side { grid-column: 1; grid-row: 1; }
  .page-project .about__content { grid-column: 1; grid-row: 2; }
  .others { grid-column: 1; grid-row: 3; }
  .others__title, .others > .grid { grid-column: 1; grid-row: auto; }
  .others { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .intro-photo img { height: clamp(200px, calc(100svh - 120px - 80px - 420px), 480px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  /* the About page's big avatar layout does not apply here */
  .page-project .sec--intro .sec__mark { font-size: clamp(64px, 11.5vw, 168px); top: 28px; }
  .page-project .sec--intro .sec__mark + * { margin-top: 64px; }

  .facts { gap: 24px; margin-top: 32px; }
  .intro-photo { margin-top: 32px; }
  .intro-photo img { height: auto; aspect-ratio: 1360 / 765; }
  .facts dt, .point h3 { font-size: 20px; }
  .facts dd, .point p { font-size: 15px; margin-top: 8px; }
  .points { gap: 24px; }
  .canvas { margin-top: 32px; }
  .others__title { font-size: 26px; }
}

/* ---------- EESaaS additions ---------- */
.lead--stack { display: flex; flex-direction: column; gap: 14px; }
/* Reflection: stakeholder feedback screenshots side by side */
/* columns in proportion to each screenshot's aspect ratio, so both end up the same height */
.feedbacks { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 2.786fr) minmax(0, 3.021fr); gap: 20px; align-items: center; }
.feedbacks img { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .feedbacks { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 24px; } }

/* Before / after comparisons */
.compare__tag { font-weight: 500; color: var(--text); }
/* EESaaS highlight features: From (left) | To (right), text under each image */
.feature--compare { grid-template-rows: auto auto; row-gap: 24px; column-gap: 32px; }
.compare__side { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
/* same box for both screenshots (sized by the taller one, --ar on the row), so the captions line up */
.compare__side img {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 2);
  object-fit: contain; object-position: left top; border-radius: 8px;
}
.compare__side figcaption { font-size: 16px; font-weight: 300; line-height: 1.5; color: var(--text); }
@media (max-width: 720px) {
  .feature--compare { row-gap: 18px; }
  .compare__side img { aspect-ratio: auto; }
  .compare__side figcaption { font-size: 15px; }
}


@media (max-width: 720px) {
}

/* Mobile: a two-line intro title (e.g. "/tutoring / reservation") needs room for its second line */
@media (max-width: 720px) {
  .page-project .sec--intro:has(.sec__mark br) .sec__mark + * { margin-top: calc(64px + clamp(64px, 11.5vw, 168px) * .86); }
}
