/* techru — design tokens
   Ink/brass workshop-ledger theme. Single dark identity, no external assets. */

:root {
  --ink: #0F1420;
  --ink-panel: #171E2E;
  --ink-panel-raised: #1D2740;
  --paper: #F3EEE2;
  --paper-ink: #201B12;
  --text: #ECE8DC;
  --text-muted: #8B93A6;
  --rule: #2B3448;
  --brass: #C89B3C;
  --brass-deep: #9C7628;
  --brass-soft: rgba(200, 155, 60, 0.14);

  --font-display: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 6vw, 64px);
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

a { color: var(--brass); }
a:hover { color: var(--brass-deep); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout shell ---------- */

.page {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Decorative spine: a single brass line running the length of the page,
   with a pulse that travels down it once on first scroll. Hidden on
   narrow screens where there's no room for a true side margin. */
.spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--rule) 4%, var(--rule) 96%, transparent);
  display: none;
}
.spine__pulse {
  position: absolute;
  left: -3px;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 12px 2px var(--brass-soft);
  opacity: 0;
}
.spine__pulse.is-running {
  animation: spine-travel 1.8s ease-in-out 1;
}
@keyframes spine-travel {
  0%   { opacity: 0; transform: translateY(0); }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--spine-length, 2000px)); }
}
@media (min-width: 860px) {
  .spine { display: block; }
  .page { padding-left: calc(var(--gutter) + 28px); }
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }
.wordmark em {
  font-style: normal;
  color: var(--brass);
}
nav.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}
nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}
nav.site-nav a:hover { color: var(--text); }

main { padding-bottom: 40px; }

section { padding: clamp(48px, 8vw, 88px) 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.15; max-width: 16ch; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
p { max-width: var(--measure); color: var(--text); }
p.lede { font-size: 1.1rem; color: var(--text-muted); max-width: 52ch; }

.eyebrow-free { margin-bottom: 18px; } /* placeholder hook, intentionally no label chrome */

/* ---------- Hero / terminal ---------- */

.hero { display: grid; gap: clamp(28px, 5vw, 48px); }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
}

.terminal {
  background: var(--ink-panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-panel-raised);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.terminal__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.terminal__body {
  padding: 18px 16px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-height: 190px;
}
.terminal__line { display: flex; gap: 10px; margin-bottom: 10px; }
.terminal__from { color: var(--text-muted); flex-shrink: 0; width: 4.5ch; }
.terminal__from.is-bot { color: var(--brass); }
.terminal__text { white-space: pre-wrap; }
.terminal__caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--brass);
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.clock {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Ledger (project list) ---------- */

.ledger { border-top: 1px solid var(--rule); }
.ledger-item { border-bottom: 1px solid var(--rule); }
.ledger-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.ledger-item summary::-webkit-details-marker { display: none; }
.ledger-item summary .status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--brass);
  white-space: nowrap;
}
.ledger-item summary .chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.ledger-item[open] summary .chevron { transform: rotate(90deg); }
.ledger-item .ledger-body { padding: 0 0 22px; max-width: var(--measure); color: var(--text-muted); }

/* ---------- About / paper panel ---------- */

.panel-paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 12px;
  padding: clamp(28px, 5vw, 48px);
}
.panel-paper p { color: var(--paper-ink); }
.panel-paper h2 { color: var(--paper-ink); }
.panel-paper a { color: var(--brass-deep); }

/* ---------- Contact / footer ---------- */

.contact-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; font-family: var(--font-mono); font-size: 0.92rem; }
.contact-list a { text-decoration: none; }

footer.site {
  padding: 28px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}
footer.site a { color: var(--text-muted); }
footer.site a:hover { color: var(--brass); }
footer.site .legal-links { display: flex; gap: 16px; }

/* ---------- Standalone legal pages (privacy.html / terms.html) ---------- */

.legal main { max-width: var(--measure); }
.legal h1 { max-width: none; }
.legal h2 { margin-top: 1.6em; font-size: 1.2rem; }
.legal ul { padding-left: 1.2em; color: var(--text); }
.legal .updated { color: var(--text-muted); font-size: 0.85rem; }
