/* git.css — git.braydenjfrankl.in's landing page, on top of site.css (a copy
   of the portfolio's: same tokens, header, footer). Blue accent. From
   sites/_mockups/git/git.css, cut down to the landing page.

   1 Logos   2 Clone command   3 Empty state   4 Repo list   5 Phones */


/* 1. Logos ----------------------------------------------------------------
   site.css points these at the portfolio's /assets/img/logos/. Here they
   live under /_assets/, which no repo can take (repo names start with a-z
   or 0-9). Same selectors, loaded later, so these win. */

[data-logo="nixos"]           { --mask: url(/_assets/logos/nixos.svg); }
[data-logo="linuxcontainers"] { background-image: url(/_assets/logos/linuxcontainers.svg); }
[data-logo="opentofu"]        { --mask: url(/_assets/logos/opentofu.svg); }
[data-logo="ansible"]         { --mask: url(/_assets/logos/ansible.svg); }
[data-logo="windows"]         { --mask: url(/_assets/logos/windows.svg); }
[data-logo="linux"]           { --mask: url(/_assets/logos/linux.svg); }


/* 2. Clone command --------------------------------------------------------- */

.git-intro { display: grid; gap: 1.5rem; max-width: 44rem; }
/* Grid children default to min-width: auto, which lets the one-line clone
   command push the page wider than a phone. */
.git-intro > * { min-width: 0; }

.cmd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 36rem;
  min-height: 3rem;
  padding: 0.25rem 1rem;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.cmd .prompt { color: var(--muted); user-select: none; }
.cmd .slot { color: var(--accent); }
.cmd-note { margin: -0.75rem 0 0; color: var(--muted); font-size: 0.875rem; }

[hidden] { display: none !important; }


/* 3. Empty state: no repos yet, or repos.json can't be read ----------------- */

.empty {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 44rem;
  padding: 1.75rem 1.5rem;
  border: var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty .icon-tile { background: var(--accent-soft); color: var(--accent); }
.empty-title { margin: 0.125rem 0 0.375rem; font-size: 1.3125rem; }
.empty p { margin: 0; color: var(--muted); }
.empty p + p { margin-top: 0.5rem; }


/* 4. Repo list -------------------------------------------------------------- */

.repo-list { margin: 0; padding: 0; border-bottom: var(--rule); list-style: none; }
.repo-list > li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 9rem auto;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding-block: 1.25rem;
  border-top: var(--rule);
}
.repo-list > li > * { min-width: 0; }
.repo-list .logo { width: 32px; height: 32px; }
.repo-name { display: block; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600; }
.repo-sum { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.repo-when { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; text-align: right; }
.repo-when b { display: block; color: var(--text); font-weight: 500; }

.repo-get { display: flex; align-items: center; gap: 0.25rem; }
.repo-get a {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none;
}
.repo-get a:hover, .repo-list .copy:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.repo-list .copy { border: 1px solid var(--border); }

/* For repos with no tool logo. */
.mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: var(--rule); border-radius: var(--radius-sm);
  color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
}


/* 5. Phones ----------------------------------------------------------------- */

@media (max-width: 40rem) {
  .repo-list > li { grid-template-columns: 2rem minmax(0, 1fr); }
  .repo-when { grid-column: 2; text-align: left; }
  .repo-when b { display: inline; margin-right: 0.5rem; }
  .repo-get { grid-column: 2; }
  .empty { padding: 1.25rem 1.125rem; }
}
