/* langdonholmes.info — single stylesheet
   Fonts: Bricolage Grotesque (display, via Google Fonts) + system stack (body) */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #57575c;
  --faint: #77777d;
  --accent: #c2410c;
  --accent-strong: #9e3509;
  --accent-soft: #fdf0e9;
  --rule: #e7e7ea;
  --card: #fafafa;
  --hot-text: #ffffff;
  --max: 46rem;
  --display: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --text: #ebebee;
    --muted: #a9a9b0;
    --faint: #8b8b92;
    --accent: #e8873f;
    --accent-strong: #f09a58;
    --accent-soft: #26190f;
    --rule: #2b2b30;
    --card: #1c1c1f;
    --hot-text: #1a1208;
  }
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.75rem 1.25rem 2rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- top utility row ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem 1.2rem;
  margin-bottom: 2.75rem;
  font-size: 0.92rem;
}

.topbar a {
  color: var(--muted);
  font-weight: 500;
}

.topbar a:hover {
  color: var(--accent);
  text-decoration: none;
}

.topbar .cv-btn {
  background: var(--accent);
  color: var(--hot-text);
  font-weight: 600;
  padding: 0.28rem 0.95rem;
  border-radius: 999px;
}

.topbar .cv-btn:hover {
  background: var(--accent-strong);
  color: var(--hot-text);
}

@media (max-width: 560px) {
  .topbar { justify-content: flex-start; }
}

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

.site-header { margin-bottom: 3rem; }

.site-header h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 3.25rem);
  line-height: 1.05;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  font-family: var(--display);
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  line-height: 1.45;
}

/* ---------- surprisal heatmap ---------- */

.heatmap {
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  padding: 1.1rem 1.3rem 1rem;
  margin: 0;
}

.fig-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem 1rem;
  margin-bottom: 0.8rem;
}

.fig-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--faint);
}

.legend .ramp {
  width: 5.5rem;
  height: 0.55rem;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--accent) 8%, var(--bg)),
    color-mix(in srgb, var(--accent) 80%, var(--bg))
  );
}

.heatmap .sentence {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.9;
  margin: 0;
}

.heatmap .w {
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
}

.heatmap .h0 { background: color-mix(in srgb, var(--accent) 13%, var(--bg)); }
.heatmap .h1 { background: color-mix(in srgb, var(--accent) 32%, var(--bg)); }
.heatmap .h2 { background: color-mix(in srgb, var(--accent) 52%, var(--bg)); }
.heatmap .h3 {
  background: color-mix(in srgb, var(--accent) 80%, var(--bg));
  color: var(--hot-text);
}

.heatmap figcaption {
  color: var(--faint);
  font-size: 0.85rem;
  margin-top: 0.45rem;
}

/* ---------- sections ---------- */

section { margin-bottom: 3rem; }

h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 1.3rem;
}

h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
}

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

/* ---------- stat cards ---------- */

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 560px) {
  .fact-row { grid-template-columns: 1fr; }
}

.fact-row li {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.fact-row .num {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--accent);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

/* ---------- projects ---------- */

.project { margin-bottom: 1.9rem; }

.project h3 {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.project h3 a { color: var(--text); }
.project h3 a:hover { color: var(--accent); text-decoration: none; }

.project h3 .sep { color: var(--faint); font-weight: 400; }

.project h3 .role {
  font-family: var(--sans);
  color: var(--faint);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.project p {
  margin: 0 0 0.3rem;
  color: var(--text);
}

.project .meta,
.pub .meta,
.writing .meta {
  color: var(--faint);
  font-size: 0.88rem;
}

.project .meta a, .pub .meta a {
  color: var(--faint);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.project .meta a:hover, .pub .meta a:hover { color: var(--accent); }

.also {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 2rem 0 0;
}

/* ---------- publications ---------- */

.pub { margin-bottom: 1.25rem; }

.pub .title {
  font-weight: 600;
  display: block;
}

.pub a.title { color: var(--text); }
.pub a.title:hover { color: var(--accent); text-decoration: none; }

.pub .cite {
  color: var(--muted);
  font-size: 0.92rem;
  display: block;
}

.pub .cite em { font-style: italic; }

.pub .note {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.more-link {
  font-weight: 600;
  font-size: 0.98rem;
}

h2 + .pubnote {
  margin-top: -0.5rem;
  margin-bottom: 1.4rem;
  color: var(--faint);
  font-size: 0.9rem;
}

h3.pubgroup {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  margin: 2.2rem 0 1.1rem;
  color: var(--text);
}

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

.writing { margin-bottom: 1.1rem; }
.writing .title { font-weight: 600; }
.writing a.title { color: var(--text); }
.writing a.title:hover { color: var(--accent); text-decoration: none; }

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

footer {
  border-top: 1px solid var(--rule);
  margin-top: 3.25rem;
  padding: 1.2rem 0 0.5rem;
  color: var(--faint);
  font-size: 0.88rem;
}

footer p { margin: 0.2rem 0; }

footer a { color: var(--faint); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
footer a:hover { color: var(--accent); }

/* ---------- publications page ---------- */

.backlink {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.backlink:hover { color: var(--accent); text-decoration: none; }
