/* ===========================================================================
   Bench Notes — a quiet, instrument-panel aesthetic.
   Palette:  ink #16181d · paper #f6f7f9 · signal amber #b26a00
             muted #6b7280 · hairline #e4e6ea · panel #eef0f3
   Type:     Space Grotesk (display) · Source Serif 4 (body) · JetBrains Mono (data)
   ========================================================================== */

:root {
  --ink:     #16181d;
  --paper:   #f6f7f9;
  --panel:   #eef0f3;
  --muted:   #6b7280;
  --hairline:#e4e6ea;
  --signal:  #b26a00;
  --signal-soft: #f4ead9;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Source Serif 4", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --measure: 42rem;         /* readable line length */
  --gap:     clamp(1.5rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --- Header ---------------------------------------------------------------- */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand::before {
  content: "▚ ";
  color: var(--signal);
}
.nav { display: flex; gap: 1.25rem; }
.nav a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); border-color: var(--signal); }

/* --- Main spacing ---------------------------------------------------------- */
main.wrap { padding-bottom: 4rem; }
.intro { margin-bottom: 3rem; }

/* --- The signature: post log ---------------------------------------------- */
.index-label,
.page-head h1 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: 0.8rem; }         /* section titles read as labels */

.log { list-style: none; margin: 0; padding: 0; }
.log-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  column-gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
}
.log-row:first-child { border-top: 1px solid var(--hairline); }
.log-row time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.log-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.log-title::after {          /* leader that draws in on hover — the one flourish */
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--signal);
  transition: right .25s ease;
}
.log-row:hover .log-title::after { right: 0; }

/* --- Post header ----------------------------------------------------------- */
.post-head { margin-bottom: 2rem; }
.post-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.post-meta .dot { color: var(--hairline); }
.tags { display: inline-flex; gap: 0.4rem; }
.tag {
  background: var(--signal-soft);
  color: var(--signal);
  padding: 0.05rem 0.45rem;
  border-radius: 2px;
}
.post-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

/* --- Prose (article body) -------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15rem; }
.prose h2, .prose h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: 2.4rem;
}
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose a { color: var(--signal); text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote {
  margin-inline: 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--signal);
  color: var(--muted);
  font-style: italic;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.prose pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  background: #1b1d23;
  color: #e6e6e6;
  padding: 1rem 1.15rem;
  border-radius: 6px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.prose hr { border: none; border-top: 1px solid var(--hairline); margin: 2.5rem 0; }

.back {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--signal); }

/* --- Footer ---------------------------------------------------------------- */
.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.site-foot .foot-meta { opacity: 0.8; }

/* --- A11y & motion --------------------------------------------------------- */
a:focus-visible, .log-title:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (max-width: 34rem) {
  .log-row { grid-template-columns: 1fr; row-gap: 0.15rem; }
  .log-title::after { display: none; }
}
