/* ════════════════════════════════════════
   Reset
   ════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Arial, sans-serif;
  --menubar-h: 28px;
  --dock-h: 88px;
}

body {
  font-family: var(--font);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}


/* ════════════════════════════════════════
   Menu Bar
   ════════════════════════════════════════ */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(18, 8, 38, 0.52);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  z-index: 4000;
  user-select: none;
  pointer-events: auto;
}

.menubar-left,
.menubar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.apple-icon {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.9);
  margin-right: 6px;
  flex-shrink: 0;
}

.menubar-brand {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  padding: 2px 8px;
  margin-right: 2px;
}

.menubar-item {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.82);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: default;
  transition: background 0.1s;
  white-space: nowrap;
  background: none;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.menubar-item:hover {
  background: rgba(255,255,255,0.11);
}

.menubar-icon {
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,0.85);
  margin: 0 5px;
  flex-shrink: 0;
}

.menubar-clock {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  padding: 0 6px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}


/* ════════════════════════════════════════
   Desktop
   ════════════════════════════════════════ */
.desktop {
  position: fixed;
  top: var(--menubar-h);
  left: 0;
  right: 0;
  bottom: var(--dock-h);
  overflow: hidden;
}

/* Hero background — artwork contained left; gradient overlay blends right side. */
.desktop-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Layer 1: soft right-side vignette — erases hard cutoff, darkens behind chat */
  /* Layer 2: optional warm radial glow near center-right (echoes horizon light) */
  /* Layer 3: hero artwork, never cropped */
  background-image:
    linear-gradient(
      to right,
      rgba(20, 5, 48, 0)    55%,
      rgba(20, 5, 48, 0.60) 70%,
      rgba(20, 5, 48, 0.95) 100%
    ),
    radial-gradient(
      circle at 70% 50%,
      rgba(255, 140, 80, 0.07) 0%,
      transparent             60%
    ),
    url('../images/hero-bg.png');
  background-size:
    100% 100%,
    100% 100%,
    contain;
  background-position:
    0 0,
    0 0,
    left center;
  background-repeat: no-repeat;
  /* fallback colour fills letterbox gap above/below contained image */
  background-color: #140530;
}


/* ════════════════════════════════════════
   Desktop Icons
   ════════════════════════════════════════ */
.desktop-icons {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 7px 10px 8px;
  border-radius: 8px;
  width: 84px;
  cursor: pointer;
  transition: background 0.1s ease;
  outline: none;
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.16);
}

.desktop-icon.selected {
  background: rgba(70,120,220,0.38);
}

.icon-img {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55));
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}

.desktop-icon:hover .icon-img {
  transform: scale(1.08);
}

.icon-img svg {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  overflow: hidden;
}

.icon-label {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  max-width: 76px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.7);
  word-break: break-word;
}


/* ════════════════════════════════════════
   Window Layer  (fixed overlay, below menubar/dock)
   ════════════════════════════════════════ */
#window-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* ════════════════════════════════════════
   Chat Window launch animation
   ════════════════════════════════════════ */
@keyframes chat-launch {
  0% {
    transform: translate(-50%, 60vh) scale(0.18);
    opacity: 0;
    border-radius: 28px;
  }
  55% {
    opacity: 1;
  }
  75% {
    transform: translate(-50%, -56%) scale(1.03);
    border-radius: 20px;
  }
  90% {
    transform: translate(-50%, -47%) scale(0.98);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    border-radius: 20px;
  }
}

@keyframes chat-minimize {
  to {
    opacity: 0;
    transform: translateY(60vh) scale(0.12);
    border-radius: 50%;
  }
}

@keyframes chat-restore {
  from {
    opacity: 0;
    transform: translateY(60vh) scale(0.12);
    border-radius: 50%;
  }
}

/* ════════════════════════════════════════
   Chat Window
   ════════════════════════════════════════ */
.chat-window {
  position: absolute;
  top: 50%;
  left: 72%;
  transform: translate(-50%, -50%);
  width: clamp(380px, 40vw, 720px);
  height: clamp(440px, 72vh, 580px);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  /* deeper, richer glass */
  background: rgba(12, 8, 20, 0.86);
  backdrop-filter: blur(48px) saturate(1.9) brightness(0.92);
  -webkit-backdrop-filter: blur(48px) saturate(1.9) brightness(0.92);
  border: 1px solid rgba(255,255,255,0.075);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 1px 0   rgba(255,255,255,0.07) inset,
    0 4px 8px rgba(0,0,0,0.22),
    0 14px 36px rgba(0,0,0,0.46),
    0 44px 88px rgba(0,0,0,0.56),
    0 0 72px rgba(90,40,180,0.13);
}

.chat-window.is-launching {
  animation: chat-launch 0.62s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.chat-window.is-minimizing {
  animation: chat-minimize 0.38s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

.chat-window.is-hidden {
  display: none;
}

.chat-window.is-restoring {
  display: flex;
  animation: chat-restore 0.52s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.chat-window.is-maximized {
  left: 20px !important;
  top: calc(var(--menubar-h) + 10px) !important;
  right: 20px !important;
  width: auto !important;
  height: calc(100vh - var(--menubar-h) - var(--dock-h) - 20px) !important;
  transform: none !important;
  transition: left 0.32s cubic-bezier(0.34,1.2,0.64,1),
              top  0.32s cubic-bezier(0.34,1.2,0.64,1),
              width  0.32s cubic-bezier(0.34,1.2,0.64,1),
              height 0.32s cubic-bezier(0.34,1.2,0.64,1);
}

/* Title bar */
.chat-titlebar {
  flex-shrink: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.055);
  cursor: grab;
}

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: filter 0.15s;
}

.tl:hover { filter: brightness(1.18); }

.tl-red    { background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.22); }
.tl-yellow { background: #febc2e; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.22); }
.tl-green  { background: #28c840; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.22); }

.chat-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.86);
  letter-spacing: 0.03em;
  user-select: none;
}

.titlebar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.titlebar-btn-icon {
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,0.28);
  cursor: pointer;
  transition: color 0.15s;
}

.titlebar-btn-icon:hover { color: rgba(255,255,255,0.72); }

/* Window body */
.chat-body {
  flex: 1;
  display: flex;
  min-height: 0;
}


/* ────────────────────────────────────────
   Sidebar
   ──────────────────────────────────────── */
.chat-sidebar {
  width: 192px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.016);
  border-right: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 11px;
}

.sidebar-title {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
}

.compose-icon {
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: color 0.15s;
}

.compose-icon:hover { color: rgba(255,255,255,0.75); }

.sidebar-threads {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.sidebar-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.sidebar-thread:hover {
  background: rgba(255,255,255,0.055);
}

.sidebar-thread.active {
  background: linear-gradient(90deg, rgba(110,55,230,0.22) 0%, rgba(100,45,210,0.10) 100%);
  box-shadow: inset 2px 0 0 rgba(150,90,255,0.65);
}

.thread-icon {
  width: 26px;
  height: 26px;
  color: rgba(255,255,255,0.36);
  flex-shrink: 0;
}

.sidebar-thread.active .thread-icon {
  color: rgba(180,140,255,0.72);
}

.thread-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.thread-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
}

.sidebar-thread.active .thread-name {
  color: rgba(215,190,255,0.92);
}

.thread-time {
  font-size: 10px;
  color: rgba(255,255,255,0.26);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  border-top: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-profile:hover {
  background: rgba(255,255,255,0.04);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 1.5px rgba(140,90,255,0.35);
}

.profile-name {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chevron {
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.24);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-profile.is-open .profile-chevron {
  transform: rotate(180deg);
}

/* Profile dropdown */
.profile-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: rgba(30, 30, 38, 0.96);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 9px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.06) inset;
  position: fixed;
  transform-origin: bottom center;
  transform: scaleY(0.88) translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), opacity 0.15s ease;
  z-index: 9999;
}

.profile-menu.is-open {
  transform: scaleY(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.profile-menu-item a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  border-radius: 5px;
  margin: 0 4px;
  transition: background 0.12s, color 0.12s;
}

.profile-menu-item a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.profile-menu-item a svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.profile-menu-item a:hover svg {
  opacity: 1;
}

.profile-menu-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 3px 8px;
}


/* ────────────────────────────────────────
   Main Chat Area
   ──────────────────────────────────────── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-date-header {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.22);
  padding: 14px 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 4px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 4px;
  font-size: 13.5px;
  line-height: 1.62;
  color: rgba(255,255,255,0.90);
}

.message-bubble.bot {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.075);
}

.message-row.user {
  align-items: flex-end;
}

/* User bubbles use a purple gradient matching the portfolio palette */
.message-bubble.user {
  background: linear-gradient(135deg, rgba(112,55,230,0.34) 0%, rgba(82,35,190,0.30) 100%);
  border: 1px solid rgba(150,95,255,0.22);
  border-radius: 18px 18px 4px 18px;
  color: rgba(255,255,255,0.92);
}

.chat-follow-ups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 0 4px;
  align-self: flex-start;
  max-width: 100%;
}

/* Premium pill capsules with purple tint */
.faq-chip {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(200,170,255,0.78);
  background: rgba(100,50,220,0.10);
  border: 1px solid rgba(140,90,255,0.22);
  border-radius: 100px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  line-height: 1.4;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s,
    transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.18s;
  flex-shrink: 0;
}

.faq-chip:hover {
  background: rgba(120,65,240,0.22);
  border-color: rgba(170,120,255,0.45);
  color: rgba(225,200,255,0.95);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(100,45,220,0.26);
}

.faq-chip--hidden {
  display: none;
}

.faq-chip--toggle {
  opacity: 0.65;
  border-style: dashed;
}

.faq-chip--toggle:hover {
  opacity: 1;
}

.chat-followup-note {
  font-size: 10.5px;
  color: rgba(255,255,255,0.2);
  padding: 8px 2px 4px;
  font-style: italic;
  letter-spacing: 0.01em;
}

.msg-emoji {
  margin-right: 4px;
}

.message-time {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  padding-left: 4px;
  letter-spacing: 0.02em;
}

.chat-vibe-note {
  text-align: center;
  font-size: 10.5px;
  color: rgba(255,255,255,0.15);
  padding: 4px 20px 6px;
  user-select: none;
  letter-spacing: 0.02em;
}

/* Input bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.14);
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 24px;
  padding: 9px 18px;
  font-size: 13px;
  font-family: var(--font);
  color: rgba(255,255,255,0.88);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.chat-input::placeholder { color: rgba(255,255,255,0.26); }

.chat-input:focus {
  border-color: rgba(140,85,255,0.50);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(110,55,230,0.14);
}

/* Send button — purple gradient, subtle glow on hover */
.send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(120,58,225,0.72) 0%, rgba(82,30,165,0.80) 100%);
  border: 1px solid rgba(160,100,255,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s, transform 0.16s cubic-bezier(0.34,1.56,0.64,1);
}

.send-btn svg {
  width: 15px;
  height: 15px;
  fill: rgba(255,255,255,0.88);
}

.send-btn:hover {
  background: linear-gradient(135deg, rgba(140,72,245,0.88) 0%, rgba(100,48,205,0.92) 100%);
  box-shadow: 0 4px 18px rgba(110,50,230,0.38);
  transform: scale(1.08);
}


/* ════════════════════════════════════════
   App Windows  (About / Education / Projects / Contact)
   ════════════════════════════════════════ */
.app-window {
  position: absolute;
  width: clamp(420px, 50vw, 660px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(26, 22, 34, 0.82);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow:
    0 1px 0   rgba(255,255,255,0.06) inset,
    0 2px 4px rgba(0,0,0,0.14),
    0 8px 20px rgba(0,0,0,0.32),
    0 28px 56px rgba(0,0,0,0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.app-window.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Skills window: cap height so the 3D canvas doesn't overflow the viewport */
#window-skills { max-height: 82vh; }

/* Zero-padding body variant used when a React component owns its own spacing */
.app-body--flush {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

/* ════════════════════════════════════════
   Browser App Window
   ════════════════════════════════════════ */
#browser-window {
  position: absolute;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: clamp(620px, 66vw, 960px);
  height: clamp(520px, 80vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(13, 10, 22, 0.96);
  backdrop-filter: blur(48px) saturate(1.7) brightness(0.95);
  -webkit-backdrop-filter: blur(48px) saturate(1.7) brightness(0.95);
  border: 1px solid rgba(255,255,255,0.072);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.055) inset,
    0 4px 16px rgba(0,0,0,0.28),
    0 20px 52px rgba(0,0,0,0.52),
    0 52px 104px rgba(0,0,0,0.60),
    0 0 90px rgba(75,30,160,0.22),
    0 0 180px rgba(55,15,130,0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.34,1.2,0.64,1),
              transform 0.22s cubic-bezier(0.34,1.2,0.64,1),
              top 0.32s cubic-bezier(0.34,1.2,0.64,1),
              left 0.32s cubic-bezier(0.34,1.2,0.64,1),
              width 0.32s cubic-bezier(0.34,1.2,0.64,1),
              height 0.32s cubic-bezier(0.34,1.2,0.64,1);
  z-index: 500;
}

#browser-window.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

#browser-window.is-minimized {
  opacity: 0;
  transform: translate(-50%, 60vh) scale(0.12);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4,0,1,1);
}

#browser-window.is-maximized {
  top: calc(var(--menubar-h) + 8px) !important;
  left: 8px !important;
  transform: none !important;
  width: calc(100vw - 16px) !important;
  height: calc(100vh - var(--menubar-h) - var(--dock-h) - 16px) !important;
  opacity: 1;
  pointer-events: auto;
}

/* Title bar + tab strip + actions */
.browser-titlebar {
  flex-shrink: 0;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 14px;
  gap: 10px;
  background: rgba(255,255,255,0.022);
  border-bottom: 1px solid rgba(255,255,255,0.062);
  cursor: grab;
  user-select: none;
  position: relative;
  z-index: 2;
}

.browser-titlebar:active { cursor: grabbing; }

.browser-tabs {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.browser-tabs::-webkit-scrollbar { display: none; }

.browser-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px 6px 9px;
  border-radius: 7px 7px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.13s, background 0.13s;
  letter-spacing: 0.01em;
  position: relative;
  font-family: var(--font);
}

.browser-tab:hover {
  color: rgba(255,255,255,0.62);
  background: rgba(255,255,255,0.05);
}

.browser-tab.is-active {
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.088);
  border-color: rgba(255,255,255,0.072);
}

.browser-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(140,80,255,0.8), rgba(100,50,240,0.5));
  border-radius: 2px 2px 0 0;
}

.btab-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.5;
}

.browser-tab.is-active .btab-icon {
  opacity: 1;
  color: rgba(170,130,255,0.88);
}

.btab-close {
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  color: rgba(255,255,255,0.38);
  margin-left: 1px;
  transition: opacity 0.12s;
}

.browser-tab:hover .btab-close,
.browser-tab.is-active .btab-close {
  opacity: 1;
}

.browser-tab-new {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.28);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.13s, color 0.13s;
  margin-left: 2px;
}

.browser-tab-new:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.62);
}

/* Actions row (Download CV / theme / github) */
.browser-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.browser-cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 7px;
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.13s, color 0.13s;
  font-family: var(--font);
}

.browser-cv-btn:hover {
  background: rgba(255,255,255,0.11);
  color: rgba(255,255,255,0.90);
}

.browser-action-btn {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.048);
  color: rgba(255,255,255,0.48);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  flex-shrink: 0;
}

.browser-action-btn:hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.84);
}

/* Body: sidebar + panels wrapper */
.browser-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
}

/* ── Persistent Profile Sidebar ── */
.browser-sidebar {
  flex: 0 0 266px;
  width: 266px;
  min-width: 266px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 18px;
  overflow-y: auto;
  background: rgba(10,7,18,0.38);
  border-right: 1px solid rgba(255,255,255,0.055);
  scrollbar-width: none;
}

.browser-sidebar::-webkit-scrollbar { display: none; }

.bsb-avatar-wrap { margin-bottom: 13px; }

/* Shared profile photo style — used in all PN placeholder avatars */
.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.bsb-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
  border: 3px solid rgba(120,80,240,0.30);
  box-shadow:
    0 0 0 5px rgba(90,40,200,0.10),
    0 0 28px rgba(100,45,210,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
}

.bsb-name {
  font-size: 16.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.94);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.bsb-role {
  font-size: 11.5px;
  color: rgba(155,110,255,0.88);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 2px;
}

.bsb-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 14px 0;
}

.bsb-contact {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bsb-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 7px;
  text-decoration: none;
  color: rgba(255,255,255,0.58);
  transition: background 0.12s, color 0.12s;
}

.bsb-row:hover { background: rgba(255,255,255,0.05); }

.bsb-row--link { color: rgba(150,110,255,0.80); }

.bsb-row--link:hover { color: rgba(185,155,255,0.96); }

.bsb-icon {
  width: 13px;
  height: 13px;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

.bsb-row--link .bsb-icon { color: rgba(150,110,255,0.55); }

.bsb-row span {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.bsb-section-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.26);
  width: 100%;
  margin-top: 16px;
  margin-bottom: 10px;
  padding-left: 8px;
}

.bsb-techgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.bsb-tech {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.bsb-tech-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.38);
  overflow: hidden;
}

.bsb-abbr {
  color: rgba(255,255,255,0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--font);
  line-height: 1;
}

.bsb-tech > span {
  font-size: 9px;
  color: rgba(255,255,255,0.46);
  text-align: center;
  line-height: 1.2;
}

.bsb-footer {
  font-size: 9.5px;
  color: rgba(255,255,255,0.18);
  text-align: center;
  margin-top: auto;
  padding-top: 18px;
  width: 100%;
}


/* ── Panels wrapper ── */
.browser-panels-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.browser-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 22px 26px 26px;
  display: none;
  flex-direction: column;
  gap: 16px;
}

.browser-panel.is-active { display: flex; }

.browser-panel--flush {
  padding: 0;
  overflow: hidden;
}

.browser-panel--flush #techstack-root {
  width: 100%;
  height: 100%;
}

/* ── Panel heading ── */
.bp-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  margin-bottom: 2px;
}

.bp-heading-icon {
  width: 26px;
  height: 26px;
  color: rgba(150,110,255,0.68);
  flex-shrink: 0;
  margin-top: 3px;
}

.bp-heading-title {
  font-size: 21px;
  font-weight: 700;
  color: rgba(255,255,255,0.93);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.bp-heading-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.40);
  margin-top: 4px;
  line-height: 1.4;
}

/* Staggered default positions — kept for .app-window if ever reused */

/* Title bar */
.app-titlebar {
  flex-shrink: 0;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: grab;
  user-select: none;
}

.app-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
}

/* Balances the title visually against the traffic lights */
.titlebar-spacer { width: 52px; flex-shrink: 0; }

/* Window body */
.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.app-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}


/* ── About ── */
.about-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.about-name {
  font-size: 17px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  line-height: 1.2;
}

.about-role {
  font-size: 12px;
  color: rgba(255,255,255,0.42);
  margin-top: 3px;
}

.about-bio {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.68);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 11px;
}


/* ── Education — timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  padding-left: 2px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 26px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  flex-shrink: 0;
  width: 12px;
  padding-top: 4px;
  position: relative;
}

.timeline-marker::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(130, 90, 240, 0.88);
  border: 2px solid rgba(180,140,255,0.25);
  box-shadow: 0 0 8px rgba(120,70,230,0.35);
}

.timeline-item:not(:last-child) .timeline-marker::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

.timeline-content { flex: 1; min-width: 0; }

.timeline-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timeline-meta { flex: 1; min-width: 0; }

.timeline-year {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.32);
  white-space: nowrap;
  margin-top: 3px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  line-height: 1.3;
}

.timeline-company {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(150,110,255,0.85);
  margin-top: 3px;
}

.timeline-location {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(255,255,255,0.34);
  margin-top: 3px;
}

.timeline-school {
  font-size: 12.5px;
  color: rgba(255,255,255,0.44);
  margin-top: 3px;
}

.timeline-note {
  font-size: 12px;
  color: rgba(255,255,255,0.40);
  margin-top: 7px;
  line-height: 1.58;
}


/* ── Projects ── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.project-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}

.project-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
}

.project-badge.live {
  background: rgba(40, 200, 64, 0.16);
  color: rgba(80, 220, 100, 0.88);
}

.project-badge.wip {
  background: rgba(254, 188, 46, 0.16);
  color: rgba(254, 200, 80, 0.88);
}

.project-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.52);
  margin-bottom: 10px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.52);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 8px;
}


/* ── About — secondary bio + metrics ── */
.about-bio--secondary {
  font-size: 12.5px;
  line-height: 1.62;
  color: rgba(255,255,255,0.42);
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.about-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 8px 10px;
  gap: 4px;
}

.about-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  line-height: 1;
}

.about-metric-label {
  font-size: 10px;
  color: rgba(255,255,255,0.38);
  text-align: center;
  line-height: 1.3;
}


/* ── Skill tag accent variant (focus areas) ── */
.skill-tag--accent {
  color: rgba(130, 200, 255, 0.85);
  background: rgba(80, 140, 220, 0.12);
  border-color: rgba(80, 160, 255, 0.2);
}


/* ── Timeline badge (in-progress) ── */
.timeline-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(52, 199, 89, 0.14);
  color: rgba(80, 220, 110, 0.9);
  margin-top: 5px;
}


/* ── Experience highlights list ── */
.exp-highlights {
  margin-top: 9px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: disc;
}

.exp-highlights li {
  font-size: 12.5px;
  line-height: 1.58;
  color: rgba(255,255,255,0.52);
}


/* ── Project links ── */
.project-links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(130, 200, 255, 0.8);
  text-decoration: none;
  background: rgba(80, 140, 220, 0.1);
  border: 1px solid rgba(80, 160, 255, 0.18);
  border-radius: 5px;
  padding: 3px 10px;
  transition: background 0.14s, color 0.14s;
}

.project-link:hover {
  background: rgba(80, 140, 220, 0.2);
  color: rgba(180, 220, 255, 0.95);
}



/* ════════════════════════════════════════
   Beyond Code Panel
   ════════════════════════════════════════ */

/* Channel card */
.bc-channel {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
}

.bc-channel-banner {
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.bc-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-channel-info {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  min-width: 0;
}

.bc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}

.bc-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(150,110,255,0.18);
  color: rgba(150,110,255,0.7);
}

.bc-channel-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.bc-channel-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-channel-handle {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
}

.bc-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,60,60,0.85);
  background: rgba(255,60,60,0.08);
  border: 1px solid rgba(255,60,60,0.2);
  border-radius: 6px;
  padding: 4px 11px;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.bc-visit-btn:hover {
  background: rgba(255,60,60,0.16);
  color: rgba(255,100,100,0.95);
}

/* Featured video */
.bc-featured {
  display: flex;
  gap: 14px;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.14s, border-color 0.14s;
  min-width: 0;
}

.bc-featured:hover {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.13);
}

.bc-featured-thumb {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: rgba(0,0,0,0.3);
  min-width: 0;
}

.bc-featured-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bc-video-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.35;
  margin: 0;
}

.bc-video-desc {
  font-size: 11.5px;
  color: rgba(255,255,255,0.42);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shared thumbnail styles */
.bc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-thumb-fallback {
  width: 100%;
  height: 100%;
  background: rgba(150,110,255,0.08);
}

.bc-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 0.14s;
  color: #fff;
}

.bc-featured:hover .bc-play-badge,
.bc-card:hover .bc-play-badge { opacity: 1; }

.bc-play-badge--sm {
  background: rgba(0,0,0,0.32);
}

/* Video grid */
.bc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bc-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 0;
  transition: background 0.14s, border-color 0.14s;
}

.bc-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.11);
}

.bc-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  min-width: 0;
}

.bc-card-title {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.76);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA */
.bc-cta {
  display: flex;
  justify-content: center;
  padding: 4px 0 6px;
}

.bc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  padding: 6px 18px;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.bc-cta-btn:hover {
  background: rgba(255,60,60,0.1);
  color: rgba(255,120,120,0.9);
  border-color: rgba(255,60,60,0.22);
}

/* ════════════════════════════════════════
   Dock
   ════════════════════════════════════════ */
.dock-container {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.dock {
  display: inline-flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 20px 14px;
  /* deep purple-tinted glass matching the hero palette */
  background: rgba(12, 8, 22, 0.78);
  backdrop-filter: blur(52px) saturate(2.0) brightness(1.06);
  -webkit-backdrop-filter: blur(52px) saturate(2.0) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 28px;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.36),
    0 18px 52px rgba(0,0,0,0.52),
    0 0 64px rgba(80,30,160,0.13),
    inset 0 1px 0 rgba(255,255,255,0.11);
  user-select: none;
}

.dock-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.09);
  align-self: center;
  margin: 0 2px;
  flex-shrink: 0;
}

.dock-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  /* JS drives transform; this transition smooths the magnification */
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: 7px;
}

/* JS overrides transform — CSS :hover adds filter/glow only */

.dock-icon-img {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.60));
  flex-shrink: 0;
  transition: filter 0.20s ease;
}

/* Hover: subtle purple glow + brightness lift */
.dock-icon:hover .dock-icon-img {
  filter:
    drop-shadow(0 4px 14px rgba(0,0,0,0.52))
    drop-shadow(0 0 10px rgba(110,55,220,0.28))
    brightness(1.10);
}

.dock-icon-img svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tooltip label */
.dock-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(10, 6, 18, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.86);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 8px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.dock-icon:hover .dock-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Active indicator dot — small white pill with soft purple glow */
.dock-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.90);
  box-shadow: 0 0 6px rgba(190,150,255,0.65);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

.dock-icon--active .dock-dot { display: block; }

/* Active icon gets a persistent subtle glow */
.dock-icon--active .dock-icon-img {
  filter:
    drop-shadow(0 3px 10px rgba(0,0,0,0.56))
    drop-shadow(0 0 8px rgba(140,90,255,0.30));
}


/* ════════════════════════════════════════
   Scrollbar
   ════════════════════════════════════════ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.20);
}


/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1100px) {
  .chat-window {
    width: clamp(360px, 48vw, 600px);
    left: 68%;
  }
}

/* Mobile — full-width panel anchored above the dock */
@media (max-width: 768px) {
  :root { --dock-h: 76px; }

  .chat-window {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(var(--dock-h) + 8px);
    transform: none;
    width: auto;
    height: clamp(320px, 55vh, 460px);
  }

.app-window { width: 90vw; left: 5vw !important; }
  .chat-sidebar { display: none; }
  .menubar-item { display: none; }
  .menubar-brand { display: block; }
  .dock-icon-img { width: 42px; height: 42px; }
  .dock { gap: 8px; padding: 8px 14px 11px; border-radius: 22px; }
}


/* ════════════════════════════════════════
   Chat collapse states
   ════════════════════════════════════════ */
.chat-window.is-collapsing {
  opacity: 0 !important;
  transition: opacity 0.28s ease !important;
  pointer-events: none !important;
}
.chat-window.is-collapsed {
  display: none !important;
}


/* ════════════════════════════════════════
   Contact FAB
   ════════════════════════════════════════ */
#contact-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(120,58,225,0.92) 0%, rgba(82,30,165,0.96) 100%);
  border: 1px solid rgba(160,100,255,0.32);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: opacity 0.28s, transform 0.34s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
  box-shadow: 0 4px 22px rgba(100,40,220,0.45);
}

#contact-fab.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#contact-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(100,40,220,0.58), 0 0 0 6px rgba(140,80,255,0.1);
}

#contact-fab svg {
  width: 22px;
  height: 22px;
  fill: rgba(255,255,255,0.92);
  flex-shrink: 0;
}

.fab-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34c759;
  border: 1.5px solid rgba(0,60,10,0.65);
  animation: fab-pulse 2.4s ease-in-out infinite;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(52,199,89,0); }
}


/* ════════════════════════════════════════
   Chat FAB
   ════════════════════════════════════════ */
#chat-fab {
  position: fixed;
  bottom: 24px;
  right: 90px;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: opacity 0.28s, transform 0.34s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
  box-shadow: 0 4px 22px rgba(14,159,55,0.45);
  padding: 0;
}

#chat-fab.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(14,159,55,0.58), 0 0 0 6px rgba(94,226,107,0.15);
}

#chat-fab svg {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: block;
}

/* ════════════════════════════════════════
   Chat Popup
   ════════════════════════════════════════ */
#chat-popup {
  position: fixed;
  bottom: 90px;
  right: 90px;
  width: 320px;
  max-height: calc(100vh - 130px);
  background: rgba(8,14,28,0.97);
  backdrop-filter: blur(44px) saturate(1.9) brightness(0.9);
  -webkit-backdrop-filter: blur(44px) saturate(1.9) brightness(0.9);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2001;
  opacity: 0;
  transform: scale(0.88) translateY(16px);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.34,1.2,0.64,1),
              transform 0.26s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 4px 20px rgba(0,0,0,0.38),
    0 24px 60px rgba(0,0,0,0.58),
    0 0 60px rgba(14,80,220,0.18);
}

#chat-popup.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

#chat-popup-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.popup-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff 0%, #0e50c8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(40,120,255,0.38);
}

.popup-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.popup-name {
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  line-height: 1.2;
}

.popup-status {
  font-size: 10.5px;
  color: #34c759;
}

#chat-popup-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  transition: background 0.14s, color 0.14s;
  flex-shrink: 0;
}

#chat-popup-close:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
}

#chat-popup-close svg { width: 14px; height: 14px; fill: currentColor; }

#chat-popup-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  max-height: 340px;
  /* scroll-behavior intentionally omitted — JS manages scrollTop via rAF */
}

.chat-jump-btn {
  flex-shrink: 0;
  display: none;
  align-self: center;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: rgba(200,170,255,0.85);
  background: rgba(80,40,200,0.18);
  border: 1px solid rgba(140,90,255,0.30);
  border-radius: 100px;
  padding: 4px 14px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
  margin: 2px 0 4px;
}
.chat-jump-btn:hover {
  background: rgba(100,55,220,0.30);
  color: rgba(220,200,255,0.95);
}

#chat-popup-messages::-webkit-scrollbar { width: 4px; }
#chat-popup-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

#chat-popup-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.018);
}

#chat-popup-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.88);
  outline: none;
  font-family: var(--font);
  transition: border-color 0.14s;
}

#chat-popup-input::placeholder { color: rgba(255,255,255,0.26); }

#chat-popup-input:focus {
  border-color: rgba(30,140,255,0.5);
}

#chat-popup-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30,140,255,0.85), rgba(14,80,200,0.9));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s, transform 0.14s;
}

#chat-popup-send:hover {
  background: linear-gradient(135deg, rgba(30,140,255,1), rgba(14,80,200,1));
  transform: scale(1.08);
}

#chat-popup-send svg {
  width: 15px;
  height: 15px;
  fill: #fff;
}

/* ════════════════════════════════════════
   Contact Popup
   ════════════════════════════════════════ */
#contact-popup {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  max-height: calc(100vh - 120px);
  background: rgba(11,7,20,0.96);
  backdrop-filter: blur(44px) saturate(1.9) brightness(0.9);
  -webkit-backdrop-filter: blur(44px) saturate(1.9) brightness(0.9);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1999;
  opacity: 0;
  transform: scale(0.88) translateY(16px);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.34,1.2,0.64,1),
              transform 0.26s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.04) inset,
    0 4px 20px rgba(0,0,0,0.38),
    0 24px 60px rgba(0,0,0,0.58),
    0 0 60px rgba(90,40,180,0.18);
}

#contact-popup.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

#contact-popup-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cp-heading-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(140,90,255,0.38);
}

.cp-title {
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  line-height: 1.2;
}

.cp-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,0.38);
  margin-top: 2px;
}

#contact-popup-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  transition: background 0.14s, color 0.14s;
  flex-shrink: 0;
}

#contact-popup-close:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
}

#contact-popup-close svg { width: 14px; height: 14px; fill: currentColor; }

#contact-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

#contact-popup-body::-webkit-scrollbar { width: 4px; }
#contact-popup-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* ── Quick links row ── */
.cp-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}

.cp-link:hover {
  background: rgba(130,80,255,0.18);
  border-color: rgba(140,90,255,0.3);
  color: rgba(210,185,255,0.92);
}

.cp-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Divider ── */
.cp-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}

/* ── Contact form inside popup ── */
.cp-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* ── Mobile overrides ── */
@media (max-width: 767px) {
  #contact-popup {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 80px;
  }
  #contact-fab {
    bottom: 18px;
    right: 18px;
  }
  #chat-popup {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 80px;
  }
  #chat-fab {
    bottom: 18px;
    right: 84px;
  }
}


/* ════════════════════════════════════════
   Menubar Dropdown Menus
   ════════════════════════════════════════ */
.menu-wrapper {
  position: relative;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 224px;
  background: rgba(28, 20, 46, 0.96);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.45),
    0 3px 8px rgba(0,0,0,0.25);
  list-style: none;
  padding: 4px 0;
  z-index: 2000;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  transform-origin: top center;
}

.menu-wrapper.is-open .menu-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 5px 14px;
  margin: 0 4px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.86);
  cursor: default;
  white-space: nowrap;
  transition: background 0.07s ease, color 0.07s ease;
  user-select: none;
}

.menu-item:hover {
  background: rgba(108, 64, 220, 0.64);
  color: #fff;
}

.menu-item:hover .menu-kbd {
  color: rgba(255,255,255,0.52);
}

.menu-label {
  flex: 1;
}

.menu-kbd {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font);
  background: none;
  border: none;
  padding: 0;
  margin-left: 20px;
  flex-shrink: 0;
  pointer-events: none;
}

.menu-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 3px 0;
  list-style: none;
}

/* Active state while menu is open — matches dropdown bg so they appear joined */
.menu-wrapper.is-open > .menubar-item {
  background: rgba(28, 20, 46, 0.96);
  color: #fff;
  border-radius: 4px 4px 0 0;
}


/* ════════════════════════════════════════
   Modals (About + Shortcuts)
   ════════════════════════════════════════ */
.mb-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.mb-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mb-overlay.is-open .mb-window {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.mb-window {
  position: relative;
  width: 360px;
  background: rgba(20, 12, 38, 0.94);
  backdrop-filter: blur(48px) saturate(1.9);
  -webkit-backdrop-filter: blur(48px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.05) inset,
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 20px 60px rgba(0,0,0,0.65),
    0 6px 16px rgba(0,0,0,0.4);
  padding: 24px 28px 22px;
  text-align: center;
  transform: scale(0.94) translateY(-10px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.18s ease;
}

.mb-window--wide {
  width: 440px;
  text-align: left;
}

.mb-traffic {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  gap: 6px;
}

.mb-close-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: filter 0.1s;
}

.mb-close-dot:hover {
  filter: brightness(1.15);
}

.mb-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(120,58,225,0.9) 0%, rgba(60,20,140,0.95) 100%);
  border: 1px solid rgba(160,100,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.02em;
  margin: 14px auto 14px;
  box-shadow: 0 4px 16px rgba(90,40,200,0.4);
}

.mb-title {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.mb-subtitle {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0;
}

.mb-rule {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 16px 0;
}

.mb-body {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
}

.mb-version {
  font-size: 11.5px;
  color: rgba(255,255,255,0.28);
  margin-bottom: 18px;
}

.mb-ok {
  display: inline-block;
  padding: 6px 28px;
  background: rgba(108,64,220,0.8);
  border: 1px solid rgba(160,100,255,0.35);
  border-radius: 8px;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
  font-family: var(--font);
}

.mb-ok:hover {
  background: rgba(120,72,240,0.9);
}

.mb-ok:active {
  transform: scale(0.97);
}

/* Shortcuts list */
.mb-shortcuts {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
}

.mb-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mb-shortcut-row:last-child {
  border-bottom: none;
}

.mb-shortcut-row dt {
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

.mb-shortcut-row dd {
  margin: 0;
}

.mb-shortcut-row kbd {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font);
}


/* ════════════════════════════════════════
   Toast Notification
   ════════════════════════════════════════ */
#mb-toast {
  position: fixed;
  top: calc(var(--menubar-h) + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(28, 18, 52, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.88);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 4000;
  white-space: nowrap;
}

#mb-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ════════════════════════════════════════
   Light Mode
   ════════════════════════════════════════ */
body.light-mode .menubar {
  background: rgba(235, 228, 248, 0.78);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

body.light-mode .menubar-brand,
body.light-mode .menubar-clock {
  color: rgba(30, 15, 60, 0.88);
}

body.light-mode .menubar-item {
  color: rgba(30, 15, 60, 0.8);
}

body.light-mode .menubar-item:hover {
  background: rgba(0, 0, 0, 0.07);
  color: rgba(10, 5, 30, 0.95);
}

body.light-mode .menu-wrapper.is-open > .menubar-item {
  background: rgba(240, 234, 252, 0.97);
  color: rgba(10, 5, 30, 0.95);
}

body.light-mode .apple-icon,
body.light-mode .menubar-icon {
  color: rgba(30, 15, 60, 0.75);
}

body.light-mode .menu-dropdown {
  background: rgba(240, 234, 252, 0.97);
  border-color: rgba(0, 0, 0, 0.1);
  border-top: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16), 0 3px 8px rgba(0,0,0,0.09);
}

body.light-mode .menu-item {
  color: rgba(20, 10, 50, 0.85);
}

body.light-mode .menu-item:hover {
  background: rgba(108, 64, 220, 0.15);
  color: rgba(10, 0, 40, 0.95);
}

body.light-mode .menu-kbd {
  color: rgba(20, 10, 50, 0.32);
}

body.light-mode .menu-sep {
  background: rgba(0, 0, 0, 0.07);
}

/* ════════════════════════════════════════
   Menubar icon button wrapper
   ════════════════════════════════════════ */
.menubar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px 3px;
  border-radius: 4px;
  cursor: pointer;
  color: inherit;
  transition: background 0.1s;
}
.menubar-icon-btn:hover {
  background: rgba(255,255,255,0.12);
}
body.light-mode .menubar-icon-btn:hover {
  background: rgba(0,0,0,0.07);
}

/* ════════════════════════════════════════
   Wi-Fi Popover
   ════════════════════════════════════════ */
#wifi-popover {
  position: fixed;
  top: calc(var(--menubar-h) + 4px);
  right: 80px;
  width: 220px;
  background: rgba(28, 20, 46, 0.96);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.25);
  padding: 10px 0 4px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  transform-origin: top right;
  user-select: none;
}
#wifi-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wifi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 8px;
}
.wifi-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

/* toggle switch */
.wifi-toggle { display: flex; align-items: center; cursor: pointer; }
.wifi-toggle input { display: none; }
.wifi-toggle-track {
  width: 34px;
  height: 20px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}
.wifi-toggle input:checked ~ .wifi-toggle-track {
  background: rgba(108, 64, 220, 0.9);
}
.wifi-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wifi-toggle input:checked ~ .wifi-toggle-track .wifi-toggle-thumb {
  transform: translateX(14px);
}

.wifi-sep {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0 0 4px;
}

.wifi-network {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 0 4px;
  transition: background 0.08s;
  cursor: default;
}
.wifi-network:hover { background: rgba(255,255,255,0.06); }

.wifi-net-icon {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.wifi-net-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.wifi-net-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wifi-net-status {
  font-size: 10.5px;
  color: rgba(255,255,255,0.42);
  margin-top: 1px;
}
.wifi-net-check {
  width: 13px;
  height: 13px;
  color: rgba(108,220,130,0.9);
  flex-shrink: 0;
}

/* disconnected state */
#wifi-popover.wifi-off .wifi-network { opacity: 0.35; pointer-events: none; }
#wifi-popover.wifi-off .wifi-net-status::before { content: "Disconnected"; }
#wifi-popover.wifi-off .wifi-net-status { font-size: 0; }
#wifi-popover.wifi-off .wifi-net-status::before { font-size: 10.5px; }
#wifi-popover.wifi-off .wifi-net-check { display: none; }

.wifi-footer {
  font-size: 11.5px;
  color: rgba(255,255,255,0.42);
  padding: 6px 12px 4px;
  cursor: default;
  transition: color 0.08s;
}
.wifi-footer:hover { color: rgba(255,255,255,0.7); }

/* light mode */
body.light-mode #wifi-popover {
  background: rgba(240,234,252,0.97);
  border-color: rgba(0,0,0,0.09);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15), 0 3px 8px rgba(0,0,0,0.08);
}
body.light-mode .wifi-title { color: rgba(20,10,50,0.88); }
body.light-mode .wifi-toggle-track { background: rgba(0,0,0,0.15); }
body.light-mode .wifi-toggle input:checked ~ .wifi-toggle-track { background: rgba(108,64,220,0.82); }
body.light-mode .wifi-sep { background: rgba(0,0,0,0.07); }
body.light-mode .wifi-network:hover { background: rgba(0,0,0,0.05); }
body.light-mode .wifi-net-icon { color: rgba(20,10,50,0.6); }
body.light-mode .wifi-net-name { color: rgba(20,10,50,0.88); }
body.light-mode .wifi-net-status { color: rgba(20,10,50,0.4); }
body.light-mode .wifi-footer { color: rgba(20,10,50,0.38); }
body.light-mode .wifi-footer:hover { color: rgba(20,10,50,0.7); }

/* ════════════════════════════════════════
   Battery Popover
   ════════════════════════════════════════ */
#battery-popover {
  position: fixed;
  top: calc(var(--menubar-h) + 4px);
  right: 120px;
  width: 200px;
  background: rgba(28, 20, 46, 0.96);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.25);
  padding: 10px 0 4px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  transform-origin: top right;
  user-select: none;
}
#battery-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.bat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 8px;
}
.bat-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.bat-pct {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.bat-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0 0 8px;
}
.bat-bar-wrap {
  padding: 0 12px 8px;
}
.bat-bar-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.bat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #30d158;
  transition: width 0.4s ease;
}
.bat-bar-fill.bat-low  { background: #ff453a; }
.bat-bar-fill.bat-mid  { background: #ffd60a; }
.bat-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 8px;
  color: rgba(255,255,255,0.55);
  font-size: 11.5px;
}
.bat-status-icon { flex-shrink: 0; }
.bat-footer {
  padding: 4px 12px 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
}
.bat-footer:hover { color: rgba(255,255,255,0.65); }

body.light-mode #battery-popover {
  background: rgba(240,238,248,0.96);
  border-color: rgba(0,0,0,0.07);
}
body.light-mode .bat-title,
body.light-mode .bat-pct { color: rgba(20,10,50,0.88); }
body.light-mode .bat-sep { background: rgba(0,0,0,0.07); }
body.light-mode .bat-bar-track { background: rgba(0,0,0,0.1); }
body.light-mode .bat-status-row { color: rgba(20,10,50,0.45); }
body.light-mode .bat-footer { color: rgba(20,10,50,0.38); }
body.light-mode .bat-footer:hover { color: rgba(20,10,50,0.7); }

/* ════════════════════════════════════════
   Calendar Popover
   ════════════════════════════════════════ */
#cal-popover {
  position: fixed;
  top: calc(var(--menubar-h) + 4px);
  right: 8px;
  width: 224px;
  background: rgba(28, 20, 46, 0.96);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.25);
  padding: 12px 10px 10px;
  z-index: 3000;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  transform-origin: top right;
  user-select: none;
}
#cal-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.cal-month-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
}
.cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.1s, background 0.1s;
}
.cal-nav:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.cal-dow {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding-bottom: 4px;
  letter-spacing: 0.04em;
}
.cal-day {
  font-size: 11.5px;
  color: rgba(255,255,255,0.72);
  text-align: center;
  padding: 4px 0;
  border-radius: 5px;
  cursor: default;
  transition: background 0.08s;
}
.cal-day:hover:not(.cal-day--empty):not(.cal-day--today) {
  background: rgba(255,255,255,0.07);
}
.cal-day--empty {
  color: transparent;
  pointer-events: none;
}
.cal-day--today {
  background: rgba(108, 64, 220, 0.85);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

/* light mode */
body.light-mode #cal-popover {
  background: rgba(240, 234, 252, 0.97);
  border-color: rgba(0,0,0,0.09);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15), 0 3px 8px rgba(0,0,0,0.08);
}
body.light-mode .cal-month-label {
  color: rgba(20, 10, 50, 0.88);
}
body.light-mode .cal-nav {
  color: rgba(20, 10, 50, 0.4);
}
body.light-mode .cal-nav:hover {
  color: rgba(20, 10, 50, 0.85);
  background: rgba(0,0,0,0.06);
}
body.light-mode .cal-dow {
  color: rgba(20, 10, 50, 0.35);
}
body.light-mode .cal-day {
  color: rgba(20, 10, 50, 0.75);
}
body.light-mode .cal-day:hover:not(.cal-day--empty):not(.cal-day--today) {
  background: rgba(108, 64, 220, 0.1);
}
body.light-mode .cal-day--today {
  background: rgba(108, 64, 220, 0.82);
  color: #fff;
}




/* ══════════════════════════════════════════════════════
   PHASE 2 — Responsive Layout · Interaction · Polish
   ══════════════════════════════════════════════════════ */

/* ── Chat title: truncate gracefully inside narrow window ── */
.chat-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  text-align: center;
  margin: 0 8px;
}

/* ── iOS momentum scrolling in scrollable areas ── */
.browser-panel,
#contact-popup-body,
.sidebar-threads,
.browser-sidebar {
  -webkit-overflow-scrolling: touch;
}

/* ── Profile menu opens ABOVE trigger (JS sets top; transform-origin ensures upward animation) ── */
.profile-menu {
  transform-origin: bottom center;
}

/* ── Dock labels: suppress on touch so they don't stick ── */
@media (hover: none) {
  .dock-label { display: none !important; }
}

/* ── Popovers: never clip below viewport ── */
#wifi-popover,
#battery-popover,
#cal-popover {
  max-height: calc(100vh - var(--menubar-h) - 12px);
  overflow-y: auto;
}


/* ── Tablet — 1024px ── */
@media (max-width: 1024px) {
  #browser-window {
    width: clamp(560px, 88vw, 860px);
  }
  .browser-sidebar {
    width: 220px;
    padding: 20px 14px 16px;
  }
  .ob-avatar-img {
    height: 160px;
  }
  .mb-window--onboarding {
    width: clamp(480px, 90vw, 600px);
  }
}


/* ── Small tablet — 900px ── */
@media (max-width: 900px) {
  .chat-window {
    left: 50% !important;
    width: clamp(320px, 90vw, 520px);
  }

  #browser-window {
    width: clamp(480px, 95vw, 700px);
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .browser-sidebar {
    width: 180px;
    padding: 18px 12px 14px;
  }

  .bsb-avatar { width: 68px; height: 68px; font-size: 18px; }
  .bsb-name   { font-size: 14px; }
  .bsb-techgrid { grid-template-columns: repeat(3, 1fr); }
}


/* ── Mobile — 768px (augments existing rules) ── */
@media (max-width: 768px) {

  /* Browser window: fill the desktop area between menubar and dock */
  #browser-window {
    position: fixed !important;
    top: var(--menubar-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--dock-h) !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    border-radius: 0 !important;
    max-height: none !important;
  }

  #browser-window.is-maximized {
    top: var(--menubar-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--dock-h) !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Browser sidebar: no horizontal space on mobile */
  .browser-sidebar { display: none !important; }

  /* Browser titlebar: compact */
  .browser-titlebar {
    height: 40px;
    padding: 0 8px 0 10px;
    gap: 6px;
  }

  /* Tab text: tighter */
  .browser-tab {
    font-size: 10.5px;
    padding: 5px 8px 5px 7px;
  }

  /* Tab close button: no room on mobile */
  .btab-close { display: none; }

  /* CV button: hidden — use dock or contact panel instead */
  .browser-cv-btn { display: none; }

  /* Panel content: tighter padding */
  .browser-panel { padding: 14px 14px 18px; gap: 10px; }

  /* About metrics: 2-column on narrow panels */
  .about-metrics { grid-template-columns: repeat(2, 1fr); }

  /* Timeline: stack year below title on narrow panel */
  .timeline-header-row { flex-direction: column; gap: 3px; }
  .timeline-year { margin-top: 0; }

  /* FABs: ensure they clear the dock */
  #contact-fab {
    bottom: calc(var(--dock-h) + 16px);
    right: 16px;
  }
  #chat-fab {
    bottom: calc(var(--dock-h) + 16px);
    right: 82px;
  }

  /* Profile dropdown: full-width, positioned by JS */
  .profile-menu {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
  }

  /* Dock: slightly bigger touch targets */
  .dock-icon { padding-bottom: 6px; }
}


/* ── Small phone — 480px ── */
@media (max-width: 480px) {

  /* Popovers: full width so they don't clip off-screen */
  #wifi-popover    { left: 8px !important; right: 8px !important; width: auto !important; }
  #battery-popover { left: 8px !important; right: 8px !important; width: auto !important; }
  #cal-popover     { left: 8px !important; right: 8px !important; width: auto !important; }

  /* Menubar: squeeze text */
  .menubar-brand  { font-size: 12px; }
  .menubar-clock  { font-size: 10.5px; padding: 0 4px; }

  /* Dock: minimal */
  .dock           { gap: 5px; padding: 6px 10px 9px; }
  .dock-icon-img  { width: 36px; height: 36px; }
  .dock-divider   { height: 28px; }



  /* Modal: almost full width */
  .mb-window      { width: calc(100vw - 24px); max-width: 340px; padding: 20px 18px 18px; }
  .mb-window--wide{ width: calc(100vw - 24px); max-width: 420px; }

  /* Phase 3 responsive */
  .proj-featured-list { gap: 12px; }
  .proj-more-grid { grid-template-columns: 1fr; }
  .cf-row--half { flex-direction: column; }
}


/* ════════════════════════════════════════
   Phase 3 — Projects
   ════════════════════════════════════════ */

.proj-featured-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.proj-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s;
}

.proj-card:hover {
  border-color: rgba(150,110,255,0.28);
}

.proj-card-top { display: flex; flex-direction: column; gap: 7px; }

.proj-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proj-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(150,110,255,0.82);
  background: rgba(130,80,255,0.1);
  border: 1px solid rgba(150,100,255,0.18);
  border-radius: 4px;
  padding: 2px 8px;
}

.proj-category--sm {
  font-size: 9.5px;
  padding: 1px 6px;
}

.proj-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px rgba(52,199,89,0.55);
  flex-shrink: 0;
}

.proj-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  line-height: 1.3;
}

.proj-summary {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.54);
}

.proj-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid rgba(150,110,255,0.22);
  padding-left: 14px;
}

.proj-detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proj-detail-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.proj-detail-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.58);
}

.proj-detail-text--impact {
  color: rgba(130,200,130,0.82);
}

.proj-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-more-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 12px;
}

.proj-more-heading span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
}

.proj-more-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.proj-more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.proj-more-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-more-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.proj-more-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.84);
  line-height: 1.3;
}

.proj-more-desc {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.44);
}

.proj-more-tags { gap: 5px; }
.proj-more-tags .tech-tag { font-size: 10px; padding: 1px 7px; }


/* ════════════════════════════════════════
   Phase 3 — Skills
   ════════════════════════════════════════ */

.skills-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skills-core-banner {
  background: linear-gradient(135deg, rgba(130,80,255,0.12) 0%, rgba(80,140,220,0.08) 100%);
  border: 1px solid rgba(150,100,255,0.2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skills-core-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180,140,255,0.75);
}

.skills-core-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-tag--core {
  color: rgba(200,170,255,0.88);
  background: rgba(130,80,255,0.14);
  border-color: rgba(160,110,255,0.25);
  font-weight: 600;
}

.skill-group {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-group:last-child { border-bottom: none; }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.skill-group-icon {
  width: 13px;
  height: 13px;
  color: rgba(255,255,255,0.30);
  flex-shrink: 0;
}

.skill-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
}

.skill-group-tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(130,200,130,0.7);
  background: rgba(52,199,89,0.1);
  border: 1px solid rgba(52,199,89,0.18);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 2px;
}

.skill-tag--domain {
  color: rgba(180,210,255,0.72);
  background: rgba(80,140,220,0.08);
  border-color: rgba(80,150,240,0.15);
}


/* ════════════════════════════════════════
   Phase 3 — Experience
   ════════════════════════════════════════ */

.timeline-item--current .timeline-marker::before {
  background: rgba(52,199,89,0.9);
  box-shadow: 0 0 8px rgba(52,199,89,0.45);
  border-color: rgba(100,230,120,0.3);
}

.timeline-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-badge--current {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(52,199,89,0.14);
  color: rgba(80,220,110,0.9);
}

.timeline-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.timeline-type-badge {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 7px;
}

.exp-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
}

.exp-section-divider span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
}

.exp-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.leadership-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leadership-card--current {
  border-color: rgba(52,199,89,0.2);
  background: rgba(52,199,89,0.04);
}

.leadership-role {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.84);
  line-height: 1.3;
}

.leadership-org {
  font-size: 12px;
  color: rgba(150,110,255,0.78);
}

.leadership-period {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: rgba(255,255,255,0.30);
  margin-top: 4px;
}

.leadership-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(52,199,89,0.14);
  color: rgba(80,220,110,0.85);
}


/* ════════════════════════════════════════
   Contact Form (shared by popup)
   ════════════════════════════════════════ */

.cf-row { display: flex; gap: 10px; }
.cf-row--half > .cf-field { flex: 1; }

.cf-field { display: flex; flex-direction: column; gap: 5px; }

.cf-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.02em;
}

.cf-input {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.14s, background 0.14s;
  width: 100%;
}

.cf-input::placeholder { color: rgba(255,255,255,0.24); }

.cf-input:focus {
  border-color: rgba(130,110,255,0.5);
  background: rgba(255,255,255,0.075);
}

.cf-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='rgba(255,255,255,0.35)'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.cf-select option {
  background: #1e1030;
  color: rgba(255,255,255,0.88);
}

.cf-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

.cf-actions { display: flex; justify-content: flex-end; }

.cf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  background: rgba(130,80,255,0.72);
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.14s;
}

.cf-submit:hover { background: rgba(150,100,255,0.85); }
.cf-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.cf-success {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(80,220,110,0.88);
  background: rgba(52,199,89,0.08);
  border: 1px solid rgba(52,199,89,0.18);
  border-radius: 7px;
  padding: 9px 12px;
}

.cf-error {
  font-size: 12.5px;
  color: rgba(255,120,100,0.88);
  background: rgba(255,80,60,0.08);
  border: 1px solid rgba(255,80,60,0.18);
  border-radius: 7px;
  padding: 9px 12px;
}

.cf-error a {
  color: rgba(255,160,140,0.9);
  text-decoration: underline;
}


/* ═══════════════════════════════════════════════════
   Phase 4 — Onboarding · Tour · Progress · Completion
   ═══════════════════════════════════════════════════ */

/* ── Onboarding modal ── */
.mb-window--onboarding {
  width: 600px;
  text-align: left;
  padding: 22px 26px 24px;
}

.ob-body-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.ob-avatar-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-content-col {
  flex: 1;
  min-width: 0;
}

.ob-hi {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin: 0 0 8px;
}

.ob-avatar-img {
  height: 210px;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 32px rgba(100, 45, 220, 0.45)) drop-shadow(0 2px 8px rgba(0,0,0,0.55));
  animation: ob-avatar-in 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes ob-avatar-in {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.ob-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 20px;
}

.ob-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.ob-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin: 0 0 2px;
}

.ob-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.ob-question {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 10px;
}

.ob-visitor-types {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
}

.ob-vtype {
  flex: 1;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.3;
}

.ob-vtype:hover {
  background: rgba(124,92,252,0.14);
  border-color: rgba(124,92,252,0.3);
  color: rgba(255,255,255,0.75);
}

.ob-vtype.is-selected {
  background: rgba(124,92,252,0.22);
  border-color: rgba(124,92,252,0.55);
  color: #fff;
  font-weight: 500;
}

.ob-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ob-tour-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ob-tour-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.ob-explore-btn {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ob-explore-btn:hover {
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.2);
}

.ob-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  margin: 0;
  text-align: center;
}

.ob-hint kbd {
  font-family: var(--font);
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  color: rgba(255,255,255,0.35);
}

/* ── Tour overlay (dim backdrop only — no tooltip inside) ── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.tour-overlay.is-active {
  opacity: 1;
}

/* Raise window-layer (browser window's root ancestor) above the dim overlay.
   z-index on #browser-window itself has no effect because it inherits its parent's
   stacking context (#window-layer at z-50). Targeting the parent fixes it. */
body.tour-active #window-layer {
  z-index: 5001;
}

/* Spotlight glow on the browser window edge during tour */
#browser-window.tour-in-focus {
  box-shadow: 0 0 0 2px rgba(124,92,252,0.45), 0 32px 80px rgba(0,0,0,0.7) !important;
}

/* ── Tour card (now a root-level sibling of the overlay, z-5002 is root-relative) ── */
.tour-tooltip {
  position: fixed;
  z-index: 5002;
  width: 320px;
  background: rgba(14,8,30,0.97);
  backdrop-filter: blur(48px) saturate(2);
  border: 1px solid rgba(124,92,252,0.22);
  border-radius: 14px;
  padding: 18px 20px 16px;
  pointer-events: none;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 0 0 1px rgba(124,92,252,0.08);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34,1.4,0.64,1);
}

.tour-tooltip.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tour-tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tour-step-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(124,92,252,0.85);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tour-exit-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.28);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  font-family: var(--font);
  transition: color 0.15s ease;
}

.tour-exit-btn:hover {
  color: rgba(255,255,255,0.65);
}

.tour-tt-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin: 0 0 6px;
  line-height: 1.3;
}

.tour-tt-body {
  font-size: 13px;
  color: rgba(255,255,255,0.58);
  margin: 0 0 16px;
  line-height: 1.6;
}

.tour-tt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tour-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  transition: background 0.2s ease, transform 0.2s ease;
}

.tour-dot.is-active {
  background: rgba(124,92,252,0.9);
  transform: scale(1.3);
}

.tour-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tour-back-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tour-back-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
}

.tour-next-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: rgba(124,92,252,0.8);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tour-next-btn:hover {
  background: rgb(124,92,252);
  transform: translateY(-1px);
}

.tour-next-btn:disabled {
  background: rgba(124,92,252,0.28);
  color: rgba(255,255,255,0.55);
  cursor: default;
  transform: none;
}

/* ── Scroll hint & animated cue ── */
.tour-scroll-hint {
  font-size: 11.5px;
  color: rgba(255,193,7,0.82);
  margin: 0 0 8px;
  line-height: 1.5;
}

.tour-scroll-cue {
  text-align: center;
  font-size: 12px;
  color: rgba(124,92,252,0.8);
  margin: 0 0 10px;
  animation: tourScrollBounce 1.1s ease-in-out infinite;
}

@keyframes tourScrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50% { transform: translateY(5px); opacity: 1; }
}

.tour-target-highlight {
  box-shadow: 0 0 0 2px rgba(124,92,252,0.85), 0 0 14px rgba(124,92,252,0.35) !important;
  border-radius: 6px !important;
}

/* ── Tour control group ── */
.tour-control-group {
  position: fixed;
  top: calc(var(--menubar-h) + 8px);
  right: 20px;
  z-index: 3900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* ── Progress pill ── */
.progress-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(18,11,38,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(124,92,252,0.28);
  border-radius: 20px;
  padding: 5px 10px 5px 9px;
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  opacity: 1;
  transform: translateY(0);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}

.progress-pill:hover {
  background: rgba(26,16,54,0.97);
  border-color: rgba(124,92,252,0.5);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 2px 12px rgba(124,92,252,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* kept for JS compatibility — pill is always visible, class is now a no-op */
.progress-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-pill.progress-pill--complete {
  color: rgba(167,139,250,0.9);
  border-color: rgba(124,92,252,0.4);
}

.pp-icon {
  color: rgba(124,92,252,0.8);
  flex-shrink: 0;
}

.pp-chevron {
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.progress-pill[aria-expanded="true"] .pp-chevron {
  transform: rotate(180deg);
}

.pp-bar {
  width: 48px;
  height: 3px;
  background: rgba(255,255,255,0.09);
  border-radius: 2px;
  overflow: hidden;
}

.pp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cfc, #a78bfa);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.34,1.4,0.64,1);
  width: 0%;
}

/* ── Tour popover ── */
.tour-popover {
  background: rgba(14,8,30,0.95);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 5px;
  min-width: 172px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  transform-origin: top right;
  transform: scale(0.92) translateY(-6px);
  opacity: 0;
  transition: transform 0.18s cubic-bezier(0.34,1.4,0.64,1), opacity 0.15s ease;
  pointer-events: none;
}

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

.tour-pop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.tour-pop-item svg {
  flex-shrink: 0;
  color: rgba(124,92,252,0.7);
}

.tour-pop-item:hover {
  background: rgba(124,92,252,0.12);
  color: rgba(255,255,255,0.95);
}

.tour-pop-item--muted {
  color: rgba(255,255,255,0.35);
}

.tour-pop-item--muted svg {
  color: rgba(255,255,255,0.22);
}

.tour-pop-item--muted:hover {
  background: rgba(255,80,80,0.08);
  color: rgba(255,110,110,0.85);
}

.tour-pop-sep {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 3px 5px;
}

@media (max-width: 767px) {
  .tour-control-group { display: none; }
}

/* ── Completion modal ── */
.mb-window--completion {
  width: 360px;
  text-align: center;
  padding: 28px 28px 24px;
  overflow: hidden;
}

.comp-badge {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 0 32px rgba(124,92,252,0.35);
}

.comp-title {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin: 0 0 8px;
}

.comp-body {
  font-size: 13px;
  color: rgba(255,255,255,0.48);
  margin: 0 0 22px;
  line-height: 1.6;
}

.comp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-contact-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7c5cfc, #a78bfa);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.comp-contact-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.comp-skip-btn {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  color: rgba(255,255,255,0.3);
  font-size: 12.5px;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.15s ease;
}

.comp-skip-btn:hover {
  color: rgba(255,255,255,0.55);
}

/* ── Completion celebration ── */
.celebration-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Keep modal content above particles */
.mb-window--completion .comp-badge,
.mb-window--completion .comp-title,
.mb-window--completion .comp-body,
.mb-window--completion .comp-actions {
  position: relative;
  z-index: 1;
}

/* Confetti particle */
.cel-particle {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: confettiFly var(--dur, 1.4s) var(--delay, 0s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.cel-particle--tri {
  border-radius: 2px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

@keyframes confettiFly {
  0%   { transform: translate(-50%, -50%) translate(0,    0)            rotate(0deg)              scale(1);   opacity: 1; }
  70%  { opacity: 0.7; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3); opacity: 0; }
}

/* Badge pop on open */
.comp-badge--pop {
  animation: badgePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badgePop {
  0%   { transform: scale(0.8); }
  55%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Radial glow flash behind badge */
.comp-badge-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.6) 0%, transparent 68%);
  opacity: 0;
  pointer-events: none;
  animation: badgeGlow 1.1s ease-out forwards;
}

@keyframes badgeGlow {
  0%   { opacity: 0;   transform: scale(0.5); }
  25%  { opacity: 0.9; transform: scale(1.1); }
  100% { opacity: 0;   transform: scale(1.8); }
}

/* ── Tour-end full-screen celebration ── */
.tour-cel-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(30,18,60,0.82) 0%, rgba(10,8,28,0.78) 100%);
  pointer-events: none;
  animation: tourCelIn 0.28s ease-out forwards, tourCelOut 0.5s ease-in 1.6s forwards;
}

.tour-cel-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Confetti in the full-screen overlay bursts from the viewport centre */
.tour-cel-overlay .cel-particle {
  left: 50%;
  top: 45%;
}

.tour-cel-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: tourCelPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}

.tour-cel-badge {
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(124,92,252,0.7));
  animation: tourCelSpin 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}

.tour-cel-title {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 20px rgba(124,92,252,0.6), 0 1px 4px rgba(0,0,0,0.5);
}

.tour-cel-body {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}

@keyframes tourCelIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tourCelOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes tourCelPop {
  0%   { transform: scale(0.72); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes tourCelSpin {
  0%   { transform: rotate(-25deg) scale(0.6); }
  60%  { transform: rotate(12deg)  scale(1.18); }
  100% { transform: rotate(0deg)   scale(1); }
}

/* ════════════════════════════════════════
   Beyond Code — standalone YouTube window
   ════════════════════════════════════════ */

#beyond-code-window {
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  width: min(1120px, 86vw);
  height: min(760px, 78vh);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.072);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.055) inset,
    0 4px 16px rgba(0,0,0,0.32),
    0 24px 60px rgba(0,0,0,0.60),
    0 60px 120px rgba(0,0,0,0.64),
    0 0 100px rgba(200,20,20,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.34,1.2,0.64,1),
              transform 0.22s cubic-bezier(0.34,1.2,0.64,1),
              top 0.32s cubic-bezier(0.34,1.2,0.64,1),
              left 0.32s cubic-bezier(0.34,1.2,0.64,1);
  z-index: 500;
}

#beyond-code-window.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

#beyond-code-window.is-minimized {
  opacity: 0;
  transform: translate(-50%, 60vh) scale(0.12);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4,0,1,1);
}

/* Title bar */
.beyond-titlebar {
  flex-shrink: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #181818;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: grab;
  user-select: none;
}

.beyond-titlebar:active { cursor: grabbing; }

.beyond-titlebar-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.beyond-yt-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
}

.beyond-titlebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.beyond-titlebar-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 4px;
}

.beyond-visit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  background: #FF0000;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.beyond-visit-btn:hover { background: #cc0000; }

/* Scrollable body */
.beyond-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.beyond-body::-webkit-scrollbar { width: 5px; }
.beyond-body::-webkit-scrollbar-track { background: transparent; }
.beyond-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* Hero banner */
.beyond-hero {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #1a1a1a;
}
.beyond-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.beyond-hero-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1010 100%);
}

/* Channel info row */
.beyond-channel-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.beyond-channel-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.beyond-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  margin-top: -28px;
}

.beyond-avatar--placeholder {
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
}

.beyond-channel-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.beyond-channel-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.beyond-verified {
  color: #aaa;
  flex-shrink: 0;
}

.beyond-channel-handle {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.beyond-channel-intro {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
  line-height: 1.45;
  max-width: 540px;
}

.beyond-channel-right {
  flex-shrink: 0;
  padding-top: 6px;
}

.beyond-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 20px;
  background: #FF0000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.beyond-subscribe-btn:hover { background: #cc0000; }

/* Channel nav tabs */
.beyond-nav {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.beyond-nav-tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.beyond-nav-tab:hover { color: #fff; }
.beyond-nav-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Two-column content layout */
.beyond-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  padding: 20px 24px;
}

.beyond-content-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.beyond-section-label {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

/* Featured video */
.beyond-featured {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.beyond-featured:hover { background: rgba(255,255,255,0.07); }

.beyond-featured-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #1a1a1a;
}

.beyond-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.beyond-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.beyond-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.beyond-featured:hover .beyond-play-badge,
.beyond-card:hover .beyond-play-badge { opacity: 1; }

.beyond-play-badge--sm {
  background: rgba(0,0,0,0.45);
}

.beyond-featured-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.beyond-video-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.35;
}

.beyond-video-meta {
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.beyond-video-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Latest videos header */
.beyond-latest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.beyond-view-all {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
}
.beyond-view-all:hover { color: #fff; }

/* Video grid */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.beyond-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s;
}
.beyond-card:hover { transform: translateY(-2px); }

.beyond-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.beyond-card-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.beyond-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar: About card */
.beyond-sidebar { min-width: 0; }

.beyond-about-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
}

.beyond-about-heading {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.beyond-about-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.beyond-about-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(100,130,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8ab4f8;
}

.beyond-about-icon--green {
  background: rgba(50,180,100,0.18);
  color: #5cb85c;
}

.beyond-about-icon--yellow {
  background: rgba(220,170,50,0.18);
  color: #f0ad4e;
}

.beyond-about-item > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.beyond-about-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.beyond-about-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.beyond-read-more-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
}
.beyond-read-more-btn:hover { background: rgba(255,255,255,0.12); }

/* CTA bar */
.beyond-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(255,0,0,0.07);
  border-top: 1px solid rgba(255,0,0,0.15);
}

.beyond-cta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.beyond-cta-yt-icon {
  flex-shrink: 0;
  border-radius: 6px;
}

.beyond-cta-left > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.beyond-cta-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.beyond-cta-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
}

.beyond-cta-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: 20px;
  background: #FF0000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.beyond-cta-subscribe-btn:hover { background: #cc0000; }

/* Responsive: collapse sidebar at narrow widths */
@media (max-width: 860px) {
  .beyond-content {
    grid-template-columns: 1fr;
  }
  .beyond-sidebar { display: none; }
  .beyond-featured {
    grid-template-columns: 1fr;
  }
  .beyond-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Visually hidden (screen-reader only) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
