/* ==========================================================================
   Robin Craig, DO, FAAP: site styles
   Design tokens first (see DESIGN.md). Change a token, and the whole site follows.
   ========================================================================== */

:root {
  /* Colour */
  --ink: #14212d;
  --text: #3d4a56;
  --muted: #5b6773;
  --line: #dbe3e9;
  --bg: #ffffff;
  --surface: #f4f7f9;
  --hero: #e8eef2;
  --accent: #4fc3bf;
  --accent-strong: #0d6d6a;
  --accent-strong-hover: #0a5755;
  --accent-soft: #e2f4f3;
  --navy: #152534;
  --on-navy: #ffffff;
  --on-navy-muted: #b8c4cf;

  /* Type */
  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --fs-display: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem);
  --fs-greeting: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
  --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-h3: 1.2rem;
  --fs-body: 1.125rem;
  --fs-small: .95rem;
  --fs-eyebrow: .78rem;

  /* Space */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);
  --wide: 1180px;
  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Shape, depth, motion */
  --r-sm: 6px; --r-md: 14px; --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 45, .06), 0 2px 8px rgba(20, 33, 45, .05);
  --shadow-md: 0 6px 24px rgba(20, 33, 45, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 var(--s-4); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-strong-hover); }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
ul, ol { padding: 0; margin: 0; }
address { font-style: normal; }

.container { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--navy); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: var(--s-3); color: #fff; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Eyebrow and section heads ---------- */
.eyebrow {
  font-family: var(--font-head); font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-strong);
  margin-bottom: var(--s-3);
}
.section-head { margin-bottom: var(--s-6); max-width: 44rem; }
.section-head h2 { position: relative; padding-bottom: var(--s-4); }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; border-radius: 3px; background: var(--accent); }
.section-head p:not(.eyebrow) { color: var(--muted); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center h2::after { left: 50%; transform: translateX(-50%); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: var(--r-sm);
  font-family: var(--font-head); font-size: .9rem; font-weight: 600; letter-spacing: .02em;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--primary { background: var(--accent-strong); color: #fff; }
.btn--primary:hover { background: var(--accent-strong-hover); color: #fff; }
.btn--ghost { border-color: var(--accent-strong); color: var(--accent-strong); background: transparent; }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-strong-hover); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--accent-soft); color: var(--navy); }
.btn-hint { font-weight: 500; opacity: .85; font-size: .8rem; }
.text-link { display: inline-flex; align-items: center; gap: .4em; font-family: var(--font-head); font-weight: 600; font-size: .9rem; text-decoration: none; }
.text-link:hover .icon { transform: translateX(3px); }
.text-link .icon { transition: transform .18s var(--ease); }

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent; transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: var(--header-h); }
.logo { display: inline-flex; align-items: baseline; gap: .1em; text-decoration: none; color: var(--ink); font-family: var(--font-head); white-space: nowrap; }
.logo-mark { font-size: 1.7rem; font-weight: 700; color: var(--accent-strong); font-style: italic; line-height: 1; }
.logo-name { font-size: 1.05rem; font-weight: 600; letter-spacing: .16em; }
.logo-cred { font-size: .72rem; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-left: .6em; }
.logo:hover { color: var(--ink); }

.nav ul { list-style: none; display: flex; gap: clamp(.8rem, 1.6vw, 1.7rem); }
.nav a {
  position: relative; display: inline-block; padding: .5rem 0; text-decoration: none;
  font-family: var(--font-head); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.nav a:hover { color: var(--accent-strong); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent-strong); }
.nav-toggle { display: none; }

@media (max-width: 1079px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    margin-right: -10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--r-sm);
  }
  .nav-toggle .icon { width: 28px; height: 28px; }
  .nav-toggle-close, .nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline-flex; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    background: #fff; border-top: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: var(--s-3) var(--gutter) var(--s-6);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li + li { border-top: 1px solid var(--line); }
  .nav a { display: block; padding: 1rem 0; font-size: .9rem; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { border-left: 3px solid var(--accent); padding-left: .8rem; }
  body.nav-open { overflow: hidden; }
}
/* Without JavaScript the menu simply shows as a list. */
.no-js .nav-toggle { display: none; }
@media (max-width: 1079px) { .no-js .nav { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; } }
@media (max-width: 420px) { .logo-cred { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 85% 30%, rgba(255, 255, 255, .85), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--s-7);
  padding-block: clamp(3rem, 2rem + 6vw, 7rem);
}
.hero-greeting { font-size: var(--fs-greeting); font-weight: 300; letter-spacing: 0; margin-bottom: var(--s-2); color: var(--ink); }
.hero-role { margin: 0 0 var(--s-5); min-height: 2.3em; font-family: var(--font-head); font-size: var(--fs-display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; color: var(--ink); }
.typed-caret { display: inline-block; width: 3px; height: .9em; margin-left: .08em; vertical-align: -.06em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero-intro { max-width: 36rem; font-size: 1.15rem; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

.hero-visual { position: relative; justify-self: center; width: min(100%, 460px); }
.hero-visual::before {
  content: ""; position: absolute; width: 62%; height: 62%; left: -9%; bottom: -7%;
  background: var(--accent); border-radius: var(--r-lg); opacity: .9;
}
.hero-visual::after {
  content: ""; position: absolute; width: 90px; height: 90px; right: -18px; top: -18px;
  background-image: radial-gradient(var(--accent-strong) 1.6px, transparent 1.6px); background-size: 14px 14px; opacity: .35;
}
.hero-photo { position: relative; z-index: 1; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); background: #dfe7ec; }
.hero-photo img, .hero-photo picture { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; z-index: 2; left: -12%; bottom: 9%; max-width: 270px;
  display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4);
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: .88rem; line-height: 1.4; color: var(--ink);
}
.hero-badge p { margin: 0; }
.hero-badge-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.hero-badge-label { display: block; font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 2px; }
.hero-accent { position: absolute; left: 0; bottom: 0; width: min(22%, 220px); height: 10px; background: var(--accent); }

@media (max-width: 859px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s-6); padding-top: var(--s-6); }
  .hero-visual { order: -1; width: min(72%, 320px); }
  .hero-badge { left: auto; right: -14%; bottom: -6%; max-width: 230px; font-size: .8rem; }
  .hero-role { min-height: 2.3em; }
}
@media (max-width: 480px) {
  .hero .eyebrow { font-size: .7rem; letter-spacing: .1em; }
  .hero-intro { font-size: 1.05rem; }
  .hero-badge { position: relative; right: auto; bottom: auto; margin: -2rem auto 0; max-width: 92%; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Affiliations strip ---------- */
.affiliations { border-bottom: 1px solid var(--line); background: #fff; }
.affiliations ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-4); padding-block: var(--s-5); }
.affiliations li { display: inline-flex; align-items: center; gap: var(--s-4); font-family: var(--font-head); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.affiliations li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 640px) {
  .affiliations ul { flex-direction: column; align-items: center; gap: var(--s-3); }
  .affiliations li { font-size: .72rem; }
  .affiliations li + li::before { display: none; }
}

/* ---------- Sections and layout ---------- */
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--hero { background: var(--hero); }
.split { display: grid; gap: var(--s-7); align-items: start; }
.split--wide-left { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.split--about { grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); }
@media (max-width: 899px) { .split--wide-left, .split--about { grid-template-columns: 1fr; } }

.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.side-card-title { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: var(--s-4); }
.mini-list { list-style: none; margin-bottom: var(--s-4); }
.mini-list li { padding-block: var(--s-3); border-top: 1px solid var(--line); line-height: 1.4; }
.mini-list li:first-child { border-top: 0; padding-top: 0; }
.mini-list-title { display: block; font-weight: 600; color: var(--ink); }
.mini-list-meta { display: block; font-size: .9rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 899px) { .side-card { position: static; } }

/* ---------- Page header (inner pages) ---------- */
.page-header { background: var(--hero); padding-block: clamp(2.75rem, 2rem + 4vw, 5rem); position: relative; overflow: hidden; }
.page-header::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(22%, 220px); height: 8px; background: var(--accent); }
.page-title { font-size: var(--fs-h1); margin-bottom: var(--s-3); max-width: 22ch; }
.page-summary { font-size: 1.2rem; max-width: 46rem; color: var(--text); margin: 0; }
.breadcrumb { font-family: var(--font-head); font-size: .8rem; font-weight: 500; color: var(--muted); margin-bottom: var(--s-4); }
.breadcrumb a { color: var(--accent-strong); }

/* ---------- Prose (Markdown written in the editor) ---------- */
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s-5); }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--accent-strong); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: var(--s-7) 0; position: relative; overflow: visible; }
.prose hr::after { content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 3px; border-radius: 3px; background: var(--accent); }
.prose blockquote { margin: var(--s-5) 0; padding-left: var(--s-5); border-left: 3px solid var(--accent); font-family: var(--font-serif); font-style: italic; color: var(--ink); }
.prose img { border-radius: var(--r-md); margin-block: var(--s-5); }
.prose strong { color: var(--ink); }
.prose a { word-break: break-word; }

/* Citations (Scholarship) */
.prose--citations { max-width: 52rem; }
.prose--citations h2 { padding-top: var(--s-6); border-top: 1px solid var(--line); }
.prose--citations h2:first-child { border-top: 0; padding-top: 0; }
.prose--citations h3 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); }
.prose--citations ul, .prose--citations ol { list-style: none; padding-left: 0; }
.prose--citations li { position: relative; padding: var(--s-3) 0 var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); margin: 0; line-height: 1.6; }
.prose--citations li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* Long-form literary writing */
.prose--literary { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.85; color: #33404c; }
.prose--literary h2 { font-family: var(--font-head); }
.prose--literary > p:first-child { font-family: var(--font-body); font-size: var(--fs-body); }

/* ---------- Cards ---------- */
.card-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-5); }
.portfolio-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s-5); }
.card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card--link:hover, .card--link:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d6de; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.card-media img, .card-media picture { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card--link:hover .card-media img { transform: scale(1.03); }
.card-media--logo { display: grid; place-items: center; padding: var(--s-6); background: #fff; border-bottom: 1px solid var(--line); }
.card-media--logo img, .card-media--logo picture { object-fit: contain; height: auto; max-height: 100%; }
.card--link:hover .card-media--logo img { transform: none; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s-5); }
.card-body p { color: var(--text); font-size: 1.02rem; }
.card-title { font-size: 1.15rem; margin-bottom: var(--s-2); }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is the link */
.card-title a:focus-visible { outline: none; }
.card--link:focus-within { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.card-more { margin-top: auto; display: inline-flex; align-items: center; gap: .4em; font-family: var(--font-head); font-size: .85rem; font-weight: 600; color: var(--accent-strong); }
.card-more .icon { transition: transform .18s var(--ease); }
.card--link:hover .card-more .icon { transform: translateX(3px); }
.card-number { font-family: var(--font-head); font-size: .85rem; font-weight: 700; letter-spacing: .1em; color: var(--accent-strong); margin-bottom: var(--s-3); display: inline-flex; align-items: center; gap: var(--s-2); }
.card-number::after { content: ""; width: 28px; height: 2px; background: var(--accent); }
.card--numbered { border-top: 3px solid var(--accent); }

/* ---------- Focus tiles ---------- */
.focus-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--s-5); }
.focus { background: #fff; border-radius: var(--r-md); padding: var(--s-6) var(--s-5); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.focus h3 { font-size: 1.1rem; margin-bottom: var(--s-2); }
.focus p { font-size: 1rem; margin: 0; }
.focus-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: var(--s-4); }
.focus-icon .icon { width: 26px; height: 26px; }

/* ---------- Quotes ---------- */
.quote-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s-4); }
.quote-grid--featured { margin-bottom: var(--s-6); }
.quote { margin: 0; position: relative; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5) var(--s-5) var(--s-5); }
.quote::before { content: "\201C"; display: block; height: 2rem; margin-top: var(--s-2); font-family: var(--font-serif); font-size: 3.6rem; line-height: 1; color: var(--accent); } /* in normal flow so it always has breathing room above and below */
.quote blockquote { margin: 0; }
.quote p { margin: var(--s-3) 0 0; font-family: var(--font-serif); font-style: italic; font-size: 1.08rem; line-height: 1.6; color: var(--ink); }
.quote figcaption { margin-top: var(--s-4); font-family: var(--font-head); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.quote--card { box-shadow: var(--shadow-sm); border: 0; display: flex; flex-direction: column; }
.quote--card figcaption { margin-top: auto; padding-top: var(--s-4); }
.quote-theme + .quote-theme { margin-top: var(--s-7); }
.quote-theme-title { font-size: 1.25rem; display: flex; align-items: center; gap: var(--s-3); }
.quote-theme-title::before { content: ""; width: 24px; height: 3px; border-radius: 3px; background: var(--accent); flex: none; }

/* ---------- Timeline (leadership roles) ---------- */
.timeline { list-style: none; position: relative; max-width: 54rem; }
.timeline::before { content: ""; position: absolute; left: 10.5rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 9rem 1fr; gap: 3rem; padding-bottom: var(--s-6); }
.timeline-item::before { content: ""; position: absolute; left: calc(10.5rem - 6px); top: .45rem; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-strong); }
.timeline-dates { font-family: var(--font-head); font-size: .85rem; font-weight: 600; color: var(--accent-strong); text-align: right; margin: .1rem 0 0; }
.timeline-body h3 { font-size: 1.12rem; margin-bottom: var(--s-2); }
.timeline-body p { margin: 0; color: var(--text); line-height: 1.5; }
.timeline-location { color: var(--muted) !important; font-size: .95rem; margin-top: 2px !important; }
@media (max-width: 640px) {
  .timeline::before { left: 6px; }
  .timeline-item { grid-template-columns: 1fr; gap: var(--s-1); padding-left: 2rem; }
  .timeline-item::before { left: 0; }
  .timeline-dates { text-align: left; }
}

/* ---------- Documents ---------- */
.jump-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-7); }
.jump-links a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem; border-radius: 999px; background: var(--accent-soft); text-decoration: none; font-family: var(--font-head); font-size: .85rem; font-weight: 600; }
.jump-links a:hover { background: #cdebe9; }
.doc-section + .doc-section { margin-top: var(--s-8); }
.doc-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s-4); }
.doc { position: relative; display: flex; gap: var(--s-4); padding: var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.doc:hover, .doc:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.doc:focus-within { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.doc-badge { flex: none; display: grid; place-items: center; width: 48px; height: 58px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .06em; border: 1px solid #c4e6e4; }
.doc-body { min-width: 0; display: flex; flex-direction: column; }
.doc-type { font-family: var(--font-head); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 var(--s-1); }
.doc-title { font-size: 1.05rem; margin-bottom: var(--s-1); line-height: 1.35; }
.doc-title a { color: var(--ink); text-decoration: none; }
.doc-title a::after { content: ""; position: absolute; inset: 0; }
.doc-title a:focus-visible { outline: none; }
.doc-meta, .doc-details { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.45; }
.doc-details { margin-top: 2px; }
.doc-open { margin-top: var(--s-3); display: inline-flex; align-items: center; gap: .4em; font-family: var(--font-head); font-size: .8rem; font-weight: 600; color: var(--accent-strong); }

.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.doc-updated { margin: 0 0 0 var(--s-2); color: var(--muted); font-size: var(--fs-small); }
.pdf-frame { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.pdf-frame iframe { width: 100%; height: min(85vh, 1100px); border: 0; }
@media (max-width: 760px) { .pdf-frame { display: none; } } /* phones open the PDF directly instead */

/* ---------- About ---------- */
.photo-stack { display: grid; gap: var(--s-5); }
.photo { margin: 0; }
.photo img, .photo picture { border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 100%; }
.photo--primary { position: relative; }
.photo--primary::before { content: ""; position: absolute; inset: auto auto -14px -14px; width: 55%; height: 55%; background: var(--accent); border-radius: var(--r-lg); z-index: -1; }
.photo figcaption { margin-top: var(--s-3); font-size: .95rem; color: var(--muted); font-style: italic; }
.split--about .photo-stack { isolation: isolate; }
@media (max-width: 899px) { .photo-stack { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); } }

/* ---------- Contact ---------- */
.contact-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s-5); margin-top: var(--s-5); max-width: 56rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-6); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: flex-start; }
.contact-card h2 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.contact-card p, .contact-card address { margin-bottom: var(--s-5); word-break: break-word; }
.contact-card .btn { margin-top: auto; }
.contact-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: var(--s-4); }

/* ---------- CTA band ---------- */
.cta { background: var(--navy); color: var(--on-navy-muted); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(79, 195, 191, .14); }
.cta-inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5); padding-block: clamp(3rem, 2rem + 4vw, 4.5rem); }
.cta h2 { color: #fff; margin-bottom: var(--s-2); }
.cta p { margin: 0; max-width: 40rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1c28; color: var(--on-navy-muted); font-size: 1rem; padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-7); padding-block: var(--s-8) var(--s-6); }
.footer-name { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 1.15rem; letter-spacing: .04em; margin-bottom: var(--s-3); }
.footer-about p { max-width: 30rem; }
.footer-email-line { margin-bottom: var(--s-3); }
.footer-email { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; overflow-wrap: anywhere; }
.footer-social { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.footer-social a { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; }
.footer-email .icon, .footer-social .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.footer-heading { font-family: var(--font-head); font-size: .75rem; line-height: 1.7; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-3); }
.footer-nav ul { list-style: none; columns: 2; column-gap: var(--s-6); }
.footer-nav li { margin-bottom: var(--s-2); break-inside: avoid; }
.footer-nav a { display: inline-block; padding-block: .2rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: var(--s-5); font-size: .9rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------- Motion preferences and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .typed-caret { display: none; }
}
@media print {
  .site-header, .cta, .site-footer, .hero-visual::before, .hero-accent, .nav-toggle, .pdf-frame { display: none !important; }
  .hero, .page-header, .section--surface, .section--hero { background: none !important; }
  a { color: inherit; }
}

/* Resident feedback: two columns so groups of four quotes form a tidy 2×2 */
.quote-theme .quote-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }

/* ---------- Connect with me (footer and Contact page) ---------- */
.connect-list { list-style: none; display: grid; gap: var(--s-3); }
.connect-link {
  display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm); text-decoration: none; transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.connect-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none; }
.connect-icon .icon { width: 20px; height: 20px; }
.connect-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.connect-label { font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.connect-detail { font-size: .85rem; overflow-wrap: anywhere; }
.connect-ext { width: 15px; height: 15px; margin-left: auto; opacity: .7; }

/* Contact page: white cards */
.connect-section { margin-top: var(--s-7); max-width: 56rem; }
.connect-section h2 { font-size: 1.25rem; }
.connect-list--page { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s-4); }
.connect-list--page .connect-link { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: var(--s-4); color: var(--ink); }
.connect-list--page .connect-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #c9d6de; color: var(--ink); }
.connect-list--page .connect-icon { background: var(--accent-soft); color: var(--accent-strong); width: 44px; height: 44px; }
.connect-list--page .connect-label { font-size: 1rem; }
.connect-list--page .connect-detail { color: var(--muted); }
.connect-list--page .connect-ext { color: var(--accent-strong); }
