/* ============================================
   PROJECT PAGES v3
   Values come from the approved Paper mockups in "Portfolio v3"
   (Project – Eloquii and the other Project – * artboards, 1440 wide,
   1032 content column). Pages are generated from Paper by
   tools/portfolio-assets/build-project-pages.py.
   Loaded after styles.css and scoped to body.pp. Uses !important where
   styles.css forces weights and colors on body *.
   One breakpoint: 800px (SKILL.md).
   ============================================ */

body.pp {
  background: #FFFFFF !important;
  color: #151515 !important;
}

.pp .top-bar {
  max-width: 1096px !important;
  margin: 0 auto !important;
}

.pp .pp-main {
  max-width: 1096px;
  margin: 0 auto;
  padding: 0 32px 120px;
}

/* Layout boxes: gap and padding come from Paper through custom properties,
   so the mobile breakpoint can scale them down. Custom properties inherit,
   so every box resets them; a box's own inline values win over this rule. */
.pp .pp-col,
.pp .pp-row,
.pp .pp-img,
.pp .pp-next {
  --gap: 0px;
  --pt: 0px;
  --pr: 0px;
  --pb: 0px;
  --pl: 0px;
  --w: 100%;
}

.pp .pp-col,
.pp .pp-row {
  display: flex;
  box-sizing: border-box;
  gap: var(--gap, 0px);
  padding: var(--pt, 0px) var(--pr, 0px) var(--pb, 0px) var(--pl, 0px);
}

.pp .pp-col { flex-direction: column; }
.pp .pp-row { flex-direction: row; }

.pp .pp-panel {
  background-color: #F0F0F0;
  border-radius: 6px;
}

.pp figure { margin: 0; }

.pp .pp-img {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  background-color: #E3E3E3;
  cursor: zoom-in;
}

.pp .pp-img--fill { object-fit: fill; }

/* Type ------------------------------------------------------------------ */

.pp .pp-title {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 47px !important;
  line-height: 54px !important;
  letter-spacing: -0.055em !important;
  font-weight: 400 !important;
}

.pp .pp-muted { color: #8B8B8B !important; }

.pp .pp-label {
  margin: 0 !important;
  color: #8E8E8E !important;
  font-size: 12px !important;
  line-height: 14px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  font-weight: 600 !important;
}

.pp .pp-value {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 16px !important;
  line-height: 21px !important;
  letter-spacing: -0.02em !important;
  font-weight: 500 !important;
}

.pp a.pp-value { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pp a.pp-value:hover { color: #8E8E8E !important; }

.pp .pp-lede {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 25px !important;
  line-height: 34px !important;
  letter-spacing: -0.04em !important;
  font-weight: 400 !important;
}

.pp .pp-h2 {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 25px !important;
  line-height: 30px !important;
  letter-spacing: -0.05em !important;
  font-weight: 400 !important;
}

.pp .pp-body {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 18px !important;
  line-height: 26px !important;
  letter-spacing: -0.02em !important;
  font-weight: 400 !important;
}

.pp .pp-cap {
  margin: 0 !important;
  color: #8E8E8E !important;
  font-size: 14px !important;
  line-height: 18px !important;
  letter-spacing: -0.01em !important;
  font-weight: 400 !important;
}

/* Text styles that only appear on one page keep Paper's values inline;
   these classes only win the weight back from styles.css. */
.pp .pp-text { margin: 0 !important; }
.pp .pp-w4, .pp .pp-w4 * { font-weight: 400 !important; }
.pp .pp-w5, .pp .pp-w5 * { font-weight: 500 !important; }
.pp .pp-w6, .pp .pp-w6 * { font-weight: 600 !important; }

/* TL;DR ------------------------------------------------------------------ */
/* A label on a hairline, over a lightly outlined full-width box, right under
   "The story" (the section's 56px gap sits above and below it). */

.pp .pp-tldr {
  padding: 20px 24px 22px;
  border-radius: 10px;
  background: #EEF7EF;
}

.pp .pp-tldr__label {
  margin: 0 0 8px !important;
  color: #6E6E6E !important;
  font-size: 12px !important;
  line-height: 16px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  font-weight: 600 !important;
}

.pp .pp-tldr__text {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 18px !important;
  line-height: 26px !important;
  letter-spacing: -0.02em !important;
  font-weight: 500 !important;
}

@media (max-width: 799px) {
  .pp .pp-tldr { padding: 18px 18px 16px; }
  .pp .pp-tldr__text { font-size: 16px !important; line-height: 23px !important; }
}

/* Next project ------------------------------------------------------------ */

.pp .pp-next {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  color: #151515 !important;
  text-decoration: none !important;
}

.pp .pp-next__copy { display: flex; flex-direction: column; gap: 10px; }

.pp .pp-next .pp-h2 .pp-muted { transition: color 0.15s ease; }

.pp .pp-next__arrow {
  flex-shrink: 0;
  font-size: 25px !important;
  line-height: 30px !important;
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .pp a.pp-next:hover .pp-muted { color: #5E5E5E !important; }
  .pp a.pp-next:hover .pp-next__arrow { transform: translateX(4px); }
}

.pp .pp-next:focus-visible { outline: 2px solid #151515; outline-offset: 6px; }

/* Footer ------------------------------------------------------------------ */

.pp .home-footer {
  display: flex;
  justify-content: center;
  padding: 0 32px 48px;
}

.pp .home-footer p {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  letter-spacing: -0.035em !important;
  font-weight: 500 !important;
}

/* Lightbox (reuses .project-lightbox from styles.css) ------------------------ */

.pp .project-lightbox img { max-width: 90vw; max-height: 86vh; }

.pp .project-lightbox__nav[disabled] { opacity: 0.25; cursor: default; }

/* Mobile -------------------------------------------------------------------- */

@media (max-width: 799px) {
  .pp .pp-main { padding: 0 20px 72px; }

  .pp .pp-col,
  .pp .pp-row {
    gap: calc(var(--gap, 0px) * 0.6);
    padding: calc(var(--pt, 0px) * 0.6) 0 calc(var(--pb, 0px) * 0.6);
  }

  .pp .pp-panel { padding: 24px 16px !important; gap: 16px; }

  /* Rows stack on phones. Each item keeps its Paper width as a cap. */
  .pp .pp-row { flex-direction: column; align-items: center; gap: 16px; }
  .pp .pp-row > * { flex: none !important; width: 100% !important; max-width: var(--w, 100%) !important; }

  /* Two narrow items (phones) stay side by side. */
  .pp .pp-row--pair { flex-direction: row; align-items: flex-start; gap: 12px; }
  .pp .pp-row--pair > * { flex: 1 1 0 !important; width: auto !important; min-width: 0; }

  /* Four or more items wrap two to a row. */
  .pp .pp-row--many { flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 12px; }
  .pp .pp-row--many > * { width: calc(50% - 6px) !important; max-width: none !important; }

  /* Stacked rows of many (DDS public projects, AA catalogs) flow as one grid,
     so an odd row count doesn't leave a lone item after every row. */
  .pp .pp-col:has(> .pp-row--many + .pp-row--many) { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; }
  .pp .pp-col:has(> .pp-row--many + .pp-row--many) > .pp-row--many { display: contents; }
  .pp .pp-col:has(> .pp-row--many + .pp-row--many) > :not(.pp-row--many) { width: 100%; }

  .pp .pp-title { font-size: 34px !important; line-height: 38px !important; }
  .pp .pp-lede { font-size: 20px !important; line-height: 27px !important; }
  .pp .pp-h2 { font-size: 22px !important; line-height: 26px !important; }
  .pp .pp-body { font-size: 16px !important; line-height: 23px !important; }
  .pp .pp-cap { font-size: 13px !important; line-height: 17px !important; }
  .pp .pp-meta { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px 32px; }
  .pp .pp-meta > * { width: auto !important; max-width: none !important; flex: 0 0 auto !important; }
  .pp .pp-next__arrow { font-size: 22px !important; }

  .pp .home-footer { padding: 0 20px 40px; }
}

/* Images that carry their own transparency and shadows (e.g. the icon sheet). */
.pp .pp-img--plain { background-color: transparent; object-fit: contain; }

@media (max-width: 799px) {
  .pp .pp-img--plain[src*="surface-icons"] { aspect-ratio: 1008 / 816 !important; }
}

.pp .pp-video { display: block; box-sizing: border-box; height: auto; background-color: #000; }

/* Arrows after link text (same markup as Contact) sit outside the underline. */
.pp a .text-arrow { display: inline-block; text-decoration: none; }
