/* doc.css - generated pages (toddwolven-sync).
   Rides on styles.css theme variables so light and dark come for free.
   Deployed by sync.py with a content-hash query string, so it can never go stale. */

/* Site name is a div, not an h1, so each page has exactly one h1: the article title.
   These rules restore what .top-bar h1 gave it in styles.css. */
.site-name { font-size: 1.8rem; font-weight: 700; margin: 0; line-height: 1.2; }
.site-name a { color: var(--text-color); text-decoration: none; }
.site-name a:hover { color: var(--accent-color); }

.crumb .sep { margin: 0 0.35rem; opacity: 0.5; }

.doc { max-width: 900px; padding-bottom: 3rem; }

.crumb { font-size: 0.85rem; opacity: 0.75; margin: 0 0 1.25rem; }
.crumb a { color: var(--accent-color); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb span { margin: 0 0.4rem; opacity: 0.6; }

.doc-title { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.6rem; }

.doc-byline { font-size: 0.9rem; opacity: 0.8; margin: 0 0 2rem;
              padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-color); }
.doc-byline a { color: var(--accent-color); text-decoration: none; }
.doc-byline a:hover { text-decoration: underline; }

.doc-body { font-size: 1rem; line-height: 1.7; }
.doc-body h2 { font-size: 1.5rem; margin: 2.5rem 0 0.9rem;
               padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-color); }
.doc-body h3 { font-size: 1.2rem; margin: 2rem 0 0.7rem; }
.doc-body h4 { font-size: 1.05rem; margin: 1.5rem 0 0.6rem; }
.doc-body p  { margin: 0 0 1.1rem; }
.doc-body ul, .doc-body ol { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.doc-body li { margin-bottom: 0.4rem; }
.doc-body a { color: var(--accent-color); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; }
.doc-body img { max-width: 100%; height: auto; border-radius: 6px; }
.doc-body hr { border: 0; border-top: 1px solid var(--border-color); margin: 2rem 0; }

.doc-body code { background: var(--secondary-bg); padding: 0.15em 0.4em;
                 border-radius: 4px; font-size: 0.88em;
                 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.doc-body pre { background: var(--secondary-bg); border: 1px solid var(--border-color);
                border-radius: 8px; padding: 1rem; overflow-x: auto; margin: 0 0 1.3rem;
                font-size: 0.85rem; line-height: 1.55; }
.doc-body pre code { background: none; padding: 0; font-size: inherit; }

.doc-body blockquote { margin: 0 0 1.2rem; padding: 0.2rem 0 0.2rem 1rem;
                       border-left: 3px solid var(--accent-color); opacity: 0.92; }

.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem;
                  font-size: 0.92rem; display: block; overflow-x: auto; }
.doc-body th, .doc-body td { border: 1px solid var(--border-color);
                             padding: 0.5rem 0.7rem; text-align: left; }
.doc-body th { background: var(--secondary-bg); font-weight: 600; }

.doc-body details { margin: 0 0 1.2rem; padding: 0.6rem 0.9rem;
                    background: var(--secondary-bg); border-radius: 6px; }
.doc-body summary { cursor: pointer; font-weight: 600; }

.doc-foot { margin-top: 3rem; padding-top: 1.25rem;
            border-top: 1px solid var(--border-color);
            font-size: 0.85rem; opacity: 0.8; }
.doc-foot a { color: var(--accent-color); text-decoration: none; }
.doc-foot a:hover { text-decoration: underline; }

/* ---- site-only case study preamble ---- */
.case-study { border-left: 3px solid var(--accent-color); padding: 0.2rem 0 0.2rem 1.15rem;
              margin: 0 0 2.5rem; }
.case-study h2 { font-size: 1.3rem; border: 0; margin: 1.6rem 0 0.6rem; padding: 0; }
.case-study h2:first-child { margin-top: 0; }
.case-study p { margin: 0 0 1rem; }
.case-study > :last-child { margin-bottom: 0; }

.readme-divider { font-size: 1.05rem !important; text-transform: uppercase;
                  letter-spacing: 0.06em; opacity: 0.6; margin-top: 0 !important; }

/* ---- projects index: cards ---- */
.doc-lede { font-size: 1.02rem; line-height: 1.65; opacity: 0.9; margin: 0 0 2rem; }

.repo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.repo-item {
  position: relative;                 /* anchor for the stretched link below */
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.repo-item:hover { border-color: var(--accent-color); transform: translateY(-2px); }

/* The whole card is a click target: the title's ::after is stretched over the card.
   CSS-only, so the anchor keeps its semantics and keyboard focus. The GitHub link in
   the footer is lifted above it so it stays independently clickable. */
.repo-name::after { content: ""; position: absolute; inset: 0; z-index: 1;
                    border-radius: 10px; }
.repo-item:hover .repo-name { text-decoration: underline; }
.repo-item:focus-within { border-color: var(--accent-color); }
.repo-src { position: relative; z-index: 2; }

.repo-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }

.repo-name { font-size: 1rem; font-weight: 600; color: var(--accent-color);
             text-decoration: none; word-break: break-word; }
.repo-name:hover { text-decoration: underline; }

.repo-archived { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em;
                 padding: 0.1rem 0.4rem; border-radius: 10px; white-space: nowrap;
                 background: var(--secondary-bg); border: 1px solid var(--border-color);
                 opacity: 0.85; }

/* Gold to match .star-icon in styles.css. No opacity on the container - it would
   multiply down onto the icon and grey the gold out, which is what happened before. */
.repo-stars { margin-left: auto; display: inline-flex; align-items: center; gap: 0.25rem;
              font-size: 0.82rem; white-space: nowrap; color: var(--text-color); }
.repo-stars .star-icon { width: 13px; height: 13px; fill: #FFD700; }

.repo-desc { flex: 1 1 auto; margin: 0 0 0.9rem; font-size: 0.88rem;
             line-height: 1.55; opacity: 0.9; }
.repo-desc:empty { display: none; }

.repo-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.78rem;
             opacity: 0.75; margin-top: auto; padding-top: 0.7rem;
             border-top: 1px solid var(--border-color); }
.repo-lang { display: inline-flex; align-items: center; white-space: nowrap; }
.repo-lang::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
                     background: var(--accent-color); margin-right: 0.4rem;
                     flex-shrink: 0; }
.repo-src { margin-left: auto; color: var(--accent-color); text-decoration: none;
            white-space: nowrap; position: relative; z-index: 2; }
.repo-src:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .doc-title { font-size: 1.6rem; }
  .doc-body pre { font-size: 0.78rem; }
  .repo-list { grid-template-columns: 1fr; }
}
