:root {
  color-scheme: dark;
  --bg: #0c0c0e;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  overscroll-behavior: none;
  touch-action: none;
}

body {
  background: var(--bg);
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  /* Minimal but visible cursor — a small ring, on-theme and actually usable. */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='6' fill='none' stroke='white' stroke-opacity='0.75' stroke-width='1.3'/%3E%3C/svg%3E")
      11 11,
    auto;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

/* Contact bubble: a single orb that the field reveals, blooming into links. */
#links {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  z-index: 2;
}

/* A single rounded-rect bar. Collapsed it's a small square with the dot; open
   it stretches into a bar divided into vertical segments — each one a link. */
#bar {
  --fg: 232, 232, 236;
  position: absolute;
  left: 0;
  top: 0;
  margin: -22px 0 0 -22px;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border-radius: 16px;
  border: 1.3px solid rgba(var(--fg), 0.6);
  background: rgba(24, 24, 30, 0.82);
  color: rgba(var(--fg), 0.92);
  cursor: pointer;
  transition: width 0.45s cubic-bezier(0.2, 0.9, 0.2, 1),
    height 0.5s cubic-bezier(0.2, 0.9, 0.2, 1),
    margin 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}
#links.open #bar {
  width: 190px;
  height: 212px;
  margin: -106px 0 0 -95px;
  cursor: default;
}

.seg {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 0 20px;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease;
}
.seg + .seg {
  border-top: 1px solid rgba(var(--fg), 0.14); /* divider between stacked rows */
}
.seg svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.seg .cap {
  font: 200 12.5px/1.2 -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Inter", system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: rgba(var(--fg), 0.74);
  white-space: nowrap;
}
#links.open .seg {
  opacity: 1;
  pointer-events: auto;
}
#links.open .seg:hover {
  background: rgba(var(--fg), 0.08);
}
#links.open .seg:nth-child(1) {
  transition-delay: 0.14s;
}
#links.open .seg:nth-child(2) {
  transition-delay: 0.18s;
}
#links.open .seg:nth-child(3) {
  transition-delay: 0.22s;
}
#links.open .seg:nth-child(4) {
  transition-delay: 0.26s;
}
#links.open .seg:nth-child(5) {
  transition-delay: 0.3s;
}

/* Periodic ripple — an on-theme "tap me" affordance (rounded-rect ring). */
#links::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 16px;
  border: 1.3px solid rgba(232, 232, 236, 0.5);
  pointer-events: none;
  animation: ping 3.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
#links.open::after {
  animation: none;
  opacity: 0;
}
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  60%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #links::after {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petal {
    transition-duration: 0.001s;
  }
}

