/* =========================================
   css/timeline.css — Fixed side navigation
   ========================================= */

.timeline {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline.visible {
  opacity: 1;
}

.timeline ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline li {
  position: relative;
  padding-left: 10px;
  margin: 20px 0;
  cursor: pointer;
}

/* Dot */
.timeline li::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 8px;
  height: 8px;
  background: #555;
  border-radius: 50%;
  z-index: 1;
}

.timeline li.active::before {
  background: var(--accent);
  
}
.timeline li.active {
  font-weight: bold;
  
}

/* Connector line */
.timeline li::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 16px;
  width: 1px;
  height: 16px;
  background: #ccc;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li span {
  white-space: nowrap;
}

/* =============================================
   Mobile nav — hamburger + slide-out drawer
   Only active below 768px
   ============================================= */

.mob-hamburger,
.mob-backdrop,
.mob-drawer { display: none; }

@media (max-width: 768px) {

  .timeline { display: none !important; }

  /* ── Floating hamburger ── */
  .mob-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 200;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--ink);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
  }

  .mob-hamburger:hover { transform: scale(1.08); }

  .mob-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--bg);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
    transform-origin: center;
  }

  .mob-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mob-hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
  .mob-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ── Backdrop ── */
  .mob-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(31, 27, 22, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mob-backdrop.is-open { opacity: 1; pointer-events: all; }

  /* ── Slide-out drawer ── */
  .mob-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 160;
    width: min(72vw, 260px);
    background: var(--bg);
    padding: 2rem 1.5rem 2.5rem;
    transform: translateX(-110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }

  .mob-drawer.is-open { transform: translateX(0); }

  .mob-drawer__close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    opacity: 0.45;
    padding: 0.25rem 0.5rem;
    margin-bottom: 1rem;
    transition: opacity 0.15s ease;
  }

  .mob-drawer__close:hover { opacity: 1; }

  .mob-drawer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .mob-drawer li {
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s ease;
  }

  .mob-drawer li span {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: 0.01em;
  }

  .mob-drawer li:hover { background: rgba(31, 27, 22, 0.07); }

  .mob-drawer li.active span { font-weight: 700; color: var(--accent); }
  .mob-drawer li.active { background: rgba(0, 123, 255, 0.06); }
}
