/* ==========================================================================
   Main Stylesheet — kenwilliford.net
   Deep-zoom microscopy homepage · Typography inspired by Science, Vol. I, 1880
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Serif 4', 'Georgia', serif;
  color: #f5f0e8;
  background: #1e1914;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  line-height: 1.6;
}

a {
  color: #c8a87c;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: #dfc49e;
}

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

ul, ol {
  list-style: none;
}

/* ---------- OpenSeadragon Container (Layer 0) ---------- */
#osd-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  cursor: grab;
}

#osd-container:active {
  cursor: grabbing;
}

/* ==========================================================================
   HERO — Centered title plate over deep-zoom background
   Inspired by the masthead of Science, Vol. I—No. 1, July 3, 1880
   ========================================================================== */

#hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#hero.dimmed {
  opacity: 0;
}

@keyframes hero-peek {
  0%   { background: rgba(12, 10, 7, 0.82); }
  20%  { background: rgba(12, 10, 7, 0.55); }
  75%  { background: rgba(12, 10, 7, 0.55); }
  100% { background: rgba(12, 10, 7, 0.82); }
}

#hero-inner.peek {
  animation: hero-peek 3s ease-in-out;
}

/* Vignette overlay that briefly lightens edges */
#vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 1;
  transition: opacity 3s ease-in-out;
}

#vignette.lifted {
  opacity: 0;
}

#hero-inner {
  background: rgba(12, 10, 7, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 1.4rem 2.5rem;
  max-width: 780px;
  width: 90vw;
  border: 1px solid rgba(200, 168, 124, 0.18);
}

/* --- Decorative Rules (horizontal lines) --- */
.hero-rule {
  border: none;
  border-top: 1px solid rgba(200, 168, 124, 0.4);
  margin: 1rem auto;
  width: 100%;

}

.hero-rule.double {
  border-top: 1px solid rgba(200, 168, 124, 0.5);
  border-bottom: 1px solid rgba(200, 168, 124, 0.5);
  height: 4px;
  margin: 0.6rem auto;
}

/* --- Site Name — large tracked uppercase sans-serif (1880 Science masthead style) --- */
.site-name {
  font-family: 'IM Fell DW Pica', 'Georgia', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #f5f0e8;
  margin: 0.6rem 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* --- Subtitle — small caps, tracked --- */
.site-subtitle {
  margin: 0.6rem 0;
}

.subtitle-role {
  display: block;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-variant: small-caps;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  letter-spacing: 0.14em;
  color: rgba(245, 240, 232, 0.85);
  margin-bottom: 0.15em;

}

.site-subtitle a {
  display: block;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-variant: small-caps;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  letter-spacing: 0.1em;
  color: rgba(245, 240, 232, 0.65);
  pointer-events: auto;

}

.site-subtitle a:hover {
  color: #dfc49e;
}

/* --- Navigation — small caps with middot separators --- */
#main-nav {
  pointer-events: auto;
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.4rem;
}

#main-nav a {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-variant: small-caps;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #f5f0e8;
  padding: 0.5em 0.4em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;

}

#main-nav a:hover,
#main-nav a:focus {
  color: #c8a87c;
}

#main-nav a.active {
  color: #c8a87c;
}

.nav-sep {
  color: rgba(200, 168, 124, 0.5);
  font-size: 1.1rem;
  padding: 0 0.15em;
  user-select: none;
}

/* ==========================================================================
   SCALE BAR & COORDINATES (Layer 2)
   ========================================================================== */

#scale-bar {
  position: fixed;
  bottom: 1.2rem;
  left: 1.5rem;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  opacity: 0;
  transition: opacity 1.5s ease;
}

#scale-bar.visible {
  opacity: 1;
}

.scale-bar-inner {
  height: 2px;
  background: rgba(245, 240, 232, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  min-width: 40px;
  transition: width 0.3s ease;
}

.scale-bar-label {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.05em;
}

#coordinates {
  position: fixed;
  bottom: 1.2rem;
  right: 1.5rem;
  z-index: 15;
  pointer-events: none;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.65);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.03em;
}

/* ==========================================================================
   CONTENT OVERLAY PANEL (Layer 3)
   Slides in from right. Includes its own navigation header so that menu
   is always accessible — fixes the issue of the panel obscuring the hero nav.
   ========================================================================== */

#content-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: min(720px, 90vw);
  height: 100vh;
  z-index: 20;
  background: rgba(30, 25, 20, 0.92);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-left: 1px solid rgba(200, 168, 124, 0.15);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 168, 124, 0.25) transparent;
}

#content-overlay.active {
  transform: translateX(0);
}

/* --- Overlay Header — sticky nav + close button --- */
#overlay-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(20, 16, 12, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(200, 168, 124, 0.15);
  min-height: 48px;
}

#overlay-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

#overlay-nav a {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-variant: small-caps;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 232, 0.55);
  padding: 0.7em 0.4em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

#overlay-nav a:hover,
#overlay-nav a:focus {
  color: #f5f0e8;
}

#overlay-nav a.active {
  color: #f5f0e8;
}

#overlay-nav .nav-sep {
  color: rgba(200, 168, 124, 0.3);
  font-size: 0.9rem;
  padding: 0 0.1em;
}

/* --- Close Button --- */
#overlay-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(245, 240, 232, 0.5);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
}

#overlay-close:hover,
#overlay-close:focus {
  color: #f5f0e8;
}

/* --- Overlay Content --- */
#overlay-content {
  padding: 1.5rem 2.5rem 3rem;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.section {
  display: none;
}

.section h2 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f5f0e8;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(200, 168, 124, 0.2);
}

.section h3 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: #f5f0e8;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.section p {
  color: rgba(245, 240, 232, 0.85);
  line-height: 1.7;
  margin-bottom: 1em;
}

/* ---------- About Section ---------- */
.about-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid rgba(200, 168, 124, 0.3);
  flex-shrink: 0;
}

.about-intro h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.3rem;
  text-transform: none;
  letter-spacing: 0.03em;
}

.affiliation {
  font-size: 0.95rem;
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 0;
}

.affiliation a {
  color: rgba(245, 240, 232, 0.7);
}

.affiliation a:hover {
  color: #dfc49e;
}

.about-bio {
  margin-bottom: 1rem;
}

.about-bio a {
  color: #c8a87c;
}

/* ---------- CV List ---------- */
.cv-list {
  margin-bottom: 1rem;
}

.cv-list li {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.06);
}

.cv-list li:last-child {
  border-bottom: none;
}

.cv-year {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: rgba(245, 240, 232, 0.4);
  min-width: 5.5em;
  flex-shrink: 0;
  padding-top: 0.15em;
}

.cv-detail {
  flex: 1;
}

.cv-detail strong {
  color: #f5f0e8;
  font-size: 0.95rem;
}

.cv-institution {
  display: block;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.55);
}

.cv-note {
  display: block;
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.45);
  margin-top: 0.15em;
}

.cv-download {
  margin-top: 1.5rem;
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6em 1.2em;
  border: 1px solid rgba(200, 168, 124, 0.4);
  color: #c8a87c;
  font-family: 'Cormorant Garamond', serif;
  font-variant: small-caps;
  font-size: 1rem;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}

.cv-link:hover {
  background: rgba(200, 168, 124, 0.1);
  border-color: rgba(200, 168, 124, 0.6);
  color: #dfc49e;
}

/* ---------- Publications ---------- */
.pub-loading,
.pub-error {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(245, 240, 232, 0.5);
  font-style: italic;
}

.pub-year {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #c8a87c;
  letter-spacing: 0.04em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(200, 168, 124, 0.12);
}

.pub-list {
  margin-bottom: 0.5rem;
}

.pub-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.06);
  position: relative;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-abbr {
  display: inline-block;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: #c8a87c;
  background: rgba(200, 168, 124, 0.1);
  border: 1px solid rgba(200, 168, 124, 0.2);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  margin-right: 0.5em;
  vertical-align: middle;
}

.pub-star {
  color: #c8a87c;
  font-size: 0.85rem;
  margin-right: 0.3em;
  vertical-align: middle;
}

a.pub-title {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #f5f0e8;
  line-height: 1.4;
  display: block;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

a.pub-title:hover {
  color: #dfc49e;
}

span.pub-title {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #f5f0e8;
  line-height: 1.4;
  display: block;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.55);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.pub-authors strong {
  color: #f5f0e8;
  font-weight: 600;
}

.pub-venue {
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.5);
  margin-bottom: 0.4rem;
}

.pub-note {
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(200, 168, 124, 0.6);
  margin-bottom: 0.3rem;
}

.pub-links {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.3rem;
}

.pub-links a {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c8a87c;
  padding: 0.15em 0.45em;
  border: 1px solid rgba(200, 168, 124, 0.25);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.pub-links a:hover {
  color: #f5f0e8;
  border-color: rgba(200, 168, 124, 0.5);
  background: rgba(200, 168, 124, 0.1);
}

/* ---------- Contact Section ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  background: rgba(245, 240, 232, 0.04);
  border-radius: 6px;
  transition: background 0.2s ease;
  min-height: 44px;
}

.contact-list li:hover {
  background: rgba(245, 240, 232, 0.07);
}

.contact-label {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(245, 240, 232, 0.45);
  min-width: 7em;
  flex-shrink: 0;
}

.contact-list li a {
  color: #c8a87c;
  font-size: 0.95rem;
}

/* ---------- Projects ---------- */
.project-card {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(245, 240, 232, 0.04);
  border: 1px solid rgba(200, 168, 124, 0.12);
  border-radius: 4px;
}

.project-card h3 {
  margin-top: 0;
}

.project-links {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.project-links a {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c8a87c;
  padding: 0.2em 0.55em;
  border: 1px solid rgba(200, 168, 124, 0.25);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.project-links a:hover {
  color: #f5f0e8;
  border-color: rgba(200, 168, 124, 0.5);
  background: rgba(200, 168, 124, 0.1);
}

/* ---------- Loading ---------- */
.loading {
  text-align: center;
  color: rgba(245, 240, 232, 0.5);
  font-style: italic;
  padding: 2rem;
}

/* ---------- Overlay Scrollbar (Webkit) ---------- */
#content-overlay::-webkit-scrollbar {
  width: 6px;
}

#content-overlay::-webkit-scrollbar-track {
  background: transparent;
}

#content-overlay::-webkit-scrollbar-thumb {
  background: rgba(200, 168, 124, 0.25);
  border-radius: 3px;
}

#content-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 168, 124, 0.4);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* --- Tablets --- */
@media (max-width: 900px) {
  #content-overlay {
    width: min(720px, 95vw);
  }

  #overlay-content {
    padding: 1rem 2rem 2.5rem;
  }

  .about-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- Mobile --- */
@media (max-width: 600px) {
  #hero-inner {
    padding: 1.5rem 1.8rem;
    width: 95vw;
  }

  .site-name {
    font-size: 1.5rem;
    letter-spacing: 0.15em;
  }

  .subtitle-role {
    font-size: 0.8rem;
  }

  .site-subtitle a {
    font-size: 0.75rem;
  }

  #main-nav a {
    font-size: 0.85rem;
    padding: 0.5em 0.3em;
  }

  .nav-sep {
    font-size: 0.9rem;
    padding: 0 0.05em;
  }

  #content-overlay {
    width: 100vw;
    border-left: none;
  }

  #overlay-header {
    padding: 0 0.75rem;
  }

  #overlay-nav a {
    font-size: 0.78rem;
    padding: 0.6em 0.25em;
  }

  #overlay-content {
    padding: 0.75rem 1.25rem 2rem;
  }

  .section h2 {
    font-size: 1.3rem;
  }

  .about-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 110px;
    height: 110px;
  }

  .cv-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .cv-year {
    min-width: auto;
  }

  .pub-links a {
    font-size: 0.65rem;
    padding: 0.15em 0.35em;
  }

  #scale-bar {
    left: 0.75rem;
    bottom: 0.75rem;
  }

  #coordinates {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .contact-list li {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .contact-label {
    min-width: auto;
    width: 100%;
  }
}

/* ---------- Print ---------- */
@media print {
  #osd-container,
  #scale-bar,
  #coordinates,
  #overlay-close,
  #overlay-header,
  #main-nav,
  #hero {
    display: none;
  }

  body {
    background: #fff;
    color: #1e1914;
    overflow: visible;
    height: auto;
  }

  #content-overlay {
    position: static;
    width: 100%;
    transform: none;
    background: #fff;
    backdrop-filter: none;
    border: none;
    overflow: visible;
  }

  .section {
    display: block;
  }

  .section h2 {
    color: #1e1914;
    border-bottom-color: #ccc;
  }

  a {
    color: #1e1914;
    text-decoration: underline;
  }
}

/* ---------- Accessibility — Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #content-overlay {
    transition: none;
  }

  #hero {
    transition: none;
  }
}

/* ---------- Focus Styles ---------- */
:focus-visible {
  outline: 2px solid #c8a87c;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   BFF EASTER EGG
   ========================================================================== */

/* --- Trigger: faint [->+<] near coordinates --- */
#bff-trigger {
  position: fixed;
  bottom: 1.2rem;
  right: 1.5rem;
  z-index: 15;
  transform: translateY(-1.4rem);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.65rem;
  color: rgba(245, 240, 232, 0.25);
  letter-spacing: 0.03em;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: color 0.3s ease;
}

#bff-trigger:hover {
  color: rgba(245, 240, 232, 0.6);
}

/* --- Overlay: fullscreen dark backdrop with centered video --- */
#bff-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#bff-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Video container --- */
.bff-video-container {
  max-width: 960px;
  width: 90vw;
}

.bff-video {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(200, 168, 124, 0.2);
  border-radius: 2px;
  background: #000;
}

/* --- Label: top-left --- */
.bff-label {
  position: fixed;
  top: 1.5rem;
  left: 2rem;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.7);
  letter-spacing: 0.04em;
}

/* --- Citation: bottom-right --- */
.bff-citation {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  max-width: 560px;
  text-align: right;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.5);
  line-height: 1.5;
}

.bff-citation-links {
  display: flex;
  gap: 0.5em;
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.bff-citation-links a {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c8a87c;
  padding: 0.15em 0.45em;
  border: 1px solid rgba(200, 168, 124, 0.25);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.bff-citation-links a:hover {
  color: #f5f0e8;
  border-color: rgba(200, 168, 124, 0.5);
  background: rgba(200, 168, 124, 0.1);
}

/* --- BFF Responsive --- */
@media (max-width: 600px) {
  #bff-trigger {
    right: 0.75rem;
    bottom: 0.75rem;
    transform: translateY(-1.2rem);
  }

  .bff-label {
    top: 1rem;
    left: 1rem;
    font-size: 0.95rem;
  }

  .bff-citation {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    font-size: 0.7rem;
    text-align: center;
  }

  .bff-citation-links {
    justify-content: center;
  }

  .bff-video-container {
    width: 95vw;
  }
}

/* --- BFF Print / Reduced Motion --- */
@media print {
  #bff-trigger,
  #bff-overlay {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bff-overlay {
    transition: none;
  }

  #bff-trigger {
    transition: none;
  }
}
