/* ============================================================
   Kevin Boudreau — Baseline Editorial
   Type: Lora (serif) for name/headings/titles; Inter (sans) for
   nav, labels, metadata, chips, UI.
   ============================================================ */

:root {
  --paper:      #FBFAF6;
  --ink:        #1C1B19;
  --muted:      #6B6760;
  --hairline:   #E5DFD4;
  --accent:     #23395D;
  --accent-soft:#23395D14;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --page-max: 1080px;
  --measure:  70ch;

  --space-section: 4.5rem;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

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

em { font-style: italic; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  z-index: 100;
  font-family: var(--sans);
  font-size: .85rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  text-decoration: none;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.masthead-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: .85rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: .01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.nav {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  white-space: nowrap;
}
.nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Layout shell ---------- */
.hero,
.section,
.footer-inner { max-width: var(--page-max); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.rule {
  max-width: var(--page-max);
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }

/* ---------- Section labels & titles ---------- */
.section-label {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: .7rem;
  position: relative;
  top: -.18em;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 .6rem;
  letter-spacing: -.01em;
}
.section-intro { color: var(--ink); font-size: 1.12rem; line-height: 1.6; margin: 0 0 1.6rem; max-width: 64ch; }
.section-intro strong { color: var(--accent); font-weight: 600; }
.program-intro { color: var(--ink); font-size: 1.04rem; line-height: 1.55; margin: .1rem 0 1.3rem; max-width: 62ch; }
.program-intro em { color: var(--accent); font-style: italic; }
.pub-gloss { font-size: 0.9rem; color: #3a3833; margin: 3px 0 5px; line-height: 1.42; max-width: 66ch; }

/* ---------- Speaking & Media ---------- */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 1.4rem 0 2.4rem; }
.video-card { display: block; text-decoration: none; color: inherit; }
.video-thumb { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; background: rgba(0,0,0,.18); transition: background .2s ease; }
.video-card:hover .video-thumb .play { background: rgba(35,57,93,.42); }
.video-title { display: block; font-family: var(--serif); font-size: 1.06rem; line-height: 1.3; margin: .55rem 0 .12rem; color: var(--ink); }
.video-meta { display: block; font-size: .85rem; color: var(--muted); }
.talk-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.talk-list li { padding: .5rem 0; border-bottom: 1px solid var(--hairline); line-height: 1.55; }
.talk-list li:last-child { border-bottom: none; }
.talk-year { display: inline-block; min-width: 3.4em; font-weight: 600; color: var(--accent); }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; gap: 1.1rem; } }

/* clips turnstile (native vertical shorts) */
.clips-turnstile { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; padding: .3rem .1rem 1rem; margin: 1.3rem 0 .4rem; -webkit-overflow-scrolling: touch; }
.clip { flex: 0 0 auto; width: 224px; scroll-snap-align: center; margin: 0; position: relative; }
.clip video { width: 224px; height: 398px; object-fit: cover; border-radius: 14px; background: #000; display: block; box-shadow: 0 6px 22px rgba(0,0,0,.20); cursor: pointer; }
.clip figcaption { font-size: .84rem; color: var(--muted); margin-top: .55rem; line-height: 1.35; max-width: 224px; }
.clip-sound { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: none; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: .8rem; cursor: pointer; display: grid; place-items: center; padding: 0; }
.clip.sound-on .clip-sound { background: var(--accent); }
.clips-hint { font-size: .8rem; color: var(--muted); margin: 0 0 1.6rem; }
@media (max-width: 640px) { .clip, .clip video { width: 198px; } .clip video { height: 352px; } }

/* research layout: publications (left) + "Currently" rail (right) */
.research-layout { display: grid; grid-template-columns: 1fr 256px; gap: 2.8rem; align-items: stretch; }
.research-aside { display: flex; flex-direction: column; justify-content: flex-start; gap: 2.6rem; }
.rail-head { font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .8rem; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { list-style: none; margin: 0 0 1.5rem; padding: 0; line-height: 1.4; }
.rail-list li:last-child { margin-bottom: 0; }
.rail-title { display: block; font-family: var(--serif); font-size: .95rem; line-height: 1.38; color: var(--ink); }
.rail-meta { display: block; font-size: .77rem; color: var(--muted); margin-top: .3rem; }
.research-aside .clip { width: 256px; flex: none; margin: 0; position: relative; }
.research-aside .clip video { width: 256px; height: 455px; object-fit: cover; border-radius: 14px; background: #000; display: block; box-shadow: 0 8px 26px rgba(0,0,0,.20); cursor: pointer; }
.clip-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border: none; border-radius: 50%; background: rgba(35,57,93,.86); color: #fff; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; padding: 0 0 0 3px; }
.research-aside .clip.playing .clip-play { display: none; }
.research-aside figcaption { font-size: .82rem; color: var(--muted); margin-top: .5rem; line-height: 1.35; }
/* current projects & working papers — full-width panel at top of Research */
.current-block { margin: 0 0 2.6rem; padding: 1.3rem 1.5rem; background: var(--accent-soft); border-radius: 10px; }
.current-block-head { font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .9rem; }
.cb-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1.4rem 2.4rem; }
.cb-topic-head { font-family: var(--serif); font-size: 1rem; color: var(--accent); font-weight: 600; margin: 0 0 .6rem; }
.cb-list { list-style: none; margin: 0; padding: 0; }
.cb-list li { margin: 0 0 .65rem; line-height: 1.32; }
.cb-title { display: block; font-family: var(--serif); color: var(--ink); font-size: .95rem; }
.cb-meta { display: block; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
@media (max-width: 900px) {
  .research-layout { grid-template-columns: 1fr; gap: 1.8rem; }
  .research-aside { align-items: center; gap: 1.6rem; }
  .rail-current { width: 100%; max-width: 620px; }
  .research-aside .clip, .research-aside .clip video { width: 220px; }
  .research-aside .clip video { height: 391px; }
}

/* ---------- Prose ---------- */
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding-top: 4rem; padding-bottom: 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 1.5rem + 4.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 1.1rem;
}
.hero-lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + .7vw, 1.4rem);
  line-height: 1.45;
  max-width: 36ch;
  margin: 0 0 1.4rem;
  color: var(--ink);
}
.hero-affil {
  font-family: var(--sans);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 1.2rem;
}
.hero-contact {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  margin: 0;
}
.hero-contact .dot { color: var(--hairline); margin: 0 .55rem; }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  box-shadow: 0 8px 28px -14px rgba(28,27,25,.28);
}
.hero-figure.no-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px dashed var(--hairline);
}

/* ---------- Publications ---------- */
.program { margin-top: 2.6rem; }
.program:first-of-type { margin-top: 1.6rem; }

.program-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -.005em;
  margin: 0 0 .15rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--hairline);
}
.program-sub {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--muted);
  margin: .5rem 0 0;
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.pub {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--hairline);
}
.pub:last-child { border-bottom: 0; }

.pub-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.16rem;
  line-height: 1.32;
  margin: 0 0 .4rem;
  color: var(--ink);
  max-width: 62ch;
}
.pub-meta {
  font-family: var(--sans);
  font-size: .855rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 .55rem;
}
.pub-meta .venue { font-style: normal; color: var(--ink); font-weight: 500; }
.award {
  display: inline;
  font-family: var(--sans);
  font-size: .8rem;
  font-style: italic;
  color: var(--accent);
}
.award::before { content: "— "; color: var(--muted); font-style: normal; }

/* ---------- Link chips ---------- */
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: .22rem .55rem;
  line-height: 1.3;
  background: transparent;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.chip-muted {
  text-transform: none;
  letter-spacing: .02em;
  font-weight: 500;
  color: var(--muted);
  cursor: default;
}

/* ---------- Working-papers section tint ---------- */
.section-working { background: color-mix(in srgb, var(--accent) 3%, var(--paper)); }
.section-working .rule { display: none; }

/* ---------- Two-column blocks ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}
.block-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--hairline);
}
.block-title-spaced { margin-top: 2.2rem; }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink);
}
.plain-list li {
  padding: .42rem 0 .42rem 1.1rem;
  position: relative;
  border-bottom: 1px solid var(--hairline);
}
.plain-list li:last-child { border-bottom: 0; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .95em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.plain-list em { color: var(--muted); }
.plain-list strong { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--accent) 4%, var(--paper));
  padding: 3.5rem 0;
}
.footer-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 .25rem;
}
.footer-meta {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.footer-links {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  margin: 0 0 1.4rem;
}
.footer-links .dot { color: var(--hairline); margin: 0 .55rem; }
.footer-fine {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .03em;
  color: var(--muted);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .hero-figure { order: -1; }
  .hero-figure img,
  .hero-figure.no-photo { width: 132px; height: 132px; }
  .two-col { grid-template-columns: 1fr; gap: 2.4rem; }
  .nav { gap: .9rem; font-size: .78rem; }
  .masthead-inner { flex-wrap: wrap; gap: .4rem 1rem; }
  :root { --space-section: 3.2rem; }
}

@media (max-width: 420px) {
  .hero-contact .dot,
  .footer-links .dot { margin: 0 .35rem; }
}

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

/* ---------- Print ---------- */
@media print {
  .masthead, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .chip { border-color: #999; }
}
