/* ---------- Design tokens ---------- */
:root {
  --ink: #1a1d23;
  --ink-soft: #4a505c;
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --rule: #e2e2e2;
  --accent: #8a3324;        /* muted brick red, echoes the old site's rule color */
  --accent-soft: #f4ece8;

  --self-ref: #2b5fa8;      /* blue */
  --emotion: #b4483e;       /* rust */
  --jargon: #b07a17;        /* amber */
  --values: #6e4fa6;        /* violet */

  --serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --max-w: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a.highlight-link { color: var(--self-ref); font-weight: 600; }

/* ---------- Header / nav ---------- */
header.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 1.25rem;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--ink);
}

nav.site-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

/* ---------- Layout ---------- */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .content-grid { grid-template-columns: 1fr; }
}

.headshot {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: block;
}

.lede p { margin: 0 0 1.1rem; }

.lede { font-size: 1.05rem; }

.tagline {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  max-width: var(--max-w);
}

h1 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 2.25rem 0 1rem;
  color: var(--ink);
}

.prose { max-width: var(--max-w); }
.prose p { margin: 0 0 1.1rem; }

/* ---------- Social row ---------- */
.social-row {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: border-color .15s, color .15s;
}
.social-row a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.social-row svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Annotation widget ---------- */
.annotated {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.85;
  max-width: var(--max-w);
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.annotated mark {
  background: none;
  color: inherit;
  border-bottom: 2px solid currentColor;
  cursor: help;
  position: relative;
  padding: 0 1px;
}

.annotated mark.self-ref { color: var(--self-ref); }
.annotated mark.emotion  { color: var(--emotion); }
.annotated mark.jargon   { color: var(--jargon); }
.annotated mark.values   { color: var(--values); }

.annotated mark .popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  z-index: 10;
}

.annotated mark .popover .cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,.65);
}

.annotated mark .popover a { color: #cfe0ff; }

.annotated mark:hover .popover,
.annotated mark:focus .popover {
  display: block;
}


/* ---------- News list ---------- */
.news-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.news-list li {
  border-left: 3px solid var(--rule);
  padding: 0.2rem 0 0.2rem 1.1rem;
}
.news-list .news-outlet {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}
.news-list p { margin: 0.25rem 0; color: var(--ink-soft); }
.news-list a { font-size: 0.9rem; font-weight: 600; }

.video-embed {
  max-width: var(--max-w);
  margin: 0.25rem 0 2.5rem;
}
.video-embed video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--rule);
  display: block;
}
.video-embed figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- CV ---------- */
.cv-actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}
.btn:hover { background: #6f2a1d; text-decoration: none; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn.secondary:hover { border-color: var(--ink); }

.cv-embed {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  height: 85vh;
  background: #fff;
}
.cv-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Contact form ---------- */
form.contact-form {
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
form.contact-form input,
form.contact-form textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
}
form.contact-form textarea { min-height: 160px; resize: vertical; }
form.contact-form button {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}
.form-note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  max-width: var(--max-w);
  margin-bottom: 1.5rem;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
}
.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e6e1;
    --ink-soft: #a9a9a3;
    --paper: #16151a;
    --paper-raised: #1e1d23;
    --rule: #33323a;
    --accent: #e08a73;
    --accent-soft: #2a211d;
  }
  .annotated mark .popover { background: #e8e6e1; color: #16151a; }
  .annotated mark .popover a { color: #8a3324; }
  .annotated mark .popover .cite { color: rgba(22,21,26,.6); }
}
