/* The project screenshots remain the focus against the selected section artwork. */
#work {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(88px, 10vw, 140px);
  background: #000 url('../img/work-abstract.png') center / cover no-repeat;
  border-top: 1px solid rgba(255,255,255,.08);
}
@supports (background-image: image-set(url('test.webp') type('image/webp'))) {
  #work { background-image: image-set(url('../img/work-abstract.webp') type('image/webp'), url('../img/work-abstract.png') type('image/png')); }
}
#work::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.84), rgba(0,0,0,.72) 50%, rgba(0,0,0,.85));
}
#work > .canvas { position: relative; max-width: 1500px; }

.work-intro { max-width: 900px; margin-inline: auto; text-align: center; }
.work-kicker { color: #e3a857; font-family: var(--font-display); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.work-kicker span { display: none; }
.work-intro h2 { font-family: var(--font-display); font-size: clamp(2.8rem, 5.5vw, 5.3rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 700; }
.work-intro h2 span { color: #a1a1a6; }
.work-intro p { max-width: 42ch; margin: 20px auto 0; color: #b9bac0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; }
.work-heading-line { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(50px, 7vw, 80px); padding-block: 16px; border-bottom: 1px solid rgba(255,255,255,.14); color: #aeb3be; font-size: 12px; font-weight: 600; letter-spacing: .03em; }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 2.4vw, 36px); margin-top: 36px; }
.work-card { min-width: 0; background: #111216; border: 1px solid rgba(255,255,255,.1); border-radius: 24px; overflow: hidden; transition: border-color 250ms ease, box-shadow 250ms ease; }
.work-card:hover, .work-card:focus-within { border-color: rgba(167,206,255,.35); box-shadow: 0 20px 55px rgba(0,0,0,.28); }
.work-card__layout { display: flex; flex-direction: column; height: 100%; }
.work-card__footer:focus-visible { outline: 2px solid #a7ceff; outline-offset: 4px; border-radius: 2px; }
.work-art { position: relative; overflow: hidden; min-width: 0; aspect-ratio: 1.45; background: linear-gradient(145deg, #233f58, #111b2c); border-bottom: 1px solid rgba(255,255,255,.08); }
.work-art--bmi { background: linear-gradient(145deg, #34544f, #172b2c); }
.work-art--memorial { background: linear-gradient(145deg, #536752, #1a3029); }
.work-art__screenshot { position: absolute; inset: 18px 18px 0; display: block; width: calc(100% - 36px); height: calc(100% - 18px); object-fit: cover; object-position: top center; border-radius: 10px 10px 0 0; box-shadow: 0 10px 32px rgba(0,0,0,.32); }
.work-art__index, .work-art__caption { display: none; }
.work-card__content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: clamp(26px, 2.5vw, 36px); }
.work-card__top { display: flex; justify-content: space-between; align-items: center; color: #aeb5c1; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.work-card__top span:last-child { color: #8d96a5; font-variant-numeric: tabular-nums; }
.work-card__arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #29292d; color: #f5f5f7; font-size: 20px; transition: background-color 200ms, transform 200ms; }
.work-card h3 { font-family: var(--font-display); font-size: clamp(1.75rem, 2.2vw, 2.4rem); font-weight: 650; line-height: 1.1; letter-spacing: -.035em; }
.work-card__content p { max-width: 35ch; color: #b7b8bf; font-size: 16px; line-height: 1.55; }
.work-card__tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 2px 0 0; list-style: none; }
.work-card__tags li { padding: 6px 10px; border: 1px solid rgba(255,255,255,.11); border-radius: 999px; color: #c9cfda; font-size: 11px; line-height: 1.3; }
.work-card__details { border-top: 1px solid rgba(255,255,255,.1); margin-top: 4px; }
.work-card__details summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: #c9d2df; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.work-card__details summary::-webkit-details-marker { display: none; }
.work-card__details summary::after { content: '+'; font-size: 20px; font-weight: 400; }
.work-card__details[open] summary::after { content: '−'; }
.work-card__details summary:focus-visible { outline: 2px solid #a7ceff; outline-offset: 3px; border-radius: 2px; }
.case-details { display: grid; gap: 16px; margin: 0 0 20px; }
.case-details div { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
.case-details dt { color: #f5f5f7; font-size: 13px; font-weight: 650; }
.case-details dd { margin: 4px 0 0; color: #b7b8bf; font-size: 14px; line-height: 1.5; }
.work-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: auto; color: #f5f5f7; font-size: 13px; font-weight: 600; text-decoration: none; }
.work-card__footer > span:last-child { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid rgba(167,206,255,.3); border-radius: 50%; color: #a7ceff; font-size: 18px; transition: background-color 180ms ease; }
.work-card__footer:hover { color: #c7ddff; }
.work-card__footer:hover > span:last-child { background: rgba(167,206,255,.12); }
.work-card .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: no-preference) {
  .work-art__screenshot { transition: transform 600ms cubic-bezier(.16, 1, .3, 1); }
  .work-card:hover .work-art__screenshot, .work-card:focus-within .work-art__screenshot { transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .work-card, .work-card__footer > span:last-child { transition: none; }
}
@media (max-width: 1300px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card__content { padding: 28px; }
  .work-intro h2 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .work-heading-line span:last-child, .work-card__footer span:last-child { text-align: right; }
  .work-card { border-radius: 20px; }
}
