/* The Linux Cast profile overview: the .profile README as btop panes.
   Loaded on user profile pages only (custom/footer.tmpl). Scoped to .tlc-profile,
   which profile.js adds; without the script the README stays plain markdown. */
@font-face { font-family: "Chakra Petch"; src: url("fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

.tlc-profile {
  --ground: var(--color-body, #2a2a2a);
  --pane: #1e1e1e;
  --raised: #262626;
  --cell-off: #353535;
  --rule: #3a3a3a;
  --blue: #25a7ea;
  --blue-lt: #4fb5ec;
  --orange: #f7ab28;
  --fg: #ececec;
  --fg-dim: #b3b3b3;
  --ui: "Chakra Petch", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  color: var(--fg);
  font-family: var(--ui);
  font-weight: 500;
}
#readme_profile.tlc-profile { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.tlc-profile ::selection { background: var(--orange); color: #04060a; }
.tlc-profile a { color: var(--blue-lt); }
.tlc-profile a:hover { color: var(--fg); text-decoration: none; }
.tlc-profile svg { width: 1em; height: 1em; flex: none; }
.tlc-profile > p { margin: 0; color: #cfcfcf; font-size: 1.08rem; line-height: 1.6; max-width: 72ch; }
.tlc-profile > p strong { color: var(--fg); }

.tlc-profile .tlc-banner { margin: 0; max-width: none; }
.tlc-profile .tlc-banner img { display: block; width: 100%; height: auto; border: 2px solid var(--blue); border-radius: 14px; }

.tlc-profile .tlc-pane {
  position: relative;
  margin-top: 8px;
  padding: 30px 22px 20px;
  background: var(--pane);
  border: 2px solid var(--blue);
  border-radius: 14px;
}
.tlc-profile .tlc-pane__title {
  position: absolute;
  top: 0;
  left: 18px;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 0 !important;
  transform: translateY(-50%);
  background: linear-gradient(var(--ground) 50%, var(--pane) 50%);
  color: var(--fg);
  font: 600 1.02rem/1.5 var(--ui) !important;
}
.tlc-profile .tlc-idx { margin-right: .45ch; color: var(--orange); font: 700 .78em/1 var(--mono); vertical-align: .32em; }
.tlc-profile .tlc-pane ul { margin: 0; padding: 0; list-style: none; }
.tlc-profile .tlc-pane p { margin: 0; color: var(--fg-dim); }

/* now building: ruled rows, the same grammar as the homepage table */
.tlc-profile .tlc-builds > li {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 6rem 6.6rem;
  column-gap: 16px;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px 6px 22px;
  border-bottom: 1px solid var(--cell-off);
}
.tlc-profile .tlc-builds > li:last-child { border-bottom: 0; }
.tlc-profile .tlc-builds > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: .52em;
  height: 1.05em;
  background: var(--orange);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  transition: transform .18s cubic-bezier(.16, 1, .3, 1);
}
.tlc-profile .tlc-builds > li:hover, .tlc-profile .tlc-builds > li:focus-within { background: var(--raised); }
.tlc-profile .tlc-builds > li:hover::before, .tlc-profile .tlc-builds > li:focus-within::before { transform: translateY(-50%) scaleX(1); }
.tlc-profile .tlc-build__name { overflow: hidden; font: 700 .98rem/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.tlc-profile .tlc-build__name::after { content: ""; position: absolute; inset: 0; }
.tlc-profile .tlc-build__desc { overflow: hidden; color: var(--fg-dim); text-overflow: ellipsis; white-space: nowrap; }
.tlc-profile .tlc-build__lang, .tlc-profile .tlc-build__when { color: var(--fg-dim); font: 400 .84rem/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlc-profile .tlc-build__when { color: var(--fg); }

/* on air: two rows, image then words */
.tlc-profile .tlc-air { display: grid; gap: 14px; }
.tlc-profile .tlc-air__item { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 20px; align-items: center; color: var(--fg); }
.tlc-profile .tlc-air__item + .tlc-air__item { padding-top: 14px; border-top: 1px solid var(--cell-off); }
.tlc-profile .tlc-air__media { display: block; width: 224px; height: 126px; object-fit: cover; overflow: hidden; border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); }
.tlc-profile .tlc-air__media--cover { position: relative; }
.tlc-profile .tlc-air__media--cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tlc-profile .tlc-air__text { display: grid; gap: 8px; }
.tlc-profile .tlc-air__title { font-weight: 600; font-size: 1.12rem; line-height: 1.3; text-wrap: pretty; }
.tlc-profile .tlc-air__item:hover .tlc-air__title { color: var(--blue-lt); }
.tlc-profile .tlc-air__when { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--fg-dim); font: 400 .84rem/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.tlc-profile .tlc-air__when > span { white-space: nowrap; }
.tlc-profile .tlc-air__when svg { width: 15px; height: 15px; color: var(--fg); }

/* at the keyboard */
.tlc-profile .tlc-graph { margin: 0 0 18px; }
.tlc-profile .tlc-graph__dots { display: block; width: 100%; height: auto; fill: var(--blue); }
.tlc-profile .tlc-graph__dots .off { fill: var(--cell-off); }
.tlc-profile .tlc-graph__dots .now { fill: var(--orange); }
.tlc-profile .tlc-graph figcaption { display: flex; justify-content: space-between; margin-top: 8px; color: var(--fg-dim); font: 400 .78rem/1 var(--mono); }
.tlc-profile .tlc-short { display: none; }
.tlc-profile .tlc-pane__foot {
  white-space: nowrap;
  position: absolute;
  bottom: 0;
  right: 18px;
  margin: 0 !important;
  padding: 0 10px;
  transform: translateY(50%);
  background: linear-gradient(var(--pane) 50%, var(--ground) 50%);
  color: var(--fg) !important;
  font: 400 .85rem/1.6 var(--mono);
  font-variant-numeric: tabular-nums;
}
.tlc-profile .tlc-pushes li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--cell-off); }
.tlc-profile .tlc-pushes li:last-child { border-bottom: 0; }
.tlc-profile .tlc-push__repo { overflow: hidden; font: 700 .92rem/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.tlc-profile .tlc-push__msg { overflow: hidden; color: var(--fg-dim); text-overflow: ellipsis; white-space: nowrap; }
.tlc-profile .tlc-push__when { color: var(--fg); font: 400 .84rem/1.4 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlc-profile .tlc-keys__more { margin-top: 14px !important; font-size: .95rem; }

/* elsewhere */
.tlc-profile .tlc-links li { margin: 0 !important; }
.tlc-profile .tlc-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 4px 14px; }
.tlc-profile .tlc-links a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--fg); font-weight: 600; }
.tlc-profile .tlc-links a:hover { background: var(--raised); color: var(--blue-lt); }
.tlc-profile .tlc-links svg { display: block; width: 20px; height: 20px; color: var(--fg); }

@media (max-width: 760px) {
  .tlc-profile .tlc-builds > li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name when" "desc desc"; row-gap: 4px; padding-block: 10px; }
  .tlc-profile .tlc-build__name { grid-area: name; }
  .tlc-profile .tlc-build__when { grid-area: when; }
  .tlc-profile .tlc-build__desc { grid-area: desc; white-space: normal; }
  .tlc-profile .tlc-build__lang { display: none; }
  .tlc-profile .tlc-air__item { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .tlc-profile .tlc-air__media { width: 120px; height: 68px; }
  .tlc-profile .tlc-long { display: none; }
  .tlc-profile .tlc-short { display: inline; }
  .tlc-profile .tlc-pane__foot { right: 12px; width: max-content; font-size: .78rem; }
  .tlc-profile .tlc-pushes li { grid-template-columns: minmax(0, 1fr) auto; }
  .tlc-profile .tlc-push__msg { grid-column: 1 / -1; grid-row: 2; }
  .tlc-profile .tlc-pane { padding: 28px 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tlc-profile * , .tlc-profile *::before { transition: none !important; }
}
