/* rowbyroh — Base Design System (C2 Refined: Zoned Warmth + Raw Edge) */

:root {
  --bg: #faf9f6;
  --bg-light: #fefefe;
  --text: #1a1a1a;
  --muted: #888;
  --light: #d4d2cd;
  --surface: #eeedea;
  --body-size: 0.9rem;
  --body-lh: 1.72;
  --max-w: 620px;
  --container-w: 760px;
  --zone-portfolio: #b84233;
  --zone-writing: #8a7d3c;
  --zone-mono: #555;
  --red-line: #e84040;
  --quote-bg: #fefefe;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--body-lh);
  color: var(--text);
  background: var(--bg);
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 3.5rem 4rem 4rem;
  position: relative;
}

/* Red notebook double margin line — ghost track */
body::before {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 2px;
  background: var(--red-line);
  opacity: 0.08;
  z-index: 50;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 52px;
  width: 1px;
  background: var(--red-line);
  opacity: 0.06;
  z-index: 50;
  pointer-events: none;
}

/* Scroll progress — fills the red line as you read */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 48px;
  width: 2px;
  height: 0%;
  background: var(--red-line);
  opacity: 0.45;
  z-index: 51;
  transition: height 0.05s linear;
  pointer-events: none;
}
.scroll-progress-inner {
  position: fixed;
  top: 0;
  left: 52px;
  width: 1px;
  height: 0%;
  background: var(--red-line);
  opacity: 0.3;
  z-index: 51;
  transition: height 0.05s linear;
  pointer-events: none;
}

/* Breadcrumb navigation */
.breadcrumb {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--text);
}
.breadcrumb .sep {
  margin: 0 0.4rem;
  color: var(--light);
}
/* Legacy back-link (archive, about — single level) */
.back-link {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back-link:hover {
  color: var(--text);
}

/* Page header */
h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.page-subtitle {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.page-intro {
  font-size: var(--body-size);
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: var(--body-lh);
}

/* Section headers with zone-colored numbers and underlines */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 3rem;
  margin-bottom: 0.4rem;
}
.section-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 300;
}
.section-number.zone-portfolio { color: var(--zone-portfolio); }
.section-number.zone-writing { color: var(--zone-writing); }
.section-number.zone-mono { color: var(--zone-mono); }

.section-header h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.section-underline {
  height: 2px;
  width: 3rem;
  margin-bottom: 1.25rem;
}
.section-underline.zone-portfolio { background: var(--zone-portfolio); }
.section-underline.zone-writing { background: var(--zone-writing); }
.section-underline.zone-mono { background: var(--zone-mono); }

/* Pull quote — lighter bg than page, zone-colored border */
.pull-quote {
  background: var(--quote-bg);
  border-left: 3px solid var(--zone-portfolio);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
}
.pull-quote .attribution {
  display: block;
  margin-top: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}

/* Stats — modest, inline, zone-colored labels */
.stat-strip {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.stat-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}
.stat-item .stat-value {
  font-weight: 500;
  color: var(--text);
}
.stat-item .stat-label {
  color: var(--zone-portfolio);
  font-weight: 400;
}

/* Diagram / chart — bordered container with presence */
.flow-diagram {
  margin: 2rem 0 3rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--zone-portfolio);
  background: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}
.flow-diagram .diagram-label {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--zone-portfolio);
  margin-bottom: 1rem;
}

/* Dialogue — monochrome zone */
.dialogue {
  margin: 2rem 0;
  padding-left: 1rem;
  border-left: 1px solid var(--zone-mono);
}
.dialogue .speaker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--zone-mono);
  margin-bottom: 0.3rem;
}

/* Meta comment */
.meta-comment {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--zone-portfolio);
  opacity: 0.6;
  margin: 1.5rem 0;
  line-height: 1.55;
}

/* Highlight box */
.highlight-box {
  background: var(--bg-light);
  border: 1px solid var(--light);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

/* Code blocks */
pre, code {
  font-family: 'IBM Plex Mono', monospace;
}
pre {
  background: var(--bg-light);
  border: 1px solid var(--light);
  padding: 1rem 1.25rem;
  font-size: 0.78rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.55;
}
code {
  font-size: 0.85em;
  background: var(--bg-light);
  padding: 0.15em 0.35em;
}
pre code {
  background: none;
  padding: 0;
}

/* Footer */
.site-footer, footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
}

/* Links */
a {
  color: var(--text);
}

/* Paragraphs */
p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}
li {
  margin-bottom: 0.35rem;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 2rem 1.25rem 3rem;
    font-size: 0.85rem;
  }
  body::before { left: 16px; }
  body::after { left: 20px; }
  .scroll-progress { left: 16px; }
  .scroll-progress-inner { left: 20px; }
  h1 { font-size: 1.1rem; }
  .pull-quote {
    margin: 1.75rem 0;
    padding: 1rem 1.25rem;
  }
  .stat-strip { gap: 1rem; }
  .flow-diagram { padding: 1rem; }
  .section-header { margin-top: 2.5rem; }
}
