.case-site-nav {
  position: fixed;
  top: 26px;
  left: 50%;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(19, 19, 19, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 54px rgba(19, 19, 19, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  transform: translateX(-50%);
  transition: gap 500ms cubic-bezier(0.65, 0, 0.35, 1), padding 500ms cubic-bezier(0.65, 0, 0.35, 1), border-radius 500ms cubic-bezier(0.65, 0, 0.35, 1);
}

.case-site-nav a,
.case-site-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(19, 19, 19, 0.56);
  font: 400 14px/1.2 'Poppins', 'SF Pro Display', 'Avenir Next', sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
}

.case-site-nav a:hover,
.case-site-nav button:hover { color: rgb(19, 19, 19); background: rgba(19, 19, 19, 0.08); }
.case-site-nav a:active,
.case-site-nav button:active { transform: scale(0.96); }
.case-site-nav .case-nav-home { padding-inline: 8px; }
.case-site-nav .case-nav-home:hover { background: transparent; }
.case-site-nav .case-nav-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; filter: grayscale(1); }
.case-site-nav .case-nav-contact { color: rgb(19, 19, 19); background: rgba(19, 19, 19, 0.08); }
.case-site-nav .case-language-toggle { width: 38px; padding: 0; cursor: pointer; }
.case-language-icon { display: block; width: 16px; height: 16px; color: currentColor; line-height: 0; background: currentColor; -webkit-mask: url('images/language-icon.svg') center / 16px 16px no-repeat; mask: url('images/language-icon.svg') center / 16px 16px no-repeat; }
.case-language-icon span, .case-language-icon svg { display: none; }

.case-site-nav.is-compact { gap: 0; padding: 4px; border-radius: 12px; justify-content: center; }
.case-site-nav [data-case-nav-secondary] { max-width: 180px; overflow: hidden; opacity: 1; transform-origin: center; visibility: visible; transition: color 180ms ease, background 180ms ease, max-width 500ms cubic-bezier(0.65, 0, 0.35, 1), padding 500ms cubic-bezier(0.65, 0, 0.35, 1), opacity 500ms cubic-bezier(0.65, 0, 0.35, 1), transform 500ms cubic-bezier(0.65, 0, 0.35, 1), visibility 0s linear 0s; }
.case-site-nav.is-compact [data-case-nav-secondary] { max-width: 0; padding-inline: 0; opacity: 0; pointer-events: none; transform: scale(0.94); visibility: hidden; transition-delay: 0s, 0s, 0s, 0s, 0s, 500ms; }

/* Reuse the homepage's pinned project note on every case-study header. */
.case-project-anchor {
  position: relative;
  width: min(188px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 44px;
  padding: 9px;
  border: 1px solid rgba(19, 19, 19, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(19, 19, 19, 0.12), 0 2px 4px rgba(19, 19, 19, 0.04);
  transform: rotate(-2.26deg);
}
.case-project-anchor-head {
  position: relative;
  display: block;
  height: auto;
  min-height: 0;
  margin-top: 27.5%;
  padding: 10px 11px 9px;
  overflow: visible;
  border-radius: 12px;
  background: #f6f6f6;
  box-shadow: inset 0 -3px 1px rgba(0, 0, 0, 0.12);
}
.case-project-anchor-pin {
  position: absolute;
  top: -34%;
  left: -2%;
  z-index: 3;
  width: 15%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.16));
  transform: rotate(2.26deg);
}
.case-project-anchor-mark {
  position: absolute;
  top: -28%;
  right: 10%;
  z-index: 2;
  width: calc(25% + 4px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #333;
  box-shadow: 0 2px 4px rgba(99, 99, 99, 0.22);
  transform: rotate(-1.2deg);
}
.case-project-anchor-mark img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.case-project-anchor-product { display: flex; flex-direction: column; align-items: flex-start; width: 108px; margin: 0; }
.case-project-anchor-product p {
  order: -1;
  margin: 0 0 10px;
  color: #878787;
  font-family: var(--font-serif, 'Averia Serif Libre', Georgia, serif);
  font-size: 10px;
  line-height: 12.8px;
  letter-spacing: -0.04em;
}
.case-project-anchor-product h2 { margin: 0; color: rgb(19, 19, 19); font-size: 12.8px; font-weight: 400; line-height: 16px; letter-spacing: -0.055em; }
.case-project-anchor-description { width: 128px; margin: 6px 0 0; color: rgba(19, 19, 19, 0.56); font-size: 8px; line-height: 10px; letter-spacing: 0.014em; }
.case-project-anchor-head::after { content: ""; display: block; width: 108px; margin-top: 7px; color: rgba(19, 19, 19, 0.56); font-size: 6px; line-height: 10px; }
.case-project-anchor.is-nox .case-project-anchor-head::after { content: "2025.8-2026.1"; }
.case-project-anchor.is-surge .case-project-anchor-head::after { content: "2025"; }
.case-project-anchor.is-unibee .case-project-anchor-head::after { content: "2024.12-2025.7"; }
.case-project-anchor.is-startline .case-project-anchor-head::after { content: "2 months"; }
.case-project-anchor.is-nox .case-project-anchor-pin { filter: grayscale(1) brightness(0.34) drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.16)); }
.case-project-anchor.is-unibee .case-project-anchor-head { background: #fff8cd; }
.case-project-anchor.is-unibee .case-project-anchor-product p { color: #bbae3a; }
.case-project-anchor.is-startline .case-project-anchor-head { background: #ffeee1; }
.case-project-anchor.is-startline .case-project-anchor-product p { color: #a68a68; }
.case-project-anchor.is-startline .case-project-anchor-pin { top: -60%; }

/* The AI panel belongs to the navigation and opens directly beneath it. */
body .case-site-nav ~ .ai-panel {
  top: 98px;
  left: 50%;
  transform: translateX(-50%) translateY(0) scale(1);
  transform-origin: top center;
}
body .case-site-nav ~ .ai-panel.collapsed { transform: translateX(-50%) translateY(-12px) scale(0.96); }

@media (max-width: 809.98px) {
  body .case-site-nav ~ .ai-panel { top: auto; bottom: 84px; }
}

@media (max-width: 809.98px) {
  .case-site-nav { top: auto; bottom: 14px; width: max-content; max-width: calc(100% - 28px); min-width: 0; justify-content: flex-start; gap: 4px; padding: 6px; border-radius: 16px; overflow-x: auto; scrollbar-width: none; }
  .case-site-nav::-webkit-scrollbar { display: none; }
  .case-site-nav.is-compact { max-width: none; justify-content: center; padding: 2px; overflow: visible; }
  .case-site-nav a, .case-site-nav button { min-height: 42px; min-width: 0; padding: 0 6px; font-size: 12px; }
  .case-site-nav .case-nav-home { padding-inline: 7px; }
  .case-site-nav .case-language-toggle { width: 36px; flex: 0 0 36px; }
}

@media (max-width: 359.98px) {
  .case-site-nav a, .case-site-nav button { padding-inline: 3px; font-size: 11px; }
  .case-site-nav .case-nav-home { padding-inline: 4px; }
  .case-site-nav .case-language-toggle { width: 32px; flex-basis: 32px; }
}
