/* ============================================================
   dierker.us — systems ledger
   Palette:  paper #F2F6EF · ink #1C3325 · slate #52705C
             forest #2D5A3D · rule #C8D8CC
   Type:     Zilla Slab (display) · IBM Plex Sans (body)
             IBM Plex Mono (labels, figures)
   ============================================================ */

:root {
  --paper: #F2F6EF;
  --ink: #1C3325;
  --slate: #52705C;
  --accent: #2D5A3D;
  --accent-dark: #1F4230;
  --rule: #C8D8CC;
  --rule-strong: #2A5540;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout shell ---------- */

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--rule-strong);
  padding: 0.65rem 1.15rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

#main-content { scroll-margin-top: 5rem; }

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 2px solid var(--rule-strong);
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1E3B2A;
}

.site-header .wrap { transition: padding 180ms ease; }

.site-header.is-compact .wrap {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
  .site-header .wrap { transition: none; }
  html { scroll-behavior: auto; }
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}

.wordmark:hover { color: #9CC3A8; }

.wordmark .est {
  color: #9CC3A8;
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1.4rem;
  row-gap: 0.6rem;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #DDE8DF;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover { color: #9CC3A8; }

.site-nav a[aria-current="page"]:hover { color: #fff; }

.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #9CC3A8;
}

.nav-divider {
  width: 1px;
  height: 0.95rem;
  background: #9CC3A8;
  opacity: 0.45;
}

/* Below 560px, tighter nav spacing keeps the links on one
   line. 560 (not 540) leaves buffer for font-metric
   differences across OS/browser/zoom. */

@media (max-width: 560px) {
  .site-nav { column-gap: 0.95rem; }
}

.site-header :focus-visible { outline-color: #fff; }

/* ---------- shared section machinery ---------- */

main { padding-bottom: 4rem; }

.section {
  padding-top: 3.25rem;
}

.eyebrow {
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 1rem; max-width: 28ch; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { max-width: var(--measure); }
p + p { margin-top: 1rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

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

.lede {
  font-size: 1.15rem;
  color: var(--ink);
}

.muted { color: var(--slate); }

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: 3.25rem;
  border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(to right, rgba(34, 68, 46, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 68, 46, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero h1 { margin-bottom: 1.4rem; }

.hero .lede { margin-bottom: 2rem; }

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.65rem 1.15rem;
  border: 2px solid var(--rule-strong);
  color: var(--ink);
  transition: background-color 120ms ease, color 120ms ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #1E3B2A;
  border-color: #1E3B2A;
  color: #fff;
}

/* ---------- ledger (proof points) ---------- */

.ledger {
  list-style: none;
  border-top: 2px solid var(--rule-strong);
  margin-top: 1.25rem;
}

.ledger li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 12.5rem) 1fr;
  gap: 0.4rem 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.ledger .figure {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  white-space: nowrap;
}

.ledger .desc {
  color: var(--slate);
  max-width: var(--measure);
}

/* ---------- avail-row (availability note, via footer.php) ---------- */

.avail-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-top: 3.25rem;
  padding: 0.9rem 0;
  border-top: 2px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.avail-row__label {
  flex: none;
  color: var(--slate);
  font-style: italic;
}

.avail-row__copy {
  flex: 1;
  margin: 0;
  color: var(--ink);
  max-width: none;
}

.avail-row__link {
  flex: none;
  white-space: nowrap;
  color: var(--accent);
  text-decoration: none;
}

.avail-row__link:hover { color: var(--accent-dark); text-decoration: underline; }

@media (max-width: 540px) {
  .avail-row { flex-wrap: wrap; row-gap: 0.5rem; }
  .avail-row__copy { flex-basis: calc(100% - 3rem); }
  .avail-row__link { margin-left: auto; }
}

/* ---------- capability cards (short version / what i build) ---------- */

.areas {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.area {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
}

.area h3 .tag {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.35rem;
}

.area p { color: var(--slate); }

/* ---------- changelog (about page signature) ---------- */

.changelog { margin-top: 2rem; }

.release {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
  border-left: 2px solid var(--rule);
}

.release:last-child { padding-bottom: 0.5rem; }

.release::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.release .version {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.release h3 { margin-bottom: 0.6rem; }

.release p { color: var(--ink); }

.release h3 a {
  color: var(--ink);
  text-decoration: none;
}

.release h3 a:hover { color: var(--accent); }

.release-more {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-top: 0.6rem;
  text-decoration: none;
}

.release-more:hover { color: var(--accent-dark); text-decoration: underline; }


/* ---------- contact ---------- */

.contact-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.contact-status .status-label {
  color: var(--slate);
  font-style: italic;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---------- inverted band ---------- */

.band {
  background: #1E3B2A;
  color: var(--paper);
  margin-top: 3.25rem;
  padding: 3.25rem 0 3.75rem;
}

.band .eyebrow { color: #9CC3A8; }
.band h2 { color: #fff; }
.band p { color: #BED3C3; }
.band .lede { color: #E6EDE7; }

.band .btn {
  border-color: var(--paper);
  color: var(--paper);
}

.band .btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.band .cta-row { margin-top: 3rem; }

.cta-row-compact { margin-top: 1.75rem; }

/* ---------- system diagram ---------- */

.diagram {
  margin: 2.25rem 0 0.5rem;
  max-width: 46rem;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 0.75rem;
  letter-spacing: 0.03em;
}

/* ---------- portrait (about) ---------- */

.hero-split .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem);
  gap: 2.5rem;
  align-items: start;
}

.portrait {
  border: 2px solid var(--rule-strong);
  background: #fff;
  padding: 0.6rem;
}

.portrait img,
.portrait svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.portrait figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  padding-top: 0.55rem;
  letter-spacing: 0.04em;
}

@media (max-width: 700px) {
  .hero-split .wrap { grid-template-columns: 1fr; }
  .portrait { max-width: 14rem; }
}

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

.site-footer {
  border-top: 2px solid var(--rule-strong);
  padding: 1.6rem 0 2.4rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
}

.site-footer a { color: var(--slate); }
.site-footer a:hover { color: var(--ink); }

/* ---------- load-in (restrained) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > * {
    animation: rise 480ms ease-out backwards;
  }
  .hero .wrap > *:nth-child(2) { animation-delay: 90ms; }
  .hero .wrap > *:nth-child(3) { animation-delay: 180ms; }
  .hero .wrap > *:nth-child(4) { animation-delay: 270ms; }
  .hero .wrap > *:nth-child(5) { animation-delay: 360ms; }
  .hero .wrap > *:nth-child(6) { animation-delay: 450ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- small screens ---------- */

@media (max-width: 540px) {
  .ledger li { grid-template-columns: 1fr; gap: 0.15rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}
