:root {
  --ink: #16181d;
  --ink-soft: #4a5058;
  --ink-faint: #767d87;
  --accent: #1f3864;
  --accent-soft: #2f5490;
  --bg: #fbfaf8;
  --panel: #ffffff;
  --rule: #e2e0da;
  --rule-soft: #eeece7;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e6e1;
    --ink-soft: #a8adb6;
    --ink-faint: #7d838d;
    --accent: #9db8e8;
    --accent-soft: #b6cbf0;
    --bg: #14161a;
    --panel: #191c21;
    --rule: #2b2f36;
    --rule-soft: #23262c;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- masthead ---- */

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0 1.3rem;
  margin-bottom: 3rem;
}

header.site .name {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

header.site .name span { color: var(--ink-faint); font-weight: 400; }

nav {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav a { color: var(--ink-soft); text-decoration: none; padding-bottom: 2px; }
nav a:hover { color: var(--accent); }
nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ---- type ---- */

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 2.6rem;
}

h2 {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3rem 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 1.06rem; font-weight: 600; margin: 1.9rem 0 0.35rem; }
h3:first-of-type { margin-top: 0; }

p { margin: 0 0 1.1rem; }

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

.muted { color: var(--ink-faint); }

.meta {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.83rem;
  color: var(--ink-faint);
  margin: 0 0 0.7rem;
}

/* ---- entries ---- */

.entry { margin-bottom: 2.2rem; }
.entry p:last-child { margin-bottom: 0; }

/* ---- track cards ---- */

.tracks { display: grid; gap: 1rem; margin: 2.4rem 0 1rem; }

.track {
  display: block;
  padding: 1.3rem 1.4rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.track:hover { border-color: var(--accent); transform: translateY(-1px); }
.track b {
  display: block;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.track span { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }

/* ---- metrics strip ---- */

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.4rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.6rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.metrics div { padding: 0.35rem 0; }
.metrics dt { font-size: 1.45rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.metrics dd { margin: 0.15rem 0 0; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); }

/* ---- publication list ---- */

ol.pubs { margin: 0; padding-left: 1.4rem; }
ol.pubs li { margin-bottom: 0.95rem; font-size: 0.97rem; line-height: 1.55; }
ol.pubs .j { color: var(--ink-soft); }
ol.pubs .c {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: 0.5rem; padding-left: 1.05rem; position: relative; }
ul.plain li::before { content: "·"; position: absolute; left: 0.15rem; color: var(--ink-faint); }

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

footer.site {
  margin-top: 4.5rem;
  padding: 1.6rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--accent); text-decoration: underline; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-bottom: 0.9rem; }

@media (min-width: 34rem) {
  body { font-size: 18px; }
  h1 { font-size: 2.45rem; }
}
