/* © 2026 Lloyd Jones. All Rights Reserved. */

:root {
  --bg:          #f9fafb;
  --surface:     #ffffff;
  --border:      #e5e7eb;
  --border-soft: #f3f4f6;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-faint:  #9ca3af;
  --blue:        #2563eb;
  --blue-hover:  #1d4ed8;
  --blue-light:  #eff6ff;
  --blue-border: #bfdbfe;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.08);
  --max-width:   1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  min-height:  100dvh;
  display:     flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s;
}
.nav-brand:hover { color: var(--blue); }

.nav-divider {
  color: var(--text-faint);
  font-size: 0.875rem;
}

.nav-section {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero-name {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.625rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.section-count {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}

/* Cards */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.project-card { display: flex; }

.project-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.project-card-inner:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-border);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.project-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.project-language {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.topic-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.project-meta { margin-top: auto; }

.meta-updated {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Contact */
.contact-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--blue);
  transition: color 0.15s;
}
.contact-link:hover { color: var(--blue-hover); }

/* Project page */
.project-page { padding-top: 2rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-faint); }

.project-page-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .project-page-layout { grid-template-columns: 1fr; }
  .project-sidebar { order: -1; }
}

.project-article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.project-article-title {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.project-article-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

/* README */
.readme-body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
}

.readme-body h1,
.readme-body h2,
.readme-body h3,
.readme-body h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
  color: var(--text);
}
.readme-body h1 { font-size: 1.5rem;  border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.readme-body h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border-soft); padding-bottom: 0.35rem; }
.readme-body h3 { font-size: 1.0625rem; }
.readme-body h4 { font-size: 0.9375rem; color: var(--text-muted); }

.readme-body p { margin-bottom: 1rem; }
.readme-body ul,
.readme-body ol { margin: 0 0 1rem 1.5rem; }
.readme-body li { margin-bottom: 0.3rem; }

.readme-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.readme-body a:hover { color: var(--blue-hover); }

.readme-body pre {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.readme-body code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--border-soft);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--text);
}

.readme-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.readme-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}
.readme-body th,
.readme-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.readme-body th {
  background: var(--border-soft);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.readme-body blockquote {
  border-left: 3px solid var(--blue-border);
  background: var(--blue-light);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  margin: 1.5rem 0;
}

.readme-body img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 100%;
}

/* Sidebar */
.project-sidebar {
  position: sticky;
  top: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.sidebar-value {
  font-size: 0.875rem;
  color: var(--text);
}

.lang-badge {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue);
}

.sidebar-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.clone-block .clone-url {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.5;
}

.copy-btn {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  align-self: flex-start;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.copy-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

.back-link {
  font-size: 0.8125rem;
  color: var(--blue);
  margin-top: 0.5rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--blue-hover); text-decoration: underline; }

/* Empty states */
.empty-state,
.empty-readme {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-hint {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.empty-hint code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.error-page {
  padding: 6rem 0;
  text-align: center;
}

.error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy,
.footer-note {
  font-size: 0.8125rem;
  color: var(--text-faint);
}
