:root {
  --bg:         #f6f3ec;
  --bg-soft:    #fbf9f4;
  --ink:        #181614;
  --ink-soft:   #181614cc;
  --rule:       #18161422;
  --muted:      #56524d;
  --accent:     #7a2a1e;
  --err:        #a83232;

  --serif: 'Iowan Old Style', 'Charter', 'Charis SIL', 'Source Serif Pro',
           Cambria, 'Times New Roman', Georgia, serif;
  --mono:  ui-monospace, 'SF Mono', SFMono-Regular, 'Cascadia Code',
           'JetBrains Mono', 'Source Code Pro', Menlo, Consolas, monospace;

  --col: 38rem;
  --pad: clamp(1.5rem, 4vw, 3rem);

  --beat: 1.5rem;
}

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

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

body {
  margin: 0;
  padding: var(--pad);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'kern', 'liga', 'onum';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ─── Masthead ─────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: var(--col);
  margin: 0 auto calc(var(--beat) * 4);
  padding-bottom: var(--beat);
  border-bottom: 1px solid var(--ink);
}

.mark {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
}

.masthead nav {
  display: flex;
  gap: 1.5rem;
}

.masthead nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--ink);
}

/* ─── Main column ──────────────────────────────────── */

main { max-width: var(--col); margin: 0 auto; }

/* ─── Hero ─────────────────────────────────────────── */

.hero { margin: calc(var(--beat) * 4) 0 calc(var(--beat) * 5); }

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero .lede {
  margin: calc(var(--beat) * 1.3) 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Bands (sections) ─────────────────────────────── */

.band {
  margin: calc(var(--beat) * 3.5) 0;
  padding-top: calc(var(--beat) * 1.3);
  border-top: 1px solid var(--ink);
}

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: calc(var(--beat) * 1.3);
}

.band-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.band-head .num {
  color: var(--accent);
  margin-right: 0.7em;
  font-weight: 500;
}

.band-head .entity {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
}

.band-body {
  margin: 0 0 calc(var(--beat) * 1.3);
  max-width: 32rem;
}

.band-footnote {
  margin: calc(var(--beat) * 0.5) 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ─── Investment thesis list ───────────────────────── */

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

.theses li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 34rem;
}

.theses li:last-child { border-bottom: none; }

.theses li::before {
  content: "—";
  margin-right: 0.65em;
  color: var(--accent);
  font-style: normal;
}

/* ─── Talks list ───────────────────────────────────── */

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

.talks li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.talks li:last-child { border-bottom: none; }

.talks a {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.05em;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.talks a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.talks .ext {
  font-family: var(--mono);
  font-size: 0.78em;
  opacity: 0.55;
}

.talks .venue {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}


/* ─── Contact form ─────────────────────────────────── */

.contact-form {
  display: grid;
  gap: calc(var(--beat) * 0.9);
  max-width: 28rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.45rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
  cursor: pointer;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.5;
  font-family: var(--serif);
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--accent); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

button[type="submit"] {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
button[type="submit"]:hover {
  background: var(--accent);
  border-color: var(--accent);
}
button[type="submit"]:disabled { opacity: 0.5; cursor: wait; }

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.form-status[data-state="ok"]  { color: var(--accent); }
.form-status[data-state="err"] { color: var(--err); }

/* ─── Footer ───────────────────────────────────────── */

footer {
  max-width: var(--col);
  margin: calc(var(--beat) * 4) auto 0;
  padding-top: calc(var(--beat) * 1.3);
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  line-height: 1.75;
}
footer p { margin: 0 0 0.25rem; }
footer .rights { margin-top: 0.9rem; }

footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.08em;
  transition: color 0.15s ease, border-color 0.15s ease;
}

footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Responsive ───────────────────────────────────── */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .masthead nav { gap: 1rem; }
  .masthead nav a { font-size: 0.66rem; letter-spacing: 0.1em; }
  .band-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .band-head .entity { text-align: left; }
  .theses li {
    padding: 0.95rem 0;
    font-size: 0.95rem;
  }
  .talks li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 1rem 0;
  }
  .talks .venue {
    font-size: 0.68rem;
  }
}

/* ─── Reduced motion ───────────────────────────────── */

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