/* === Timeline Controls === */
.tl-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* `.tl-tag` 和 `.tl-toggle-hidden` 按钮样式与 .archive-tag 共用，定义见 main.css */

/* === Timeline Container - Center Axis === */
.tl-container {
  position: relative;
  padding: 1rem 0;
}

.tl-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-0.5px);
  background: var(--line);
  transition: background-color 0.3s ease;
}

/* === Timeline Entry === */
.tl-entry {
  position: relative;
  width: 50%;
  padding-bottom: 2.5rem;
}

.tl-entry.tl-filtered,
.tl-entry.tl-is-hidden {
  display: none;
}

.tl-container.tl-show-hidden .tl-entry.tl-is-hidden {
  display: block;
  opacity: 0.5;
}

/* Left entries */
.tl-entry.tl-left {
  left: 0;
  padding-right: 2.5rem;
}

/* Right entries */
.tl-entry.tl-right {
  left: 50%;
  padding-left: 2.5rem;
}

/* === Marker on the center axis === */
.tl-marker {
  position: absolute;
  top: 0.2rem;
  width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  background: var(--bg);
  z-index: 1;
  transition: background-color 0.3s ease;
}

.tl-entry.tl-left .tl-marker {
  right: -0.6rem;
}

.tl-entry.tl-right .tl-marker {
  left: -0.6rem;
}

.tl-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--neon-glow);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* === Content === */
.tl-content {
  transition: border-color 0.3s ease;
}

.tl-entry.tl-left .tl-content {
  text-align: right;
}

.tl-entry.tl-right .tl-content {
  text-align: left;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.3rem;
}

.tl-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
}

.tl-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.4rem;
}

.tl-image {
  max-width: 100%;
  border-radius: 6px;
  margin-top: 0.5rem;
}

.tl-entry-tags {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.tl-entry.tl-left .tl-entry-tags {
  justify-content: flex-end;
}

/* `.tl-entry-tag` 基础样式与 .chip 共用，定义见 main.css */

/* === Responsive: stack on narrow screens === */
@media (max-width: 640px) {
  .tl-container::before {
    left: 0.45rem;
  }

  .tl-entry,
  .tl-entry.tl-left,
  .tl-entry.tl-right {
    width: 100%;
    left: 0;
    padding-left: 2rem;
    padding-right: 0;
  }

  .tl-entry.tl-left .tl-marker,
  .tl-entry.tl-right .tl-marker {
    left: 0;
    right: auto;
  }

  .tl-entry.tl-left .tl-content {
    text-align: left;
  }

  .tl-entry.tl-left .tl-entry-tags {
    justify-content: flex-start;
  }
}
