/* ============================================================
   site-bubbles.css — canonical bubble-glass recipe for the site.
   Source of truth for the frosted-glass look used by .nav-bubble
   (styles.css) and .project-bubble (carousel.css). New pages
   (contact, blog, project detail pages) consume these tokens
   instead of re-declaring the recipe.
   ============================================================ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(102, 126, 234, 0.28);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-border-bright: rgba(255, 255, 255, 0.42);
  --glass-blur: 14px;
  --glow-rgb: 102, 126, 234;
  --glow-shadow: 0 0 24px rgba(var(--glow-rgb), 0.3), 0 4px 18px rgba(0, 0, 0, 0.45);
  --glow-shadow-hover: 0 0 26px rgba(var(--glow-rgb), 0.66), 0 0 58px rgba(var(--glow-rgb), 0.22),
                       0 6px 22px rgba(0, 0, 0, 0.55), inset 0 0 16px rgba(255, 255, 255, 0.06);
  --rainbow: linear-gradient(135deg, #f97316, #eab308, #22c55e, #06b6d4, #6366f1, #a855f7, #ec4899);
}

/* ---------- Circular glass bubble ---------- */
.glass-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
  color: #fff;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  /* button/anchor reset */
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              background 0.3s ease;
}

.glass-bubble:hover,
.glass-bubble:focus-visible {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-shadow-hover);
  transform: scale(1.08);
}

.glass-bubble:focus-visible {
  outline: 2px solid rgba(var(--glow-rgb), 0.8);
  outline-offset: 3px;
}

/* Size variants */
.glass-bubble-sm { width: 88px;  height: 88px; }
.glass-bubble-lg { width: 150px; height: 150px; }
.glass-bubble-xl { width: 220px; height: 220px; }

/* Bubble children */
.gb-icon {
  font-size: 1.9rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(var(--glow-rgb), 0.6);
  pointer-events: none;
}

.glass-bubble-xl .gb-icon { font-size: 2.8rem; }
.glass-bubble-sm .gb-icon { font-size: 1.5rem; }

.gb-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  max-width: 90%;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.glass-bubble-xl .gb-label { font-size: 0.95rem; }

.gb-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
  max-width: 86%;
  line-height: 1.3;
  pointer-events: none;
}

/* ---------- Rounded-rect glass panel (text content) ---------- */
.glass-panel {
  background: rgba(10, 10, 15, 0.55);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glow-shadow);
}

/* ---------- Status badge pill ---------- */
.glass-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.glass-badge.live {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.glass-badge.coming-soon {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.55);
  color: #d8b4fe;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.glass-badge.seeking-funding {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fcd34d;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ---------- Pill button ---------- */
.glass-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease,
              border-color 0.3s ease, background 0.3s ease;
}

.glass-btn:hover,
.glass-btn:focus-visible {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-shadow-hover);
  transform: translateY(-2px);
}

.glass-btn:focus-visible {
  outline: 2px solid rgba(var(--glow-rgb), 0.8);
  outline-offset: 3px;
}

/* Accent variant — pages set --accent (and optionally --accent-2) as "R,G,B" */
.glass-btn-accent {
  background: linear-gradient(135deg,
    rgba(var(--accent, var(--glow-rgb)), 0.35),
    rgba(var(--accent-2, var(--accent, var(--glow-rgb))), 0.35));
  border-color: rgba(var(--accent, var(--glow-rgb)), 0.5);
}

.glass-btn-accent:hover,
.glass-btn-accent:focus-visible {
  background: linear-gradient(135deg,
    rgba(var(--accent, var(--glow-rgb)), 0.55),
    rgba(var(--accent-2, var(--accent, var(--glow-rgb))), 0.55));
  border-color: rgba(var(--accent, var(--glow-rgb)), 0.75);
  box-shadow: 0 0 26px rgba(var(--accent, var(--glow-rgb)), 0.5),
              0 6px 22px rgba(0, 0, 0, 0.55);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .glass-bubble,
  .glass-btn {
    transition: none;
  }
  .glass-bubble:hover,
  .glass-bubble:focus-visible,
  .glass-btn:hover,
  .glass-btn:focus-visible {
    transform: none;
  }
}

/* ============================================================
   About Me / Projects bubble redesign — shared styles.
   Consumes tokens defined above (--glass-*, --glow-*, --rainbow).
   @keyframes backgroundCycle comes from carousel.css, already
   loaded by every page that uses .bubble-cycling-glow.
   ============================================================ */

/* ---------- Cycling background glow ---------- */
.bubble-cycling-glow {
  position: relative;
  overflow: hidden;
}
.bubble-cycling-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: backgroundCycle 130s infinite ease-in-out;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.bubble-cycling-glow > * { position: relative; z-index: 1; }

/* ---------- True-circle back button ---------- */
.bubble-back-btn {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.bubble-back-btn:hover,
.bubble-back-btn:focus-visible {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-shadow-hover);
  transform: scale(1.08);
}
.bubble-back-btn .bbb-arrow { font-size: 1.3rem; pointer-events: none; }
.bubble-back-btn .bbb-tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%) translateX(-6px);
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.bubble-back-btn:hover .bbb-tooltip,
.bubble-back-btn:focus-visible .bbb-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- True-circle title bubble ---------- */
.bubble-title {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
  margin: 0 auto;
}
.bubble-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  max-width: 74%;
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bubble-title-caption {
  text-align: center;
  margin: 14px auto 32px;
}
.bubble-title-caption .label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.bubble-title-caption p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* ---------- Shared physics field wrapper ---------- */
.bubble-page-field {
  position: relative;
  width: 100%;
}
.bubble-page-field.pool-active { touch-action: none; }
.bubble-page-field .dragging { cursor: grabbing; z-index: 500; }

/* ---------- Content deck (stacked bubble carousel) ---------- */
.deck-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.deck-wrap {
  position: static;
  width: 100%;
  min-height: 600px;
}
.deck-card {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: #0d0d17;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
}
.deck-card-inner {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14%;
  transform-origin: center;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}
.deck-card-inner::-webkit-scrollbar {
  display: none; /* Chrome/Safari — content still scrolls via wheel/touch/keys */
}
.deck-card .deck-step {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #8b8fc7;
  margin-bottom: 8px;
}
.deck-card-inner p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #b8bbda;
  margin: 0;
}
.deck-card-inner .deck-list-heading {
  font-weight: 700;
  color: #e8eaf6;
  margin-top: 10px;
}
.deck-card-inner ul {
  text-align: left;
  padding-left: 1.1em;
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #b8bbda;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.deck-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}
.deck-card-inner a.deck-link {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  text-decoration: none;
}
.deck-card.wobble { animation: deckWobble 5s ease-in-out infinite; }
@keyframes deckWobble {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -2px; }
}

.deck-controls {
  position: relative;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.deck-arrow-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(9, 9, 16, 0.88);
  border: 1px solid var(--glass-border-bright);
  box-shadow: var(--glow-shadow);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.deck-arrow-btn:hover,
.deck-arrow-btn:focus-visible {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-bright);
  box-shadow: var(--glow-shadow-hover);
  transform: scale(1.08);
}
.deck-slide-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(9, 9, 16, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 14px;
  min-width: 3.5em;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .deck-card.wobble { animation: none; }
  .bubble-cycling-glow::before { animation: none; }
}

@media (max-width: 720px) {
  .bubble-title { width: 200px; height: 200px; }
  .bubble-title h1 { font-size: 1.25rem; }
  .deck-wrap { min-height: 420px; }
}

/* ---------- Deck title card (first card in each carousel: "Journey", "Skills & Background") ---------- */
.deck-title-heading {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 85%;
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
