/* Custom Quarto site design for Robert Fithen, PhD */
:root {
  --rf-navy: #0f172a;
  --rf-blue: #2563eb;
  --rf-sky: #38bdf8;
  --rf-teal: #14b8a6;
  --rf-green: #22c55e;
  --rf-ink: #0f172a;
  --rf-muted: #475569;
  --rf-soft: #f8fafc;
  --rf-line: rgba(15, 23, 42, .11);
  --rf-card: rgba(255, 255, 255, .84);
}

body {
  color: var(--rf-ink);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .18), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(34, 197, 94, .13), transparent 27rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #ffffff 100%);
}

.navbar {
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, .08);
}

.navbar-brand, .navbar-nav .nav-link {
  letter-spacing: .01em;
}

#title-block-header { display: none; }

main.content {
  max-width: 1180px;
}

.hero {
  margin: 2.5rem 0 2rem;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--rf-line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(240,249,255,.86));
  box-shadow: 0 28px 90px rgba(15, 23, 42, .12);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8rem -11rem auto;
  width: 25rem;
  height: 25rem;
  background: radial-gradient(circle, rgba(37, 99, 235, .16), transparent 70%);
}

.eyebrow {
  color: var(--rf-blue);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  font-size: .78rem;
  margin-bottom: .65rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  line-height: .94;
  letter-spacing: -.06em;
  margin: 0 0 1.1rem;
  color: #08111f;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--rf-blue), var(--rf-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--rf-muted);
  max-width: 64ch;
}

.hero-visual img {
  width: 100%;
  max-width: 420px;
  border-radius: 28px;
  display: block;
  margin-inline: auto;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

.button-row {
  margin-top: 1.7rem;
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}

.rf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .82rem 1.15rem;
  text-decoration: none !important;
  font-weight: 800;
  border: 1px solid rgba(37, 99, 235, .22);
}

.rf-button.primary {
  color: white;
  background: linear-gradient(90deg, var(--rf-blue), #0ea5e9);
  box-shadow: 0 12px 28px rgba(37,99,235,.26);
}

.rf-button.secondary {
  color: var(--rf-navy);
  background: rgba(255,255,255,.8);
}

.metric-grid, .card-grid, .expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}

.metric, .rf-card, .expertise-card, .callout-panel {
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
}

.metric strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--rf-blue);
  letter-spacing: -.045em;
}

.metric span, .muted { color: var(--rf-muted); }

.section-kicker {
  margin-top: 3rem;
  color: var(--rf-blue);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
}

h2 {
  letter-spacing: -.035em;
  font-weight: 850;
  margin-top: .5rem;
}

h3 { font-weight: 800; }

.expertise-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.expertise-card h3 { margin-top: 0; color: #0f172a; }
.expertise-card p { color: var(--rf-muted); margin-bottom: 0; }

.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 1.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: .35rem;
  top: .4rem;
  bottom: .4rem;
  width: 3px;
  background: linear-gradient(var(--rf-sky), var(--rf-teal));
  border-radius: 99px;
}
.timeline-item {
  position: relative;
  padding: 0 0 1.6rem 1.6rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -.15rem;
  top: .25rem;
  width: .9rem;
  height: .9rem;
  border-radius: 999px;
  background: #fff;
  border: 4px solid var(--rf-blue);
}
.timeline-date {
  color: var(--rf-blue);
  font-weight: 900;
  font-size: .92rem;
}
.timeline-title { font-weight: 850; font-size: 1.12rem; }
.timeline-desc { color: var(--rf-muted); }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0 2rem;
}
.pill {
  display: inline-block;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  color: #1e3a8a;
  border: 1px solid rgba(37,99,235,.13);
  font-size: .92rem;
  font-weight: 700;
}

.pub-list {
  display: grid;
  gap: .75rem;
  margin-top: 1.25rem;
}
.pub-item {
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--rf-line);
  border-radius: 18px;
}
.pub-year { color: var(--rf-blue); font-weight: 900; }
.pub-title { font-weight: 800; }
.pub-venue { color: var(--rf-muted); }

.course-columns {
  columns: 2 330px;
  column-gap: 2rem;
}
.course-columns li { break-inside: avoid; margin-bottom: .35rem; }

.footer-note {
  border-top: 1px solid var(--rf-line);
  margin-top: 4rem;
  padding-top: 1.5rem;
  color: var(--rf-muted);
  font-size: .94rem;
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .metric-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expertise-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .metric-grid, .card-grid { grid-template-columns: 1fr; }
  .hero { border-radius: 22px; }
}


/* Active research and finance-pivot additions */
.research-hero {
  margin: 2.5rem 0 2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--rf-line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, .18), transparent 22rem),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,246,255,.90));
  box-shadow: 0 28px 90px rgba(15, 23, 42, .12);
}
.research-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.055em;
  margin: 0 0 1.1rem;
}
.role-banner {
  margin: 1.35rem 0 2.15rem;
  padding: 1.15rem 1.35rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, .96), rgba(254, 243, 199, .88));
  border: 1px solid rgba(37, 99, 235, .34);
  border-left: 7px solid #f59e0b;
  color: #102a43;
  font-size: 1.05rem;
  line-height: 1.62;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, .10),
    inset 0 1px 0 rgba(255, 255, 255, .82);
}

.role-banner strong {
  color: #1d4ed8;
  font-weight: 850;
}
.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}
.research-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
  position: relative;
  overflow: hidden;
}
.research-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rf-blue), var(--rf-teal));
}
.research-card h3 { margin-top: .3rem; }
.split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}
.split-copy {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
.pipeline-image {
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--rf-line);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
  margin: 1.25rem 0;
}
.question-list {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
@media (max-width: 920px) {
  .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .research-grid { grid-template-columns: 1fr; }
}


/* Corporate experience page additions */
.corp-hero {
  margin: 2.5rem 0 2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--rf-line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 18%, rgba(34, 197, 94, .20), transparent 22rem),
    radial-gradient(circle at 12% 78%, rgba(37, 99, 235, .13), transparent 22rem),
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(240,253,250,.90));
  box-shadow: 0 28px 90px rgba(15, 23, 42, .12);
}
.corp-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.055em;
  margin: 0 0 1.1rem;
}
.corp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.corp-card {
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
  position: relative;
  overflow: hidden;
}
.corp-card.featured {
  background: linear-gradient(135deg, rgba(37,99,235,.09), rgba(20,184,166,.10)), rgba(255,255,255,.88);
}
.corp-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rf-blue), var(--rf-teal), var(--rf-green));
}
.corp-card h3 { margin-top: .35rem; margin-bottom: .25rem; }
.corp-date {
  display: inline-block;
  color: #1e3a8a;
  font-weight: 900;
  font-size: .92rem;
  margin-bottom: .65rem;
}
.impact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}
.impact-item {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--rf-line);
  border-radius: 22px;
  padding: 1.1rem;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
.impact-item strong { display: block; color: var(--rf-blue); margin-bottom: .4rem; }
.impact-item span { color: var(--rf-muted); }
@media (max-width: 920px) {
  .corp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .impact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .corp-grid, .impact-strip { grid-template-columns: 1fr; }
}

/* Expanded corporate experience details */
.corp-card.gov {
  background: linear-gradient(135deg, rgba(30,64,175,.10), rgba(14,165,233,.09)), rgba(255,255,255,.90);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.detail-card {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--rf-line);
  border-radius: 24px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
.detail-card h3 {
  margin-top: 0;
  color: var(--rf-navy);
}
.detail-card p {
  color: var(--rf-muted);
  margin-bottom: 0;
}
.timeline-desc {
  max-width: 76rem;
}
@media (max-width: 920px) {
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .detail-grid { grid-template-columns: 1fr; }
}


/* Larger navbar menu items with hover background */
.navbar-nav .nav-link {
  font-size: 1.04rem;
  font-weight: 700;
  padding: .62rem .9rem !important;
  border-radius: 999px;
  transition:
    background-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8 !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
  background: rgba(20, 184, 166, .12);
  color: #0f766e !important;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .20);
}

.navbar-brand {
  font-size: 1.18rem;
  font-weight: 850;
}

.navbar .navbar-nav {
  gap: .15rem;
}

/* Eye-catching NASAA CE link button */
.ce-link-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .35rem;
  padding: .78rem 1.15rem !important;
  border-radius: 999px;
  border: 1px solid rgba(29, 78, 216, .38);
  background:
    linear-gradient(135deg, #1d4ed8 0%, #2563eb 38%, #0f766e 100%) !important;
  color: #ffffff !important;
  font-weight: 850;
  letter-spacing: .01em;
  text-decoration: none !important;
  box-shadow:
    0 10px 24px rgba(37, 99, 235, .28),
    inset 0 1px 0 rgba(255, 255, 255, .32);
  overflow: hidden;
  transform: translateY(0);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.ce-link-button::after {
  content: " →";
  font-weight: 900;
  margin-left: .2rem;
}

.ce-link-button::before {
  content: "";
  position: absolute;
  inset: -40% -55%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
  transform: translateX(-55%) rotate(8deg);
  animation: ce-button-sheen 2.8s ease-in-out infinite;
}

.ce-link-button:hover,
.ce-link-button:focus {
  filter: saturate(1.12) brightness(1.06);
  transform: translateY(-2px) scale(1.025);
  box-shadow:
    0 14px 32px rgba(37, 99, 235, .36),
    inset 0 1px 0 rgba(255, 255, 255, .38);
}

@keyframes ce-button-sheen {
  0%, 45% {
    transform: translateX(-65%) rotate(8deg);
  }
  75%, 100% {
    transform: translateX(65%) rotate(8deg);
  }
}

/* Discreet but readable required IAR continuing-education promotion disclaimer. */
.ce-disclaimer {
  font-size: .78rem;
  line-height: 1.5;
  margin: 1.15rem 0 .15rem;
  padding: .7rem .8rem;
  border-left: 3px solid rgba(29, 78, 216, .55);
  background: rgba(239, 246, 255, .65);
  color: #334155;
}

/* Site-wide disclosure: compact animated corner button + accessible modal. */
.disclosure-trigger {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  padding: .57rem .88rem;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: linear-gradient(120deg, #1e40af, #2563eb 65%, #0f766e);
  color: #fff;
  font-family: inherit;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(30,64,175,.28), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  animation: disclosure-arrive .65s both, disclosure-breathe 5s ease-in-out 1s infinite;
}
.disclosure-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: 1.5px solid rgba(255,255,255,.84);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
}
.disclosure-trigger:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 10px 27px rgba(30,64,175,.38), inset 0 1px 0 rgba(255,255,255,.24);
  animation-play-state: paused;
}
.disclosure-trigger:focus-visible,
.disclosure-x:focus-visible,
.disclosure-done:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}
@keyframes disclosure-arrive {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes disclosure-breathe {
  0%, 82%, 100% { box-shadow: 0 7px 22px rgba(30,64,175,.28), 0 0 0 0 rgba(37,99,235,0); }
  88% { box-shadow: 0 7px 22px rgba(30,64,175,.28), 0 0 0 7px rgba(37,99,235,.14); }
  95% { box-shadow: 0 7px 22px rgba(30,64,175,.28), 0 0 0 12px rgba(37,99,235,0); }
}
body.disclosure-open { overflow: hidden; }

.disclosure-dialog {
  box-sizing: border-box;
  width: min(670px, calc(100vw - 28px));
  max-width: 670px;
  max-height: min(85vh, 760px);
  max-height: min(85dvh, 760px);
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 19px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 30px 90px rgba(15,23,42,.34);
  overflow: auto;
  overscroll-behavior: contain;
}
.disclosure-dialog[open] {
  animation: disclosure-pop .24s cubic-bezier(.2,.8,.25,1) both;
}
.disclosure-dialog::backdrop {
  background: rgba(9, 20, 41, .62);
  backdrop-filter: blur(5px);
}
@keyframes disclosure-pop {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.disclosure-panel { overflow: hidden; }
.disclosure-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1.35rem 1.6rem 1.15rem;
  background: linear-gradient(120deg, #eff6ff 0%, #f0fdfa 100%);
  border-bottom: 1px solid rgba(37,99,235,.12);
  border-top: 4px solid #2563eb;
}
.disclosure-eyebrow {
  color: #0f766e;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.disclosure-header h2 {
  margin: .38rem 0 0;
  color: #0f172a;
  font-size: clamp(1.14rem, 3vw, 1.52rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.025em;
}
.disclosure-x {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font-family: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.disclosure-x:hover { background: #dbeafe; color: #1d4ed8; }
.disclosure-content {
  padding: 1.4rem 1.6rem 1rem;
  font-size: .92rem;
  line-height: 1.7;
}
.disclosure-content p { margin: 0 0 1rem; }
.disclosure-content strong { color: #0f172a; }
.disclosure-content a,
.disclosure-noscript a {
  color: #1d4ed8;
  font-weight: 700;
  text-underline-offset: 3px;
}
.disclosure-content .footer-research-note {
  padding: .85rem 1rem;
  border-left: 3px solid #14b8a6;
  border-radius: 0 8px 8px 0;
  background: #f0fdfa;
}
.disclosure-content .footer-resource-links { margin-bottom: .2rem; }
.disclosure-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.6rem 1.05rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.disclosure-actions span { color: #64748b; font-size: .76rem; }
.disclosure-done {
  padding: .45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #1d4ed8;
  color: white;
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
}
.disclosure-done:hover { background: #1e40af; }
.disclosure-noscript {
  width: min(900px, calc(100% - 2rem));
  margin: 1.3rem auto;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  font-size: .85rem;
}
.disclosure-noscript p { margin: .6rem 0 0; }
@media (max-width: 540px) {
  .disclosure-header { padding: 1rem 1.1rem; }
  .disclosure-content { padding: 1.15rem 1.1rem .6rem; font-size: .88rem; }
  .disclosure-actions { padding: .8rem 1.1rem; }
  .disclosure-trigger { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .disclosure-trigger, .disclosure-dialog[open] { animation: none !important; }
  .disclosure-trigger { transition: none; }
}
@media print {
  .disclosure-trigger, .disclosure-x, .disclosure-done { display: none !important; }
  .disclosure-dialog, .disclosure-dialog:not([open]) {
    display: block !important;
    position: static !important;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 1rem auto;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .disclosure-dialog::backdrop { display: none; }
  .disclosure-panel { overflow: visible; }
  .disclosure-content { padding: .7rem 1rem; }
}


/* Featured book projects at the top of Publications. */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 1.25rem 0 3rem;
}
.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.55rem;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.87));
  border: 1px solid var(--rf-line);
  border-top: 4px solid var(--rf-blue);
  border-radius: 23px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, .08);
}
.book-card:nth-child(2) { border-top-color: var(--rf-teal); }
.book-card:nth-child(3) { border-top-color: #8b5cf6; }
.book-topic {
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .75rem;
  font-weight: 850;
  margin-bottom: .65rem;
}
.book-card h3 {
  margin: .15rem 0 .75rem;
  color: var(--rf-navy);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.3;
}
.book-card p {
  flex: 1;
  color: var(--rf-muted);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}
.book-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .65rem .95rem;
  background: linear-gradient(100deg, #1d4ed8, #0f766e);
  color: white !important;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(37,99,235,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-link:hover,
.book-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(37,99,235,.28);
}
.book-link:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
@media (max-width: 920px) { .book-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .book-link { transition: none; } }

/* Publications: living-books notice above the three book cards. */
.living-books-note {
  margin: 1.2rem 0 1.6rem;
  padding: 1.05rem 1.3rem;
  background: linear-gradient(110deg, rgba(239, 246, 255, .96), rgba(240, 253, 250, .92));
  border: 1px solid rgba(37, 99, 235, .18);
  border-left: 4px solid var(--rf-teal);
  border-radius: 12px;
  color: var(--rf-muted);
  line-height: 1.6;
}
.living-books-note p { margin: 0; }
.living-books-note strong { color: var(--rf-navy); }
