/* ================================================================
   STYLE SHEET — controls how the site LOOKS (not what it says).
   The most useful knobs are the colour and font variables just below.
   Change a value, save, refresh the page to see the effect.
   ================================================================ */

:root {
  --paper: #f4f3ef;        /* page background */
  --ink: #1b1b1b;          /* main text */
  --muted: #66645e;        /* secondary text */
  --rule: #d9d7d0;         /* thin divider lines */
  --accent: #1b1b1b;       /* links and highlights (black and white) */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --width: 720px;          /* max width of the text column */
}

/* Dark mode: used automatically when the visitor's phone/computer is in dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121212;
    --ink: #ecebe6;
    --muted: #a19f98;
    --rule: #2c2c2a;
    --accent: #ecebe6;
  }
  .banner { filter: grayscale(1) invert(1) brightness(0.9); border-bottom: none; }
}

* { box-sizing: border-box; }

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

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

a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

/* ---------- Banner + photo ---------- */
.banner {
  filter: grayscale(1);
  height: clamp(150px, 26vw, 300px);
  background: url("images/banner-site.png") 65% center / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}

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

.headshot {
  display: block;
  width: clamp(112px, 20vw, 160px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--paper);
  margin-top: calc(clamp(112px, 20vw, 160px) / -2);
  filter: grayscale(1) contrast(1.05);
  background: var(--rule);
}

/* ---------- Name + interests ---------- */
.intro { padding-top: 12px; border-top: none; }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.interests {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  line-height: 1.5;
  margin: 0 0 16px;
}

.meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.meta .dot { margin: 0 6px; }

/* ---------- Sections ---------- */
section {
  border-top: 1px solid var(--rule);
  padding: 32px 0 8px;
  margin-top: 32px;
}
.intro { margin-top: 0; }

h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
h2::before { content: "◦ "; color: var(--accent); }

h3 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; }

section > p { margin: 0 0 1em; }

/* Focus areas: two columns on wide screens, one on phones */
.focus {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px 32px;
}
.focus p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* Experience */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}
.timeline li:last-child { border-bottom: none; }
.when { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; }

/* Praise */
blockquote { margin: 0 0 24px; padding-left: 18px; border-left: 2px solid var(--accent); }
blockquote p { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 6px; }
cite { font-style: normal; color: var(--muted); font-size: 0.9rem; }

/* Writing & talks */
.links { list-style: none; padding: 0; margin: 0; }
.links li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.links span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

/* Contact */
.contact-lead { color: var(--muted); }
.contact {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.contact a {
  display: block;
  text-decoration: none;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.contact a::after { content: " →"; color: var(--accent); }
.contact a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.email-plain { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }

/* Footer */
.footer {
  max-width: var(--width);
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer p { margin: 0; }
