/* Shared color-led cards for selected work and independent projects. */
#work .reel-item,
#projects .reel-item {
  --card-height: 360px;
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 7px;
  background: var(--brand, #29332e);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transform: translateZ(0);
  transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s;
}

#work .reel-item + .reel-item,
#projects .reel-item + .reel-item {
  margin-top: 25px;
}

#work .reel-item:hover:not(.is-open):not(.is-hover-suppressed),
#projects .reel-item:hover:not(.is-open):not(.is-hover-suppressed),
#work .reel-item:focus-within:not(.is-open):not(.is-hover-suppressed),
#projects .reel-item:focus-within:not(.is-open):not(.is-hover-suppressed) {
  z-index: 2;
  transform: translateY(-5px) scale(1.008);
  box-shadow: 0 18px 42px rgba(12, 19, 16, .2);
}

#work .reel-item.is-open,
#projects .reel-item.is-open,
#work .reel-item.is-hover-suppressed,
#projects .reel-item.is-hover-suppressed {
  transform: none;
}

#work .reel-item.is-hover-suppressed,
#projects .reel-item.is-hover-suppressed {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

#work .project-toggle,
#projects .project-toggle {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: var(--card-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

#work .project-toggle::after,
#projects .project-toggle::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent 26%, var(--brand) 56%);
  opacity: .98;
}

#work .project-toggle:focus-visible,
#projects .project-toggle:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .9);
  outline-offset: -7px;
  border-radius: 7px;
}

#work .project-visual,
#projects .project-visual {
  position: absolute;
  z-index: 0;
  inset: 0 auto auto 0;
  display: block;
  width: 48%;
  height: var(--card-height);
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

#work .project-art,
#projects .project-art {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: left top;
  opacity: .98;
  transform: scale(1.015);
  -webkit-mask-image: linear-gradient(90deg, #000 42%, rgba(0,0,0,.72) 63%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 42%, rgba(0,0,0,.72) 63%, transparent 100%);
  transition: transform .75s cubic-bezier(.2,.8,.2,1), filter .5s;
}

/* Beat the older #projects .reel-figure img rule, which otherwise restores
   intrinsic image height and contain sizing. */
#work .project-visual img.project-art,
#projects .project-visual img.project-art {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: left top;
}

#work .reel-item:hover:not(.is-open):not(.is-hover-suppressed) .project-art,
#projects .reel-item:hover:not(.is-open):not(.is-hover-suppressed) .project-art,
#work .reel-item:focus-within:not(.is-open):not(.is-hover-suppressed) .project-art,
#projects .reel-item:focus-within:not(.is-open):not(.is-hover-suppressed) .project-art {
  transform: scale(1.055);
  filter: saturate(1.06);
}

#work .reel-item.is-hover-suppressed .project-art,
#projects .reel-item.is-hover-suppressed .project-art {
  transform: none;
  filter: none;
}

#work .project-copy,
#projects .project-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 54%;
  min-height: var(--card-height);
  margin-left: auto;
  padding: 36px 38px 31px 20px;
  text-align: left;
}

#work .project-meta,
#projects .project-meta {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px 13px;
  color: rgba(255, 255, 255, .78);
  font: 11px/1.4 Switzer, Arial, sans-serif;
  letter-spacing: .025em;
}

#work .project-meta span + span::before,
#projects .project-meta span + span::before {
  content: "·";
  margin-right: 13px;
  color: rgba(255, 255, 255, .55);
}

#work .project-title,
#projects .project-title {
  display: block;
  margin-top: 23px;
  font: 500 clamp(30px, 4.1vw, 43px)/1.04 Cabinet, Arial, sans-serif;
  letter-spacing: -.025em;
}

#work .project-summary,
#projects .project-summary {
  display: block;
  max-width: 34em;
  margin-top: 15px;
  color: rgba(255, 255, 255, .94);
  font-size: 15px;
  line-height: 1.55;
}

#work .project-role,
#projects .project-role {
  display: block;
  margin-top: 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

#work .project-action,
#projects .project-action {
  display: flex;
  align-items: center;
  width: max-content;
  margin-top: auto;
  padding-top: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .72);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  transition: border-color .2s;
}

#work .project-toggle:hover .project-action,
#projects .project-toggle:hover .project-action { border-color: #fff; }
#work .less-label, #projects .less-label { display: none; }
#work .is-open .more-label, #projects .is-open .more-label { display: none; }
#work .is-open .less-label, #projects .is-open .less-label { display: inline; }

#work .project-more,
#projects .project-more {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  margin: 0;
  border-top: 1px solid transparent;
  background: var(--brand);
  transition: grid-template-rows .5s cubic-bezier(.2,.8,.2,1), border-color .25s;
}

#work .is-open .project-more,
#projects .is-open .project-more {
  grid-template-rows: 1fr;
  border-color: rgba(255, 255, 255, .24);
}

#work .project-more-inner,
#projects .project-more-inner {
  min-height: 0;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 0 38px;
  border: 0;
  text-align: left;
  animation: none;
  transition: padding .5s cubic-bezier(.2,.8,.2,1);
}

#work .is-open .project-more-inner,
#projects .is-open .project-more-inner {
  padding-top: 18px;
  padding-bottom: 28px;
  animation: project-details-drop .34s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes project-details-drop {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

#work .project-more p,
#projects .project-more p {
  max-width: none;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  line-height: 1.7;
}

#work .project-more p a,
#projects .project-more p a {
  display: inline;
  margin: 0;
  color: #fff;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#work .project-links,
#projects .project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
}

#work .project-links a,
#projects .project-links a {
  position: relative;
  z-index: 4;
  display: block;
  width: max-content;
  margin: 0;
  color: #fff;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Translayte's two short links share one row, including on small screens. */
#work #translayte .project-links {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 24px;
  row-gap: 8px;
}

/* What's Poppin uses its bright yellow brand field, so keep every text layer
   and interaction cue in a deep blue with enough contrast against it. */
#work .reel-item#whats-poppin { color: #243b83; }
#work #whats-poppin .project-meta { color: rgba(36, 59, 131, .78); }
#work #whats-poppin .project-meta span + span::before { color: rgba(36, 59, 131, .56); }
#work #whats-poppin .project-summary,
#work #whats-poppin .project-more p { color: rgba(36, 59, 131, .96); }
#work #whats-poppin .project-role { color: rgba(36, 59, 131, .78); }
#work #whats-poppin .project-action,
#work #whats-poppin .project-links a,
#work #whats-poppin .project-more p a { color: #243b83; }
#work #whats-poppin .project-action { border-color: rgba(36, 59, 131, .72); }
#work #whats-poppin .project-toggle:hover .project-action { border-color: #243b83; }
#work #whats-poppin .project-toggle:focus-visible { outline-color: rgba(36, 59, 131, .9); }
#work #whats-poppin.is-open .project-more { border-color: rgba(36, 59, 131, .22); }

#work .reel-item:nth-child(even) .project-visual,
#projects .reel-item:nth-child(even) .project-visual {
  inset: 0 0 auto auto;
}

#work .reel-item:nth-child(even) .project-art,
#projects .reel-item:nth-child(even) .project-art {
  object-position: left top;
  -webkit-mask-image: linear-gradient(270deg, #000 42%, rgba(0,0,0,.72) 63%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 42%, rgba(0,0,0,.72) 63%, transparent 100%);
}

#work .reel-item:nth-child(even) .project-toggle::after,
#projects .reel-item:nth-child(even) .project-toggle::after {
  background: linear-gradient(270deg, transparent 26%, var(--brand) 56%);
}

#work .reel-item:nth-child(even) .project-copy,
#projects .reel-item:nth-child(even) .project-copy {
  width: 54%;
  margin-left: 0;
  padding: 36px 20px 31px 38px;
}

@media (max-width: 680px) {
  #work .reel-item:first-of-type,
  #projects .reel-item:first-of-type { padding-top: 0; }
  #work .reel-item,
  #projects .reel-item { border-radius: 6px; }
  #work .reel-item + .reel-item,
  #projects .reel-item + .reel-item { margin-top: 19px; }
  #work .project-toggle,
  #projects .project-toggle { min-height: 485px; }
  #work .project-toggle::after,
  #projects .project-toggle::after {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.04) 37%, var(--brand) 68%);
  }
  #work .reel-item:nth-child(even) .project-toggle::after,
  #projects .reel-item:nth-child(even) .project-toggle::after {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.04) 37%, var(--brand) 68%);
  }
  #work .project-visual,
  #projects .project-visual,
  #work .reel-item:nth-child(even) .project-visual,
  #projects .reel-item:nth-child(even) .project-visual {
    inset: 0 0 auto 0;
    width: 100%;
    height: 320px;
  }
  #work .project-art,
  #projects .project-art,
  #work .reel-item:nth-child(even) .project-art,
  #projects .reel-item:nth-child(even) .project-art {
    object-fit: cover;
    object-position: left top;
    -webkit-mask-image: linear-gradient(180deg, #000 45%, rgba(0,0,0,.86) 64%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 45%, rgba(0,0,0,.86) 64%, transparent 100%);
  }
  #work .project-copy,
  #projects .project-copy,
  #work .reel-item:nth-child(even) .project-copy,
  #projects .reel-item:nth-child(even) .project-copy {
    width: 100%;
    min-height: 485px;
    margin: 0;
    padding: 249px 22px 23px;
  }
  #work .project-title,
  #projects .project-title { margin-top: 15px; font-size: 34px; }
  #work .project-summary,
  #projects .project-summary { margin-top: 10px; font-size: 14px; }
  #work .project-role,
  #projects .project-role { margin-top: 9px; }
  #work .project-action,
  #projects .project-action { padding-top: 13px; }
  #work .project-more-inner,
  #projects .project-more-inner { padding-right: 22px; padding-left: 22px; }
  #work .is-open .project-more-inner,
  #projects .is-open .project-more-inner { padding-top: 16px; padding-bottom: 24px; }
  #work .project-more p,
  #projects .project-more p { font-size: 13px; }
}

@media (max-width: 420px) {
  #work .project-toggle,
  #projects .project-toggle { min-height: 520px; }
  #work .project-copy,
  #projects .project-copy,
  #work .reel-item:nth-child(even) .project-copy,
  #projects .reel-item:nth-child(even) .project-copy { min-height: 520px; padding-top: 260px; }
  #work .project-meta,
  #projects .project-meta { font-size: 10px; }
  #work .project-summary,
  #projects .project-summary { max-width: 30em; }
  #work .project-action,
  #projects .project-action { padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #work .reel-item,
  #projects .reel-item,
  #work .project-art,
  #projects .project-art,
  #work .project-more,
  #projects .project-more { transition-duration: .01ms; }
}
