.orbit-wrap {
    display: grid;
    place-items: center;
}

.orbit {
    /* Oval container with proportional sizing so items stay consistent across breakpoints */
    --orbit-w: clamp(320px, 92vw, 700px);
    --orbit-h: clamp(120px, 24vmin, 220px);
    --item-size: clamp(90px, calc(var(--orbit-h) * 0.6), 140px);
    --gap: clamp(16px, 4vw, 36px);

    position: relative;
    width: var(--orbit-w);
    height: var(--orbit-h);
    margin: 0 auto;
    /* elliptical radius: huge horizontal, slightly smaller vertical */
    border-radius: 999px / 70%;

    /* lay items side-by-side */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
}

.orbit::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px / 70%;
    border: 1.5px dashed var(--border);
    pointer-events: none;
}

.orbit a.orbit-item {
    position: relative;
    top: auto;
    left: auto;
    transform: none !important;
    width: var(--item-size);
    height: var(--item-size);
    display: block;
    border-radius: 999px;
    text-align: center;
    line-height: var(--item-size);
    transform-origin: center center;
    will-change: transform;
}

.orbit a.orbit-item .bubble {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    box-shadow: var(--shadow);
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--btn-fg);
    transition: color 220ms ease, box-shadow 220ms ease, background 220ms ease, opacity 220ms ease, transform 220ms ease;
    animation: pop-in 420ms cubic-bezier(.2, .8, .2, 1) both, breathe 7s ease-in-out 420ms infinite;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
}

.orbit a.orbit-item .bubble .label {
    position: relative;
    z-index: 1;
    font-size: clamp(0.9rem, calc(var(--item-size) / 7.5), 1.15rem);
    line-height: 1.05;
}

.orbit a.orbit-item:nth-child(1) .bubble {
    animation-delay: 0ms, 420ms;
}

.orbit a.orbit-item:nth-child(2) .bubble {
    animation-delay: 0ms, 920ms;
}

.orbit a.orbit-item:nth-child(3) .bubble {
    animation-delay: 0ms, 1420ms;
}

/* Fancy hover variant: slide-in fill from the left (uniform across bubbles) */
.bubble.fancy-enter::after {
    box-shadow: inset 0 0 0 2px var(--accent);
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.bubble.fancy-enter::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent);
    transform: translateX(-100%);
    transition: transform 300ms ease;
}

.bubble.fancy-enter:hover::before,
.bubble.fancy-enter:focus::before {
    transform: translateX(0);
}

.orbit a.orbit-item:hover .bubble.fancy-enter,
.orbit a.orbit-item:focus .bubble.fancy-enter {
    color: #fff;
}

.orbit a.orbit-item:hover .bubble,
.orbit a.orbit-item:focus .bubble,
.orbit a.orbit-item:focus-visible .bubble {
    animation-play-state: paused;
    box-shadow: 0 18px 36px var(--ring);
}

.orbit a.orbit-item:focus-visible .bubble {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Linear layout now; rotation-based positioning disabled */
.orbit a.orbit-item[data-rot] {
    transform: none !important;
}