/* bryandunmire.com — one stylesheet, no build step.
   Signature: the wordmark and section headings are set on Archivo's width
   axis at 125%; nothing else on the page is expanded. */

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo-var.woff2) format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Literata;
  src: url(/fonts/literata-var.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Literata;
  src: url(/fonts/literata-italic.woff2) format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #191b1e;
  --paper: #f2f2f0;
  --muted: #5e6266;
  --rule: #dcdcd8;
  --accent: #2f5d62;

  --display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --body: Literata, Georgia, "Times New Roman", serif;
  --measure: 41rem; /* ~680px: 65–72 characters at the body size */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7e7e4;
    --paper: #131417;
    --muted: #9ca1a5;
    --rule: #2a2d31;
    --accent: #7fb6bb;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.16rem;      /* ~18.5px */
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

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

@media (max-width: 30rem) {
  .wrap { padding: 0 1.25rem; }
  body { font-size: 1.1rem; }
}

/* --- links --- */

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 0;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-family: var(--display);
  font-size: 0.95rem;
}

/* --- the signature: expanded display type --- */

.wordmark,
h1,
h2 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.35rem + 3.4vw, 3.15rem);
  margin: 0;
}

h2 {
  font-size: 1.32rem;
  letter-spacing: -0.012em;
  margin: 0 0 0.7rem;
}

h3 {
  font-family: var(--display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.005em;
  margin: 2rem 0 0.5rem;
}

/* --- page furniture --- */

.masthead {
  padding: 2.75rem 0 0;
}
.masthead .wordmark {
  font-size: 1.06rem;
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.masthead .wordmark:hover { border-bottom-color: var(--rule); }

main { padding: 3rem 0 0; }

.intro { padding-top: 1.25rem; }

.intro p {
  margin: 1.6rem 0 0;
}

section {
  margin: 3.5rem 0 0;
  padding-top: 2.4rem;
  border-top: 1px solid var(--rule);
}

section > p { margin: 0 0 1rem; }

.more {
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
}

.note { color: var(--muted); }

footer {
  margin: 4.5rem 0 0;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 0.9rem;
  color: var(--muted);
}
footer a { color: var(--muted); }

/* --- contact form --- */

form { margin: 1.6rem 0 0; }

.field { margin: 0 0 1.15rem; }

label {
  display: block;
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--muted);   /* 3:1+ boundary, not a hairline */
  border-radius: 2px;
  padding: 0.55rem 0.7rem;
}

/* A name and an email address are short; the box shouldn't run the measure. */
input[type="text"],
input[type="email"] { max-width: 22rem; }
input:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 8rem; resize: vertical; }

button {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
}
button:hover { background: var(--ink); border-color: var(--ink); }

.hp { position: absolute; left: -9999px; }

/* --- essays --- */

article p { margin: 0 0 1.25rem; }
article h2 { margin: 2.6rem 0 0.75rem; }

.eyebrow {
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.standfirst {
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 1.1rem 0 2.4rem;
}

blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
blockquote p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.75rem 0;
}
th, td {
  text-align: left;
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
caption {
  text-align: left;
  margin: 0 0 0.6rem;
}

th {
  font-family: var(--display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.footnotes, .sources {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
  color: var(--muted);
}
.footnotes h2, .sources h2 { color: var(--ink); }
.footnotes ol, .sources ol { padding-left: 1.4rem; }
.footnotes li, .sources li { margin: 0 0 0.7rem; }

.updated {
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 2.5rem 0 0;
}

/* --- writing index --- */

.entries { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.entries li { margin: 0 0 2rem; }
.entries h2 { margin: 0 0 0.35rem; font-size: 1.24rem; }
.entries h2 a { color: var(--ink); text-decoration: none; }
.entries h2 a:hover { text-decoration: underline; }
.entries p { margin: 0; color: var(--muted); font-size: 1rem; }

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

/* --- print: essays get saved as PDFs --- */

@page {
  margin: 18mm 16mm;
}

@media print {
  :root {
    --ink: #000;
    --paper: #fff;
    --muted: #333;
    --rule: #bbb;
    --accent: #000;
  }
  body { font-size: 11.5pt; line-height: 1.5; background: #fff; color: #000; }
  p { orphans: 2; widows: 2; }
  .wrap { max-width: none; padding: 0; }
  .masthead, form, .skip, .more { display: none; }
  main { padding: 0; }
  h1 { font-size: 22pt; }
  h2 { font-size: 13pt; }
  a { color: #000; text-decoration: none; }
  article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  blockquote, table, .footnotes, .sources { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  footer {
    border-top: 1px solid #bbb;
    margin-top: 2rem;
    display: block;
    font-size: 9pt;
  }
  footer::after {
    content: "bryandunmire.com";
    display: block;
    margin-top: 0.35rem;
  }
  footer a[href*="linkedin"] { display: none; }
}
