/* Set the html and body to 100% height to ensure proper inheritance */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* Hide any overflow caused by the Vanta.js background */
  overflow: hidden;
  background: #000;
}

#vanta-bg {
  /* Set the container to occupy the full viewport height */
  height: 100vh;
  width: 100%;
  /* Position the background behind your content */
  position: absolute;
}

/* Top-left collapsible panel */
#site-panel {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  width: min(360px, 92vw);
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  backdrop-filter: blur(2px);
}

#site-panel .panel-header {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  letter-spacing: 0.3px;
}

#site-panel .panel-header .title {
  display: flex;
  align-items: center;
  gap: 8px;
}

#site-panel .icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* Action button at bottom of panel */
#site-panel .action-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

#site-panel .switch-bg {
  appearance: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#site-panel .switch-bg:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

#site-panel .chevron {
  transition: transform 0.3s ease;
}

#site-panel.expanded .chevron {
  transform: rotate(180deg);
}

#site-panel .panel-content {
  padding: 0 12px; /* start collapsed without vertical padding */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease;
}

#site-panel.expanded .panel-content {
  max-height: 500px; /* enough room for typical content */
  opacity: 1;
  padding-top: 12px;
  padding-bottom: 12px;
  overflow: auto;
}

/* Top-right LinkedIn link */
#linkedin-link {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #444;
  border-radius: 999px;
  padding: 6px 10px;
  /* Safe area padding for iOS notches */
  padding-right: calc(10px + env(safe-area-inset-right));
  padding-left: calc(10px + env(safe-area-inset-left));
  text-decoration: none;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(2px);
}

#linkedin-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* LinkedIn icon inside the button */
#linkedin-link .li-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  fill: currentColor;
}

/* Bottom-left pixel triceratops button */
#trike-btn {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  padding: 0;
  backdrop-filter: none;
}

#trike-btn:hover {
  background: transparent;
}

#trike-btn svg {
  image-rendering: pixelated;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #site-panel {
    top: 12px;
    left: 12px;
    width: min(94vw, 380px);
  }
  #site-panel.expanded .panel-content {
    max-height: 60vh;
  }
  #linkedin-link {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    right: calc(12px + env(safe-area-inset-right));
    font-size: 12px;
    padding: 6px 10px;
  }
}


