html:has(body.work-index) {
  background: #d31800;
}

body.portfolio-body.work-index {
  min-height: 100svh;
  background: #d31800;
  color: #fffdf5;
}

.work-index :focus-visible {
  outline: 3px solid #f0ff6a;
  outline-offset: 5px;
}

.work-index #navbar .logo img {
  filter: brightness(0) saturate(100%) invert(95%) sepia(84%) saturate(627%) hue-rotate(13deg) brightness(107%) contrast(104%) !important;
}

.work-index-main {
  padding-top: calc(76px + clamp(40px, 6vw, 80px));
  padding-bottom: 56px;
}

.work-index-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.work-tile-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 280px));
  gap: 24px;
}

.work-tile-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.work-tile-grainient {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  clip-path: url(#work-tile-union);
  -webkit-clip-path: url(#work-tile-union);
}

.work-tile-grainient.is-active {
  opacity: .2;
}

.work-tile-grainient-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: .2;
  pointer-events: none;
  clip-path: url(#work-tile-union);
  -webkit-clip-path: url(#work-tile-union);
}

.work-tile-grainient-fallback img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-tile-grainient-fallback[hidden] {
  display: none;
}

.work-index .work-tile {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 26px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  text-decoration: none;
  color: #fffdf5;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.work-tile h2 {
  margin: 0;
  font: 700 30px/1.12 "Figtree", sans-serif;
  letter-spacing: -.025em;
}

.work-tile p {
  margin: 15px 0 0;
  font: 400 14px/1.5 "Figtree", sans-serif;
}

@media (hover: hover) {
  .work-index .work-tile:hover {
    border-color: #f0ff6a;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-index .work-tile { transition: none; }
}
