/* v265 clean rebuild: dedicated mobile Work page.
   Desktop grid stays intact. Mobile gets a separate visible, uniform card list. */

.mobile-work-list {
  display: none;
}

@media screen and (max-width: 900px) {
  .page-work .work-page-grid {
    display: none !important;
  }

  .page-work .mobile-work-list {
    display: grid !important;
    gap: 34px;
    margin-top: 0;
    position: relative;
    z-index: 1;
  }

  .page-work .mobile-work-group {
    display: grid;
    gap: 18px;
  }

  .page-work .mobile-work-heading {
    color: rgba(255,255,255,0.46);
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0 0 2px;
  }

  .page-work .mobile-work-card {
    display: grid;
    grid-template-rows: auto 216px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
      radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 45%);
    box-shadow: 0 18px 46px rgba(0,0,0,0.24);
  }

  .page-work .mobile-work-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 0;
    color: inherit;
    text-align: left;
    background: #060606;
    overflow: hidden;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .page-work .mobile-work-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.68));
    pointer-events: none;
  }

  .page-work .mobile-work-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .page-work .mobile-work-title {
    position: absolute;
    left: 17px;
    right: 17px;
    bottom: 16px;
    z-index: 2;
    color: rgba(255,255,255,0.96);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 7.2vw, 2.15rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
  }

  .page-work .mobile-work-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(5,5,5,0.36);
    backdrop-filter: blur(10px);
    color: rgba(255,255,255,0.82);
    font-size: 0.72rem;
    letter-spacing: 0;
    line-height: 1;
    border-radius: 999px;
  }

  .page-work .mobile-work-info {
    display: grid;
    grid-template-rows: 24px 42px 54px 24px;
    row-gap: 10px;
    min-height: 216px;
    height: 216px;
    max-height: 216px;
    padding: 16px 16px 18px;
    overflow: hidden;
  }

  .page-work .mobile-work-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow: hidden;
  }

  .page-work .mobile-work-meta span {
    flex: 0 0 auto;
    color: rgba(255,255,255,0.46);
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .page-work .mobile-work-role,
  .page-work .mobile-work-copy {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .page-work .mobile-work-role {
    color: rgba(255,255,255,0.80);
    font-size: 0.82rem;
    line-height: 1.42;
    -webkit-line-clamp: 2;
  }

  .page-work .mobile-work-copy {
    color: rgba(255,255,255,0.58);
    font-size: 0.87rem;
    line-height: 1.58;
    -webkit-line-clamp: 2;
  }

  .page-work .mobile-work-actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
  }

  .page-work .mobile-work-actions a,
  .page-work .mobile-work-actions button,
  .page-work .mobile-work-actions span {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.72);
    font: inherit;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
  }

  .page-work .mobile-work-actions button {
    cursor: pointer;
  }

  .page-work .mobile-work-actions span {
    color: rgba(255,255,255,0.36);
  }

  .page-work .mobile-work-actions a::after {
    content: " ↗";
    letter-spacing: 0;
  }

  .page-work .mobile-work-actions button::after {
    content: "";
  }

  .work-hero .mobile-work-list,
  .work-hero .mobile-work-badge,
  .hero .mobile-work-list,
  .hero .mobile-work-badge {
    display: none !important;
  }
}

@media screen and (max-width: 430px) {
  .page-work .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-work .mobile-work-list {
    gap: 30px;
  }

  .page-work .mobile-work-group {
    gap: 16px;
  }

  .page-work .mobile-work-card {
    grid-template-rows: auto 216px;
  }

  .page-work .mobile-work-info {
    grid-template-rows: 24px 42px 54px 24px;
    min-height: 216px;
    height: 216px;
    max-height: 216px;
    padding: 15px 15px 17px;
  }
}


/* v265 QA guard: keep action labels from wrapping and clipping. */
@media screen and (max-width: 900px) {
  .page-work .mobile-work-actions a,
  .page-work .mobile-work-actions button,
  .page-work .mobile-work-actions span {
    white-space: nowrap;
  }
}
