/* career.css — Map-based career portfolio styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-deep:       #0d0f14;
  --bg-card:       #161b27;
  --bg-elevated:   #1e2638;
  --bg-hover:      #242d42;
  --border-subtle: rgba(255,255,255,0.07);
  --border-mid:    rgba(255,255,255,0.12);
  --text-primary:  #e8eaf0;
  --text-secondary:#8892a4;
  --text-muted:    #4a5568;
  --accent-blue:   #4a90d9;
  --accent-gold:   #ffd700;
  --nav-h:         60px;
  --tl-h:          68px;
  --sidebar-w:     320px;
  --chat-w:        400px;
  --card-w:        360px;
  --radius:        12px;
  --radius-sm:     6px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg-deep); color: var(--text-primary); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }

/* ── Top Nav ───────────────────────────────────────────────── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(13,15,20,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  z-index: 1003;
}
.nav-identity { display: flex; align-items: center; gap: 12px; }
.nav-menu-btn {
  display: none; padding: 6px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  color: var(--text-secondary); cursor: pointer;
}
.nav-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-mid);
}
.nav-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.nav-subtitle { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 11px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--text-secondary); padding: 5px 8px; border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); text-decoration: none; }
.nav-btn {
  font-size: 12px; font-weight: 500; padding: 6px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-mid);
  background: var(--bg-elevated); color: var(--text-primary);
  transition: background 0.15s, border-color 0.15s;
}
.nav-btn:hover { background: var(--bg-hover); border-color: var(--accent-blue); }
.nav-btn--chat { background: rgba(74,144,217,0.12); border-color: rgba(74,144,217,0.3); color: #7ab4e8; }
.nav-btn--chat.nav-btn--active { background: rgba(74,144,217,0.25); border-color: var(--accent-blue); }
.nav-btn--resume { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.25); color: #d4b830; }
.nav-btn--resume:hover { background: rgba(255,215,0,0.18); border-color: rgba(255,215,0,0.4); }

/* ── App Wrapper ───────────────────────────────────────────── */
.app-wrapper {
  position: fixed;
  top: var(--nav-h);
  bottom: var(--tl-h);
  left: 0; right: 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  grid-column: 1;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 10;
}
.sidebar-nav-links { display: none; }
.sidebar-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.sidebar-search input {
  width: 100%; padding: 7px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.sidebar-search input::placeholder { color: var(--text-muted); }
.sidebar-search input:focus { border-color: var(--accent-blue); }
.stop-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.stop-list::-webkit-scrollbar { width: 4px; }
.stop-list::-webkit-scrollbar-track { background: transparent; }
.stop-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
/* Org group */
.sl-org-group { padding: 4px 0 8px; border-bottom: 1px solid var(--border-subtle); }
.sl-org-group:last-of-type { border-bottom: none; }
.sl-org-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 10px 14px 4px;
}

/* Primary stop item */
.sl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.sl-item:hover { background: var(--bg-elevated); }
.sl-item--active { background: var(--bg-elevated); border-left-color: var(--stop-color, var(--accent-blue)); }
.sl-item__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--stop-color, var(--accent-blue));
}
.sl-item__title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.sl-item__period { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

/* Deputation sub-item */
.sl-deputation {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 0; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.sl-deputation:hover { background: var(--bg-elevated); }
.sl-deputation--active { background: var(--bg-elevated); border-left-color: var(--dep-color, var(--accent-blue)); }
.sl-deputation__track {
  display: flex; flex-direction: column; align-items: center;
  padding-left: 20px; width: 32px; flex-shrink: 0; position: relative;
}
.sl-deputation__line {
  width: 1px; height: 100%; min-height: 8px;
  background: var(--border-mid); flex: 1;
  margin-bottom: 2px;
}
.sl-deputation__dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: var(--dep-color, var(--text-muted));
  border: 1px solid var(--dep-color, var(--text-muted));
}
.sl-deputation__title { font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.sl-deputation__period { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

/* Education sidebar section */
.sl-edu-group { padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.sl-edu-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 14px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.sl-edu-item:hover { background: var(--bg-elevated); border-left-color: rgba(155,89,182,0.5); }
.sl-edu-item__icon { font-size: 14px; line-height: 1.4; flex-shrink: 0; }
.sl-edu-item__degree { font-size: 11px; font-weight: 500; color: var(--text-secondary); line-height: 1.3; }
.sl-edu-item__institution { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

/* ── Map Container ─────────────────────────────────────────── */
.map-container { grid-column: 2; position: relative; }
#map { width: 100%; height: 100%; }

/* ── Career Markers ────────────────────────────────────────── */
.career-marker { cursor: pointer; position: relative; width: 0; height: 0; }
.marker-dot {
  position: absolute; top: -7px; left: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--marker-color, #4a90d9);
  border: 2px solid rgba(255,255,255,0.7);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 transparent;
}
.marker-pulse {
  position: absolute; top: -12px; left: -12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--marker-color, #4a90d9);
  opacity: 0;
}
.marker-label {
  position: absolute; top: 11px; left: -25px;
  width: 50px; text-align: center;
  font-size: 10px; font-family: 'Inter', sans-serif; font-weight: 500;
  color: rgba(255,255,255,0.8); white-space: nowrap;
  background: rgba(13,15,20,0.75); padding: 2px 5px; border-radius: 3px;
  pointer-events: none;
}
.career-marker:hover .marker-dot { transform: scale(1.3); }
.career-marker--active .marker-dot {
  transform: scale(1.6);
  box-shadow: 0 0 12px var(--marker-color, #4a90d9);
}
.career-marker--active .marker-pulse {
  animation: markerPulse 1.6s ease-out infinite;
}
@keyframes markerPulse {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Travel pin markers (smaller, no pulse) */
.travel-marker { cursor: default; }
.travel-marker .marker-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.5);
}

/* ── Story Card ────────────────────────────────────────────── */
.story-card {
  position: absolute; top: 16px; left: 16px;
  width: var(--card-w); max-height: calc(100% - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow-y: auto; overflow-x: hidden;
  z-index: 900;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
}
.story-card::-webkit-scrollbar { width: 4px; }
.story-card::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
.story-card--hidden { transform: translateX(calc(-100% - 32px)); opacity: 0; pointer-events: none; }

.sc-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  border-top: 3px solid var(--stop-color, var(--accent-blue));
  border-radius: var(--radius) var(--radius) 0 0;
}
.sc-close {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-elevated); color: var(--text-secondary);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.sc-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.sc-era { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stop-color, var(--accent-blue)); margin-bottom: 6px; }
.sc-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.sc-period { font-size: 12px; color: var(--text-secondary); }
.sc-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Story card deputations section */
.sc-deputations {
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 18px;
  background: rgba(255,255,255,0.02);
}
.sc-deputations__label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.sc-deputation-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; margin-bottom: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); text-align: left;
  transition: background 0.13s, border-color 0.13s;
}
.sc-deputation-btn:last-child { margin-bottom: 0; }
.sc-deputation-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); }
.sc-deputation-btn__icon { font-size: 13px; flex-shrink: 0; }
.sc-deputation-btn__info { flex: 1; min-width: 0; }
.sc-deputation-btn__title { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.sc-deputation-btn__period { font-size: 10px; color: var(--text-muted); }
.sc-deputation-btn__arrow { font-size: 14px; color: var(--text-muted); flex-shrink: 0; }

/* Vertical chapter navigator */
.sc-chapter-nav {
  border-bottom: 1px solid var(--border-subtle);
}
.sc-chapter-nav__label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); padding: 8px 18px 4px;
}
.sc-chapter-nav-item {
  display: flex; align-items: center; width: 100%;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent; text-align: left;
  transition: background 0.13s, border-left-color 0.13s;
}
.sc-chapter-nav-item:last-child { border-bottom: none; }
.sc-chapter-nav-item:hover {
  background: var(--bg-elevated);
  border-left-color: rgba(74,144,217,0.4);
}
.sc-chapter-nav-item--active {
  background: rgba(74,144,217,0.07);
  border-left-color: var(--stop-color, var(--accent-blue));
}
.sc-chapter-nav-content { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.sc-chapter-nav-era { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.sc-chapter-nav-item--active .sc-chapter-nav-era { color: var(--stop-color, var(--accent-blue)); }
.sc-chapter-nav-period { font-size: 10px; color: var(--text-muted); }
.sc-chapter-nav-arrow {
  padding-right: 14px; font-size: 16px; color: var(--text-muted);
  transition: color 0.13s;
}
.sc-chapter-nav-item--active .sc-chapter-nav-arrow { color: var(--stop-color, var(--accent-blue)); }

.sc-body { padding: 16px 18px; }

.sc-present { color: var(--accent-gold); }
.sc-employers--header { margin-top: 10px; }
.sc-employers { margin-bottom: 14px; }
.sc-employer { margin-bottom: 10px; }
.sc-employer__name { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.sc-role { font-size: 11px; color: var(--text-secondary); padding: 2px 0; }
.sc-role__period { color: var(--text-muted); margin-left: 6px; }

.sc-headline { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; line-height: 1.4; }
.sc-narrative { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }

.sc-achievements { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sc-achievement {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.sc-achievement__label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--stop-color, var(--accent-blue)); flex-shrink: 0; width: 70px;
  padding-top: 1px;
}
.sc-achievement__value { font-size: 12px; color: var(--text-primary); line-height: 1.4; }

/* Skills section — prominent, labeled */
.sc-skills-section { margin-bottom: 4px; }
.sc-skills-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.sc-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-skill-tag {
  font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 500;
  background: rgba(74,144,217,0.1);
  color: #7ab4e8;
  border: 1px solid rgba(74,144,217,0.25);
}

/* Override with stop colour where available */
.sc-body .sc-skill-tag {
  background: color-mix(in srgb, var(--stop-color, #4a90d9) 12%, transparent);
  color: var(--stop-color, #7ab4e8);
  border-color: color-mix(in srgb, var(--stop-color, #4a90d9) 30%, transparent);
}

.sc-footer { padding: 0 18px 16px; }
.sc-chat-btn {
  width: 100%; padding: 10px;
  background: rgba(74,144,217,0.08); border: 1px solid rgba(74,144,217,0.2);
  border-radius: var(--radius-sm); color: #7ab4e8; font-size: 12px; font-weight: 500;
  text-align: center; transition: background 0.15s, border-color 0.15s;
}
.sc-chat-btn:hover { background: rgba(74,144,217,0.16); border-color: rgba(74,144,217,0.4); }

/* ── Chat Panel ────────────────────────────────────────────── */
.chat-panel {
  position: fixed;
  top: var(--nav-h); right: 0; bottom: var(--tl-h);
  width: var(--chat-w);
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  z-index: 1002;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.chat-panel--hidden { transform: translateX(100%); }

.chat-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.chat-panel__title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.chat-panel__controls { display: flex; gap: 6px; }
.chat-panel__controls button {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); color: var(--text-secondary); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.chat-panel__controls button:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Document panel inside chat */
.document-panel { border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
.document-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; cursor: pointer; user-select: none;
  font-size: 12px; color: var(--text-secondary);
  transition: background 0.12s;
}
.document-panel__header:hover { background: var(--bg-elevated); }
.doc-toggle-icon { font-size: 14px; font-weight: 300; }
.documents-list { padding: 8px 12px 10px; max-height: 180px; overflow-y: auto; }
.documents-list::-webkit-scrollbar { width: 3px; }
.documents-list::-webkit-scrollbar-thumb { background: var(--border-mid); }

/* Category headers in doc list */
.doc-category-header {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); padding: 6px 4px 3px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.doc-item {
  padding: 5px 4px; font-size: 11px; color: var(--text-secondary);
  cursor: pointer; border-radius: var(--radius-sm); display: flex; justify-content: space-between;
  transition: background 0.1s, color 0.1s;
}
.doc-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.doc-item-view { font-size: 10px; color: var(--accent-blue); }

/* Chat messages */
.chat-content {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-content::-webkit-scrollbar { width: 4px; }
.chat-content::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
#chatMessages { display: flex; flex-direction: column; gap: 12px; }

/* Chat messages from chat.js */
.command { font-size: 12px; color: var(--text-secondary); font-family: 'Courier New', monospace; padding: 2px 0; }
.output {
  font-size: 13px; color: var(--text-primary); line-height: 1.6;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  padding: 10px 12px; border-left: 3px solid var(--accent-blue);
}
.output p { margin-bottom: 6px; }
.output p:last-child { margin-bottom: 0; }
.output strong { color: var(--accent-gold); }
.output code { font-family: 'Courier New', monospace; font-size: 11px; background: var(--bg-deep); padding: 1px 4px; border-radius: 3px; }

.suggested-question {
  display: inline-block; margin: 3px 3px 3px 0;
  font-size: 11px; padding: 4px 10px;
  background: rgba(74,144,217,0.08); border: 1px solid rgba(74,144,217,0.2);
  border-radius: 20px; color: #7ab4e8; cursor: pointer;
  transition: background 0.12s;
}
.suggested-question:hover { background: rgba(74,144,217,0.18); }

.typing-indicator {
  display: inline-flex; gap: 4px; padding: 8px 12px;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
}
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Chat input area */
.chat-input-area {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.chat-prompt-label { font-size: 11px; color: var(--text-muted); font-family: 'Courier New', monospace; flex-shrink: 0; }
#chatInput {
  flex: 1; background: var(--bg-elevated); border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm); color: var(--text-primary);
  padding: 7px 10px; font-size: 12px; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
#chatInput::placeholder { color: var(--text-muted); }
#chatInput:focus { border-color: var(--accent-blue); }
#sendButton {
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: rgba(74,144,217,0.2); border: 1px solid rgba(74,144,217,0.3);
  color: #7ab4e8; font-size: 12px; font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
#sendButton:hover { background: rgba(74,144,217,0.35); border-color: var(--accent-blue); }

/* ── Timeline Bar ──────────────────────────────────────────── */
.timeline-bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--tl-h);
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; padding: 0 20px; gap: 16px;
  z-index: 1003;
}
.timeline-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tl-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  color: var(--text-primary); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.tl-btn:hover { background: var(--bg-hover); border-color: var(--accent-blue); }
.tl-speed-control { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.tl-select {
  background: var(--bg-elevated); border: 1px solid var(--border-mid);
  color: var(--text-primary); border-radius: var(--radius-sm);
  padding: 3px 6px; font-size: 11px; outline: none;
}

.timeline-track-wrapper { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.timeline-year-row { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); }
.timeline-dots-row { display: flex; align-items: center; gap: 0; position: relative; }
.timeline-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: var(--border-mid);
}
.timeline-progress-line {
  position: absolute; left: 0; height: 1px;
  background: var(--accent-blue); transition: width 0.5s ease;
}
.tl-dot {
  position: relative; z-index: 1; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1;
}
.tl-dot__inner {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-elevated); border: 2px solid var(--border-mid);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.tl-dot:hover .tl-dot__inner { transform: scale(1.3); border-color: var(--stop-color, var(--accent-blue)); }
.tl-dot--passed .tl-dot__inner { background: var(--stop-color, var(--accent-blue)); border-color: var(--stop-color, var(--accent-blue)); }
.tl-dot--active .tl-dot__inner {
  background: var(--stop-color, var(--accent-blue));
  border-color: var(--stop-color, var(--accent-blue));
  transform: scale(1.4);
  box-shadow: 0 0 8px var(--stop-color, var(--accent-blue));
}
.tl-dot__label { font-size: 9px; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: hidden; max-width: 60px; text-overflow: ellipsis; }
.tl-dot--active .tl-dot__label { color: var(--stop-color, var(--accent-blue)); }

/* ── Document Modal ────────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 200;
  align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
  background: var(--bg-card); border: 1px solid var(--border-mid);
  border-radius: var(--radius); width: 90%; max-width: 800px;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-header .close {
  font-size: 22px; color: var(--text-secondary); cursor: pointer;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: background 0.12s;
}
.modal-header .close:hover { background: var(--bg-elevated); }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-mid); }
#documentContent { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
#documentContent h1, #documentContent h2, #documentContent h3 { color: var(--text-primary); margin: 16px 0 8px; }
#documentContent p { margin-bottom: 10px; }
#documentContent ul, #documentContent ol { padding-left: 20px; margin-bottom: 10px; }

/* ── No-token fallback banner ──────────────────────────────── */
.map-no-token {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-deep); color: var(--text-secondary); gap: 12px;
  font-size: 14px; text-align: center; padding: 32px;
}
.map-no-token a { color: var(--accent-blue); }

/* ── Education timeline markers ────────────────────────────── */
.tl-edu-marker {
  position: absolute; z-index: 2;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
}
.tl-edu-marker__diamond {
  width: 10px; height: 10px;
  background: #9b59b6;
  border: 1px solid rgba(155,89,182,0.6);
  transform: rotate(45deg);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tl-edu-marker:hover .tl-edu-marker__diamond {
  transform: rotate(45deg) scale(1.4);
  box-shadow: 0 0 8px rgba(155,89,182,0.6);
}
.tl-edu-marker__label {
  font-size: 11px; line-height: 1;
  margin-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ── Mobile / Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 85vw; --chat-w: 100%; --card-w: calc(100vw - 24px); --nav-h: 52px; --tl-h: 56px; }

  .app-wrapper { display: flex; grid-template-columns: none; }

  /* Sidebar as slide-in drawer */
  .sidebar {
    position: fixed; top: var(--nav-h); left: 0; bottom: var(--tl-h);
    width: var(--sidebar-w); z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-deep);
    grid-column: auto;
  }
  .sidebar--open { transform: translateX(0); }

  /* Backdrop overlay when sidebar is open */
  .sidebar-backdrop {
    position: fixed; inset: var(--nav-h) 0 var(--tl-h) 0;
    background: rgba(0,0,0,0.6); z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-backdrop--visible { opacity: 1; pointer-events: auto; }

  .map-container {
    grid-column: auto;
    position: absolute; inset: 0;
    width: 100% !important;
  }

  /* Nav */
  .nav-menu-btn { display: flex; align-items: center; justify-content: center; }
  .nav-name { font-size: 13px; }
  .nav-subtitle { font-size: 10px; }
  .nav-link { display: none; }
  .nav-btn--chat { display: none; }
  .top-nav { padding: 0 12px; }

  /* Sidebar nav links (mobile only) */
  .sidebar-nav-links { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
  .sidebar-nav-links__title { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
  .sidebar-nav-links__grid { display: flex; flex-wrap: wrap; gap: 6px; }
  .snav-link {
    font-size: 11px; font-weight: 500; letter-spacing: 0.05em;
    color: var(--text-secondary); padding: 5px 8px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); border: 1px solid var(--border-mid);
    transition: color 0.15s, background 0.15s; text-decoration: none;
  }
  .snav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
  .snav-btn {
    font-size: 11px; font-weight: 500; padding: 5px 10px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-mid);
    background: var(--bg-elevated); color: var(--text-primary);
  }
  .snav-btn--chat { background: rgba(74,144,217,0.12); border-color: rgba(74,144,217,0.3); color: #7ab4e8; }
  .snav-btn--resume { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.25); color: #d4b830; }

  /* Story card at bottom */
  .story-card {
    left: 8px; right: 8px; width: auto;
    top: auto; bottom: 8px;
    max-height: 45vh;
    border-radius: var(--radius);
  }
  .story-card--hidden { transform: translateY(calc(100% + 16px)); opacity: 0; pointer-events: none; }

  /* Chat panel */
  .chat-panel { width: 100%; top: var(--nav-h); bottom: var(--tl-h); }

  /* Timeline */
  .timeline-bar { padding: 0 10px; gap: 8px; height: var(--tl-h); }
  .tl-dot__label { display: none; }
  .tl-btn { width: 30px; height: 30px; }
  .tl-speed-control { display: none; }

  /* Bigger touch targets */
  .sl-item { padding: 12px 14px; }
  .sl-item__title { font-size: 14px; }
  .sl-deputation { padding: 8px 14px 8px 0; }
}
