:root {
  --bg: #14130f;
  --panel: #1b1a15;
  --fg: #d9d3c5;
  --muted: #948e80;
  --faint: #6d685d;
  --rule: #2b2921;
  --accent: #d8894c;
  --accent-soft: rgba(216, 137, 76, .10);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #fbfbfa;
  --panel: #ffffff;
  --fg: #16181d;
  --muted: #6b7280;
  --faint: #9ca3af;
  --rule: #e7e7e4;
  --accent: #b4531f;
  --accent-soft: rgba(180, 83, 31, .09);
}

/* theme toggle */
.theme {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.theme:hover { color: var(--accent); border-color: var(--accent); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0 1.5rem 6rem;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.7 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 42rem; margin: 0 auto; }

/* ---------- nav ---------- */

nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem 0 4rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

nav a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
nav .theme { margin-left: auto; }
nav a:hover { color: var(--accent); }
nav a[aria-current] { color: var(--fg); }

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

h1 {
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 620;
  margin: 0 0 1.1rem;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 34rem;
}

.statement {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 0 2.75rem;
  max-width: 32rem;
  text-wrap: balance;
}

.hero-statement {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.4rem, 3.6vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.018em;
  color: var(--fg);
  border: 1.5px solid var(--fg);
  padding: 1.6rem 1.7rem;
  margin: 0 0 3rem;
  max-width: 34rem;
  text-wrap: balance;
}

h2 {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 4rem 0 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--fg);
  margin: 2.25rem 0 .75rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.35rem; }

a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

strong { font-weight: 620; }

/* ---------- link rows ---------- */

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

.rows > li {
  border-bottom: 1px solid var(--rule);
}

.rows > li:first-child { border-top: 1px solid var(--rule); }

.rows > li > a,
.rows > li > .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: .95rem .25rem;
  text-decoration: none;
  color: var(--fg);
  transition: background .15s ease, padding-left .15s ease;
}

.rows > li > a:hover {
  background: var(--accent-soft);
  padding-left: .7rem;
  color: var(--accent);
}

.rows .tag {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- publication items ---------- */

ul.items { list-style: none; padding: 0; margin: 0 0 1rem; }

ul.items > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
ul.items > li:last-child { border-bottom: 0; }

.meta {
  display: block;
  font-family: var(--mono);
  font-size: .79rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: .35rem;
  letter-spacing: -0.005em;
}

.meta strong { color: var(--fg); font-weight: 600; }

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

footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

@media (max-width: 560px) {
  body { padding: 0 1.15rem 4rem; font-size: 16px; }
  nav { padding: 1.5rem 0 2.75rem; gap: 1.1rem; font-size: .72rem; }
  .rows > li > a { flex-direction: column; gap: .2rem; }
  h2 { margin-top: 3rem; }
}
