/* ==========================================================
   Chelsea Pennick — site styles
   Colors and fonts are set once here; change them in :root.
   ========================================================== */
:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --ink: #1d2721;
  --muted: #5b665f;
  --line: #e4e0d6;
  --accent: #2f5d46;        /* forest green */
  --accent-soft: #e6efe9;
  --warm: #9a6a22;          /* ochre */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--warm); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: 2.6rem; margin: 0 0 .3rem; letter-spacing: -.01em; }
h2 { font-size: 1.75rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 10; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 220px; gap: 48px; align-items: center; }
.hero .role { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.2rem; }
.hero .lede { font-size: 1.1rem; max-width: 60ch; }
.portrait { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); border: 4px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.portrait-fallback { display: grid; place-items: center; font-family: var(--serif); font-size: 3.5rem; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.tags li { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 12px; font-size: .85rem; font-weight: 500; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.4rem; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--accent); text-decoration: none; font-weight: 500; font-size: .95rem; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #244a37; color: #fff; }
.btn.ghost { color: var(--accent); background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- sections ---------- */
section.block { padding: 48px 0; border-top: 1px solid var(--line); }
.page-head { padding: 52px 0 24px; }
.page-head p { color: var(--muted); max-width: 65ch; margin: 0; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--warm); margin: 0 0 .4rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { font-size: .95rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.stat .n { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--accent); line-height: 1; }
.stat .l { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.card p { margin: .3rem 0 .6rem; color: #34403a; }
.card .meta { font-size: .85rem; color: var(--muted); }
.card .links { font-size: .9rem; display: flex; gap: 14px; flex-wrap: wrap; margin-top: .4rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.badge.warm { background: #f6ecdc; color: var(--warm); }

.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.news .date { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---------- publications ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 8px; position: sticky; top: 64px; background: var(--bg); padding: 12px 0; z-index: 4; border-bottom: 1px solid var(--line); }
.toolbar input { flex: 1 1 260px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .95rem; background: #fff; }
.toolbar input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.count { color: var(--muted); font-size: .85rem; }
.pub-section { padding: 28px 0 8px; }
.pub-section h2 { display: flex; align-items: baseline; gap: 10px; }
.pub-section h2 small { font-family: var(--sans); font-size: .9rem; font-weight: 400; color: var(--muted); }
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub .yr { font-family: var(--serif); font-weight: 600; color: var(--accent); font-size: 1.05rem; }
.pub .title { font-weight: 600; color: var(--ink); }
.pub .authors { font-size: .93rem; color: #3a4640; }
.pub .authors strong { color: var(--ink); }
.pub .venue { font-size: .93rem; color: var(--muted); font-style: italic; }
.pub .actions { margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.pub .actions a { font-size: .8rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 5px; padding: 2px 9px; background: #fff; }
.pub .actions a:hover { border-color: var(--accent); }
.status { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--warm); margin-left: 6px; }
.pub[hidden], .pub-section[hidden] { display: none; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  .hero { padding: 36px 0 24px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero .wrap > div:last-child { order: -1; }
  .portrait { width: 140px; height: 140px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .news li { grid-template-columns: 1fr; gap: 2px; }
  .pub { grid-template-columns: 1fr; gap: 2px; }
  .toolbar { top: 0; position: static; }
  .site-header { position: static; }
}
