/* Artwork-led glass cards: a fine rim and a clear, frosted information strip. */
.selected-carousel {
  --selected-card-width: clamp(240px, 27vw, 350px);
  --selected-card-height: calc(var(--selected-card-width) + 20px);
  --selected-card-footer: 64px;
  position: relative;
  width: 100%;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  isolation: isolate;
}

.selected-section #selected-grid {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--selected-card-height) + 58px);
  margin: 0;
  gap: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 48%;
  touch-action: pan-y;
  user-select: none;
}

.selected-section #selected-grid .project-card {
  position: absolute;
  top: 46%;
  left: 50%;
  width: var(--selected-card-width);
  height: var(--selected-card-height);
  padding: 0;
  margin: 0;
  border: 1px solid #f4faffb8;
  border-radius: 15px;
  background: linear-gradient(145deg, #f5fbff30, #d7e7fa16 54%, #e8f3ff2b);
  color: #fff;
  text-align: center;
  box-shadow: 0 19px 40px #34477a26, inset 0 1px 1px #fff9, inset -1px -1px 1px #edf7ff70;
  -webkit-backdrop-filter: blur(13px) saturate(1.12);
  backdrop-filter: blur(13px) saturate(1.12);
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: box-shadow .3s ease;
}

.selected-section #selected-grid .project-card:before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: none;
  box-shadow: inset 0 1px 1px #fff9, inset -1px -1px 2px #d9edff59;
  pointer-events: none;
}

.selected-section #selected-grid .project-card:after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background: #1e345b;
  opacity: var(--card-shade, 0);
  pointer-events: none;
}

.selected-section #selected-grid .project-card.is-current {
  box-shadow: 0 25px 52px #34457530, 0 0 25px #e2f4ff18, inset 0 1px 1px #fffc, inset -1px -1px 2px #e7f5ff8c;
}

.selected-section #selected-grid .project-card:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 6px;
}

.selected-section #selected-grid .project-image,
.selected-section #selected-grid .project-card:nth-child(even) .project-image {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
  height: calc(100% - var(--selected-card-footer) - 5px);
  margin: 0;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  border-radius: 10px 10px 4px 4px;
  background: #c3cce0;
  box-shadow: 0 12px 17px -8px #142d5659, 0 4px 6px -3px #24476e3d;
}

.selected-section #selected-grid .project-image:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #19243e57, transparent 24%, transparent);
  pointer-events: none;
}

.selected-section #selected-grid .project-image img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  transform: none;
  transition: filter .35s ease;
}

.selected-section #selected-grid .project-card.is-current:hover img {
  transform: none;
  filter: brightness(1.035);
}

.selected-section #selected-grid .project-meta { display: contents; }
.selected-section #selected-grid .project-meta h3 {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--selected-card-footer);
  min-height: 0;
  margin: 0;
  padding: 9px 50px 9px 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-top: 1px solid #fff4;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(120deg, #f4faff29, #edf5ff0d 58%, #ffffff24);
  box-shadow: inset 0 -1px 1px #f2faff40;
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  color: #fff;
  font-size: clamp(13px, 1.14vw, 16px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -.035em;
  word-break: keep-all;
  text-align: left;
  text-shadow: 0 1px 5px #203b6299;
}

.selected-section #selected-grid .project-meta > span {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 17px;
  color: #fff;
  font-size: 9px;
  letter-spacing: .05em;
  text-shadow: 0 1px 6px #234976b3;
}

.selected-section #selected-grid .project-category {
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 17px;
  max-width: calc(100% - 70px);
  margin: 0;
  color: #fff;
  font-size: 8px;
  line-height: 1.3;
  letter-spacing: .09em;
  text-align: left;
  text-shadow: 0 1px 9px #163353;
}

.selected-section #selected-grid .project-image .project-arrow {
  z-index: 5;
  right: 9px;
  bottom: calc((var(--selected-card-footer) + 28px) / -2);
  left: auto;
  width: 28px;
  height: 28px;
  border-color: #ffffff9e;
  background: #eef8ff26;
  color: white;
  font-size: 16px;
  opacity: 0;
  transform: none;
  transition: opacity .3s ease, background .3s ease;
}

.selected-section #selected-grid .project-card.is-current .project-arrow { opacity: 1; }
.selected-section #selected-grid .project-card.is-current:hover .project-arrow { background: #f5fbff66; color: #fff; }

.selected-carousel-controls {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  color: #fff;
  text-shadow: 0 1px 8px #1d3a69;
}

.selected-carousel-controls > button {
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  padding: 0 0 2px;
  border: 1px solid #ffffffad;
  border-radius: 50%;
  background: linear-gradient(135deg, #faffff93, #eee8ff67);
  color: #355e8e;
  box-shadow: inset 0 1px 1px #fff, 0 5px 20px #48699113;
  font-size: 20px;
  backdrop-filter: blur(12px);
  transition: background .25s ease, transform .25s ease;
}

.selected-carousel-controls > button:hover { background: #fff; transform: translateY(-2px); }
.selected-carousel-controls > button:focus-visible { outline-color: #376fb6; }
.selected-carousel-readout { min-width: 155px; max-width: 360px; text-align: center; }
.selected-carousel-count { font-size: 10px; font-weight: 600; letter-spacing: .2em; }
.selected-carousel-title { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.selected-carousel-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; position: relative; z-index: 5; margin-top: 16px; color: #fff; text-shadow:0 1px 9px #16365f; font-size: 10px; line-height: 1.7; letter-spacing: -.01em; text-align: center; }
.selected-touch-hint { display: none; }
.paused .selected-pointer-hint { display: none; }

@media (max-width: 680px) {
  .selected-carousel { --selected-card-width: min(72vw, 280px); --selected-card-height: calc(var(--selected-card-width) + 18px); --selected-card-footer: 64px; perspective: 900px; }
  .selected-section #selected-grid { height: calc(var(--selected-card-height) + 42px); }
  .selected-section #selected-grid .project-meta h3 { font-size: 13px; padding-left: 13px; }
  .selected-section #selected-grid .project-meta > span { top: 15px; right: 15px; font-size: 8px; }
  .selected-section #selected-grid .project-category { top: 15px; left: 15px; font-size: 7px; }
  .selected-carousel-controls { gap: 18px; }
  .selected-carousel-readout { min-width: 100px; }
  .selected-carousel-controls > button { flex-basis: 36px; width: 36px; height: 36px; font-size: 18px; }
  .selected-carousel-hint { flex-direction: column; gap: 0; margin-top: 12px; font-size: 9px; }
}

@media (max-height: 720px) {
  .selected-carousel { --selected-card-width: clamp(220px, 38svh, 280px); --selected-card-height: calc(var(--selected-card-width) + 12px); --selected-card-footer: 60px; }
  .selected-section #selected-grid { height: calc(var(--selected-card-height) + 30px); }
  .selected-carousel-hint { margin-top: 8px; }
}

@media (hover: none) {
  .selected-pointer-hint { display: none; }
  .selected-touch-hint { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .selected-section #selected-grid,
  .selected-section #selected-grid .project-card,
  .selected-section #selected-grid .project-image img { transition: none; }
  .selected-pointer-hint { display: none; }
}
