/* ═══ NAV ═══ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(3,10,16,0.9) 0%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-logo span { color: var(--text-dim); font-weight: 400; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
  cursor: pointer;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cyan);
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 99;
  background: rgba(3,10,16,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  display: none;
  flex-direction: column;
  padding: 12px 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
}
.mobile-menu a:active { color: var(--cyan); background: rgba(0,240,255,0.06); }

/* ═══ GLASS PANELS ═══ */
.panel {
  position: fixed;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(160deg, rgba(8,24,40,0.82), rgba(3,10,20,0.88));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 28px 30px;
  max-width: 460px;
  box-shadow: 0 0 40px rgba(0,240,255,0.06), inset 0 0 30px rgba(0,240,255,0.03);
}
.panel::before, .panel::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--cyan);
  opacity: 0.7;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.panel.interactive { pointer-events: auto; }

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.panel-title::after {
  content: '';
  display: block;
  width: 48px; height: 2px;
  background: var(--cyan);
  margin-top: 10px;
  box-shadow: 0 0 10px var(--cyan);
}
.panel-body {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.panel-body p { margin-bottom: 10px; }
.panel-body strong { color: var(--text-primary); font-weight: 600; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.25);
  border-radius: 3px;
  padding: 3px 8px;
  background: rgba(0,240,255,0.05);
}

/* Panel placement */
.panel-left  { left: 48px; top: 50%; transform: translateY(-50%); }
.panel-right { right: 48px; top: 50%; transform: translateY(-50%); }
.panel-top   { top: 84px; left: 50%; transform: translateX(-50%); text-align: center; max-width: 640px; }

/* ═══ HERO — name up top, rocket center stage, quote beneath it ═══ */
#heroBand {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  pointer-events: none;
  padding: 88px 20px 118px;
}
.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  /* Molten sun: shimmering hot gradient + breathing radioactive glow */
  background: linear-gradient(100deg,
    #fff8dc 0%, #ffd75e 22%, #ff9d2e 42%, #ffcf4d 58%, #fff3c4 78%, #ffb84d 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  animation: sunShimmer 7s linear infinite, sunGlow 3.4s ease-in-out infinite;
}
@keyframes sunShimmer {
  from { background-position: 0% 0; }
  to   { background-position: 250% 0; }
}
@keyframes sunGlow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(255, 176, 46, 0.55))
            drop-shadow(0 0 38px rgba(255, 122, 18, 0.28));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(255, 200, 70, 0.9))
            drop-shadow(0 0 64px rgba(255, 132, 22, 0.5));
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-name { animation: none; filter: drop-shadow(0 0 16px rgba(255, 176, 46, 0.6)); }
}
.hero-titles {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 15px);
  color: var(--cyan);
  letter-spacing: 2px;
  max-width: 900px;
}
.hero-titles span { padding: 0 10px; border-right: 1px solid var(--text-dim); display: inline-block; }
.hero-titles span:last-child { border-right: none; }
.hero-scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll-cue span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 5px;
  animation: cuePulse 2s ease-in-out infinite;
}
.hero-scroll-cue .cue-line {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-cue .cue-line::after {
  content: '';
  position: absolute;
  top: -8px; left: 0;
  width: 1px; height: 8px;
  background: #fff;
  animation: cueDrop 1.8s ease-in infinite;
}
@keyframes cuePulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; text-shadow: 0 0 14px var(--cyan-glow-strong); } }
@keyframes cueDrop { to { top: 40px; } }

/* Telemetry HUD (top-right strip, under nav) */
#telemetry {
  position: fixed;
  right: 32px;
  top: 64px;
  z-index: 9;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--cyan-dim);
  text-align: right;
  display: flex;
  flex-direction: row;
  gap: 22px;
}
#telemetry .t-block .t-label { opacity: 0.55; }
#telemetry .t-block .t-value { color: var(--cyan); font-size: 13px; text-shadow: 0 0 8px var(--cyan-glow); }

/* ═══ EXPERIENCE — expandable field record ═══ */
.exp-list {
  max-height: 52vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) transparent;
}
.exp-list::-webkit-scrollbar { width: 4px; }
.exp-list::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 2px; }
.exp-item { border-bottom: 1px solid rgba(0,240,255,0.12); }
.exp-item:first-child { border-top: 1px solid rgba(0,240,255,0.12); }
.exp-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  text-align: left;
  padding: 12px 6px;
  cursor: pointer;
  transition: background 0.25s;
}
.exp-head:hover { background: rgba(0,240,255,0.05); }
.exp-head-main { display: flex; flex-direction: column; gap: 1px; }
.exp-head-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.exp-role { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.exp-org { color: var(--cyan); font-size: 13.5px; font-weight: 600; font-family: var(--font-body); }
.exp-period { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1.5px; white-space: nowrap; }
.exp-chevron {
  color: var(--cyan-dim);
  font-size: 13px;
  transition: transform 0.3s, color 0.3s;
}
.exp-item.open .exp-chevron { transform: rotate(180deg); color: var(--cyan); }
.exp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.exp-item.open .exp-body { max-height: 220px; }
.exp-desc { font-size: 14.5px; color: var(--text-secondary); line-height: 1.6; padding: 0 6px 14px; }

/* Clickable tags + hint */
.tag-btn { cursor: pointer; transition: all 0.25s; }
.tag-btn:hover {
  background: rgba(0,240,255,0.16);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.panel-hint {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--cyan-dim);
}

/* ═══ CONTACT ═══ */
.contact-row { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.contact-line { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.contact-line .c-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 2px; min-width: 64px; text-transform: uppercase; }
.contact-line a, .contact-line .c-value { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.contact-line a:hover { color: var(--cyan); }
.contact-socials { display: flex; gap: 10px; margin-top: 14px; }
.contact-socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.contact-socials a svg { width: 17px; height: 17px; fill: var(--cyan); }
.contact-socials a:hover { border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan-glow); transform: translateY(-2px); }
.cta-btn {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dark-bg);
  background: linear-gradient(135deg, var(--cyan), #79f7ff);
  border-radius: 4px;
  padding: 12px 26px;
  text-decoration: none;
  box-shadow: 0 0 20px var(--cyan-glow-strong);
  transition: all 0.3s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 0 34px var(--cyan-glow-strong); }

/* ═══ MISSION PROGRESS RAIL (right edge, desktop) ═══ */
#progressRail {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  height: 46vh;
  z-index: 12;
}
.rail-track {
  position: relative;
  width: 2px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(0,240,255,0.05), rgba(0,240,255,0.25), rgba(255,140,60,0.35));
  border-radius: 1px;
}
.rail-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 22px var(--cyan-glow-strong);
}
.rail-tick {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--cyan-dim);
  background: var(--dark-bg);
  cursor: pointer;
  transition: all 0.25s;
}
.rail-tick:hover { border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow-strong); transform: translate(-50%, -50%) scale(1.5); }
.rail-tick.active { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* ═══ GAME OVER — "READY TO TALK?" (above the impact flash) ═══ */
.gameover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 70; /* above the whiteout — the end screen */
  opacity: 0;
  visibility: hidden;
  width: min(440px, calc(100vw - 36px));
  text-align: center;
  background: linear-gradient(160deg, rgba(6,18,30,0.94), rgba(3,8,16,0.97));
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 34px 34px 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 60px rgba(0,240,255,0.25), inset 0 0 40px rgba(0,240,255,0.04);
}
.gameover::before, .gameover::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border-color: var(--cyan);
  opacity: 0.9;
}
.gameover::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.gameover::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.go-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--green);
  text-shadow: 0 0 10px rgba(0,255,136,0.4);
  margin-bottom: 10px;
}
.go-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-primary);
  text-shadow: 0 0 24px var(--cyan-glow-strong);
  margin-bottom: 22px;
}
.go-services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: -8px 0 20px;
}
.go-services .tag { font-size: 10px; padding: 4px 9px; }
.go-links { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.go-links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid rgba(0,240,255,0.14);
  border-radius: 5px;
  transition: all 0.25s;
}
.go-links a:hover { border-color: var(--cyan); background: rgba(0,240,255,0.07); box-shadow: 0 0 14px var(--cyan-glow); }
.go-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.go-value { color: var(--text-primary); font-weight: 600; font-size: 14.5px; }
.go-links a:hover .go-value { color: var(--cyan); }
.go-replay {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  background: rgba(0,240,255,0.06);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 11px 24px;
  cursor: pointer;
  transition: all 0.3s;
}
.go-replay:hover { background: rgba(0,240,255,0.14); box-shadow: 0 0 24px var(--cyan-glow-strong); }

/* ═══ SOCIAL RAIL (left edge, desktop) ═══ */
.social-rail {
  position: fixed;
  left: 26px;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.social-rail a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.social-rail a svg { width: 16px; height: 16px; fill: var(--text-dim); transition: fill 0.3s; }
.social-rail a:hover svg { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan-glow-strong)); }
.social-rail::after {
  content: '';
  width: 1px; height: 70px;
  background: linear-gradient(180deg, var(--text-dim), transparent);
}

/* ═══ PROJECT MODAL ═══ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2,6,12,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.project-modal {
  position: fixed;
  z-index: 201;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  width: min(520px, calc(100vw - 40px));
  background: linear-gradient(160deg, rgba(8,24,40,0.96), rgba(3,10,20,0.98));
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 34px 34px 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,240,255,0.12);
}
.project-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.project-modal::before, .project-modal::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border-color: var(--cyan);
  opacity: 0.8;
}
.project-modal::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.project-modal::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.modal-scanline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.25;
  animation: modalScan 3s linear infinite;
}
@keyframes modalScan { 0% { top: 0; } 100% { top: 100%; } }
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
}
.modal-close:hover { color: var(--cyan); }
.modal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.modal-badge.award { color: var(--orange); border: 1px solid rgba(255,106,0,0.4); background: rgba(255,106,0,0.07); }
.modal-badge.achievement { color: var(--cyan); border: 1px solid rgba(0,240,255,0.4); background: rgba(0,240,255,0.07); }
.modal-badge.active { color: var(--green); border: 1px solid rgba(0,255,136,0.4); background: rgba(0,255,136,0.07); }
.modal-badge.publication { color: #c9a0ff; border: 1px solid rgba(180,120,255,0.4); background: rgba(180,120,255,0.07); }
.modal-badge.skill { color: var(--cyan); border: 1px solid rgba(0,240,255,0.4); background: rgba(0,240,255,0.07); }
.modal-badge.certification { color: var(--green); border: 1px solid rgba(0,255,136,0.4); background: rgba(0,255,136,0.07); }
.modal-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.modal-desc { font-size: 15.5px; color: var(--text-secondary); line-height: 1.7; }

/* ═══ FLOATING BUTTONS ═══ */
.wa-float, .ai-float {
  position: fixed;
  right: 26px;
  z-index: 101;
  width: 50px; height: 50px;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wa-float {
  bottom: 96px;
  border: 2px solid #25D366;
  background: rgba(37, 211, 102, 0.1);
  box-shadow: 0 0 12px rgba(37,211,102,0.3);
}
.wa-float svg { width: 24px; height: 24px; fill: #25D366; }
.wa-float:hover { transform: scale(1.12); box-shadow: 0 0 25px rgba(37,211,102,0.55); }
.ai-float {
  bottom: 26px;
  border: 2px solid var(--cyan);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: 0 0 12px var(--cyan-glow);
  animation: aiPulse 3s ease-in-out infinite;
}
.ai-float svg { width: 24px; height: 24px; fill: var(--cyan); }
.ai-float:hover { transform: scale(1.12); box-shadow: 0 0 25px var(--cyan-glow-strong); }
@keyframes aiPulse {
  0%,100% { box-shadow: 0 0 12px var(--cyan-glow); }
  50% { box-shadow: 0 0 22px var(--cyan-glow-strong); }
}
.ai-hint {
  position: fixed;
  right: 88px;
  bottom: 38px;
  z-index: 101;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 1px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  animation: hintAppear 8s ease-in-out 4s forwards;
}
@keyframes hintAppear {
  0% { opacity: 0; transform: translateX(-8px); }
  10% { opacity: 1; transform: translateX(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ═══ CHAT PANEL ═══ */
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(2,6,12,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.chat-overlay.open { opacity: 1; pointer-events: auto; }
.chat-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 400px;
  height: 100vh;
  height: 100dvh;
  z-index: 211;
  background: linear-gradient(160deg, rgba(6,18,30,0.97), rgba(3,8,16,0.99));
  border-left: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.chat-panel.open { right: 0; }
.chat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
}
.chat-panel-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-panel-header .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dotBlink 2s ease-in-out infinite;
}
@keyframes dotBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-font-btn {
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}
.chat-font-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.chat-close:hover { color: var(--cyan); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 2px; }
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.55;
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.25);
  color: var(--text-primary);
}
.chat-msg.assistant {
  align-self: flex-start;
  background: rgba(10,25,40,0.8);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
}
.chat-msg.typing { color: var(--cyan-dim); font-family: var(--font-mono); font-size: 12px; }
.chat-msg.typing::after { content: '…'; animation: dotBlink 1s infinite; }
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--panel-border);
}
.chat-input {
  flex: 1;
  background: rgba(0,20,35,0.6);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 14px;
  outline: none;
}
.chat-input:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.chat-send {
  width: 44px;
  border-radius: 6px;
  border: 1px solid var(--cyan);
  background: rgba(0,240,255,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-send svg { width: 18px; height: 18px; fill: var(--cyan); }
.chat-send:disabled { opacity: 0.4; cursor: default; }
.chat-send:hover:not(:disabled) { background: rgba(0,240,255,0.18); }

/* ═══ CUSTOM CURSOR (desktop only, enabled via body.has-cursor) ═══ */
.cursor-dot, .cursor-ring {
  display: none;
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
}
body.has-cursor { cursor: none; }
body.has-cursor a, body.has-cursor button { cursor: none; }
body.has-cursor .cursor-dot {
  display: block;
  width: 6px; height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: translate(-50%, -50%);
}
body.has-cursor .cursor-ring {
  display: block;
  width: 30px; height: 30px;
  border: 1px solid rgba(0,240,255,0.5);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}
body.has-cursor .cursor-ring.hot {
  width: 44px; height: 44px;
  border-color: #fff;
}
