/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --paper:      #EEEBE2;
  --paper-raise:#F6F4EC;
  --ink:        #1E2A2E;
  --ink-soft:   #4B5658;
  --brass:      #8C6A2E;
  --brass-dim:  #B99B5C;
  --verdigris:  #3E5A52;
  --verdigris-soft: #6C8880;
  --rule:       #CBC4B0;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 40rem;
  --gutter: 1.5rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--verdigris); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brass); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* ---------------------------------------------------
   Layout shell
--------------------------------------------------- */
.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

header.site-head {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem 0;
}

.site-title a { color: var(--ink); text-decoration: none; }

/* Module rail: the tab-like nav, styled as bracketed ports */
nav.module-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

nav.module-rail a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

nav.module-rail a:hover,
nav.module-rail a.active {
  border-color: var(--verdigris);
  color: var(--verdigris);
}

main { padding: 2.5rem 0 5rem; }

footer.site-foot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------
   Home hero — the thesis statement
--------------------------------------------------- */
.hero-tagline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.35;
  max-width: 30rem;
  margin: 0 0 1.25rem 0;
}

.hero-intro {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

/* ---------------------------------------------------
   Entries (publications, projects, posts)
--------------------------------------------------- */
.entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry:first-of-type { padding-top: 0; }

.entry-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 0.35rem 0;
}

.entry-title a { text-decoration: none; color: var(--ink); }
.entry-title a:hover { color: var(--brass); }

.entry-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--verdigris-soft);
  margin-bottom: 0.6rem;
}

.entry-summary { color: var(--ink-soft); margin: 0; }

/* The ledger line: real git commit data rendered as design */
.ledger {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule);
}

.ledger .brass { color: var(--brass); }

/* ---------------------------------------------------
   Section intros
--------------------------------------------------- */
.section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 2.25rem;
}

/* ---------------------------------------------------
   Single page (infrastructure project)
--------------------------------------------------- */
article.single h2 { font-size: 1.3rem; margin-top: 2rem; }
article.single p, article.single li { max-width: var(--measure); }
article.single pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--paper-raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1rem;
  overflow-x: auto;
}
article.single code {
  font-family: var(--mono);
  background: var(--paper-raise);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-size: 0.9em;
}

/* ---------------------------------------------------
   Small screens
--------------------------------------------------- */
@media (max-width: 32rem) {
  body { font-size: 1.05rem; }
  .hero-tagline { font-size: 1.45rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
