/* ============================================================
   JAMES APTER — Work / Portfolio Page Styles  (css/work.css)
   Requires: css/global.css
   ============================================================ */

/* ── Page header ────────────────────────────────────────────── */
.work-page-hd {
  padding: 56px var(--pad-x) 40px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.work-page-title {
  font-family: var(--fd);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 700; letter-spacing: -3px; line-height: 0.9;
}

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 24px; flex-wrap: wrap;
  align-items: flex-end; padding-bottom: 6px;
}
.filter-btn {
  background: none; border: none; padding: 0;
  font-family: var(--fm); font-size: 11px;
  letter-spacing: 0.1em; color: var(--gray);
  cursor: pointer; transition: color .15s;
}
.filter-btn:hover  { color: var(--ink); }
.filter-btn.active { color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }

/* ── Work grid ──────────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px var(--pad-x);
  padding: 48px var(--pad-x) 80px;
}
.work-item { background: none; }
.work-item.hidden { display: none; }

/* Image container — centred, fills container */
.work-item-link {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream2);
  margin-bottom: 14px;
}
.work-item-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .5s var(--ease);
}
.work-item-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.work-item-link:hover .work-item-img { transform: scale(1.03); }
.work-item-ph { font-size: 56px; opacity: 0.2; user-select: none; }

/* No overlay arrow — keep it minimal */
.work-item-overlay { display: none; }

/* Title centered below image */
.work-item-meta { background: none; padding: 10px 0 0; text-align: center; }
.work-item-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.work-item-cat { display: none; }

/* ── Clippy speech bubble in grid ───────────────────────────── */
.clippy-bubble {
  position: absolute;
  top: 12%;
  right: 4%;
  background: #ffffcc;
  border: 1.5px solid #999;
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--fm);
  font-size: 10px;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
  pointer-events: none;
}
.clippy-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 14px;
  border: 4px solid transparent;
  border-top-color: #999;
}
.clippy-bubble::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 15px;
  border: 3px solid transparent;
  border-top-color: #ffffcc;
  z-index: 1;
}
.work-empty {
  padding: 80px var(--pad-x); text-align: center;
  font-size: 12px; color: var(--gray);
}


/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .work-page-hd { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 540px) {
  .work-grid { grid-template-columns: 1fr; }
}
