/* =========================================================
   1. DESIGN TOKENS
   Every color, font, size and space on the site comes from here.
   ========================================================= */
:root {
  /* Color: placeholders until the logo is finished */
  --paper:   #FFFFFF;  /* page background */
  --surface: #F4F5F7;  /* alternate section background, cards */
  --ink:     #1D2433;  /* main text */
  --muted:   #5B6475;  /* secondary text */
  --line:    #DDE1E8;  /* borders and dividers */
  --accent:  #2F4A7A;  /* links, buttons, highlights */
  --accent-soft: #E7ECF5; /* tinted background for the featured card */

  /* Fonts */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-heading: var(--font-body);   /* h1 and h2 */

  /* Type scale */
  --step--1: 0.9rem;                        /* small print, citation details */
  --step-0:  1.15rem;                       /* body text */
  --step-1:  1.35rem;                       /* h3 */
  --step-2:  1.75rem;
  --step-3:  clamp(2rem, 4.5vw, 2.8rem);    /* h2, section titles */
  --step-4:  clamp(2.2rem, 5vw, 3.4rem);     /* h1, hero headline */

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  2rem;
  --space-l:  4rem;
  --space-xl: clamp(4rem, 10vw, 7rem);

  /* Layout */
  --measure: 40rem;
  --page:    72rem;
  --radius:  14px;
  --header-h: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151A24; --surface: #1D2330; --ink: #E8EBF1;
    --muted: #A3ABBA; --line: #2E3647;   --accent: #9DB4E0;
    --accent-soft: #222C40;
  }
}
:root[data-theme="dark"] {
  --paper: #151A24; --surface: #1D2330; --ink: #E8EBF1;
  --muted: #A3ABBA; --line: #2E3647;   --accent: #9DB4E0;
  --accent-soft: #222C40;
}

/* =========================================================
   2. BASE STYLES
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 1rem);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}
/* Big statements: serif */
h1, h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
/* Small titles (cards, panels): sans */
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 var(--space-s); max-width: var(--measure); }
ul { margin: 0; padding: 0; list-style: none; }
a  { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   3. LAYOUT HELPERS
   ========================================================= */
.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.section { padding-block: var(--space-xl); }
.section--tinted { background: var(--surface); }
.section-intro { color: var(--muted); margin-bottom: var(--space-m); }

.button {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  background: var(--accent);
  color: var(--paper);
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
}
.button:hover { background: var(--ink); }


/* =========================================================
   4. MENU BAR
   ========================================================= */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-height: var(--header-h);
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }

@media (max-width: 40rem) {
  :root { --header-h: 6.25rem; }
  .header-inner { flex-wrap: wrap; row-gap: 0.5rem; padding-block: 0.75rem; }
  .site-header nav { order: 3; width: 100%; }
  .nav-links { gap: 1.25rem; overflow-x: auto; }
  .button { padding: 0.6rem 1.1rem; }
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero { padding-block: var(--space-xl) var(--space-l); }
.hero h1 { max-width: 24ch; margin-bottom: var(--space-m); }
.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.hero-lede { font-size: 1.3rem; line-height: 1.55; max-width: 36rem; color: var(--muted); }
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.5rem; margin-top: var(--space-m);
}
.hero-actions a:not(.button) { font-family: var(--font-display); font-weight: 600; }

/* =========================================================
   6. SERVICES
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-summary {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--accent);
  margin-bottom: var(--space-s);
}
.service-card p:last-child { margin-bottom: 0; }
.service-card p:not(.service-summary) { font-size: 1.05rem; }

/* The women's health card spans the full width and gets a tinted background */
.service-card--featured {
  grid-column: 1 / -1;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
}

.engagements {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-m);
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
}
.engagements p { margin: 0; }
@media (max-width: 48rem) {
  .engagements { grid-template-columns: 1fr; gap: var(--space-xs); }
}

/* =========================================================
   7. EXPERTISE AND PUBLICATIONS
   One card per service, everything listed in a standard order:
   Experience, Publications, Speaking.
   ========================================================= */
.xp-cards { display: grid; gap: 1rem; }
.xp-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.xp-card h3 { margin-bottom: 0.25rem; }

/* Standard sub-headings */
.xp-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  margin: 1.25rem 0 0.25rem;
}

/* Links between a service card and its expertise card */
.card-link {
  display: inline-block;
  margin-top: var(--space-s);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.service-card { display: flex; flex-direction: column; }
.service-card .card-link { margin-top: auto; padding-top: var(--space-s); }

/* Highlight the card a link just jumped to */
.xp-card:target,
.service-card:target {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Citations and experience lines: title, then short details */
.cites li { padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.cites li:last-child { border-bottom: 0; }
.cite-title {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
}
a.cite-title:hover { color: var(--accent); text-decoration: underline; }
.cite-meta {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
}
.cite-meta strong { color: var(--ink); font-weight: 700; }
/* Optional one-sentence description under an entry */
.cite-desc {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}
.cite-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.35rem;
}

/* =========================================================
   8. ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: var(--space-l);
  align-items: start;
}
.about-mission {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.credentials {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.credentials h3 { font-size: 1.1rem; }
.credentials li {
  font-size: 1rem;
  line-height: 1.45;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.credentials li:last-child { border-bottom: 0; }
@media (max-width: 52rem) {
  .about-grid { grid-template-columns: 1fr; gap: var(--space-m); }
}

/* =========================================================
   9. CONTACT AND FOOTER
   ========================================================= */
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 4vw, 2rem);
  letter-spacing: -0.01em;
  margin: var(--space-s) 0 var(--space-m);
  word-break: break-word;
}
.profile-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: var(--space-m); }
.profile-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.profile-links a:hover { border-color: var(--accent); }
.location { color: var(--muted); font-size: 1rem; }

.site-footer {
  padding-block: var(--space-m);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}
.site-footer p { max-width: none; margin: 0; }
