/* Ruach Tov — Static Site Styles */

:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2129;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --success: #3fb950;
  --warning: #d29922;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  --max-width: 800px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.site-title:hover { color: var(--accent); text-decoration: none; }

.site-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--text); }

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  flex: 1;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-hebrew {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

/* Sections */
.section {
  margin-bottom: 3rem;
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* Donation Box */
.donation-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.donation-section h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.5rem;
}

.donation-section .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.wallet-grid {
  display: grid;
  gap: 1rem;
}

.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wallet-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  text-align: center;
  flex-shrink: 0;
}

.wallet-details {
  flex: 1;
  min-width: 0;
}

.wallet-chain {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.wallet-address {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  background: var(--bg);
  border-radius: 4px;
  display: inline-block;
  transition: color 0.2s;
}

.wallet-address:hover {
  color: var(--accent);
}

.wallet-address.copied {
  color: var(--success);
}

.copy-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* About section */
.about-content {
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 1.2rem;
}

.principle-list {
  list-style: none;
  margin: 1rem 0;
}

.principle-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.principle-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p { margin-bottom: 0.5rem; }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* Blog */
.blog-post .post-header {
  margin-bottom: 2rem;
}

.blog-post .post-header time {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.blog-post .post-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.blog-post .post-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.blog-post pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.blog-post code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.blog-post pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

.blog-post ol, .blog-post ul {
  margin: 0.75rem 0 1.5rem 1.5rem;
}

.blog-post li {
  margin-bottom: 0.5rem;
}

.blog-post table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}

.blog-post th, .blog-post td {
  text-align: left;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
}

.blog-post th {
  background: var(--bg-surface);
  font-weight: 600;
}

.blog-post td {
  background: var(--bg-card);
}

/* Scale table (About page) */
.scale-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
}

.scale-table td {
  padding: 0.5rem 0;
  vertical-align: baseline;
}

.scale-expr {
  white-space: nowrap;
}

.scale-gutter {
  min-width: 3rem;
  width: 3rem;
}

.scale-expr code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
}

/* AI mix-in: inline spans for dual human/AI consumption.
   Renders as monospace accent text with a subtle mechanical feel —
   a "link for AI" that humans see as a trace of structure.

   Basic:       <span class="m">ruach-memory</span>
   Typed:       <span class="m" data-kind="tool">chub_search</span>
   Dimensional: <span class="m" data-dim="count" data-unit="tool" data-value="271">271 tools</span>

   Extends naturally to middah dimensional analysis — every apparent
   scalar in prose can carry its BND type via data-dim/data-unit.
   No number is truly dimensionless. */
.m {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent);
  border-bottom: 1px dotted var(--border);
  padding: 0 0.15em;
}

/* Blog index — post entries */
.post-list {
  margin-top: 1rem;
}

.post-entry {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--text-muted, #888);
}

.post-entry-terminal {
  border-top: 1px solid var(--text-muted, #888);
}

/* Dateline: № N: + date — clickable, underlines on hover */
.post-dateline {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.post-dateline:hover {
  text-decoration: underline;
}

.post-number {
  white-space: nowrap;
}

.post-dateline time {
  font-weight: 600;
}

/* Title: large, link-colored, no underline on hover */
.post-entry h2 {
  font-size: 1.3rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-title-link {
  color: var(--link, #58a6ff);
  text-decoration: none;
}

.post-title-link:hover {
  text-decoration: none;
  color: var(--link-hover, #79b8ff);
}

.post-entry p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.post-tags-ai {
  display: none;
}

.footer-links {
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2em 0.6em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Support callout */
.support-callout {
  margin: 2rem auto;
  max-width: 480px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--accent, #d29922);
  border-radius: 8px;
  text-align: center;
  background: rgba(210, 153, 34, 0.06);
}
.support-callout p {
  margin: 0;
  line-height: 1.6;
}
.support-callout a {
  color: var(--accent, #d29922);
}

/* Responsive */
@media (max-width: 640px) {
  header nav { flex-direction: column; align-items: flex-start; }
  .nav-links { margin-left: 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero .tagline { font-size: 1rem; }
  main { padding: 2rem 1rem; }
  .donation-section { padding: 1.25rem; }
}
