@font-face {
  font-family: "SiteSignika";
  src: url("/web/shared/fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --site-shell-bg: #fff;
  --site-shell-text: #000;
  --site-shell-muted: rgb(75 85 99);
  --site-shell-border: rgba(0, 0, 0, 0.12);
  --site-shell-surface: rgba(255, 255, 255, 0.88);
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-shell-bg: #000;
    --site-shell-text: #fff;
    --site-shell-muted: rgb(209 213 219);
    --site-shell-border: rgba(255, 255, 255, 0.18);
    --site-shell-surface: rgba(0, 0, 0, 0.82);
  }
}

.site-shell-page {
  margin: 0;
  background: var(--site-shell-bg);
  color: var(--site-shell-text);
}

.site-shell-header {
  --site-shell-content-max: 1536px;
  box-sizing: border-box;
  width: 100%;
  padding: 2.5rem 1.25rem 0.25rem;
  color: var(--site-shell-text);
  font-family: SiteSignika, Signika, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 900;
}

.site-shell-header[data-site-shell-theme="overlay"] {
  --site-shell-text: #fff;
  --site-shell-muted: rgba(255, 255, 255, 0.78);
  --site-shell-border: rgba(255, 255, 255, 0.52);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.28);
}

.site-shell-inner {
  width: 100%;
  max-width: var(--site-shell-content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 1rem;
}

.site-shell-brand {
  color: currentColor;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-right: 0;
  white-space: nowrap;
}

.site-shell-toggle {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  margin-left: auto;
  color: currentColor;
  background: transparent;
  padding: 0;
  display: none;
  position: relative;
  cursor: pointer;
}

.site-shell-toggle-line {
  position: absolute;
  left: 0.125rem;
  right: 0.125rem;
  top: 50%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-shell-toggle-line:nth-child(1) {
  transform: translateY(-0.42rem);
}

.site-shell-toggle-line:nth-child(3) {
  transform: translateY(0.42rem);
}

.site-shell-header.is-open .site-shell-toggle-line:nth-child(1) {
  transform: rotate(45deg);
}

.site-shell-header.is-open .site-shell-toggle-line:nth-child(2) {
  opacity: 0;
}

.site-shell-header.is-open .site-shell-toggle-line:nth-child(3) {
  transform: rotate(-45deg);
}

.site-shell-menu {
  margin-left: auto;
  min-width: 0;
}

.site-shell-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 1vw, 1rem);
  padding: 0;
  margin: 0;
}

.site-shell-menu a {
  color: currentColor;
  text-decoration: none;
  display: inline-block;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  position: relative;
  white-space: nowrap;
}

.site-shell-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08rem;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.site-shell-menu a:hover::after,
.site-shell-menu a.is-active::after,
.site-shell-menu a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-shell-main {
  width: min(100% - 2.5rem, 1536px);
  margin: 0 auto;
}

body[class*="md:px-20"] > .site-shell-header {
  --site-shell-content-max: 1536px;
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 768px) {
  .site-shell-header {
    padding-left: 5rem;
    padding-right: 5rem;
  }

  .site-shell-main {
    width: min(100% - 10rem, 1536px);
  }

}

@media (max-width: 1320px) {
  .site-shell-inner {
    flex-wrap: wrap;
  }

  .site-shell-toggle {
    display: block;
  }

  .site-shell-menu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    margin-left: 0;
  }

  .site-shell-header.is-open .site-shell-menu {
    max-height: 22rem;
  }

  .site-shell-menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-top: 1.25rem;
  }

  .site-shell-menu a {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .site-shell-header[data-site-shell-theme="overlay"].is-open {
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(18px);
  }
}

/* Site-wide Header Music Player Tooltip Styles */
.site-header-music-container,
.portfolio-header-container {
  position: relative;
  display: inline-block;
  pointer-events: auto;
}

.music-player-tooltip {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(-10px);
  margin-left: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 12px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  width: max-content;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (prefers-color-scheme: dark) {
  .music-player-tooltip {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

.site-header-music-container:hover .music-player-tooltip,
.portfolio-header-container:hover .music-player-tooltip,
.music-player-tooltip:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

/* Audio Loading Indicator */
.audio-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--site-shell-muted, #666);
}

.audio-loading .dot {
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: audio-loading-pulse 1.4s infinite ease-in-out both;
}

.audio-loading .dot:nth-child(1) { animation-delay: -0.32s; }
.audio-loading .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes audio-loading-pulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .music-player-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    max-width: 90vw;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
    margin-top: 10px;
    margin-left: 0;
  }

  .music-player-tooltip.mobile-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-header-music-container,
  .portfolio-header-container {
    display: inline-block;
    width: auto;
    cursor: pointer;
    position: relative;
  }
}

