/* =========================================================================
   template-parts/sections/section-portfolio.php
   Moved out of the partial's inline <style id="es-portfolio-css"> on the owner's
   instruction, 10 Sep 2026. en_print_css() (inc/css-loader.php) prints this
   file's <link> where the <style> used to be, once per page, so every page
   that renders this section shares this one file.
   ========================================================================= */

.es-pf br { display: none; }

@media (min-width: 992px) {
  .es-pf br { display: inline; }
}

.es-pf__grid {
  display: grid;
  gap: var(--gap-fluid-md);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .es-pf__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .es-pf__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .es-pf__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Card ──────────────────────────────────────────────────
   Shot on top, copy under it. The card is not itself a link:
   each item points at two different platforms, so there is no
   single destination a whole-card hit area could honestly go
   to. The links stay the only controls. */
.es-pf__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

@media (hover: hover) {
  .es-pf__card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-200);
  }

  .es-pf__card:hover .es-pf__shot img { transform: scale(1.04); }
}

/* 16:10 rather than the shot's own aspect: these arrive at whatever size the
   designer exported and a mixed set would give the row a ragged top edge. */
.es-pf__shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
}

.es-pf__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.es-pf__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--space-3);
  padding: var(--space-6);
}

.es-pf__card h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: var(--fs-card-title);
  font-weight: var(--font-extrabold);
  line-height: var(--lh-subhead);
  letter-spacing: var(--tracking-normal);
}

.es-pf__card p {
  margin: 0;
  color: var(--text-body);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
}

/* Pinned to the bottom edge so the link rows line up across a row of cards
   whose descriptions run to different lengths. */
.es-pf__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: auto 0 0;
  padding: var(--gap-fluid-sm) 0 0;
  list-style: none;
}

.es-pf__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-heading);
  font-size: var(--fs-caption);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: border-color var(--duration-normal) var(--ease-out),
              background-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
}

.es-pf__link svg { width: 13px; height: 13px; }

.es-pf__link:hover,
.es-pf__link:focus-visible {
  border-color: var(--brand-300);
  background: var(--accent-subtle);
  color: var(--brand-700);
}

.es-pf__link:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* ── Profile strip ─────────────────────────────────────────
   Closes the section with the accounts the work lives on. */
.es-pf__profiles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-fluid-sm);
  margin-top: var(--gap-fluid-lg);
  padding-top: var(--gap-fluid-lg);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.es-pf__profiles-title {
  margin: 0;
  color: var(--text-heading);
  font-size: var(--fs-title-sm);
  font-weight: var(--font-extrabold);
  line-height: var(--lh-subhead);
}

.es-pf__profile-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-pf__profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.es-pf__profile img { width: 24px; height: 24px; object-fit: contain; }

.es-pf__profile:hover {
  transform: translateY(-3px);
  border-color: var(--brand-300);
}

.es-pf__profile:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .es-pf__card,
  .es-pf__shot img,
  .es-pf__link,
  .es-pf__profile { transition: none; }

  .es-pf__card:hover,
  .es-pf__profile:hover { transform: none; }
  .es-pf__card:hover .es-pf__shot img { transform: none; }
}
