/* ── Guided Site Tour & Onboarding Banner ───────────────── */

/* ── Guided Tour Auto-Prompt Banner ──────────────────────────── */
.tour-prompt-banner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10005;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 25px var(--glow-gold-a30);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tour-prompt-banner.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tour-prompt-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tour-prompt-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.tour-prompt-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tour-prompt-text strong {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--heading);
}

.tour-prompt-text span {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.35;
}

.tour-prompt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tour-prompt-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tour-prompt-btn.primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-weight: 600;
}

.tour-prompt-btn.primary:hover {
  background: var(--heading);
  border-color: var(--heading);
}

.tour-prompt-btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.tour-prompt-btn.secondary:hover {
  color: var(--text);
}

@media (max-width: 520px) {
  .tour-prompt-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    max-width: none;
  }
}

/* Glassmorphism card glow */
.glass-card-glow {
  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(--card-shadow);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-card-glow:hover {
  border-color: var(--accent-a45);
  box-shadow: var(--card-shadow), 0 0 25px var(--accent-a12);
}

/* Section Mesh Blobs */
.section-mesh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  transition: transform 0.5s ease-out;
  will-change: transform;
}

.mesh-blob--gold {
  width: 450px;
  height: 450px;
  background: var(--accent);
}

.mesh-blob--teal {
  width: 400px;
  height: 400px;
  background: var(--accent2);
}

/* Interactive Skill & Tech Matrix Bars */
.skill-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.25rem;
  width: 100%;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.skill-name {
  color: var(--heading);
  font-weight: 500;
}

.skill-pct {
  color: var(--accent);
  font-size: 0.68rem;
}

.skill-track {
  width: 100%;
  height: 5px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 8px var(--accent-a40);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-fill--teal {
  background: linear-gradient(90deg, var(--accent2), var(--glow-teal));
  box-shadow: 0 0 8px var(--glow-teal-a35);
}

.skill-fill--violet {
  background: linear-gradient(90deg, var(--glow-violet), var(--accent));
  box-shadow: 0 0 8px var(--glow-violet-a35);
}

/* Mobile Bottom Sheet Drawer Upgrade */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer-handle {
  display: none;
}

@media (max-width: 900px) {
  .nav-drawer {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
    max-height: 85vh !important;
    border-radius: 24px 24px 0 0 !important;
    border-top: 1px solid var(--line) !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease !important;
    padding-top: 1.2rem !important;
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 2rem)) !important;
    background: var(--bg2) !important;
  }

  .nav-drawer.open {
    transform: translateY(0%) !important;
  }

  .nav-drawer-handle {
    display: block;
    width: 44px;
    height: 5px;
    background: var(--muted);
    border-radius: 99px;
    margin: 0 auto 1.2rem;
    opacity: 0.6;
  }
}

/* Page Swipe Navigation Edge Indicator */
.swipe-indicator {
  position: fixed;
  top: 50%;
  z-index: 9990;
  transform: translateY(-50%);
  padding: 0.65rem 1.1rem;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 30px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-a35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.swipe-indicator.left {
  left: 1rem;
  transform: translateY(-50%) translateX(-20px);
}

.swipe-indicator.right {
  right: 1rem;
  transform: translateY(-50%) translateX(20px);
}

.swipe-indicator.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}


/* ── Guided Site Tour (v37) ─────────────────────────────── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.tour-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tour-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tour-mask-svg {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.tour-mask-bg {
  cursor: pointer;
  pointer-events: auto;
}

#tourHoleRect {
  transition: x 0.3s cubic-bezier(0.16, 1, 0.3, 1), y 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-spotlight-frame {
  position: fixed;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 20px var(--accent-a35), inset 0 0 10px var(--accent-a12);
  pointer-events: none;
  z-index: 10011;
  display: none;
  transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Disable content-visibility containment during active tour so highlighted elements
   and children are never trapped behind the tour scrim stacking context */
body.tour-active .cv-auto,
body.tour-active .content-visibility-auto,
body.tour-active .cv-card {
  content-visibility: visible !important;
}

.tour-highlight {
  position: relative !important;
  z-index: 10011 !important;
  outline: 2px solid var(--accent) !important;
  outline-offset: 8px !important;
  border-radius: 10px !important;
  transition: outline-color 0.2s ease;
  pointer-events: auto !important;
}

.tour-card {
  position: fixed;
  z-index: 10012;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 340px;
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 2px 1px var(--accent-a12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s ease, left 0.3s ease;
}

.tour-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.tour-progress {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.tour-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.tour-close:hover,
.tour-close:focus-visible {
  color: var(--heading);
  background: var(--accent-a07);
}

.tour-title {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
  color: var(--heading);
}

.tour-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.tour-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.tour-btn-primary,
.tour-btn-secondary {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}

.tour-btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.tour-btn-primary:hover {
  transform: translateY(-1px);
}

.tour-btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.tour-btn-secondary:hover {
  background: var(--accent-a07);
}

.tour-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .tour-overlay,
  .tour-card,
  .tour-highlight {
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .tour-card {
    max-width: calc(100% - 2rem);
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

