/* ==========================================================================
   single-thisismyurl_project.css — single portfolio exhibit template

   Built 2026-05-17 from the designer's spec after a render-pass on the live
   exhibit page found that the CSS hooks in main.css were comment skeleton
   only — every block under the "Portfolio exhibit (single) — rebuild
   2026-05-12" banner had been outlined but never written. The template
   markup at single-thisismyurl_project.php was correct; only the styles
   were missing. This file is a from-scratch implementation, not a refactor.

   Conditionally enqueued via inc/setup.php on is_singular('thisismyurl_project'),
   loaded AFTER main.css so unlayered rules here win on conflict. The
   hover / focus / interaction states and the mobile nth-child border
   rules remain in main.css (they load universally and the payload is
   negligible, so duplicating them here would only invite drift).

   Visual register sits parallel to single-case-study.css but image-first
   rather than prose-first:
     - Meta strip is the first row under the hero (Client, Year, Platform,
       Status) as a horizontal data <dl> with vertical rules between cells
     - Actions row below the meta strip carries Visit / Wayback / Repo
       (one primary, the rest ghost)
     - Hero is two-column on desktop (title + lede left, feature image
       right) and stacks on mobile
     - Body owns the numbered H2 counter (counter-reset on .__body, the
       counter() call in main.css's preserved h2::before rule)
     - Engagement record is a quiet provenance aside between body and
       subjects footer
     - Subjects footer renders the taxonomy as pill chips with a labelled
       landmark heading
   ========================================================================== */

/* ==========================================================================
   Meta strip — Client / Year / Platform / Status row
   ========================================================================== */

.portfolio-meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin: 0;
  padding-block: 1.25rem;
  border-block: 1px solid var(--color-border);
}

.portfolio-meta-strip__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-inline: 1.25rem;
  padding-block: 0.25rem;
  border-inline-start: 1px solid var(--color-border);
  min-width: 0;
}

.portfolio-meta-strip__item:first-child {
  padding-inline-start: 0;
  border-inline-start: none;
}

.portfolio-meta-strip__item dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1.2;
}

.portfolio-meta-strip__item dd {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-strong);
  line-height: 1.4;
}

.portfolio-meta-strip__item dd a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.portfolio-meta-strip__client-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border-strong);
  transition: color 140ms var(--ease-standard),
              text-decoration-color 140ms var(--ease-standard);
}

.portfolio-meta-strip__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.portfolio-meta-strip__status-dot {
  display: inline-block;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.portfolio-meta-strip__status--live .portfolio-meta-strip__status-dot {
  background: var(--color-success);
}

.portfolio-meta-strip__status--archived .portfolio-meta-strip__status-dot {
  background: var(--color-muted);
}

.portfolio-meta-strip__locality {
  display: block;
  margin-block-start: 0.1rem;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--color-muted);
}

/* ==========================================================================
   Actions row — Visit / Wayback / Repo (one primary, the rest ghost)
   Hover/focus states for these buttons live in main.css and load
   universally; only base shape lives here.
   ========================================================================== */

.portfolio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1.25rem;
  border-block-end: 1px solid var(--color-border);
}

.portfolio-actions__button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background-color 140ms var(--ease-standard),
              color 140ms var(--ease-standard),
              border-color 140ms var(--ease-standard);
}

.portfolio-actions__button--primary {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

.portfolio-actions__button--ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-border-strong);
}

/* ==========================================================================
   Hero — two-column on desktop, image-right; stacks on mobile
   ========================================================================== */

.portfolio-exhibit__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-block: 1.5rem 2rem;
  border-block-end: 1px solid var(--color-border);
}

.portfolio-exhibit__hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portfolio-exhibit__eyebrow {
  margin: 0;
}

.portfolio-exhibit__title {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: 1.1;
  color: var(--color-text-strong);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.portfolio-exhibit__lede {
  margin: 0;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  color: var(--color-text-medium);
  max-width: 60ch;
}

.portfolio-exhibit__feature {
  margin: 0;
  display: block;
}

.portfolio-exhibit__feature img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 880px) {
  .portfolio-exhibit__hero--with-feature {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: end;
  }
}

/* ==========================================================================
   Exhibit body — counter root for the numbered H2 sequence
   The h2::before rule that consumes counter(portfolio-h2) lives in main.css
   (preserved across the extract) so the counter-reset MUST live here on
   .__body and not on a higher container, or every H2 prints "01 /".
   ========================================================================== */

.portfolio-exhibit__body {
  padding-block-start: 1.5rem;
  counter-reset: portfolio-h2;
}

/* ==========================================================================
   Engagement record — provenance aside between body and subjects
   ========================================================================== */

.portfolio-engagement-record {
  margin-block-start: 2.5rem;
  padding: 1.25rem 0;
  border-block-start: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.portfolio-engagement-record__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

.portfolio-engagement-record__row {
  display: grid;
  grid-template-columns: minmax(8em, max-content) 1fr;
  gap: 1rem;
  align-items: baseline;
}

.portfolio-engagement-record__row dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1.4;
  margin: 0;
}

.portfolio-engagement-record__row dd {
  margin: 0;
  color: var(--color-text-medium);
  line-height: 1.5;
}

.portfolio-engagement-record a {
  color: var(--color-text-medium);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border-strong);
  margin-inline-start: 0.35em;
}

.portfolio-engagement-record__sep {
  color: var(--color-muted);
  margin-inline: 0.25em;
}

/* ==========================================================================
   Subjects footer — taxonomy pills with a labelled landmark heading
   ========================================================================== */

.portfolio-exhibit__footer {
  margin-block-start: 2.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--color-border);
}

.portfolio-exhibit__subjects-heading {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
}

.portfolio-exhibit__subjects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-exhibit__subjects a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-text-medium);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: border-color 140ms var(--ease-standard),
              color 140ms var(--ease-standard),
              background-color 140ms var(--ease-standard);
}

/* ==========================================================================
   Mobile — meta strip collapses to 2 columns, hero compresses, actions stack
   The nth-child border rules that re-rule the 2-column grid live in main.css
   (preserved across the extract) — duplicating them here would mean two
   sources of truth for the same selector.
   ========================================================================== */

@media (max-width: 720px) {
  .portfolio-exhibit__hero {
    padding-block: 1.25rem 1.5rem;
  }

  .portfolio-meta-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-engagement-record__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .portfolio-actions {
    gap: 0.5rem;
  }

  .portfolio-actions__button {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Related projects rail — "More projects like this"
   Template part: template-parts/portfolio-related.php
   Render context: portfolio singles only (this file is conditionally
   enqueued on is_singular('thisismyurl_project')).

   Design intent: editorial horizontal-lockup list rather than a mini
   poster-grid. The archive (/portfolio/) uses dark full-bleed poster cards
   with a curated texture pool; reproducing that here would collapse the
   related rail into a visual echo of the archive and strip featured images
   of meaning — the archive deliberately avoids featured images in favour of
   the editorial card pool. These cards surface real thumbnails instead.

   Treatment: three rows, each a horizontal lockup — thumbnail column at
   3:2 on the left, body column (eyebrow / title / outcome / cta) on the
   right. White background surface reads as content continuation rather than
   promoted grid. Section is separated from the exhibit body by a top rule
   and generous block-start spacing. On mobile (≤600px) the thumbnail column
   collapses above the body so the full card stack reads cleanly at 320px.

   Hover state (translateY + gold border + soft shadow) lives in main.css
   at the .portfolio-related__link selector — do not duplicate here.
   ========================================================================== */

/* --- Section shell -------------------------------------------------------- */

.portfolio-related {
  margin-block-start: 3rem;
  padding-block-start: 2.5rem;
  border-block-start: 1px solid var(--color-border);
}

.portfolio-related__heading {
  margin: 0 0 1.75rem;
}

.portfolio-related__heading h2 {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1.2;
}

/* --- Card list ------------------------------------------------------------ */

.portfolio-related__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Individual card ------------------------------------------------------ */

.portfolio-related__card {
  border-block-end: 1px solid var(--color-border);
}

.portfolio-related__card:first-child {
  border-block-start: 1px solid var(--color-border);
}

.portfolio-related__link {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-block: 1.25rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  /* Transition for the hover state defined in main.css */
  transition: transform 200ms var(--ease-standard),
              border-color 200ms var(--ease-standard),
              box-shadow 200ms var(--ease-standard);
}

/* --- Thumbnail column ----------------------------------------------------- */

.portfolio-related__media {
  display: block;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: var(--color-accent-soft);
  /* Subtle desaturation at rest; full colour on parent hover via media filter
     below. Matches the editorial restraint of the exhibit hero image. */
  filter: saturate(0.92) contrast(1.02);
  transition: filter 300ms var(--ease-standard),
              transform 500ms var(--ease-standard);
  transform: scale(1);
  overflow: hidden;
}

/* Blank-state (no featured image): warm tonal block.
   The navy-to-surface-alt gradient reads intentional — a deliberate
   colour surface rather than a broken image placeholder. The gold-tinted
   bottom edge ties back to the gold system accent without being decorative. */
.portfolio-related__media--blank {
  background: linear-gradient(
    160deg,
    var(--color-accent-soft) 0%,
    color-mix(in srgb, var(--color-surface-alt) 70%, var(--color-accent-soft) 30%) 100%
  );
  border-block-end: 2px solid var(--color-gold-soft);
}

.portfolio-related__link:hover .portfolio-related__media,
.portfolio-related__link:focus-visible .portfolio-related__media {
  filter: saturate(1) contrast(1.04);
  transform: scale(1.03);
}

/* --- Body column ---------------------------------------------------------- */

.portfolio-related__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-block: 0.25rem;
  min-width: 0;
}

.portfolio-related__eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-text);
  line-height: 1.2;
  /* Truncate on overflow — eyebrows can be long client + year combos */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-related__title {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-strong);
  letter-spacing: -0.01em;
  text-wrap: balance;
  /* Underline affordance — the entire card is interactive but the title
     carries the primary read-cue. Transition matches the border-colour
     shift on hover so affordance appears in one beat. */
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--color-border-strong);
  transition: text-decoration-color 200ms var(--ease-standard),
              color 200ms var(--ease-standard);
}

.portfolio-related__link:hover .portfolio-related__title,
.portfolio-related__link:focus-visible .portfolio-related__title {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.portfolio-related__outcome {
  /* -webkit-box is required for line-clamp in all current engines.
     Spec equivalent (overflow: hidden; display: block) kept below as
     a progressive-enhancement fallback, but -webkit-box wins in practice
     because the -webkit-line-clamp property is what actually clips. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-text-medium);
}

.portfolio-related__cta {
  display: inline-block;
  margin-block-start: 0.35rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 200ms var(--ease-standard);
}

.portfolio-related__link:hover .portfolio-related__cta,
.portfolio-related__link:focus-visible .portfolio-related__cta {
  color: var(--color-accent);
}

/* --- Focus ring ----------------------------------------------------------- */

.portfolio-related__link:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* --- Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .portfolio-related__link,
  .portfolio-related__media,
  .portfolio-related__title,
  .portfolio-related__cta {
    transition: none;
  }
  .portfolio-related__link:hover .portfolio-related__media {
    transform: none;
    filter: saturate(1) contrast(1.04);
  }
}

/* --- Mobile: thumbnail stacks above body (≤600px) ------------------------- */

@media (max-width: 600px) {
  .portfolio-related__link {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-block: 1.125rem;
  }

  .portfolio-related__media {
    /* At 320px the 3:2 thumbnail would be ~213px tall. 56.25% = 16:9.
       Using 60% as a compromise: taller than 16:9 (shows more of the
       image at small widths) but shorter than unconstrained 3:2. */
    aspect-ratio: 16 / 9;
  }

  .portfolio-related__eyebrow {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* ==========================================================================
   End related projects rail
   ========================================================================== */
