/* ===================================================
   FONTS
   =================================================== */
@font-face {
  font-family: 'Bebas Neue';
  src: url('/static/fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('/static/fonts/BebasNeue-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ===================================================
   VARIABLES & RESET
   =================================================== */
:root {
  /* Dudley Editions palette: navy, coral, cream, teal. */
  --navy: #2E425A;
  --coral: #FA9583;
  --cream: #F4DFCC;
  --teal: #4097AA;
  --cream-muted: #CFC4B2;

  /* Legacy token names, repointed to the new palette so every existing
     consumer follows from one place. Yellow is retired: it now resolves
     to coral. Cerulean is retired: it now resolves to teal. */
  --deep-blue: var(--navy);
  --cerulean: var(--teal);
  --yellow: var(--coral);
  --slate: #BBBAC6;
  --white: #ffffff;
  --light-grey: #f4f4f6;
  --dark-grey: #BBBAC6;
  /* Softer, slightly desaturated cream for long-form body copy on navy. */
  --text-on-navy: var(--cream-muted);
  /* Semantic text tokens used on body and headings site-wide. */
  --color-body: #CFC4B2;
  --color-heading: #F4DFCC;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 72px;
  --container-max: 1320px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-body);
  background: var(--deep-blue);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.site-main {
  flex: 1 0 auto;
}

img { max-width: 100%; display: block; }
a { color: var(--cerulean); text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 8vw;
}

/* ===================================================
   TYPOGRAPHY
   =================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--color-heading);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cerulean);
  margin-bottom: 0.75rem;
}

/* ===================================================
   NAV — animated floating pill
   =================================================== */
.site-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(46, 66, 90, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  height: 3rem;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              transform 0.2s ease;
  white-space: nowrap;
}

.nav-pill-logo {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--yellow);
  padding: 0 0.5rem 0 1.25rem;
  transition: opacity 0.25s ease,
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.nav-pill-logo:hover { opacity: 0.85; }

.nav-pill-links {
  display: flex;
  align-items: center;
  padding-right: 0.75rem;
  transition: opacity 0.2s ease;
}

.nav-pill-links a {
  color: rgba(187, 186, 198, 0.9);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.nav-pill-links a:hover,
.nav-pill-links a.active {
  color: var(--yellow);
  background: rgba(250, 149, 131, 0.08);
}

.nav-pill-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.1s;
}

/* ---- collapsed (desktop, scroll-triggered) ---- */
.site-nav.nav-collapsed .nav-pill {
  cursor: pointer;
}
.site-nav.nav-collapsed .nav-pill:hover {
  box-shadow: 0 6px 30px rgba(64, 151, 170, 0.4);
  transform: scale(1.08);
}
.site-nav.nav-collapsed .nav-pill:active {
  transform: scale(0.95);
}
.site-nav.nav-collapsed .nav-pill-logo {
  opacity: 0;
  transform: translateX(-1.5rem) rotate(-180deg);
  pointer-events: none;
}
.site-nav.nav-collapsed .nav-pill-links {
  opacity: 0;
  pointer-events: none;
}
.site-nav.nav-collapsed .nav-pill-icon {
  opacity: 1;
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--deep-blue);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: calc(var(--nav-height) + 4rem) 8vw 3rem;
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cerulean);
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.1;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--cream);
  max-width: 44ch;
  line-height: 1.7;
}

/* A single line of keywords, not pills: small uppercase, middot
   separated, letter-spaced and muted. No backgrounds, no borders. */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.6rem;
  margin-top: 0.85rem;
}

.pill {
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(187, 186, 198, 0.65);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.pill:hover,
.pill.active {
  color: var(--cream);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.kw-sep {
  color: rgba(187, 186, 198, 0.3);
  font-size: 0.7rem;
  line-height: 1.5;
  user-select: none;
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 1rem;
  text-align: right;
}

.current-thinking-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cerulean);
  margin-bottom: 0.75rem;
}

.thinking-text {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.65;
  transition: opacity 0.25s ease;
  max-width: 52ch;
}

.thinking-text.fading {
  opacity: 0;
}

/* ===================================================
   FUSION STRIP
   =================================================== */
.fusion-strip {
  position: relative;
  z-index: 2;
  background: rgba(46, 66, 90, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(64, 151, 170, 0.25);
  padding: 0.875rem 8vw;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  min-height: 52px;
}

.fusion-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
  flex-shrink: 0;
}

.fusion-ideas {
  display: flex;
  gap: 0.75rem;
  overflow: hidden;
  flex: 1;
  flex-wrap: nowrap;
}

.fusion-chip {
  color: var(--yellow);
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 0.875rem;
  white-space: nowrap;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.4s ease, opacity 0.4s ease;
  flex-shrink: 0;
}

.fusion-chip + .fusion-chip::before {
  content: '\00B7';
  margin: 0 0.6rem;
  color: var(--slate);
  font-style: normal;
}

.fusion-chip.entering {
  transform: translateY(16px);
  opacity: 0;
}

/* ===================================================
   ROLE BAND
   =================================================== */
.role-band {
  background: var(--yellow);
  padding: 0.55rem 8vw;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--deep-blue);
}

.role-sep {
  color: rgba(46, 66, 90, 0.35);
}

/* ===================================================
   SECTIONS - SHARED
   =================================================== */
.section {
  padding: clamp(4rem, 8vw, 7rem) 8vw;
}
.section-inner {
  max-width: var(--container-max);
  margin-inline: auto;
}
.section-heading {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 2.5rem;
}

/* ===================================================
   PUBLICATIONS SECTION
   =================================================== */
.section--publications {
  background: var(--deep-blue);
}
.section--publications .section-heading {
  color: var(--text-on-navy);
}

.books-card {
  background: var(--deep-blue);
  border-radius: 1.25rem;
  overflow: hidden;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.book-item {
  display: block;
  padding: 1.25rem 1.25rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}
.book-item:hover {
  box-shadow: inset 0 0 0 2px var(--cerulean);
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.book-cover {
  margin-bottom: 0.9rem;
  height: 220px;
  background: var(--deep-blue);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.book-item:hover .book-cover img {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.book-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.book-year-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.book-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.08em;
}

.book-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(64, 151, 170, 0.25);
  border: 1px solid rgba(64, 151, 170, 0.5);
  color: var(--cerulean);
  border-radius: 2rem;
  padding: 0.1rem 0.5rem;
  line-height: 1.6;
}

.book-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.3;
}

.book-publisher {
  font-size: 0.75rem;
  color: var(--slate);
  line-height: 1.4;
}

/* Publications page book layout */
.pub-item--book {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.pub-book-cover {
  flex-shrink: 0;
  width: 72px;
}
.pub-book-cover img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.pub-book-info {
  flex: 1;
}

/* ===================================================
   RESEARCH SECTION
   =================================================== */
.section--research {
  background: var(--deep-blue);
}
.section--research .section-heading {
  color: var(--text-on-navy);
}

/* No fill, no rounded container: the four interests sit on the page
   background, separated by a single hairline rule above each entry. */
.research-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: 2.5rem;
}

.research-col {
  padding: 1.5rem 0 0;
  cursor: default;
}

/* Large, muted figure: light low-opacity so it reads as faint
   texture on navy, never bright yellow. */
.research-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.research-col h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-on-navy);
  margin-bottom: 0.75rem;
}

.research-col p {
  font-size: 0.9rem;
  color: var(--text-on-navy);
  line-height: 1.65;
  max-width: 34ch;
  margin-bottom: 1.75rem;
}

/* ===================================================
   PROJECTS SECTION
   =================================================== */
.section--projects {
  background: var(--deep-blue);
}
.section--projects .section-label { color: var(--cerulean); }
.section--projects .section-heading { color: var(--text-on-navy); }
.section--projects p {
  margin-bottom: 1.75rem;
}

/* Flush full-bleed colour panels: no gaps, no rounding, no shadow,
   so the four tiles meet edge to edge as a grid. */
.projects-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.project-tile {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  /* No fill at rest: tile sits on section navy. Hairline marks the grid. */
  border-top: 1px solid rgba(250, 149, 131, 0.5);
  transition: background-color 0.4s ease;
  cursor: default;
}

.project-tile-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  transition: max-width 0.4s ease, transform 0.4s ease;
}

.project-tile:hover .project-tile-text {
  max-width: 55%;
  transform: translateX(0);
}
.project-tile-img {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(110%);
  width: auto;
  height: 80%;
  max-width: 45%;
  object-fit: contain;
  transition: transform 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.project-tile:hover .project-tile-img {
  transform: translateY(-50%) translateX(0);
}

/* Tile 1 (Dudley Editions): smaller image, right-aligned with padding
   matching the tile's horizontal padding so the horse sits inside the
   tile boundary with breathing room on the right edge. */
.project-tile:nth-child(1) .project-tile-img {
  right: clamp(1.5rem, 3vw, 2.5rem);
  height: 46%;
  max-width: 40%;
  transform: translateY(-50%) translateX(calc(110% + clamp(1.5rem, 3vw, 2.5rem)));
}
.project-tile:nth-child(1):hover .project-tile-img {
  transform: translateY(-50%) translateX(0);
}
.project-tile:nth-child(1):hover .project-tile-img {
  transform: translateY(-50%) translateX(0);
}

.project-tile:nth-child(3) .project-tile-img {
  top: auto;
  bottom: 0;
  height: 90%;
  transform: translateX(110%);
}

.project-tile:nth-child(3):hover .project-tile-img {
  transform: translateX(0);
}

.project-tile:nth-child(4) .project-tile-img {
  border-radius: 6px;
}

/* No fills at rest: all tiles sit on section navy.
   Diagonal pattern: coral top-left (1), teal top-right (2),
   teal bottom-left (3), coral bottom-right (4). */
.project-tile:nth-child(1):hover,
.project-tile:nth-child(4):hover { background: var(--coral); }
.project-tile:nth-child(2):hover,
.project-tile:nth-child(3):hover { background: var(--teal); }

/* Headings: coral at rest on all tiles (readable on navy). */
.project-tile h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 0.75rem;
  transition: color 0.25s;
}
/* On coral hover: navy text for legibility. */
.project-tile:nth-child(1):hover h3,
.project-tile:nth-child(4):hover h3 { color: var(--deep-blue); }
/* On teal hover: cream text for legibility. */
.project-tile:nth-child(2):hover h3,
.project-tile:nth-child(3):hover h3 { color: var(--cream); }

/* Body text: muted cream at rest on all tiles. */
.project-tile p {
  font-size: 0.875rem;
  color: var(--text-on-navy);
  line-height: 1.65;
  transition: color 0.25s;
}
.project-tile:nth-child(1):hover p,
.project-tile:nth-child(4):hover p { color: var(--deep-blue); }
.project-tile:nth-child(2):hover p,
.project-tile:nth-child(3):hover p { color: var(--cream); }

/* Link: teal at rest. On coral hover stays teal; on teal hover cream. */
.project-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cerulean);
  transition: color 0.25s;
}
.project-tile:nth-child(1):hover .project-link,
.project-tile:nth-child(4):hover .project-link { color: var(--cerulean); }
.project-tile:nth-child(2):hover .project-link,
.project-tile:nth-child(3):hover .project-link { color: var(--cream); }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--yellow);
  padding: 2.25rem 8vw;
  flex-shrink: 0;
}

.footer-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep-blue);
}
.footer-domain {
  font-size: 0.8rem;
  color: rgba(46, 66, 90, 0.6);
  margin-top: 0.1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-nav a {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--deep-blue);
  transition: opacity 0.2s;
}
.footer-nav a:hover { opacity: 0.6; }

.footer-cookie-settings {
  font-size: 0.83rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--deep-blue);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.footer-cookie-settings:hover { opacity: 0.6; }

/* ===================================================
   INNER PAGES - SHARED
   =================================================== */
.page-hero {
  background: var(--deep-blue);
  padding: calc(var(--nav-height) + 4rem) 8vw 4rem;
}
.page-hero-inner {
  max-width: var(--container-max);
  margin-inline: auto;
}
.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cerulean);
  margin-bottom: 0.75rem;
}
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--cream);
  max-width: 20ch;
  line-height: 1.15;
}
.page-subtitle {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 60ch;
  margin-top: 1.25rem;
  line-height: 1.7;
}

.page-writing .page-subtitle {
  color: var(--cream);
}

.page-body {
  padding: clamp(3rem, 6vw, 5rem) 8vw;
}
.page-body-inner {
  max-width: var(--container-max);
  margin-inline: auto;
}

/* ===================================================
   PAGE-BODY HAIRLINE DIVIDER (hero -> body)
   =================================================== */
.page-body-divider {
  margin-top: clamp(-2rem, -4vw, -1.5rem);
  border-top: 1px solid rgba(250,149,131,0.3);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.legal-content h2 {
  font-size: 1.6rem;
  color: var(--cream);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 1.15rem;
  color: var(--cream);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.legal-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-body);
  margin-bottom: 1.25rem;
}
.legal-content a {
  color: var(--cerulean);
  text-decoration: underline;
}
.legal-content .legal-updated {
  color: var(--slate);
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* ===================================================
   ABOUT PAGE
   =================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about-bio h2 {
  font-size: 1.6rem;
  color: var(--cream);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}
.about-bio h2:first-child { margin-top: 0; }

.about-bio p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-body);
  margin-bottom: 1.75rem;
}

.about-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.sidebar-card {
  margin-bottom: 1.5rem;
}
.sidebar-card h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cerulean);
  margin-bottom: 1rem;
}
.sidebar-card p,
.sidebar-card a {
  font-size: 0.9rem;
  color: var(--text-on-navy);
  line-height: 1.6;
  display: block;
  margin-bottom: 0.4rem;
}
.sidebar-card a:hover { color: var(--cerulean); }

/* ===================================================
   PUBLICATIONS PAGE
   =================================================== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  border: 1px solid #ddd;
  font-size: 0.83rem;
  font-weight: 500;
  color: #555;
  background: white;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--cerulean);
  color: var(--cerulean);
}
.filter-btn.active {
  background: var(--deep-blue);
  border-color: var(--deep-blue);
  color: var(--cream);
}

.pub-group {
  margin-bottom: 3rem;
}
.pub-group-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--yellow);
}

.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: opacity 0.3s;
}

.pub-group[data-group="wider"] .pub-item,
.pub-group[data-group="article"] .pub-item {
  border-bottom: none;
}

.pub-group[data-group="wider"] .pub-year,
.pub-group[data-group="article"] .pub-year {
  color: var(--coral);
}
.pub-item.hidden { display: none; }

.pub-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.pub-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: border-color 0.2s, color 0.2s;
}

.pub-title a:hover,
.pub-title a:focus {
  color: var(--cerulean);
  border-color: currentColor;
}

.pub-meta {
  font-size: 0.85rem;
  color: var(--slate);
}

.pub-doi {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--cerulean);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pub-year-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pub-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(64, 151, 170, 0.12);
  border: 1px solid rgba(64, 151, 170, 0.4);
  color: var(--cerulean);
  border-radius: 2rem;
  padding: 0.1rem 0.5rem;
  line-height: 1.6;
}

.pub-description {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.6;
  margin-top: 0.6rem;
}

.pub-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pub-buy-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cerulean);
  border: 1px solid var(--cerulean);
  border-radius: 2rem;
  padding: 0.2rem 0.7rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.pub-buy-link:hover {
  background: var(--cerulean);
  color: var(--cream);
}

/* ===================================================
   RESEARCH PAGE
   =================================================== */
.research-detail-grid {
  display: block;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--coral);
}

.research-detail-item {
  display: grid;
  grid-template-columns: 25% 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3.5rem 0;
  border-top: 1px solid var(--coral);
}

.research-detail-item .research-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.research-detail-item h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--coral);
  line-height: 1.3;
  margin-bottom: 0;
}

.research-detail-item p {
  font-size: 1rem;
  color: var(--cream-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.research-detail-item p:last-child {
  margin-bottom: 0;
}

.research-item-right {
  overflow: hidden;
}

.research-item-image {
  float: right;
  width: 280px;
  max-width: 40%;
  margin: 0 0 1rem 1.5rem;
  border-radius: 4px;
}

/* ===================================================
   PROJECTS PAGE
   =================================================== */
.page-body--no-hero {
  padding-top: calc(var(--nav-height) + 4rem);
}

.projects-page-grid {
  display: block;
}

.project-card {
  border-top: 1px solid rgba(250,149,131,0.3);
  padding: 2.5rem 0;
}

.project-card-num {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--slate);
  font-variant: small-caps;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.project-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.project-dudley-inner {
  display: flow-root;
}

.project-logo {
  float: left;
  width: 160px;
  height: auto;
  margin: 0 2rem 1rem 0;
}

.project-body {
}

.project-card p {
  font-size: 1.05rem;
  color: #CFC4B2;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* ===================================================
   WRITING / BLOG
   =================================================== */
.writing-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 2rem;
  align-items: start;
  transition: opacity 0.2s;
}
.post-card:hover { opacity: 0.8; }

.post-card-date {
  font-size: 0.8rem;
  color: var(--cerulean);
  font-weight: 600;
  padding-top: 0.2rem;
  letter-spacing: 0.03em;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.post-card-title:hover { color: var(--cerulean); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
}

/* ===================================================
   WRITING TIMELINE
   =================================================== */
body.page-writing { background: var(--deep-blue); }

.tl-body { padding: 0 2rem; }

.tl-year-block { display: flex; margin-top: 2rem; }

.tl-year-col { width: 64px; flex-shrink: 0; position: relative; padding-top: 0.15rem; }

.tl-year-label { font-family: var(--font-serif, serif); font-size: 22px; font-weight: 400; line-height: 1; }

.tl-dot { position: absolute; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--cerulean); transform: translateX(-50%); top: 0.4rem; }

.tl-spine-line { position: absolute; left: 50%; top: 1.5rem; bottom: 0; width: 0.5px; background: rgba(64,151,170,0.15); transform: translateX(-50%); }

.tl-posts-col { flex: 1; padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1.5rem; border-left: 0.5px solid rgba(64,151,170,0.15); }

.tl-card { display: flex; gap: 1rem; cursor: pointer; padding: 0.85rem; border-radius: 8px; border: 0.5px solid transparent; will-change: transform; opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.25s, background 0.25s; text-decoration: none; }

.tl-card.old { transition-duration: 0.75s; }

.tl-card.emerged { opacity: 1; transform: translateY(0); }

.tl-card:hover { border-color: rgba(64,151,170,0.3); background: rgba(64,151,170,0.06); }

.tl-card:hover .tl-card-title { color: var(--yellow); }

.tl-card:hover .post-canvas { opacity: 1; }

.tl-card-thumb { flex-shrink: 0; width: 80px; height: 64px; border-radius: 6px; overflow: hidden; background: #1D2A39; }

.post-canvas { width: 80px; height: 64px; display: block; opacity: 0.7; transition: opacity 0.25s; }

.tl-card-body { flex: 1; min-width: 0; }

.tl-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }

.tl-card-date { font-size: 10px; color: var(--cerulean); letter-spacing: 0.06em; font-weight: 500; }

.tl-card-tag { font-size: 10px; padding: 0.1em 0.45em; border-radius: 3px; font-weight: 500; background: rgba(64,151,170,0.15); color: #7ecfea; }

.tl-card-title { font-family: var(--font-serif, serif); font-size: 15px; color: rgba(255,255,255,0.85); line-height: 1.3; font-weight: 400; transition: color 0.2s; margin: 0; }

.tl-card-excerpt { font-size: 12px; color: rgba(187,186,198,0.4); line-height: 1.5; margin-top: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================================================
   WRITING CARD GRID
   =================================================== */
.yr-section { margin-bottom: 0; }

.yr-header {
  position: relative;
  height: 120px;
  display: flex;
  align-items: flex-end;
  overflow: visible;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding-left: 2rem;
  z-index: 1;
}

.yr-watermark {
  font-family: var(--font-serif);
  font-size: clamp(100px, 15vw, 200px);
  font-weight: 400;
  color: rgba(64, 151, 170, 0.12);
  line-height: 1;
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  animation: yr-drift 20s ease-in-out infinite;
}

@keyframes yr-drift {
  0%, 100% { transform: rotate(-0.5deg) translateY(0); }
  50% { transform: rotate(0.3deg) translateY(-4px); }
}

.card-grid { display: flex; flex-direction: column; }

/* Reset old .post-card styles that conflict on the writing page */
body.page-writing .post-card { display: block; padding: 1.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); grid-template-columns: none; gap: 0; }
body.page-writing .post-card:last-child { border-bottom: none; }

/* /writing/ + /writing/topics/ — replace entry divider lines with
   spacing alone, scoped to these pages only */
body.page-writing .post-card,
body.page-writing .smt-group {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.post-card { position: relative; cursor: pointer; opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease; text-decoration: none; scroll-margin-top: calc(var(--nav-height) + 1.5rem); }
.post-card.emerged { opacity: 1; transform: translateY(0); }
body.page-writing .post-card:hover { opacity: 1; }
.post-card:hover .card-title { color: var(--yellow); }
.post-card:hover .card-excerpt { max-height: 80px; opacity: 1; }
.post-card:hover .card-arrow { opacity: 1; transform: translateX(4px); }

.card-body { position: relative; width: 100%; }
.card-meta { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.4rem; }
.card-date { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--cerulean); }
.card-title { font-family: var(--font-serif, serif); font-size: 18px; color: rgba(255,255,255,0.92); line-height: 1.2; font-weight: 400; transition: color 0.2s; margin: 0; }
.card-excerpt { font-size: 12px; color: rgba(187,186,198,0.45); line-height: 1.5; margin-top: 0.35rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.35s ease; }
.card-arrow { display: inline-block; font-size: 11px; color: var(--yellow); margin-top: 0.4rem; opacity: 0; font-weight: 600; transition: opacity 0.2s, transform 0.2s; }

/* Topic labels on /writing/ + /writing/topics/ cards — supplementary
   metadata, same weight/size as .card-date, no pill chrome */
.card-topics {
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
}
.card-topic-label {
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.card-topic-label:hover,
.card-topic-label:focus {
  color: var(--cerulean);
  text-decoration-color: currentColor;
  outline: none;
}

/* /writing/topics/ filter list — editorial keyword list, not pills */
.topic-filter-bar { margin-bottom: 2.5rem; }
.topic-filter-bar .pill.active { color: var(--cream); border-bottom-color: rgba(255, 255, 255, 0.5); }

/* /writing/topics/ "jump to year" nav — same editorial keyword-list
   treatment as .card-topics, spaced rather than middot-separated */
.year-jump { margin-bottom: 2.5rem; }
.year-jump-link {
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.year-jump-link:hover,
.year-jump-link:focus {
  color: var(--cerulean);
  text-decoration-color: currentColor;
  outline: none;
}
.year-jump.hidden,
.year-jump-link.hidden { display: none; }

#topics-card-grid .hidden { display: none; }

/* Social Media Timeline collapsible group — editorial list, not a card */
.smt-group {
  cursor: pointer;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.smt-group-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.smt-group-title {
  font-family: var(--font-serif, serif);
  font-size: 1.1rem;
  color: var(--cream);
}
.smt-toggle-hint {
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(187,186,198,0.5);
}
.smt-year-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.smt-year-list li { margin-bottom: 0.35rem; font-size: 0.85rem; }
.smt-year-list a { color: var(--cerulean); text-decoration: none; }
.smt-year-list a:hover { text-decoration: underline; text-underline-offset: 2px; }
.smt-group.expanded .smt-toggle-hint { display: none; }
.smt-group.expanded .smt-year-list { max-height: 500px; }

/* Post single */
.post-main { padding-bottom: 5rem; }

.post-hero-illustration { width: 100%; height: 260px; overflow: hidden; position: relative; }

.post-header {
  background: var(--deep-blue);
  padding: calc(var(--nav-height) + 1.5rem) 8vw 1.5rem;
}
.post-header .container {
  max-width: 800px;
  padding-inline: 0;
  margin-inline: 0;
}

.post-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
}

.post-excerpt {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--slate);
  margin-top: 1.25rem;
  line-height: 1.65;
  max-width: 60ch;
}

.post-topics {
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--slate);
}
.post-topics-label {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cerulean);
  margin-right: 0.5rem;
}
.post-topics a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.post-topics a:hover {
  color: var(--cerulean);
  text-decoration-color: currentColor;
}

.post-header:has(.post-header-grid) {
  padding-top: calc(var(--nav-height) + 4rem);
}
.post-header-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: center;
}
.post-header-image-wrap {
  width: 160px;
}
.post-header-image {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.post-body-divider {
  border-top: 1px solid rgba(207, 196, 178, 0.2);
}
@media (max-width: 640px) {
  .post-header-grid { grid-template-columns: 1fr; }
  .post-header-image-wrap { width: 120px; }
}

.post-body {
  padding: 3.5rem 8vw;
}
.post-body .container {
  max-width: var(--container-max);
  padding-inline: 0;
  margin-inline: auto;
}
.post-body img { width: 80vw; max-width: 80vw; height: auto; display: block; border-radius: 4px; margin-left: calc(50% - 40vw); margin-bottom: 2rem; cursor: zoom-in; }
.post-body img.post-featured-landscape { width: 100%; max-width: 100%; height: auto; margin: 0 0 2.5rem; margin-left: 0; border-radius: 4px; }
.post-body img.post-featured-portrait { float: right; max-width: 280px; width: auto; height: auto; margin: 0 0 1.5rem 2rem; border-radius: 4px; }
.post-body img.post-inline-image { float: right; max-width: 300px; width: auto; height: auto; margin: 0 0 1.5rem 2rem; }
.post-body .container::after { content: ''; display: table; clear: both; }
[data-lightbox] { cursor: zoom-in; }
.post-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--cream);
  margin-bottom: 1.75rem;
}
.post-body h2 {
  font-size: 1.5rem;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
}
.post-body h3 {
  font-size: 1.2rem;
  color: var(--cream);
  margin: 2rem 0 0.75rem;
}
.post-body blockquote {
  border-left: 3px solid var(--cerulean);
  padding: 0.75rem 1.5rem;
  margin: 1.75rem 0;
  background: rgba(64, 151, 170, 0.08);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #BBBAC6;
}

.post-footer {
  padding: 1.5rem 8vw 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.back-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cerulean);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s;
}
.back-link::before { content: '\2190'; }
.back-link:hover { gap: 0.6rem; }

/* ===================================================
   CONTACT PAGE
   =================================================== */
.contact-form-wrap {
  background: var(--deep-blue);
  padding: clamp(3rem, 6vw, 5rem) 8vw clamp(4rem, 8vw, 6rem);
}

.contact-form-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-form-col {
  min-width: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--yellow);
}

.form-input,
.form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(207, 196, 178, 0.35);
  padding: 0.6rem 0;
  color: var(--text-on-navy);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  width: 100%;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(187, 186, 198, 0.35);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--coral);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--cerulean);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  align-self: flex-start;
  position: relative;
}
.form-submit:hover:not(:disabled) { background: #57AEBF; }
.form-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.form-submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.form-submit.loading .form-submit-spinner { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-error {
  font-size: 0.875rem;
  color: #ffaaaa;
  padding: 0.75rem 0;
  border-left: 2px solid rgba(255, 100, 100, 0.5);
  padding-left: 0.75rem;
  display: none;
}
.form-error.visible { display: block; }

.form-success {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(207, 196, 178, 0.2);
  color: var(--text-on-navy);
  display: none;
}
.form-success.visible { display: block; }
.form-success h3 {
  font-size: 1.2rem;
  color: var(--coral);
  margin-bottom: 0.5rem;
}
.form-success p {
  font-size: 0.95rem;
  color: var(--text-on-navy);
  line-height: 1.65;
}

/* Social sidebar on contact page */
.contact-social-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.contact-social-card {
  border-top: 1px solid rgba(250, 149, 131, 0.3);
  padding-top: 0.75rem;
}

.contact-social-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cerulean);
  margin-bottom: 0.3rem;
}

.contact-social-card a {
  font-size: 0.875rem;
  color: var(--cerulean);
  word-break: break-all;
  transition: color 0.2s;
}
.contact-social-card a:hover { color: var(--yellow); }

.contact-social-note {
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 0.2rem;
}

/* ===================================================
   PUBLICATIONS ACCORDION
   =================================================== */
.pub-acc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.75rem 1.1rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pub-acc-item.hidden { display: none; }
.pub-acc-item:hover {
  border-left-color: var(--cerulean);
  background: rgba(64,151,170,0.06);
}
.pub-acc-item:hover .pub-acc-title { color: var(--cerulean); }

.pub-acc-trigger-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.pub-acc-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 70px;
  background: var(--deep-blue);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pub-acc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.pub-acc-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pub-acc-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
  transition: color 0.15s;
}

.pub-acc-publisher {
  font-size: 0.8rem;
  color: var(--slate);
}

.pub-acc-chevron {
  flex-shrink: 0;
  color: var(--cerulean);
  transition: transform 0.3s ease;
}
.pub-acc-trigger[aria-expanded="true"] .pub-acc-chevron {
  transform: rotate(180deg);
}

.pub-acc-panel {
  max-height: 0;
  visibility: hidden;
  overflow: hidden;
  transition: max-height 0.4s ease, visibility 0.4s ease;
}

.pub-acc-panel-inner {
  padding: 0 0.25rem 1.25rem 4rem;
}

.pub-acc-description {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.pub-acc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.pub-acc-actions .pub-buy-links {
  margin-top: 0;
}

.pub-acc-full-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cerulean);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: opacity 0.15s;
}
.pub-acc-full-link:hover { opacity: 0.75; }

/* ===================================================
   INDIVIDUAL BOOK PAGE
   =================================================== */
.book-page-hero {
  background: var(--deep-blue);
  padding: 5rem 8vw 4rem;
}
.book-page-hero-inner {
  max-width: var(--container-max);
  margin-inline: auto;
}
.book-page-back {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cerulean);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
  transition: opacity 0.15s;
}
.book-page-back:hover { opacity: 0.75; }

.book-page-hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.book-page-cover-wrap {
  width: 280px;
  background: #1F2E40;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  aspect-ratio: 2/3;
}
.book-page-cover-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.book-page-year-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.book-page-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.1em;
}
.book-page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.book-page-publisher {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 1.25rem;
}

.book-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.book-page-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--slate);
  background: rgba(187, 186, 198, 0.12);
  border: 1px solid rgba(187, 186, 198, 0.25);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
}

.book-page-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.book-page-buy-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--deep-blue);
  background: var(--yellow);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.book-page-buy-link:hover { opacity: 0.85; }

.book-page-body {
  background: var(--navy);
  padding: 4rem 8vw 5rem;
  border-top: 1px solid rgba(207, 196, 178, 0.2);
}
.book-page-body-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.book-page-section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}

.book-page-description {
  font-size: 1rem;
  color: var(--text-on-navy);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.book-page-description:last-child { margin-bottom: 0; }

.book-page-toc {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 70ch;
}
.book-page-toc li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(207, 196, 178, 0.2);
  font-size: 0.95rem;
  color: var(--text-on-navy);
  line-height: 1.4;
}
.book-page-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.06em;
  min-width: 2em;
}

/* Book page responsive */
@media (max-width: 640px) {
  .book-page-hero-grid {
    grid-template-columns: 1fr;
  }
  .book-page-cover-wrap {
    width: 140px;
    aspect-ratio: 2/3;
  }
  .pub-acc-panel-inner {
    padding-left: 0.25rem;
  }
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .research-card { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  /* pill moves to top-right, always shows icon */
  .site-nav {
    top: 1rem;
    left: auto;
    right: 1rem;
    transform: none;
  }
  .nav-pill {
    width: 3rem !important;
    cursor: pointer;
    overflow: visible;
  }
  .nav-pill-logo {
    opacity: 0 !important;
    pointer-events: none;
  }
  /* links become a dropdown panel below the pill */
  .nav-pill-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    min-width: 10rem;
    background: rgba(46, 66, 90, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    overflow: visible;
  }
  .nav-pill-links a {
    border-radius: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  .nav-pill-icon {
    opacity: 1 !important;
  }
  /* mobile open state */
  .site-nav.mobile-open .nav-pill-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .site-nav.mobile-open .nav-pill {
    border-color: rgba(64, 151, 170, 0.5);
  }
  .site-nav.mobile-open .nav-pill-icon {
    color: var(--yellow);
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 2.5rem);
  }
  .hero-right {
    justify-content: flex-start;
    padding-bottom: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
  }

  .fusion-strip { flex-wrap: wrap; gap: 0.75rem; }
  .fusion-ideas { flex-wrap: wrap; }

  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .research-card { grid-template-columns: 1fr; }
  .projects-mosaic { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
  .contact-form-inner { grid-template-columns: 1fr; }
  .contact-social-col { flex-direction: row; flex-wrap: wrap; }
  .contact-social-card { flex: 1 1 160px; }
  .research-detail-item { grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 0; }

  .form-row { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr; gap: 0.25rem; }
  .post-card-date { padding-top: 0; }
}

@media (max-width: 480px) {
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-pills { gap: 0.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

.post-card { opacity: 0; }
.post-card.emerged { opacity: 1 !important; transform: translateY(0) !important; }


.click-ripple {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  animation: ripple-expand 0.6s ease-out forwards;
}

@keyframes ripple-expand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---- Dudley Editions accordion ---- */
.dudley-accordion-wrap {
  display: flex;
  justify-content: flex-end;
}

.dudley-accordion {
  display: flex;
  flex-direction: row;
  border-radius: 16px;
  overflow: hidden;
  width: 600px;
  flex-shrink: 0;
}

.da-panel {
  position: relative;
  width: 55px;
  flex-shrink: 0;
  overflow: visible;
  cursor: pointer;
  transition: width 0.5s ease;
  background: var(--cerulean);
  border-radius: 12px;
}

.da-panel--alt {
  background: #2F7A8A;
}

.da-panel.active {
  width: 325px;
  background: var(--deep-blue);
}

/* In-flow block — image height drives this div's height,
   which in turn drives the panel and accordion height.
   overflow: hidden clips the image horizontally during the
   panel-width transition (curtain effect). */
.da-img-clip {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.da-img-clip img {
  width: 325px;
  max-width: none;
  height: auto;
  display: block;
  transition: none;
  opacity: 0;
}

.da-panel.active .da-img-clip img {
  opacity: 1;
}

.da-colophon {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: auto;
  max-width: none;
  opacity: 0.75;
  pointer-events: none;
}

.da-panel.active .da-colophon {
  display: none;
}

/* Label near the bottom of closed panels */
.da-label {
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-transform: uppercase;
  z-index: 2;
}

.da-panel.active .da-label {
  top: auto;
  bottom: 16px;
  transform: translateX(-50%) rotate(0deg);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--deep-blue);
}

/* ---- Publications homepage accordion ---- */
/* No rounded container: panels sit flush on the section background.
   Rounding removal is scoped here so the shared .da-panel accordion on
   the dudley-editions and publications pages keeps its rounded corners. */
.pub-accordion {
  display: flex;
  flex-direction: row;
  border-radius: 0;
  overflow: hidden;
}

.pub-accordion .da-panel {
  overflow: hidden;
  height: 360px;
  border-radius: 0;
}

.pub-accordion .da-img-clip {
  border-radius: 0;
}

.pub-accordion .da-panel.active {
  width: 760px;
}

/* Inner layout: cover left, text right */
.pub-panel-inner {
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 0;
  align-items: stretch;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pub-accordion .da-panel.active .pub-panel-inner {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease 0.35s;
}

/* Book cover: fills panel height at natural aspect ratio, 10px breathing room */
.pub-cover-wrap {
  flex-shrink: 0;
  width: auto;
  padding: 28px;
}

.pub-cover-wrap img {
  height: 100%;
  width: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Text column gets its own padding, clips at panel height */
.pub-panel-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  overflow: hidden;
}

.pub-panel-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cerulean);
  letter-spacing: 0.08em;
}

.pub-panel-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-on-navy);
  line-height: 1.3;
  margin: 0;
}

.pub-panel-publisher {
  font-size: 0.78rem;
  color: rgba(233, 231, 221, 0.7);
  margin: 0;
}

.pub-panel-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(233, 231, 221, 0.85);
  margin: 0.25rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-panel-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cerulean);
  text-decoration: none;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.pub-panel-link:hover {
  text-decoration: underline;
  color: var(--cerulean);
}

/* Year on closed panel strips */
.pub-year-strip {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
}

.pub-accordion .da-panel.active .pub-year-strip {
  display: none;
}

/* Hide rotated label on active panel — title shown in text column */
.pub-accordion .da-panel.active .da-label {
  display: none;
}

/* Responsive: vertical stack on narrower screens */
@media (max-width: 1000px) {
  .pub-accordion {
    flex-direction: column;
  }

  .pub-accordion .da-panel {
    width: 100%;
    height: 52px;
    transition: height 0.5s ease;
  }

  .pub-accordion .da-panel.active {
    width: 100%;
    height: 360px; /* same value as desktop */
  }

  .pub-accordion .da-panel .da-label {
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
  }

  .pub-year-strip {
    bottom: auto;
    right: 1rem;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  .pub-accordion .da-panel.active .pub-panel-inner {
    transition: opacity 0.2s ease 0.3s;
  }
}

@media (max-width: 520px) {
  .pub-panel-inner {
    flex-direction: column;
  }

  .pub-cover-wrap {
    width: 100%;
  }

  .pub-cover-wrap img {
    max-height: 260px;
    width: auto;
    margin: 0 auto;
  }
}

/* ===================================================
   COOKIE CONSENT
   =================================================== */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 1.5rem 8vw;
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.cookie-banner,
.cookie-preferences {
  max-width: var(--container-max);
  margin-inline: auto;
}

.cookie-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  color: var(--cream-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 60ch;
}
.cookie-text a {
  color: var(--cerulean);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--cerulean);
  color: var(--white);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.cookie-btn:hover { opacity: 0.85; }
.cookie-btn--outline {
  background: transparent;
  border: 1px solid var(--cerulean);
  color: var(--cerulean);
}
.cookie-btn--outline:hover { background: rgba(64, 151, 170, 0.1); opacity: 1; }

.cookie-pref-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.cookie-preferences .cookie-text {
  max-width: 70ch;
  margin-bottom: 1.25rem;
}

.cookie-category {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-category-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
}
.cookie-category-desc {
  color: var(--slate);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 0.5rem;
  max-width: 65ch;
}

.cookie-preferences .cookie-actions {
  margin-top: 1.5rem;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.cookie-toggle-track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}
.cookie-toggle-thumb {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem;
  background: var(--cream-muted);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: var(--teal);
}
.cookie-toggle input:checked + .cookie-toggle-track .cookie-toggle-thumb {
  transform: translateX(1.25rem);
  background: var(--cream);
}
.cookie-toggle--locked .cookie-toggle-track {
  opacity: 0.6;
}
.cookie-toggle input:disabled {
  cursor: default;
}

@media (max-width: 720px) {
  .cookie-consent {
    padding: 1.25rem 6vw;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-btn {
    text-align: center;
  }
}
