/* Timeline: a build log. Dates on the left, a rail with a node per project, the
   cards on the right. On a phone the rail moves to the edge and dates sit above. */
.tl { --when: 150px; --gut: 40px; max-width: 900px; margin: 0 auto; padding: 72px 24px 120px; }
.is-preview .tl { padding-top: 32px; }

.tl-head { display: grid; gap: 18px; max-width: 720px; }
.tl-id { display: flex; align-items: center; gap: 18px; }
.tl-id .avatar { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line); }
.tl-who { flex: 1; display: grid; gap: 6px; min-width: 0; }
.tl-head h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.06; font-weight: 750; letter-spacing: -.035em; }
.tl-bio { font-size: 16.5px; line-height: 1.6; max-width: 62ch; }
.tl-stats { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 4px 0 0; }
.tl-stats div { display: grid; gap: 2px; }
.tl-stats dt { order: 2; font-size: 12.5px; color: var(--muted); }
.tl-stats dd { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tl-head .socials { margin-left: -10px; }

.tl-log { margin-top: 56px; }
.tl-label { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px calc(var(--when) + var(--gut)); }

.tl-rail { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
/* The rail: from the accent at "Now" fading into the page's hairline. */
.tl-rail::before {
  content: ''; position: absolute; top: 10px; bottom: 0; width: 2px; border-radius: 2px;
  left: calc(var(--when) + var(--gut) / 2 - 1px);
  background: linear-gradient(var(--accent), var(--line) 220px, var(--line) calc(100% - 60px), transparent);
}
.tl-item, .tl-year, .tl-now { position: relative; display: grid; grid-template-columns: var(--when) var(--gut) minmax(0, 1fr); align-items: start; }

.tl-node { grid-column: 2; grid-row: 1; justify-self: center; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 14px; border-radius: 50%; background: var(--bg); }
/* Colored by the status tone (.tone-* i in base.css). */
.tl-node i { width: 12px; height: 12px; border-radius: 50%; }
.tl-when { grid-column: 1; grid-row: 1; display: grid; justify-items: end; gap: 3px; padding: 14px 4px 0 0; text-align: right; }
.tl-when time { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-when .dot-status { font-size: 12.5px; }
.tl-item > .tl-card { grid-column: 3; grid-row: 1; }

.tl-now .tl-node { margin-top: 0; }
.tl-now .tl-node i { background: var(--accent); box-shadow: 0 0 0 4px var(--soft-2); }
.tl-now > span:last-child { grid-column: 1; grid-row: 1; justify-self: end; padding-right: 4px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); line-height: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .tl-now .tl-node i { animation: tl-pulse 2.4s ease-in-out infinite; }
  @keyframes tl-pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 8%, transparent); } }
}

.tl-year { margin-top: 10px; }
.tl-year span { grid-column: 1; justify-self: end; padding-right: 4px; font-size: 30px; line-height: 1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tl-year::after { content: ''; grid-column: 2; grid-row: 1; justify-self: center; align-self: center; width: 10px; height: 10px; border-radius: 3px; background: var(--text); transform: rotate(45deg); }

.tl-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--card); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .2s;
}
@media (hover: hover) {
  a.tl-card:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
  a.tl-card:hover .shot > img { transform: scale(1.03); }
  a.tl-card:hover .tl-arrow { color: var(--accent); transform: translateX(3px); }
}
.tl-card .shot { border-bottom: 1px solid var(--line); }
.tl-body { display: grid; gap: 8px; padding: 16px 20px 18px; min-width: 0; }
.tl-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-title { flex: 1; min-width: 0; display: grid; }
.tl-title strong { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-host { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-arrow { color: var(--muted); display: grid; transition: color .2s, transform .3s var(--ease); }
.tl-desc { font-size: 15px; line-height: 1.5; }
.tl-details { font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.tl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.tl-tags .rev, .tl-tags .rev-group { margin-left: auto; color: var(--text); }
.tl-feat .tl-title strong { font-size: 21px; white-space: normal; }
.tl-feat .tl-desc { font-size: 16px; }
.tl-feat .tl-body { padding: 20px 22px 22px; gap: 10px; }

.tl-sub { margin: 56px 0 0 calc(var(--when) + var(--gut)); padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tl-sub .sub-h { font-size: 19px; letter-spacing: -.015em; }

@media (max-width: 720px) {
  .tl { --gut: 30px; padding: 40px 16px 112px; }
  .tl-id { gap: 14px; }
  .tl-id .avatar { width: 64px; height: 64px; }
  .tl-stats dd { font-size: 20px; }
  .tl-log { margin-top: 40px; }
  .tl-label { margin-left: var(--gut); }
  .tl-rail { gap: 14px; }
  .tl-rail::before { left: calc(var(--gut) / 2 - 1px); }
  /* One column beside the rail: the dates sit over each card. */
  .tl-item, .tl-year, .tl-now { grid-template-columns: var(--gut) minmax(0, 1fr); }
  .tl-node { grid-column: 1; margin-top: 0; }
  .tl-when { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; justify-items: start; padding: 0 0 8px; text-align: left; min-height: 22px; }
  .tl-item > .tl-card { grid-column: 2; grid-row: 2; }
  .tl-now > span:last-child, .tl-year span { grid-column: 2; justify-self: start; padding: 0; }
  .tl-year::after { grid-column: 1; }
  .tl-year span { font-size: 24px; }
  .tl-body { padding: 14px 16px 16px; }
  .tl-sub { margin: 40px 0 0; padding: 22px 18px; }
}

/* Custom links between the profile and the log. */
.tl-links { max-width: 720px; margin-top: 32px; }
