/* ══════════════════════════════════
   EXPERIENCE TIMELINE — panel lateral
   ══════════════════════════════════ */

.tl-overlay {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  /* height forzado por JS con window.innerHeight */
  background: rgba(6, 5, 4, 0.72);
  z-index: 3000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tl-overlay--open {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel: height forzado por JS con window.innerHeight ── */
.tl-panel {
  width: 400px;
  max-width: 100vw;
  /* height forzado por JS */
  background: var(--bg-panel);
  border-left: 1px solid var(--border-med);
  display: flex;
  flex-direction: column;
  overflow: hidden;               /* imprescindible para que el body scrollee */
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.tl-overlay--open .tl-panel {
  transform: translateX(0);
}

/* ── Header — no crece ── */
.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(232, 226, 208, 0.02);
}

.tl-header__title {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--cream-dim);
  text-transform: uppercase;
}

.tl-close {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: none;
  color: var(--cream-dim);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  font-family: var(--font-ui);
}
.tl-close:hover { color: var(--cream); border-color: var(--border-med); }

/* ── Body — ocupa el resto y scrollea ── */
.tl-body {
  flex: 1;
  min-height: 0;          /* sin esto flex ignora overflow-y en columna */
  overflow-y: auto;
  padding: 24px 20px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Items ── */
.tl-item {
  display: grid;
  grid-template-columns: 108px 18px 1fr;
  gap: 0 10px;
  align-items: start;
  padding-bottom: 28px;
}

.tl-item__period {
  font-family: var(--font-ui);
  font-size: 7px;
  letter-spacing: 1.5px;
  color: var(--cream-low);
  padding-top: 3px;
  text-align: right;
  line-height: 1.4;
}

.tl-item__track {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-item__dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--cream-dim);
  border-radius: 50%;
  background: var(--bg-panel);
  flex-shrink: 0;
  margin-top: 2px;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 60, 60, 0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(224, 60, 60, 0); }
}

.tl-item__dot--active {
  background: #E03C3C;
  border-color: #E03C3C;
  animation: dot-pulse 1.6s ease-in-out infinite;
}

.tl-item__line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 5px;
  min-height: 28px;
}

.tl-item:last-child .tl-item__line { display: none; }

.tl-item__info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tl-item__company {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--cream);
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}

.tl-item__role {
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--cream-dim);
  display: block;
}

/* ── Botón en el system panel ── */
.timeline-btn {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--cream);
  border: 1px solid var(--border-med);
  border-radius: 2px;
  padding: 5px 10px;
  background: rgba(232, 226, 208, 0.04);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.timeline-btn:hover {
  background: var(--cream);
  color: var(--bg);
}

/* ── Mobile: bottom sheet ── */
@media (max-width: 600px) {
  .tl-overlay {
    align-items: flex-end;
  }
  .tl-panel {
    width: 100vw;
    max-height: 80vh;
    border-left: none;
    border-top: 1px solid var(--border-med);
    transform: translateY(100%);
  }
  .tl-overlay--open .tl-panel {
    transform: translateY(0);
  }
}
