/* terence-egbelo.com — static, no dependencies, no build step */

:root {
  --bg: #fdfdfb;
  --fg: #1a1a18;
  --muted: #5f5f58;
  --rule: #dedcd4;
  --accent: #7a3b2e;
  --code-bg: #f2f0ea;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e4dd;
    --muted: #9a978d;
    --rule: #33333a;
    --accent: #d99a86;
    --code-bg: #21212a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

/* ---- masthead ---- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule);
}

.masthead a.home {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}

.masthead nav {
  margin-left: auto;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.1rem;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--accent); }

/* ---- type ---- */

h1 {
  font-size: 1.9rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.9rem 0 0.9rem;
  text-wrap: balance;
}

.standfirst {
  color: var(--muted);
  font-style: italic;
  font-size: 1.08rem;
  margin: 0 0 2.25rem;
  text-wrap: pretty;
}

p { margin: 0 0 1.2rem; text-wrap: pretty; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

strong { font-weight: 600; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.855em;
  background: var(--code-bg);
  padding: 0.12em 0.34em;
  border-radius: 3px;
  overflow-wrap: break-word;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

ol, ul { padding-left: 1.3rem; margin: 0 0 1.2rem; }
li { margin-bottom: 0.55rem; }

/* ---- index listing ---- */

.lede { font-size: 1.14rem; margin-bottom: 1.4rem; }

.section-label {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3.25rem 0 1.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

.entry { margin-bottom: 1.9rem; }

.entry a {
  font-weight: 600;
  font-size: 1.08rem;
  text-decoration: none;
  color: var(--fg);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
}

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

.entry p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.97rem; }

.meta {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.elsewhere { font-size: 0.97rem; }
.elsewhere li { margin-bottom: 0.4rem; }

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

.colophon {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.93rem;
  font-style: italic;
}

.backlink {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  margin-top: 2.5rem;
}

@media (max-width: 34rem) {
  .wrap { padding-top: 2.25rem; }
  h1 { font-size: 1.6rem; }
  .masthead nav a { margin-left: 0; margin-right: 1.1rem; }
  .masthead nav { margin-left: 0; width: 100%; }
}
