/* Personal Business — personalbusiness.net
   One typeface, five colors, no boxes, no shadows, no icons. */

:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --ink-muted: #595959;
  --rule: #D9D9D9;
  --accent: #6D1A2A;

  --space-1: 8px;
  --space-2: 24px;
  --space-3: 48px;
  --space-4: 96px;

  --measure: 640px;
  --font: "Newsreader", Georgia, "Times New Roman", serif;
}

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

html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.63;
  font-feature-settings: "liga", "kern";
}

/* ---------- Links & focus ---------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */

.column {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 16px;
}

main { padding: var(--space-3) 0 var(--space-4); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header .column {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  padding-top: 20px;
  padding-bottom: 16px;
}
.masthead {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Reading progress — article pages only */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 11;
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .column {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.label, .site-footer span {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-footer span { color: var(--ink-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

/* Share line at the end of a piece */
.share {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
}
.share .label { margin-bottom: var(--space-1); }
.share a { color: var(--ink); }

/* ---------- Type ---------- */

.label { display: block; color: var(--ink-muted); margin: 0 0 var(--space-1); }
.label b { font-weight: 500; color: var(--accent); }

h1.headline {
  font-size: clamp(36px, 7vw, 52px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1.section-title {
  font-size: 36px;
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-1);
}
.deck, .intro {
  font-size: 21px;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-muted);
  margin: var(--space-1) 0 0;
}
.intro { margin: 0 0 var(--space-3); }
.byline {
  color: var(--ink-muted);
  margin: var(--space-2) 0 0;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--rule);
}

/* ---------- Lists ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
}
.list h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}
.list h2 a { text-decoration: none; }
.list h2 a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.list .deck { margin-top: var(--space-1); }
.list mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}
.list .excerpt { color: var(--ink-muted); margin: var(--space-1) 0 0; }

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: var(--space-3) 0 0;
  padding: 0 0 var(--space-1);
}
.filters button {
  all: unset;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 0;
  color: var(--ink-muted);
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---------- Article ---------- */

/* Flagship media: an article is written, audio or video. */
.media { margin: var(--space-3) 0 0; }
.media audio, .media video { display: block; width: 100%; }
.media video { aspect-ratio: 16 / 9; background: var(--ink); }
.media figcaption { color: var(--ink-muted); font-size: 15px; margin-top: var(--space-1); }

.article-head { margin-bottom: var(--space-3); }
.article-body p { margin: 0 0 var(--space-2); }
.article-body blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 24px;
  line-height: 1.35;
  font-style: italic;
}
.article-body blockquote p { margin: 0; }
.article-body .framework {
  text-align: center;
  font-variant-caps: small-caps;
  letter-spacing: 0.06em;
  margin: var(--space-3) 0;
}
.article-body figure { margin: var(--space-3) 0; }
.article-body img { display: block; width: 100%; height: auto; filter: grayscale(1); }
.article-body figcaption {
  color: var(--ink-muted);
  font-size: 15px;
  margin-top: var(--space-1);
}
.ornament {
  text-align: center;
  font-size: 24px;
  margin: var(--space-3) 0 0;
}

.article-body h2 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: var(--space-3) 0 var(--space-2);
}
.references { margin-top: var(--space-3); color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.references h2 { font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 var(--space-2); color: var(--ink-muted); }
.references p { margin: 0 0 var(--space-1); }

/* Scroll reveal: hidden and 14px low until seen */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Search ---------- */

.search-box {
  all: unset;
  display: block;
  width: 100%;
  font: inherit;
  font-size: 32px;
  line-height: 1.2;
  padding: var(--space-1) 0;
  border-bottom: 2px solid var(--ink);
}
.search-box:focus { border-bottom-color: var(--accent); outline: none; }
.search-box::placeholder { color: var(--ink-muted); font-style: italic; }
.result-count { color: var(--ink-muted); margin: var(--space-2) 0 0; }

/* ---------- Prose pages (About) ---------- */

.prose p { margin: 0 0 var(--space-2); }

/* ---------- Phone width ---------- */

body { overflow-wrap: break-word; }
.site-footer .column { flex-wrap: wrap; }

@media (max-width: 480px) {
  main { padding-top: var(--space-2); padding-bottom: var(--space-3); }
  .list h2 { font-size: 26px; }
  h1.section-title { font-size: 32px; }
  .deck, .intro { font-size: 19px; }
  .search-box { font-size: 26px; }
  .site-header .column { padding-top: 16px; padding-bottom: 12px; }
  .site-nav { gap: 16px; }
  .filters { gap: 4px 16px; }
}
