/* mlmartin.info — clean modern, WCAG 2.2 AA.
   Palette pairs contrast-verified light and dark; see repo history. */

:root {
  color-scheme: light dark;
  --bg: #fcfcfd;
  --surface: #f4f5f7;
  --ink: #1a1d23;
  --muted: #5b6271;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --rule: #e4e7ec;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d;
    --surface: #1c2027;
    --ink: #e8eaef;
    --muted: #9aa2b1;
    --accent: #53d1c1;
    --accent-strong: #7fe0d3;
    --rule: #2a2f38;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  max-width: var(--measure);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

/* ---- links & focus ---- */

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 120ms ease, text-decoration-thickness 120ms ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
}

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

.site-header nav {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  margin-right: auto;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-title:hover {
  color: var(--accent);
}

.site-header nav a:not(.site-title) {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-header nav a:not(.site-title):hover {
  color: var(--accent-strong);
}

.site-footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent-strong);
}

/* ---- headings ---- */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

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

/* ---- h-card hero ---- */

.h-card .p-note {
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
}

.profiles {
  list-style: none;
  margin: 0 0 4rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* ---- post ledger ---- */

.h-feed .p-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.post-list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.post-list time {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.post-list a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

@media (max-width: 480px) {
  .post-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ---- single post ---- */

.post-meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.post-meta a {
  color: var(--muted);
}

.post-meta a:hover {
  color: var(--accent-strong);
}

.e-content {
  font-size: 1.0625rem;
}

.e-content p {
  margin: 0 0 1.25rem;
}

.e-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
}

.e-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
}

.e-content blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.e-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.e-content pre {
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
}

.e-content pre code {
  background: none;
  padding: 0;
}

.e-content img,
.e-content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.e-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.syndication {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- motion & print ---- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  body {
    max-width: none;
    color: #000;
    background: #fff;
  }

  .site-header nav a:not(.site-title),
  .skip-link {
    display: none;
  }
}
