/* ============================================================
   Notes / Micro-blog Timeline Styles
   Compatible with PaperMod dark & light modes
   ============================================================ */

/* ---------- Page wrapper ---------- */
.notes-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ---------- Header ---------- */
.notes-header {
  margin-bottom: 1.5rem;
}

.notes-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notes-subtitle {
  font-size: 1rem;
  opacity: 0.6;
  margin-bottom: 0;
}

.notes-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s;
}

.notes-back-link:hover {
  opacity: 1;
}

/* ---------- Tag filter bar ---------- */
.notes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tag-filter {
  padding: 0.35rem 1rem;
  border-radius: 999px;
  border: 1.5px solid #999;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  outline: none;
}

.tag-filter:hover {
  border-color: #333;
  color: #333;
  background: transparent;
}

.tag-filter.active {
  background: #111;
  border-color: #111;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

/* ---------- Timeline container ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

/* The vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--primary, #1d4ed8) 0%,
    var(--border, #e2e8f0) 100%
  );
  border-radius: 2px;
}

/* ---------- Year separator ---------- */
.timeline-year {
  position: relative;
  margin: 2rem 0 1.2rem -2rem;
  padding-left: 2.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.45;
}

.timeline-year::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary, #1d4ed8);
  opacity: 0.5;
}

/* ---------- Timeline item ---------- */
.timeline-item {
  position: relative;
  margin-bottom: 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

/* ---------- Dot ---------- */
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.dot-emoji {
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.dot-default {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary, #1d4ed8);
  box-shadow: 0 0 0 3px var(--theme, #fff);
  border: 2px solid var(--primary, #1d4ed8);
}

/* ---------- Card ---------- */
.timeline-card {
  flex: 1;
  background: var(--entry, #f9fafb);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.timeline-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* ---------- Meta row ---------- */
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  opacity: 0.5;
  margin-bottom: 0.7rem;
}

.timeline-meta i {
  margin-right: 0.25rem;
}

/* ---------- Content ---------- */
.timeline-content {
  font-size: 0.97rem;
  line-height: 1.7;
}

.timeline-content p {
  margin: 0;
}

.timeline-content p + p {
  margin-top: 0.6rem;
}

/* ---------- Tags ---------- */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.note-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #1d4ed8) 10%, transparent);
  color: var(--primary, #1d4ed8);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.note-tag:hover {
  background: color-mix(in srgb, var(--primary, #1d4ed8) 20%, transparent);
}

/* ---------- Single note ---------- */
.single-note.timeline {
  margin-top: 1.5rem;
}

/* ---------- Dark mode overrides ---------- */
.dark .timeline-card {
  background: var(--entry, #1e293b);
  border-color: var(--border, #334155);
}

.dark .dot-default {
  box-shadow: 0 0 0 3px var(--theme, #0f172a);
}

.dark .tag-filter {
  border-color: #555;
  color: #aaa;
}

.dark .tag-filter:hover {
  border-color: #ccc;
  color: #ccc;
  background: transparent;
}

.dark .tag-filter.active {
  background: #f1f1f1;
  border-color: #f1f1f1;
  color: #111;
  box-shadow: none;
}

.dark .note-tag {
  background: color-mix(in srgb, var(--primary, #60a5fa) 15%, transparent);
  color: var(--primary, #60a5fa);
}

.dark .note-tag:hover {
  background: color-mix(in srgb, var(--primary, #60a5fa) 25%, transparent);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .notes-page {
    padding: 1.25rem 0.75rem 3rem;
  }

  .notes-title {
    font-size: 1.5rem;
  }

  .timeline {
    padding-left: 1.6rem;
  }

  .timeline-dot {
    left: -1.6rem;
  }

  .timeline-year {
    margin-left: -1.6rem;
    padding-left: 2.1rem;
  }
}
