/* matthewmayo.ai · palette "Proof" (see POSITIONING.md, section 3) */

@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-Italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/fonts/IBMPlexSans.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url(/fonts/IBMPlexMono-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url(/fonts/IBMPlexMono-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #FAF8F3; --surface: #F1EDE3; --line: #E3DED3; --white: #FFFFFF;
  --ink: #1D1C1A; --body: #3B3934; --muted: #6F6B62;
  --accent: #1E6B52; --accent-dark: #15513E; --accent-tint: #D8ECE3;
  --highlight: #F6D84C; --fail: #B23A2E;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plex", system-ui, sans-serif;
  --mono: "PlexMono", ui-monospace, monospace;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }  /* reserve the scrollbar's width so short pages don't shift */
body { margin: 0; background: var(--paper); color: var(--body); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 560; font-variation-settings: "opsz" 96; letter-spacing: -0.015em; line-height: 1.08; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--white); padding: 0.5rem 1rem; }

.container { width: min(100% - 3rem, var(--max)); margin-inline: auto; }
.container-narrow { --max: 760px; }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tight { padding-top: 0; }

/* Grounds */
.band-mint { background: var(--accent-tint); background-image: repeating-linear-gradient(90deg, rgb(30 107 82 / 0.08) 0 1px, transparent 1px 48px); }
.band-surface { background: var(--surface); }

/* Small parts */
.eyebrow { font-family: var(--mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.eyebrow a { color: inherit; }
.chip { display: inline-flex; align-items: center; gap: 0.55em; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: var(--accent-tint); border-radius: 999px; padding: 0.6em 1em; white-space: nowrap; }
.chip-paper { background: var(--paper); border: 1px solid rgb(30 107 82 / 0.2); }
.dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); flex: none; }
.hi { background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%); padding: 0 0.08em; font-style: inherit; }
.tag { display: inline-block; font: 500 0.78rem/1.5 var(--mono); letter-spacing: 0.06em; padding: 0 0.45em; border-radius: 4px; }
.tag-pass { color: var(--accent); background: var(--accent-tint); }
.tag-fail { color: var(--white); background: var(--fail); }
.accent { color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; font: 500 0.95rem/1 var(--sans); color: var(--paper); background: var(--accent); border: 0; border-radius: 10px; padding: 0.95em 1.4em; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); color: var(--paper); }
.btn-small { padding: 0.6em 1em; font-size: 0.875rem; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: rgb(250 248 243 / 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font: 600 1.2rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--body); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--accent); }

/* Hero */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0; border-bottom: 1px solid rgb(30 107 82 / 0.12); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.display { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 1.5rem 0 1.25rem; }
.display em { font-style: italic; }
.display-sm { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lede { font-size: 1.2rem; color: var(--body); max-width: 34em; }
.lede strong { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: 1.08em; }

.report { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -28px rgb(29 28 26 / 0.35); overflow: hidden; }
.report-head, .testcase-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.85rem 1.25rem; }
.report-log { list-style: none; margin: 0; padding: 1rem 1.25rem; display: grid; gap: 0.75rem; font-size: 0.92rem; color: var(--body); }
.report-log li { display: grid; grid-template-columns: 3.6rem 1fr; align-items: center; }
.report-log .tag { justify-self: start; }
.report-foot { border-top: 1px dashed var(--line); padding: 0.85rem 1.25rem; font-size: 0.85rem; color: var(--ink); text-align: right; }

/* Signup */
/* The input row keeps its width; the notes under it run to the edge of the box or column. */
.signup { margin-top: 1.75rem; }
.signup-row { display: flex; gap: 0.5rem; max-width: 34rem; }
.signup input[type=email] { flex: 1; min-width: 0; font: 400 1rem var(--sans); color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0.85em 1em; }
.signup input[type=email]:focus { outline: 3px solid rgb(30 107 82 / 0.3); border-color: var(--accent); }
.signup-note { display: flex; align-items: center; gap: 0.6rem; margin: 0.7rem 0 0; font: 400 0.8rem/1.4 var(--mono); color: var(--muted); }
.signup-note .tag { display: none; }
.signup[data-state=fail] .signup-note .tag-fail, .signup[data-state=pass] .signup-note .tag-pass { display: inline-block; }
.signup[data-state=fail] input[type=email] { border-color: var(--fail); }
.signup-privacy { margin: 0.35rem 0 0; font: 400 0.72rem/1.45 var(--mono); color: var(--muted); }
.signup-unwired { font: 400 0.78rem/1.4 var(--mono); color: var(--fail); margin-top: 0.5rem; }

/* Section headings */
.h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-lede { font-size: 1.15rem; max-width: 38em; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.card h3 { font-size: 1.45rem; margin: 1rem 0 0.6rem; }
.card p { margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 2.5rem; }
.split-col { padding: 2rem 2.5rem 0 0; }
.split-col + .split-col { padding: 2rem 0 0 2.5rem; border-left: 1px solid var(--line); }
.split-label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.split-big { font: 560 1.75rem/1.2 var(--serif); color: var(--ink); letter-spacing: -0.01em; }

/* Newsletter band */
.newsletter-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.nl-name { font-size: clamp(2.6rem, 6vw, 4.2rem); font-style: italic; font-weight: 600; margin-bottom: 1rem; }
.testcase { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px -28px rgb(29 28 26 / 0.35); }
.testcase-row { display: grid; grid-template-columns: 6.5rem 1fr; align-items: baseline; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.testcase-row:last-child { border-bottom: 0; }
.testcase-row .k { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; color: var(--accent); }
.testcase-row p { margin: 0; font: 500 1.3rem/1.3 var(--serif); color: var(--ink); }
.testcase-row em { font-style: italic; }

/* Post lists */
.posts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.post-list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.post-item time { font: 400 0.82rem/2.2 var(--mono); color: var(--muted); }
.post-item h3 { font-size: 1.45rem; margin: 0 0 0.35rem; }
.post-item h3 a { color: var(--ink); text-decoration: none; }
.post-item h3 a:hover { color: var(--accent); }
.post-item p { margin: 0; }
.empty { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.headshot { margin: 0; position: relative; }
.headshot img { border-radius: var(--radius); filter: saturate(0.92); }
.headshot::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 45%; height: 45%; background: var(--accent-tint); border-radius: var(--radius); z-index: -1; }
.about-links a { margin-right: 1.25rem; font-size: 0.9rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: 0.85rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); }

/* Blog pages */
.page-head, .post-head { padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid rgb(30 107 82 / 0.12); }
.post-title { font-size: clamp(2.3rem, 5vw, 3.4rem); margin-top: 0.5rem; }
.post-summary { font-size: 1.2rem; margin: 0; }
.draft { color: var(--fail); }
.prose { padding: 3rem 0 1rem; font-size: 1.125rem; }
.prose h2 { font-size: 1.9rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.8em; }
.prose blockquote { margin: 2em 0; padding: 1.1em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: italic 500 1.4rem/1.45 var(--serif); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose code { font: 0.88em var(--mono); background: var(--surface); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--ink); color: var(--paper); padding: 1.25rem 1.4rem; border-radius: 10px; overflow-x: auto; font-size: 0.9rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: 10px; margin: 2em auto; }
/* A paragraph that is all italics right after an image is its caption, as in the email (eb.py). */
.prose p:has(> img:only-child) + p:has(> em:only-child) { margin: -1.2em 0 2.2em; font: 400 0.8rem/1.5 var(--mono); color: var(--muted); text-align: center; }
.prose p:has(> img:only-child) + p > em:only-child { font-style: normal; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1.5em 0; }
.prose th, .prose td { text-align: left; padding: 0.6em 0.8em; border-bottom: 1px solid var(--line); }
.prose th { font: 500 0.78rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.prose mark { background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%); color: inherit; }
/* Admonitions: `!!! prompt "Title"` in a post (Python-Markdown's admonition extension).
   A bordered card with a mono label bar; the type shows in the label's marker, never a side strip. */
.prose .admonition { --mark: var(--accent); margin: 2em 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prose .admonition-title { display: flex; align-items: center; gap: 0.6em; margin: 0; padding: 0.65rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.prose .admonition-title::before { content: ""; flex: none; width: 0.6em; height: 0.6em; border-radius: 2px; background: var(--mark); }
.prose .admonition > :not(.admonition-title) { margin: 1.1rem 1.25rem; }
.prose .admonition.prompt { --mark: var(--ink); }
.prose .admonition.prompt > p:not(.admonition-title) { font: 400 0.95rem/1.65 var(--mono); color: var(--ink); white-space: pre-line; }
.prose .admonition.warning { --mark: var(--fail); }
.prose .admonition.warning .admonition-title { color: var(--fail); }
.post-cta { margin: 2.5rem 0 5rem; padding: 2rem; background: var(--surface); border-radius: var(--radius); }
.post-cta-title { font: 500 1.4rem/1.3 var(--serif); color: var(--ink); }
.nl-inline { font-style: italic; font-weight: 600; }

/* Small screens */
@media (max-width: 880px) {
  .hero-grid, .newsletter-grid, .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-col, .split-col + .split-col { padding: 2rem 0 0; border-left: 0; }
  .split-col + .split-col { border-top: 1px solid var(--line); margin-top: 2rem; }
  .post-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .headshot { max-width: 320px; }
}
@media (max-width: 520px) {
  .signup-row { flex-direction: column; }
  .nav a:not(.btn) { display: none; }
}
#writing { padding-bottom: 0; }
.prose p:has(> img) { margin: 0; }
.prose p:has(> img) + p:has(> em:only-child) { margin: -1.25em 0 2.2em; font: 400 0.8rem/1.5 var(--mono); color: var(--muted); text-align: center; }
.prose p:has(> img) + p:has(> em:only-child) em { font-style: normal; }

/* Code highlighting: fenced blocks with a language tag (```python), via codehilite + Pygments.
   Colors are the Dracula theme (draculatheme.com/contribute), set by hand: Pygments' own
   "dracula" style colors strings purple, not yellow. */
/* No italics anywhere in code (user, 2026-11-26), whatever the theme says. */
.prose .codehilite { margin: 1.5em 0; }
.codehilite, .codehilite * { font-style: normal; }
.prose .codehilite pre { margin: 0; background: #282A36; color: #F8F8F2; }
.codehilite .c, .codehilite .c1, .codehilite .cm, .codehilite .ch, .codehilite .cs, .codehilite .cpf { color: #6272A4; }
.codehilite .k, .codehilite .kn, .codehilite .kp, .codehilite .kr, .codehilite .o, .codehilite .ow, .codehilite .cp, .codehilite .nt { color: #FF79C6; }
.codehilite .kd, .codehilite .kt { color: #8BE9FD; }
.codehilite .kc, .codehilite .m, .codehilite .mi, .codehilite .mf, .codehilite .mh, .codehilite .mo, .codehilite .mb, .codehilite .no { color: #BD93F9; }
.codehilite .s, .codehilite .s1, .codehilite .s2, .codehilite .sa, .codehilite .sb, .codehilite .sc, .codehilite .dl, .codehilite .sd, .codehilite .sh, .codehilite .sx, .codehilite .sr, .codehilite .ss { color: #F1FA8C; }
.codehilite .se, .codehilite .si { color: #FF79C6; }
.codehilite .nf, .codehilite .fm, .codehilite .nc, .codehilite .nd, .codehilite .na { color: #50FA7B; }
.codehilite .nb, .codehilite .nv, .codehilite .vc { color: #8BE9FD; }
.codehilite .bp { color: #BD93F9; }
.codehilite .ne { color: #50FA7B; }
.codehilite .err { color: #FF5555; }
.codehilite .hll { background: #44475A; }
