/* A softer finish for the existing portfolio. Type, palette and layout stay in place. */
.button,
.physics-control,
.gallery-case-link {
  border-radius: 999px;
}

.gallery-arrow {
  border-radius: 50%;
}

.hero-visual-frame,
.work-cover {
  border-radius: 24px;
}

.capability-group img,
.cs-image-window,
.cs-figure img,
.more-work-link img {
  border-radius: 20px;
}

/* Fill the rounded image window, including the expanding desktop cards. */
.capability-group img {
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: no-preference) {
  .capability-group:hover img,
  .capability-group:focus-visible img {
    clip-path: inset(3% round 18px);
  }
}

[data-shape="tile"] .skill-badge {
  border-radius: 12px;
}

/* In the static list, enlarged labels must fit their parent item. */
.physics-stage:not([data-ready="true"]) [data-shape="tile"] .skill-badge {
  max-width: min(17rem, 100%);
}

.contact-link {
  border-radius: 12px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.availability-highlight {
  border-radius: 6px;
}

/* Keep a clear summary and status; detailed roles remain in each case study. */
.gallery-role,
.work-role {
  display: none;
}

.gallery-caption {
  padding-block: 1.75rem 2rem;
  min-height: 12rem;
}

.gallery-status {
  margin-top: 0.65rem;
}

.gallery-image-action,
.work-image-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  max-width: 100%;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
}

.gallery-image-action {
  margin: 1rem 0.5rem 0 0;
}

.work-image-action {
  margin-top: 0.75rem;
}

.gallery-image-action:hover,
.work-image-action:hover {
  border-color: var(--powder-blue);
  background: var(--powder-blue);
  color: var(--charcoal);
}

.work-gallery.is-gallery-ready .work-image-action {
  display: none;
}

/* The project cards are the accessible fallback, not a second project list. */
.work-gallery.is-gallery-ready .work-index {
  display: none;
}

@media (max-width: 699px) {
  .hero-visual-frame,
  .work-cover,
  .capability-group img,
  .cs-image-window,
  .cs-figure img,
  .more-work-link img {
    border-radius: 16px;
  }

  .gallery-caption {
    min-height: 0;
    padding-block: 1.25rem 1.5rem;
  }

  /* Close the grid row left by the removed name beneath the headline. */
  .hero-summary { grid-row: 3; }
  .hero-actions { grid-row: 4; }
  .hero-bottomline { grid-row: 5; }
}

@container (max-width: 22rem) {
  .hero-summary { grid-row: 4; }
  .hero-actions { grid-row: 5; }
  .hero-bottomline { grid-row: 6; }
}
