:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #16202e;
  --muted: #5a6473;
  --line: #e4ded3;
  --accent: #8a5a24;
  --accent-soft: #f3eadc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161e;
    --surface: #171e28;
    --ink: #e9e5dd;
    --muted: #a3abb8;
    --line: #2a3340;
    --accent: #d6a567;
    --accent-soft: #231d15;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-size: 21px; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: .2px;
}
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(34px, 5.2vw, 54px); margin: 0 0 20px; letter-spacing: -.5px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 18px; }
h3 { font-size: 20px; margin: 0 0 8px; }
.eyebrow {
  font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 14px;
}
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); max-width: 720px; margin: 0; }

/* Sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.hero { padding: 88px 0 80px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink);
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn:hover { opacity: .88; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 26px;
}
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 36px; }
.stat strong { display: block; font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 15px; }

.two-col { display: grid; gap: 48px; grid-template-columns: 1fr 1.6fr; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 20px; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 26px 22px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.timeline .when { font-size: 14px; color: var(--muted); }
.timeline p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tags li { background: var(--accent-soft); color: var(--ink); padding: 6px 12px; border-radius: 999px; font-size: 14px; }

.contact-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.contact-box p { margin: 0; color: var(--muted); }

/* Legal pages */
.legal { padding: 64px 0 80px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(32px, 4.4vw, 44px); }
.legal h2 { font-size: 23px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .meta { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; background: var(--accent-soft); }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 52px 0; }
  .hero { padding: 56px 0; }
  .contact-box { padding: 24px; }
}

/* Hero with portrait */
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: center; }
.portrait {
  width: 280px; height: 280px; border-radius: 50%; object-fit: cover;
  border: 6px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .portrait { width: 160px; height: 160px; order: -1; }
}
