/* Portfolio additions to the shared Motion Made V2 and study components. */
.portfolio-heading { padding-block: 40px 44px; }
.portfolio-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.portfolio-heading h1 { font-size: clamp(68px,10vw,136px); line-height: .86; letter-spacing: -.065em; }
.portfolio-heading h1 span { background: var(--lime); padding-inline: 8px; margin-left: -8px; }
.portfolio-heading-row > p { line-height: 1.7; }
.portfolio-count { display: block; margin-top: 24px; color: var(--muted); }
.portfolio-feature { margin-bottom: 56px; }
.portfolio-feature-link { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: center; padding: 32px; background: var(--surface); }
.portfolio-feature-image { height: 440px; border-radius: 12px; overflow: hidden; }
.portfolio-feature-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.portfolio-feature-copy h2 { font-size: clamp(40px,5vw,72px); line-height: .96; margin-bottom: 24px; }
.portfolio-feature-copy h2 span { background: var(--lime); padding-inline: .08em; }
.portfolio-feature-copy .portfolio-cta { margin-top: 32px; }
/* Poster compositions: image, title block and metadata form a single link. */
.portfolio-list { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 20px; padding-bottom: 56px; }
.portfolio-item { min-width: 0; grid-column: span 2; }
/* Center the final pair on the same six-track grid, keeping every tile equal. */
.portfolio-item:nth-child(4) { grid-column: 2 / span 2; }
.portfolio-item:nth-child(5) { grid-column: 4 / span 2; }
.portfolio-link { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--black); color: var(--white); isolation: isolate; }
.portfolio-image { display: grid; grid-template-columns: minmax(0,1fr); overflow: hidden; }
.portfolio-image img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: center 35%; transition: transform 180ms var(--ease); }
.portfolio-meta { position: absolute; top: 20px; left: 20px; padding: 8px 10px; background: var(--lime); color: var(--black); font-size: 12px; letter-spacing: .12em; }
.portfolio-caption { position: absolute; bottom: 0; left: 0; right: 12px; padding: 14px 16px; background: var(--black); }
.portfolio-caption h2 { font-size: clamp(25px,2.7vw,38px); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 12px; overflow-wrap: normal; }
.portfolio-caption-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.portfolio-caption-bottom > .mono { font-size: 12px; letter-spacing: .12em; }
.portfolio-action { font: 700 12px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.portfolio-action > span { display: inline-block; margin-left: 8px; color: var(--lime); transition: transform 180ms var(--ease); }
.portfolio-cta { display: inline-flex; align-items: center; min-height: 48px; margin-top: 12px; border-bottom: 2px solid var(--black); font: 700 14px/1.3 var(--font-label); text-transform: uppercase; letter-spacing: .12em; }
.portfolio-link:focus-visible { outline-color: var(--lime); outline-offset: 4px; }
.portfolio-link:focus-visible .portfolio-action > span { transform: translateX(4px); }
@media (hover:hover) and (prefers-reduced-motion:no-preference) { .portfolio-link:hover img { transform: scale(1.02); } .portfolio-link:hover .portfolio-action > span { transform: translateX(4px); } }
.project-study { --study-space: clamp(40px,4vw,56px); }
.back-link { display: inline-block; min-height: 44px; padding-block: 12px; letter-spacing: .12em; }
.back-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.project-heading { padding-block: 24px 40px; }
.project-heading > .eyebrow { margin-top: 24px; }
.project-heading > .eyebrow span { margin-inline: 8px; color: var(--muted); }
.project-heading h1 { font-size: clamp(36px,6.2vw,84px); line-height: .98; letter-spacing: -.055em; overflow-wrap: normal; }
.project-intro { max-width: 64ch; margin-top: 24px; font-size: 17px; line-height: 1.75; }
.project-chapter { padding-block: var(--study-space); }
.project-chapter--grey { background: var(--surface); }
.project-chapter--dark, .project-media, .project-vlog-chapter { background: var(--black); color: var(--white); }
.project-study .section__title { font-size: clamp(30px,3.7vw,48px); line-height: 1.04; max-width: 19ch; }
/* Functional headings stay black; dark chapters use a plain white heading block. */
.project-study .section__title { color: var(--black); }
.project-chapter--dark .section__title { width: fit-content; background: var(--white); padding: 8px 12px; }
.project-vlog .section__title { color: var(--white); }
.project-section-number { display: inline-block; background: var(--lime); color: var(--black); padding: 2px 5px; }
.project-study:not(.project-study--george) { --study-space: clamp(35px,3.5vw,49px); }
.project-study:not(.project-study--george) .project-media { padding-block: 28px 35px; }
.project-study .study-editorial { align-items: center; }
.project-media { padding-block: 26px 32px; }
.project-media > .container > .eyebrow, .project-chapter--dark .eyebrow, .project-vlog .eyebrow { color: var(--lime); }
.project-reels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; max-width: 720px; margin: 24px auto 0; }
.project-video { width: 100%; max-width: 340px; margin-inline: auto; }
.project-video .work-item__frame { border-radius: 12px; }
.project-video .work-item__video { width: 100%; height: 100%; object-fit: cover; }
.project-video figcaption { margin-top: 12px; font-size: 12px; letter-spacing: .12em; }
.project-single { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 64px; align-items: center; }
.project-single .study-prose { margin-top: 24px; }
.project-george { margin-bottom: 48px; }
.project-photos { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 20px; align-items: center; width: 70%; max-width: 860px; margin: 32px auto; }
.project-photos figure:nth-child(1) { grid-column: 1/7; }
.project-photos figure:nth-child(2) { grid-column: 9/13; }
.project-photos figure:nth-child(3) { grid-column: 2/6; }
.project-photos figure:nth-child(4) { grid-column: 7/13; }
.project-photos img { width: 100%; height: auto; border-radius: 8px; }
.project-vlog-chapter { padding-block: 48px; }
.project-vlog { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 48px; align-items: center; }
.project-vlog iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.project-vlog figcaption { font-size: 12px; margin-top: 12px; }
.project-next { padding-block: 40px; border-top: 1px solid var(--black); background: var(--surface); }
.project-next > .container { display: flex; align-items: start; justify-content: space-between; gap: 32px; }
.project-next-link { max-width: 68%; }
.project-next-link .eyebrow { display: block; margin-bottom: 12px; }
.project-next-link > span:last-child { font: 800 clamp(24px,3.3vw,44px)/1.08 var(--font-display); letter-spacing: -.04em; text-transform: uppercase; }
.project-next-link:hover > span:last-child { background: var(--lime); }
/* Shared video controls remain identical; make the existing paused state visible. */
.portfolio-page .video-toggle[data-paused="true"]::after { content: '▶'; position: absolute; left: 16px; bottom: 52px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--black); background: var(--lime); font-size: 17px; }
.portfolio-page .video-toggle[data-paused="true"]:focus-visible::after { content: attr(aria-label); width: auto; height: auto; }
@media (max-width: 1000px) {
  .portfolio-feature-link { gap: 32px; padding: 24px; }
  .portfolio-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .portfolio-item:nth-child(n) { grid-column: auto; }
  .portfolio-item:last-child { grid-column: 1/-1; width: calc((100% - 20px)/2); justify-self: center; }
  .portfolio-caption h2 { font-size: 27px; }
  .project-single { gap: 32px; }
}
@media (max-width: 760px) {
  .portfolio-heading { padding-block: 26px 32px; }
  .portfolio-heading-row { display: block; }
  .portfolio-heading h1 { font-size: clamp(56px,14vw,102px); }
  .portfolio-heading-row > p { margin-top: 24px; font-size: 12px; }
  .portfolio-count { margin-top: 8px; }
  .portfolio-feature { margin-bottom: 40px; }
  .portfolio-feature-link { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .portfolio-feature-image { height: 320px; }
  .portfolio-feature-copy h2 { font-size: clamp(36px,10vw,56px); }
  .portfolio-feature-copy .portfolio-cta { margin-top: 16px; }
  .portfolio-list { grid-template-columns: minmax(0,1fr); gap: 20px; padding-bottom: 40px; }
  .portfolio-item:last-child { width: 100%; }
  .portfolio-caption { right: 16px; padding: 16px; }
  .portfolio-caption h2 { font-size: clamp(22px,6.2vw,32px); margin-bottom: 12px; }
  .portfolio-meta { top: 16px; left: 16px; padding: 6px 8px; font-size: 11px; }
  .portfolio-caption-bottom { gap: 8px; }
  .portfolio-caption-bottom > .mono, .portfolio-action { font-size: 11px; }
  .portfolio-image img { height: auto; aspect-ratio: 4/5; }
  .project-heading { padding-bottom: 32px; }
  .project-heading h1 { font-size: clamp(22px,6.35vw,48px); }
  .project-heading > .eyebrow { font-size: 12px; letter-spacing: .12em; }
  .project-intro { font-size: 16px; margin-top: 20px; }
  .project-reels { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .project-video { max-width: 300px; }
  .project-single { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .project-photos { column-gap: 6px; row-gap: 16px; margin-block: 28px; }
  .project-photos figure:nth-child(1) { grid-column: 1/8; }
  .project-photos figure:nth-child(2) { grid-column: 9/13; }
  .project-photos figure:nth-child(3) { grid-column: 1/6; }
  .project-photos figure:nth-child(4) { grid-column: 7/13; }
  .project-vlog { grid-template-columns: 1fr; gap: 24px; }
  .project-next > .container { flex-direction: column; gap: 24px; }
  .project-next-link { max-width: 100%; }
  .project-next-link > span:last-child { font-size: clamp(23px,6.3vw,36px); }
}
@media (prefers-reduced-motion: reduce) { .portfolio-image img, .portfolio-action > span { transition: none; } }
.project-vlog .section__title { margin-bottom: 24px; }
/* Size poster type against the tile, including long single-word client names. */
.portfolio-link { container-type: inline-size; }
.portfolio-caption h2 { font-size: clamp(17px,6.5cqw,38px); }

/* Keep the closing project at the same 4:5 size as the other posters. */
.portfolio-item--closing .portfolio-image img + img { display: none; }
