/* Work tabs + panel — design-preview only, same page as background.css. */

.work-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.work-tab{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--chip-border);
  border-radius: 3px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}
.work-tab:hover{ transform: translateY(-1px); }
.work-tab:focus-visible{ outline: 2.5px solid var(--focus); outline-offset: 2px; }
.work-tab[aria-pressed="true"]{
  border-color: var(--identity);
  box-shadow: inset 0 0 0 1px var(--identity);
  color: var(--identity);
}
@media (max-width: 576px){
  /* At 12px, labels like "Greenheart Exchange" force these to wrap onto a
     second line inside the button — looks broken at narrow widths. Smaller
     text + tighter padding keeps each tab on one line. */
  .work-tab{
    flex: 1;
    font-size: 10px;
    padding: 7px 10px;
  }
}

.work-panel{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border: 1.5px solid var(--rule-major);
  background: transparent;
  padding: 20px;
}
.work-panel.reversed{ flex-direction: row-reverse; }
.work-panel .work-image{ flex: 1 1 0; min-width: 0; }
.work-panel .work-details{ flex: 1 1 0; min-width: 0; }
@media (max-width: 576px){
  .work-panel{ flex-direction: column !important; }
}

/* Tab switch: both boxes stay fully visible and swap content in place; the
   FLIP slide (transform) runs whenever JS clears the instant-snap it
   applies right after the layout change — see work.js's flip(). */
.work-image,
.work-details{
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce){
  .work-image,
  .work-details{ transition: none; }
}

.work-image{
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1.5px solid var(--chip-border);
  overflow: hidden;
}
.work-image a{
  position: absolute;
  inset: 0;
  display: block;
}
.work-image a:focus-visible{ outline: 2.5px solid var(--focus); outline-offset: -3px; }
.work-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.work-image .corner{
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--surface);
  opacity: 0.85;
  z-index: 1;
}
.work-image .corner.tl{ top: -1.5px; left: -1.5px; border-right: none; border-bottom: none; }
.work-image .corner.tr{ top: -1.5px; right: -1.5px; border-left: none; border-bottom: none; }
.work-image .corner.bl{ bottom: -1.5px; left: -1.5px; border-right: none; border-top: none; }
.work-image .corner.br{ bottom: -1.5px; right: -1.5px; border-left: none; border-top: none; }

.work-details{
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.work-link{
  align-self: flex-start;
  font-family: var(--font-name);
  font-weight: 600;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--identity);
  padding-bottom: 1px;
}
.work-link:hover,
.work-link:focus-visible{ color: var(--identity); }
.work-link:focus-visible{ outline: 2.5px solid var(--focus); outline-offset: 3px; }
.work-link .arrow{ font-family: var(--font-mono); font-weight: 400; font-size: 0.75em; margin-left: 2px; }

.work-highlights{
  list-style: none;
  margin: 0;
  padding: 2px 4px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  /* Real bullet count varies a lot per site (7-10). The page itself never
     scrolls on desktop (see background.css), so an unusually long list
     scrolls in its own box instead of overflowing past the viewport. */
  max-height: min(44vh, 380px);
  overflow-y: auto;
}
.work-highlights li{
  display: flex;
  gap: 9px;
  align-items: baseline;
}
.work-highlights li::before{
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--identity);
  transform: translateY(-1px);
}
