/* Layouts used by the works, project, and about pages. */

.page-head {
  margin-bottom: 40px;
  text-align: center;
}

.page-head .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.page-head .page-title {
  margin-bottom: 16px;
}

.page-head .lede {
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Works ---------- */

.work-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.work {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  align-items: stretch;
  min-height: 460px;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.work__body {
  min-width: 0;
  padding: 34px 30px 34px 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.work__body h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.work__body p {
  margin-bottom: 26px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-sub);
}

.work__art {
  position: relative;
  min-width: 0;
  min-height: 460px;
  overflow: hidden;
}

/* ---------- Screenshot collages ---------- */

/* Two shots offset in a single grid cell so the inset stays even on all sides. */
.collage {
  position: absolute;
  inset: 26px;
  display: grid;
  grid-template: 1fr / 1fr;
}

.collage img {
  grid-area: 1 / 1;
  width: 80%;
  height: auto;
  border-radius: 14px;
}

.collage img:first-child {
  align-self: start;
  justify-self: start;
  transform: translate(11%, -12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  z-index: 1;
}

.collage img:last-child {
  align-self: end;
  justify-self: end;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  z-index: 2;
}

/* One shot centred over a cropped, dimmed background shot. */
.inset-shot {
  position: absolute;
  inset: 26px;
  border-radius: 16px;
  overflow: hidden;
}

.inset-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
}

.inset-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
}

.inset-shot__front {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: auto;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  z-index: 1;
}

/* Home page cards are smaller, so the collages tighten up. */
.project-card__art .collage {
  inset: 18px;
  transform: translateY(16px);
}

.project-card__art .collage img {
  width: 78%;
  border-radius: var(--radius-sm);
  transform: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.13);
}

.project-card__art .inset-shot {
  inset: 18px;
  border-radius: 14px;
}

.project-card__art .inset-shot__front {
  width: 72%;
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

/* ---------- Project detail ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.project-head {
  margin-bottom: 34px;
  text-align: center;
}

.project-head h1 {
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.project-head p {
  max-width: 720px;
  margin: 14px auto 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-sub);
}

.project-shots {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
}

.project-shots--split {
  grid-template-columns: 1fr 1fr;
}

.project-shots img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.project-shots--split img:first-child {
  grid-column: 1 / -1;
}

.project-shots--split img:last-child {
  align-self: start;
}

.project-body {
  display: grid;
  grid-template-columns: 0.34fr 1fr;
  gap: 56px;
  align-items: start;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 22px;
}

.project-meta dl {
  margin: 0;
}

.project-meta dt {
  font-size: 12px;
  color: var(--text-muted);
}

.project-meta dd {
  margin: 4px 0 0;
  margin-inline-start: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Pulled out by its own padding so the text lines up with the meta above it. */
.caveats {
  margin: 4px -22px 0;
  padding: 20px 22px;
  background: var(--card);
  border-radius: 20px;
}

.caveats h2 {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.caveats dl {
  margin: 0;
}

.caveats dt {
  font-size: 13.5px;
  font-weight: 600;
}

.caveats dd {
  margin: 3px 0 12px;
  margin-inline-start: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-sub);
}

.caveats dd:last-child {
  margin-bottom: 0;
}

.project-meta .button--accent {
  align-self: flex-start;
  margin-top: 6px;
  padding: 13px 22px;
  font-size: 15px;
}

.project-prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.project-prose p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-sub);
}

.project-prose h2 {
  margin: 10px 0 14px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tech-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-sub);
}

.tech-list strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- About ---------- */

/* Keeps the footer below the fold on a page this short. */
.page-main--about {
  min-height: 108vh;
}

.about {
  max-width: 760px;
  margin: 0 auto;
}

.about .eyebrow {
  display: block;
  margin-bottom: 22px;
  text-align: center;
}

.about__avatar {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.about h1 {
  margin-bottom: 28px;
  text-align: center;
}

.about p {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--text-sub);
}

.about p + p {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .project-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .work,
  .project-shots--split {
    grid-template-columns: 1fr;
  }

  .work__art {
    min-height: 340px;
  }

  .project-shots--split img:first-child {
    grid-column: auto;
  }
}
