/* ==================================================================== */
/* Desktop / laptop home feed (All + Connected tabs) — FULL SCREEN       */
/* Edge-to-edge rows separated by thin lines (no separate boxed cards).  */
/* Image on the LEFT; creator, title, description, tags and actions on   */
/* the RIGHT. Phones and tablets keep the existing layout.               */
/* Only posts that actually have an image get the split layout.          */
/* ==================================================================== */
@media (min-width: 1024px) {
  body[data-page="home"] #projectFeed {
    box-sizing: border-box;
    gap: 0;
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
  }

  /* each project is a full-width row, divided by a line — not a box */
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--kc-border, #d6dbea);
    border-radius: 0;
    box-shadow: none;
    contain-intrinsic-size: 0 380px;
    overflow: hidden;
    transition: background-color .18s ease;
  }
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row):first-child {
    border-top: 1px solid var(--kc-border, #d6dbea);
  }
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row):hover {
    background: rgba(106,92,240,.035);
    border-color: var(--kc-border, #d6dbea);
    box-shadow: none;
  }
  body[data-theme="dark"][data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) {
    border-bottom-color: rgba(255,255,255,.12);
    box-shadow: none;
  }
  body[data-theme="dark"][data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row):first-child {
    border-top-color: rgba(255,255,255,.12);
  }
  body[data-theme="dark"][data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row):hover {
    background: rgba(255,255,255,.03);
  }

  /* ---- split grid: [ image | details ] across the whole screen ---- */
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) .swipe-front:has(.feed-card-image-wrap) {
    column-gap: clamp(28px, 3.4vw, 60px);
    display: grid;
    grid-template-columns: minmax(340px, 44%) minmax(0, 1fr);
    /* author · title · description/tags (takes spare height) · actions · links */
    grid-template-rows: auto auto 1fr auto auto;
    padding: 30px clamp(20px, 3vw, 48px);
  }

  /* wrappers dissolve so their children join the grid directly */
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) .swipe-front:has(.feed-card-image-wrap) > .feed-card-main,
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) .swipe-front:has(.feed-card-image-wrap) .feed-card-content {
    display: contents;
  }

  /* left: the image fills the full height of the row */
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-image-wrap {
    align-self: stretch;
    border-radius: 12px;
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    min-height: 300px;
    position: relative;
  }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-image-wrap .feed-card-image {
    border-radius: 12px;
    height: 100%;
    inset: 0;
    margin: 0;
    max-width: none;
    position: absolute;
    width: 100%;
  }

  /* right: everything else, stacked */
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) > .project-author,
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-title-row,
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-body,
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-engagement-row,
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) > .feed-card-links-outside {
    grid-column: 2;
    min-width: 0;
  }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) > .project-author { grid-row: 1; margin-bottom: 16px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-title-row { grid-row: 2; margin-bottom: 12px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-body { grid-row: 3; margin-bottom: 16px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-engagement-row { grid-row: 4; margin-top: 0; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) > .feed-card-links-outside { grid-row: 5; margin-top: 12px; }

  /* bigger, more editorial type on the right-hand side */
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-title-row h2 {
    font-size: clamp(22px, 2vw, 30px);
    letter-spacing: -.035em;
    line-height: 1.2;
  }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-summary {
    -webkit-line-clamp: 5;
    font-size: 14.5px;
    line-height: 1.7;
    margin-top: 2px;
  }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-more-button { font-size: 12px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-meta-row { margin-top: 14px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .tech-row span { font-size: 11px; padding: 6px 11px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .project-author .mini-avatar { height: 40px; width: 40px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .project-author strong { font-size: 13.5px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .project-author small { font-size: 11px; }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-link-button { font-size: 11px; padding: 9px 14px; }

  /* the swipe drawer is a touch gesture — hide it so it never peeks on desktop */
  body[data-page="home"] #projectFeed > .project-card.feed-card .swipe-actions { display: none; }
}

/* very wide monitors: a little more room for the picture */
@media (min-width: 1500px) {
  body[data-page="home"] #projectFeed > .project-card.feed-card:not(.community-post-row) .swipe-front:has(.feed-card-image-wrap) {
    grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
  }
  body[data-page="home"] #projectFeed .swipe-front:has(.feed-card-image-wrap) .feed-card-image-wrap { min-height: 340px; }
}
