:root {
  /* Blue: header + hover/deep + soft fade of the same hue */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-deep: #1e40af;
  /* 10% #2563eb + 90% white — true tint of the header blue */
  --primary-soft: #e9effd;
  --primary-rgb: 37, 99, 235;

  /* Ink */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;

  /* Surfaces / gray */
  --background-primary: #ffffff;
  --background-secondary: #f8f9fa;
  --background-accent: #e9ecef;
  --border-color: #e2e8f0;

  /* Type */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2rem;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --samples-block-gap: 2.75rem;
  --danger-color: #ef4444;
  --danger-soft: #fef2f2;
  --success-color: #10b981;
  --surface-dark: #0f172a;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s ease;
  --page-frame-max: 1320px;
  --page-frame-pad: 20px;
  --page-canvas: var(--background-secondary);
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--font-size-base);
  background: var(--page-canvas);
  padding: var(--page-frame-pad);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Content frame */
.page-frame {
  width: min(92%, var(--page-frame-max));
  margin: 0 auto;
  background: var(--background-primary);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-frame > main > :first-child {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.page-frame > .footer {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  .page-frame {
    width: 100%;
    border-radius: 12px;
  }

  .page-frame > main > :first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  .page-frame > .footer {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
}


/* Modern Button Styles */
.button {
  border-radius: var(--border-radius) !important;
  font-weight: var(--font-weight-semibold) !important;
  transition: var(--transition) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.button.is-dark {
  background: var(--text-primary) !important;
  border: none !important;
  color: var(--background-primary) !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-color) !important;
}

.button.is-dark:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.footer .icon-link {
    font-size: 25px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer .icon-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.link-block a {
    margin: 8px 4px;
}

.dnerf {
  font-variant: small-caps;
}


/* Hero Section Modernization */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--background-primary);
}

.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.hero-body {
  padding: 3rem 1rem 1.5rem;
}

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.teaser {
  font-family: 'Inter', sans-serif;
}

/* Cross-page / in-page sub-navigation — frosted glass */
.page-subnav {
  background: rgba(248, 249, 250, 0.48);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-bottom: 1px solid rgba(226, 232, 240, 0.55);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 30;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-subnav {
    background: rgba(248, 249, 250, 0.9);
  }
}

.page-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.85rem;
  justify-content: center;
  align-items: stretch;
}

.page-subnav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.28rem;
  color: var(--text-primary);
  background: var(--background-primary);
  text-decoration: none;
  padding: 0.6rem 1.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
  flex: 0 1 auto;
  min-width: 10.5rem;
  width: max-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.page-subnav-label {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  line-height: 1.25;
  white-space: nowrap;
}

.page-subnav-desc {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-light);
  line-height: 1.35;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.page-subnav-link:hover {
  color: var(--primary-color);
  background: var(--primary-soft);
  border-color: rgba(var(--primary-rgb), 0.28);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.12);
}

.page-subnav-link:hover .page-subnav-desc {
  color: var(--text-secondary);
}

.page-subnav-link.is-active {
  color: var(--background-primary);
  background: var(--primary-color);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.28);
  transform: none;
}

.page-subnav-link.is-active .page-subnav-desc {
  color: rgba(255, 255, 255, 0.85);
}

.page-subnav-link.is-active:hover {
  color: var(--background-primary);
  background: var(--primary-hover);
  border-color: transparent;
  transform: none;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.32);
}

.page-subnav-link.is-active:hover .page-subnav-desc {
  color: rgba(255, 255, 255, 0.9);
}

.page-subnav-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media screen and (max-width: 768px) {
  .page-subnav {
    padding: 0.4rem 0;
  }

  .page-subnav .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .page-subnav-inner {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    overflow-x: visible;
    gap: 0.25rem;
    padding-bottom: 0;
  }

  .page-subnav-link {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex: 0 0 auto;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
  }

  .page-subnav-label {
    font-size: var(--font-size-base);
    white-space: nowrap;
  }

  .page-subnav-desc {
    display: none;
  }
}

.materials-page-lead .subtitle {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Audio samples: one shared vertical rhythm (no stacked section paddings) */
.section.samples-section {
  padding: 0;
  scroll-margin-top: 5.5rem;
}

@media screen and (max-width: 768px) {
  .section.samples-section {
    scroll-margin-top: 9.5rem;
  }
}

/* First major block: a bit more air under the sticky nav */
.page-subnav + .section.samples-section {
  padding-top: 2rem;
}

.section.samples-section:last-of-type {
  padding-bottom: 1rem;
}

.section.samples-section > .container > .sample-container:last-child {
  margin-bottom: 0;
}

.sample-container {
  margin-bottom: 1.5rem;
  background: var(--background-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  /* visible so table headers can stick to the viewport while scrolling the page */
  overflow: visible;
}

/* Same gap before every following sample title (Prompt / Cloning / Style / Extra / DSP) */
.sample-container + .section-header,
.section.samples-section + .section.samples-section > .container > .section-header:first-child {
  margin-top: var(--samples-block-gap);
}

.voice-editing-section-header {
  margin-top: var(--samples-block-gap);
}

.clone-edit-layout {
  display: flex;
  flex-direction: column;
}

.clone-edit-layout .voice-editing-section-header {
  order: 0;
  margin-top: var(--samples-block-gap);
}

.clone-edit-layout .voice-editing-style-samples {
  order: 1;
}

.clone-edit-layout .clone-section-block {
  order: 2;
  margin-top: var(--samples-block-gap);
}

.clone-edit-layout .extra-editing-block {
  order: 3;
  margin-top: var(--samples-block-gap);
}

.sample-table {
  width: 100%;
  /* separate keeps header/body grid lines aligned with sticky thead */
  border-collapse: separate;
  border-spacing: 0;
  background: var(--background-primary);
  border-radius: 8px;
  overflow: visible;
  table-layout: fixed;
}

.sample-table th,
.sample-table td {
  border: 0;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.sample-table th:first-child,
.sample-table td:first-child {
  border-left: 1px solid var(--border-color);
}

.sample-table thead th {
  border-top: 1px solid var(--border-color);
}

.sample-table th {
  background: var(--background-primary);
  color: var(--text-primary);
  padding: 1rem;
  text-align: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  white-space: nowrap;
}

/* Sticky headers below the page subnav (desktop / tablet tables) */
@media screen and (min-width: 769px) {
  .sample-table thead th {
    position: sticky;
    top: var(--page-subnav-height, 4.75rem);
    z-index: 5;
    /* Match page-subnav frost: soft gray wash + blur */
    background: rgba(248, 249, 250, 0.72);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    background-clip: padding-box;
    box-shadow: none;
  }

  .sample-table thead th:first-child {
    z-index: 6;
    /* Keep brand blue solid — no frost */
    background: var(--primary-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  /* Baseline columns (ElevenLabs, Qwen3-TTS, etc.) */
  .sample-table thead th.ttv-base {
    background: rgba(248, 249, 250, 0.72);
    box-shadow: none;
  }

  .sample-table.data-aug-table thead th:first-child {
    background: rgba(248, 249, 250, 0.72);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    color: var(--text-primary);
    box-shadow: none;
  }

  .sample-table.data-aug-table thead th.col-accent {
    background: var(--primary-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--background-primary);
    box-shadow: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media screen and (min-width: 769px) {
    .sample-table thead th,
    .sample-table.data-aug-table thead th:first-child {
      background: rgba(248, 249, 250, 0.94);
    }

    .sample-table thead th:first-child,
    .sample-table.data-aug-table thead th.col-accent {
      background: var(--primary-color);
    }
  }
}

.sample-table td {
  padding: 0.5rem;
  text-align: center;
  vertical-align: middle;
}

.sample-table th:first-child {
  width: 28%;
  text-align: center;
  background: var(--primary-color);
  color: var(--background-primary);
  line-height: 1.6;
}

.sample-table td:first-child {
  width: 28%;
  text-align: center;
  background: var(--background-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

.sample-table td:not(:first-child),
.sample-table th:not(:first-child) {
  text-align: center;
}

.sample-table .ttv-base {
  background: repeating-linear-gradient(
    135deg,
    var(--background-primary),
    var(--background-primary) 5px,
    var(--background-secondary) 5px,
    var(--background-secondary) 10px
  );
}

.sample-table th.ours-col {
  color: var(--primary-color);
}

.sample-table th.ours-col .ours-col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.35em;
  color: var(--primary-color);
  font-size: 0.78em;
  vertical-align: 0.05em;
}

/* Expand / collapse extra sample rows (mobile only; desktop shows all) */
.sample-table tbody tr.is-row-hidden {
  display: none !important;
}

.sample-table tbody tr[hidden] {
  display: none !important;
}

.sample-expand {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}

@media screen and (min-width: 769px) {
  .sample-table tbody tr.is-row-hidden {
    display: table-row !important;
  }

  .sample-expand {
    display: none !important;
  }
}

.sample-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  border-radius: 999px;
  background: var(--background-primary);
  color: var(--primary-deep);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sample-expand-btn:hover {
  background: var(--primary-soft);
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.12);
}

.sample-expand-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sample-expand-btn .sample-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  font-size: 0.95em;
  transition: transform 0.2s ease;
}

.sample-expand-btn.is-expanded .sample-expand-icon {
  transform: rotate(45deg);
}

/* Divider between TL;DR and full demos — quiet section break */
.demo-divider {
  padding: 2.25rem 0 1rem;
  background: var(--background-primary);
  border-top: 1px solid var(--border-color);
  position: relative;
}

.demo-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  background-image: radial-gradient(circle at center, var(--text-light) 0 0.24rem, transparent 0.26rem);
}

.demo-divider-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  max-width: 40rem;
  margin: 0 auto;
  padding-top: 0.55rem;
}

.demo-divider-kicker {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-light);
}

.demo-divider-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  line-height: 1.35;
}

.instruction-text {
  font-style: normal;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}

/* Prompt tables: header centered, long prompt text left-aligned */
.sample-table.has-prompt-col th:first-child {
  text-align: center !important;
}

.sample-table.has-prompt-col td:first-child,
.sample-table.has-prompt-col td.instruction-text {
  text-align: left !important;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

/* Edit tables: shared spacing; width differs by section */
.sample-table.has-ref-edit-col th:first-child {
  white-space: nowrap;
}

.sample-table.has-ref-edit-col td.instruction-text {
  padding: 0.95rem 0.85rem;
  vertical-align: middle;
}

.edit-ref-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.edit-ref-cell .vd-player,
.edit-ref-cell audio {
  margin: 0;
}

.edit-instruction {
  margin: 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: var(--font-size-base);
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Voice Style Editing: narrower col, keep instruction on one line (desktop) */
.sample-table.edit-style-table th:first-child,
.sample-table.edit-style-table td:first-child {
  width: 30%;
  min-width: 14rem;
}

/* Extra Voice Editing: a bit narrower; soft wrap on desktop */
.sample-table.edit-extra-table th:first-child,
.sample-table.edit-extra-table td:first-child {
  width: 28%;
  min-width: 12.5rem;
}

@media screen and (min-width: 769px) {
  .sample-table.edit-style-table .edit-instruction {
    white-space: nowrap;
  }

  .sample-table.edit-extra-table .edit-instruction {
    white-space: nowrap;
  }
}

.sample-table audio {
  display: block;
  width: 160px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Custom compact audio player — flatter gray, closer to native chrome */
.vd-player {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  padding: 0.2rem 0.5rem 0.2rem 0.25rem;
  vertical-align: middle;
  overflow: visible;
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 999px;
  box-shadow: none;
}

.sample-table .vd-player {
  display: flex;
  width: min(100%, 160px);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.sample-table td .vd-player {
  position: relative;
  z-index: 1;
}

.vd-player.is-playing {
  background: #e8eaed;
  border-color: #c5c8ce;
}

.vd-player-toggle {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #5f6368;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vd-player-toggle:hover {
  background: #3c4043;
}

.vd-player-toggle:active {
  transform: scale(0.96);
}

.vd-player-toggle:focus-visible {
  outline: 2px solid #80868b;
  outline-offset: 2px;
}

.vd-player-toggle-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
}

.vd-player.is-playing .vd-player-toggle-icon {
  width: 8px;
  height: 10px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(#fff, #fff) 0 0 / 2.5px 100% no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 2.5px 100% no-repeat;
}

.vd-player.is-loading .vd-player-toggle {
  background: #80868b;
}

.vd-player.is-loading .vd-player-toggle-icon {
  width: 12px;
  height: 12px;
  margin-left: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  background: none;
  animation: vd-player-spin 0.7s linear infinite;
}

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

.vd-player-seek {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  accent-color: #80868b;
}

.vd-player-seek:focus {
  outline: none;
}

.vd-player-seek:focus-visible {
  outline: 2px solid #bdc1c6;
  outline-offset: 2px;
  border-radius: 999px;
}

.vd-player-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #80868b 0% var(--vd-seek, 0%),
    #dadce0 var(--vd-seek, 0%) 100%
  );
}

.vd-player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border-radius: 50%;
  border: 1px solid #dadce0;
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.25);
}

.vd-player-seek::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: #dadce0;
}

.vd-player-seek::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: #80868b;
}

.vd-player-seek::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid #dadce0;
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.25);
}

.vd-player audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sample-table tbody tr:hover {
  background: var(--background-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 0.85rem;
}

/* Main title (h2) + subsection (h3): avoid a tall gap between the two blocks */
.section-header:has(+ .section-header) {
  margin-bottom: 0.45rem;
}

.section-header:has(+ .section-header) > h2.title {
  margin-bottom: 0.2rem;
}

.section-header h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-header h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  line-height: 1.55;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.section-header .section-lead {
  display: block;
  width: fit-content;
  max-width: min(68rem, 98%);
  margin: 0.45rem auto 0.55rem;
  padding: 0.9rem 1.75rem;
  text-align: center;
  background: var(--background-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  line-height: 1.55;
  box-shadow: none;
  box-sizing: border-box;
}

.section-header .section-lead strong {
  color: var(--primary-deep);
  font-weight: var(--font-weight-bold);
}

.section-header .section-note {
  display: block;
  max-width: min(58rem, 94%);
  margin: 0.4rem auto 0;
  padding: 0 0.5rem;
  text-align: center;
  font-size: var(--font-size-sm);
  font-style: normal;
  line-height: 1.45;
  color: var(--text-light);
  background: none;
  border: none;
  border-radius: 0;
  text-wrap: pretty;
}

.section-header .section-note + .section-note {
  margin-top: 0.2rem;
}

.section-header .section-note strong {
  color: var(--text-light);
  font-weight: var(--font-weight-semibold);
}

.section-header .section-note .note-label {
  color: var(--text-light);
  font-weight: var(--font-weight-semibold);
  margin-right: 0.2em;
}

.section-header-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-color) 12%,
    var(--border-color) 88%,
    transparent
  );
  margin: 0.75rem auto 1rem;
  max-width: 28rem;
}

/* DSP table: equal columns; only FX header is blue */
.sample-table.data-aug-table {
  table-layout: fixed;
}

.sample-table.data-aug-table th,
.sample-table.data-aug-table td {
  width: 33.333%;
  text-align: center;
  vertical-align: middle;
}

.sample-table.data-aug-table th {
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
  background: var(--background-primary);
  color: var(--text-primary);
}

.sample-table.data-aug-table td {
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  background: var(--background-primary);
}

.sample-table.data-aug-table th:first-child,
.sample-table.data-aug-table td:first-child {
  width: 33.333%;
}

.sample-table.data-aug-table th:first-child {
  background: var(--background-primary);
  color: var(--text-primary);
}

.sample-table.data-aug-table td:first-child {
  background: var(--background-primary);
  color: var(--text-primary);
}

.sample-table.data-aug-table th.col-accent {
  background: var(--primary-color);
  color: var(--background-primary);
}

.sample-table.data-aug-table td.col-accent {
  background: var(--background-secondary);
}

.sample-table.data-aug-table .vd-player {
  display: flex;
  width: min(100%, 160px);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.sample-table.data-aug-table audio {
  display: block;
  width: 160px;
  max-width: 100%;
  margin: 0 auto;
}

/* DSP FX chain label — neutral, clickable */
.sample-table .data-aug-fx-subtitle {
  font-family: inherit;
  font-size: var(--font-size-base);
  font-style: normal;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  text-underline-offset: 0.22em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  max-width: 100%;
  line-height: 1.4;
  text-align: center;
  transition: color 0.15s ease, background 0.15s ease, text-decoration-color 0.15s ease;
}

.sample-table .data-aug-fx-subtitle:hover {
  color: var(--text-primary);
  background: var(--background-accent);
  text-decoration-color: var(--text-light);
}

.sample-table .data-aug-fx-subtitle:focus {
  outline: 2px solid var(--border-color);
  outline-offset: 2px;
}

.sample-table .data-aug-fx-subtitle:focus:not(:focus-visible) {
  outline: none;
}

/* FX Chain modal: pipeline viz + JSON */
#dataAugFxModalErr.is-hidden {
  display: none !important;
}

#dataAugFxModal .data-aug-modal-json-content {
  max-width: min(96vw, 52rem);
  width: 100%;
  background: var(--background-primary);
  border-radius: 12px;
  padding: 1.35rem 1.4rem 1.25rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.fx-viz {
  margin: 0 0 0.85rem;
}

.fx-viz.is-empty {
  display: none;
}

.fx-viz-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.fx-viz-io {
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--background-secondary);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  font-family: ui-monospace, Monaco, Consolas, "Liberation Mono", monospace;
}

.fx-viz-label {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.fx-viz-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.55rem 0.35rem;
  width: 100%;
}

.fx-viz-pipe {
  display: inline-flex;
  align-items: center;
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: var(--font-weight-medium);
  padding: 0 0.15rem;
  user-select: none;
}

.fx-viz-channel {
  flex: 1 1 8.5rem;
  max-width: 14rem;
  min-width: 7.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--background-secondary);
  text-align: left;
}

.fx-viz-channel.is-muted {
  opacity: 0.4;
}

.fx-viz-channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.fx-viz-ch {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  font-family: ui-monospace, Monaco, Consolas, "Liberation Mono", monospace;
}

.fx-viz-weight {
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.fx-viz-nodes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fx-viz-node {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
}

.fx-viz-node-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: 1.25;
}

.fx-viz-node-params {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.35;
  word-break: break-word;
}

.fx-viz-node-arrow {
  display: none;
}

.fx-viz-merge {
  min-width: 10rem;
  max-width: 18rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--background-primary);
  box-sizing: border-box;
}

.fx-viz-merge .fx-viz-nodes {
  align-items: stretch;
}

.fx-viz-merge-empty {
  min-height: 1.5rem;
}

.fx-viz-empty-nodes {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-style: italic;
}

.fx-viz-json-details {
  margin: 0;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
}

.fx-viz-json-details summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  user-select: none;
  list-style: none;
}

.fx-viz-json-details summary::-webkit-details-marker {
  display: none;
}

.fx-viz-json-details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.35em;
  color: var(--text-light);
  transition: transform 0.15s ease;
}

.fx-viz-json-details[open] summary::before {
  transform: rotate(90deg);
}

.fx-viz-json-details .data-aug-json-view {
  margin-top: 0.55rem;
}

.data-aug-json-view {
  margin: 0;
  padding: 1rem;
  background: var(--surface-dark);
  color: var(--border-color);
  border-radius: 8px;
  max-height: min(40vh, 22rem);
  overflow: auto;
  font-size: var(--font-size-sm);
  line-height: 1.45;
  font-family: ui-monospace, Monaco, Consolas, "Liberation Mono", monospace;
}

.data-aug-json-view code {
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  white-space: pre;
  word-break: normal;
}

/* 3D RoPE visualization */
.rope-viz-wrap {
  overflow: hidden;
  padding: 1rem;
}

.rope-viz {
  display: block;
}

.rope-viz-stage {
  position: relative;
  min-width: 0;
  max-width: 40rem;
  margin: 0 auto;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.rope-viz-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 22rem);
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(120% 90% at 50% 20%, rgba(248, 249, 250, 0.95) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.rope-viz-stage canvas.is-dragging {
  cursor: grabbing;
}

.rope-viz-hint {
  position: absolute;
  left: 0.7rem;
  bottom: 0.55rem;
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--text-light);
  pointer-events: none;
}

@media screen and (max-width: 768px) {
  #dataAugFxModal .data-aug-modal-json-content {
    margin: 0 0.75rem;
    padding: 1.1rem 1rem 1rem;
  }

  .fx-viz-channels {
    flex-direction: column;
    align-items: stretch;
  }

  .fx-viz-pipe {
    display: none;
  }

  .fx-viz-channel {
    max-width: none;
    flex: 1 1 auto;
  }
}


/* Publication Content Styling */
.publication-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: var(--font-weight-bold) !important;
    color: var(--text-primary) !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.28 !important;
    letter-spacing: -0.01em !important;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.publication-internship-note {
    margin: 0.15rem auto 0.35rem;
    max-width: 36rem;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-light);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

h1.publication-title {
    font-size: clamp(1.45rem, 2.8vw, 2.15rem) !important;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
}

.publication-title-line {
    display: block;
}

.publication-banner {
  max-height: 70vh;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
}

.publication-header .hero-body {
  padding: 6rem 1.5rem 4rem;
}

.publication-authors {
    font-family: 'Inter', sans-serif !important;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.publication-authors:not(.publication-affiliations) {
    white-space: normal;
}

.publication-authors .author-line {
    display: block;
}

.publication-authors .author-line-senior {
    margin-top: 0.15rem;
}

.publication-affiliations {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: var(--font-size-lg) !important;
}

.publication-affiliations .author-block {
    margin-right: 1rem;
}

.publication-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.publication-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    padding: 0.75rem 1.5rem;
    background: var(--surface-dark);
    color: var(--background-primary) !important;
    text-decoration: none !important;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    line-height: 1;
    border: none;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.publication-link-btn i {
    font-size: 1.05em;
    line-height: 1;
}

.publication-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.32);
    background: #000000;
    color: var(--background-primary) !important;
    filter: none;
}

.publication-venue {
    color: var(--text-secondary);
    width: fit-content;
    font-weight: var(--font-weight-semibold);
    background: var(--background-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: inline-block;
}

.publication-awards {
    color: var(--danger-color);
    width: fit-content;
    font-weight: var(--font-weight-bold);
    background: var(--danger-soft);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
    margin-top: 1rem;
}

.publication-authors a {
   color: var(--text-primary) !important;
   text-decoration: none;
   font-weight: var(--font-weight-medium);
   transition: color 0.15s ease;
   position: relative;
}

.publication-authors a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--primary-color);
    transition: width 0.15s ease;
}

.publication-authors a:hover::after {
    width: 100%;
}

.publication-authors a:hover {
    color: var(--primary-color) !important;
}

.author-block {
  display: inline-block;
  margin-right: 0.5rem;
}

.publication-banner img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.publication-banner img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Modern Video and Carousel Styling */
.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.publication-video:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
}

.publication-body img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.publication-body img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.results-carousel {
  overflow: hidden;
  padding: 1rem 0;
}

.results-carousel .item {
  margin: 1rem;
  overflow: hidden;
  padding: 1.5rem;
  font-size: 0;
  background: var(--background-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.results-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.results-carousel .item img,
.results-carousel video {
  margin: 0;
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
}

.results-carousel .subtitle {
  font-size: var(--font-size-base) !important;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: var(--font-weight-medium);
}

/* Pagination and Misc Improvements */
.slider-pagination .slider-page {
  background: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

.slider-pagination .slider-page.is-active {
  background: var(--primary-hover);
  transform: scale(1.2);
}

.eql-cntrb { 
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-style: italic;
}

/* Section Titles */
.title.is-3 {
  font-family: 'Inter', sans-serif !important;
  font-weight: var(--font-weight-bold) !important;
  color: var(--text-primary);
  margin-bottom: 0.75rem !important;
  position: relative;
  padding-bottom: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}



.section-title-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-base);
  flex-shrink: 0;
  color: var(--primary-color);
  background: var(--primary-soft);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.12);
}

.section-title-icon i {
  line-height: 1;
}

.title.is-3::after {
  content: none;
}

/* Content Improvements */
.content.has-text-justified {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary);
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

/* Footer Improvements */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* BibTeX Styling */
pre {
  background: var(--background-accent) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: var(--font-size-base) !important;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

code {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
}

/* BibTeX Section Improvements */
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  background: var(--primary-color);
  color: var(--background-primary);
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: var(--success-color);
}

.copy-bibtex-btn.copied .copy-text::after {
  content: "ied!";
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--background-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}


/* More Works Dropdown */
.more-works-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.more-works-btn {
  background: var(--background-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.25rem;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.more-works-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.more-works-btn .dropdown-arrow {
  transition: var(--transition);
  font-size: var(--font-size-sm);
}

.more-works-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  max-height: 70vh;
  overflow-y: auto;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header h4 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--background-accent);
  color: var(--text-primary);
}

.works-list {
  padding: 1rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.work-item:hover {
  background: var(--background-accent);
  transform: translateX(4px);
}

.work-info h5 {
  margin: 0 0 0.5rem 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.work-info p {
  margin: 0 0 0.5rem 0;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.4;
}

.work-venue {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-style: italic;
}

.work-item .fas {
  color: var(--text-light);
  font-size: var(--font-size-base);
  margin-top: 0.2rem;
  flex-shrink: 0;
}


/* Mobile Responsive Improvements */
@media screen and (max-width: 768px) {
  .hero-body {
    padding: 2.5rem 1rem 1.5rem;
  }
  
  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }
  
  h1.publication-title {
    font-size: 1.5rem !important;
    line-height: 1.32 !important;
    margin-bottom: 1rem !important;
    max-width: 22.5rem;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
  }

  /* Let the two desktop lines flow as one title on phones */
  .publication-title-line {
    display: inline;
    white-space: normal;
  }

  .publication-title-line + .publication-title-line::before {
    content: ' ';
  }
  
  .publication-authors {
    font-size: var(--font-size-base) !important;
  }

  .publication-authors:not(.publication-affiliations) {
    white-space: normal;
  }

  .publication-affiliations {
    font-size: var(--font-size-base) !important;
  }
  
  .button {
    margin: 0.25rem !important;
    font-size: var(--font-size-sm) !important;
    padding: 0.75rem 1rem !important;
  }
  
  .more-works-container {
    bottom: 2rem;
    right: 1rem;
    top: auto;
  }
  
  .more-works-btn {
    padding: 0.6rem 1rem;
    font-size: var(--font-size-sm);
  }
  
  .more-works-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: calc(100% + 0.5rem);
    top: auto;
  }
  
  .results-carousel .item {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  .teaser .hero-body {
    padding: 1rem;
  }
  
  .content.has-text-justified {
    font-size: var(--font-size-base);
  }

  .section-header h2,
  .section-header h2.title.is-3,
  .samples-section .title.is-3 {
    font-size: 1.28rem !important;
    gap: 0.4rem;
    margin-bottom: 0.55rem !important;
    line-height: 1.3;
  }

  .tldr-header h2 {
    font-size: 1.35rem;
  }
}

@media screen and (min-width: 769px) {
  .publication-title-line {
    white-space: nowrap;
  }
}

@media screen and (max-width: 480px) {
  h1.publication-title {
    font-size: 1.38rem !important;
    max-width: 21rem;
  }

  .hero-body {
    padding: 2.25rem 0.75rem 1.25rem;
  }
  
  .more-works-container {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
  }
  
  .more-works-btn {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-xs);
  }
  
  .more-works-dropdown {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: calc(100vw - 2rem);
    max-width: 90vw;
  }
  
  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  .button {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet Responsive */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-body {
    padding: 3rem 2rem;
  }
  
  .publication-header .hero-body {
    padding: 4rem 2rem 3rem;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .section {
  animation: fadeInUp 0.6s ease-out;
}

/* Improved focus states for accessibility */
.button:focus,
.related-works-btn:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}


/* Print styles */
@media print {
  .more-works-container {
    display: none;
  }
  
  .hero, .section {
    animation: none;
  }
  
  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}

/* TLDR section (shared with index.html and materials.html) */
.tldr-section {
  padding: 1.25rem 0 1.25rem;
  background: var(--background-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tldr-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 44rem;
}

.tldr-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tldr-header h2::before,
.tldr-header h2::after {
  content: none;
}

.tldr-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  margin-top: 0.5rem;
  text-align: center;
  width: 100%;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Method overview plot between TL;DR and demo samples */
.method-overview-section {
  padding: 1.1rem 1rem 3.5rem;
  background: var(--background-primary);
  border-bottom: 1px solid var(--border-color);
}

.method-overview-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 40rem;
}

.method-overview-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.method-overview-lead {
  max-width: 42rem;
  margin: 1rem auto 0;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  text-align: center;
}

.method-overview-lead a {
  color: var(--primary-color);
  font-weight: var(--font-weight-semibold);
}

.method-overview-figure {
  position: relative;
  margin: 0 auto;
  max-width: 72rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.overview-scroll-shield {
  position: absolute;
  z-index: 2;
  inset: 44px 0 0;
  background: transparent;
}

.method-overview-figure .overview-static {
  display: none;
}

.overview-frame {
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: transparent;
}

.tldr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.75rem;
  max-width: 1040px;
  margin: 0 auto;
}

.tldr-card {
  background: var(--background-primary);
  border-radius: 16px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tldr-card[hidden] {
  display: none !important;
}

.tldr-card-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.tldr-card-body--vcenter {
  justify-content: center;
}

.tldr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tldr-card-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--background-accent);
}

.tldr-card-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}

.tldr-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.tldr-card.generation .tldr-card-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.tldr-card.cloning .tldr-card-icon {
  background: var(--primary-soft);
}

.tldr-card.editing .tldr-card-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.tldr-card.understanding .tldr-card-icon {
  background: var(--primary-soft);
}

.tldr-card-title-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
}

.tldr-card-title-link:hover {
  color: var(--primary-color);
}

.tldr-card-title-link:hover .tldr-link-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.tldr-link-arrow {
  font-size: var(--font-size-xs);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: var(--primary-color);
}

.tldr-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  text-align: left;
}

.tldr-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  text-align: left;
}

.tldr-instruction {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  font-style: normal;
  margin: 0 0 0.45rem;
  padding: 0.75rem;
  background: var(--background-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  line-height: 1.5;
  text-align: left;
}

.tldr-example-divider {
  display: block;
  width: 100%;
  height: 0;
  margin: 0.85rem 0 1rem;
  border: 0;
  border-top: 1px dashed var(--border-color);
}

/* prompt → label → player: tight; blocks separated more clearly */
.tldr-card > .tldr-audio-label,
.tldr-card-body > .tldr-audio-label {
  display: block;
  margin: 0 0 0.35rem;
}

.tldr-card > .vd-player,
.tldr-card-body > .vd-player {
  display: flex;
  width: min(100%, 280px);
  margin: 0 auto 1.15rem;
}

.tldr-card > .vd-player:last-child,
.tldr-card-body > .vd-player:last-child {
  margin-bottom: 0;
}

.tldr-audio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0 0 0.55rem;
}

.tldr-audio-item + .tldr-instruction {
  margin-top: 0.15rem;
}

.tldr-instruction + .tldr-audio-item {
  margin-top: 0;
}

.tldr-audio-item + .tldr-audio-item {
  margin-top: 0.35rem;
}

/* Character / persona phrase: ink weight + blue icon only */
.ttv-char-highlight {
  font-style: inherit;
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
  display: inline;
  line-height: 1.55;
}

.ttv-char-highlight .persona-icon {
  display: inline;
  width: auto;
  height: auto;
  margin-right: 0.28em;
  border-radius: 0;
  vertical-align: baseline;
  color: var(--primary-color);
  background: none;
  font-size: 1em;
  box-shadow: none;
}

.prompt-persona {
  text-align: left !important;
}

.tldr-audio-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
  align-items: center;
}

.tldr-card .vd-player {
  display: flex;
  width: min(100%, 280px);
  max-width: 100%;
}

.tldr-card audio {
  display: block;
  width: min(100%, 280px);
}

.tldr-audio-item .vd-player {
  display: flex;
  width: min(100%, 280px);
  margin: 0;
}

.tldr-audio-item audio {
  width: min(100%, 280px);
  margin: 0;
}

.tldr-audio-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  width: 100%;
}


.tldr-video-container {
  flex-grow: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-dark);
}

.tldr-video-container video {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (max-width: 768px) {
  .tldr-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 540px;
  }
}

.institution-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0 1rem;
  flex-wrap: wrap;
}

.institution-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.institution-logo-link:hover {
  opacity: 0.75;
}

.institution-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.institution-logo-fallback {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.institution-logo-divider {
  color: var(--border-color);
  font-size: var(--font-size-xl);
  font-weight: 300;
  line-height: 1;
}

@media screen and (max-width: 768px) {
  .tldr-section {
    padding: 1rem 1rem 2rem;
  }

  .tldr-header h2 {
    font-size: 1.28rem;
  }

  .tldr-card {
    padding: 1.25rem;
  }

  .method-overview-section {
    padding: 0.9rem 0.75rem 1.1rem;
  }

  .method-overview-header {
    margin-bottom: 0.55rem;
  }

  .method-overview-header h2 {
    font-size: 1.28rem;
  }

  .method-overview-figure {
    padding: 0.65rem 0.7rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
  }

  .overview-frame {
    display: none !important;
  }

  .overview-scroll-shield {
    display: none;
  }

  .method-overview-figure .overview-static {
    display: block;
    width: 100%;
    height: auto;
  }

  .tldr-audio-row {
    align-items: stretch;
  }

  .tldr-audio-item {
    align-items: stretch;
  }

  .tldr-audio-label {
    text-align: left;
  }

  .tldr-card > .vd-player,
  .tldr-card-body > .vd-player,
  .tldr-card .vd-player,
  .tldr-audio-item .vd-player {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .tldr-card > .vd-player,
  .tldr-card-body > .vd-player {
    margin-bottom: 1.15rem;
  }

  .tldr-card audio,
  .tldr-audio-item audio {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .institution-logos {
    gap: 1.25rem;
  }

  .institution-logo-img {
    height: 28px;
  }
}

/* ===============================
   Hybrid sample tables
   Phone: card stack | Tablet: sticky first col | Desktop: unchanged
================================ */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .sample-container {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sample-container::after {
    content: 'swipe →';
    position: absolute;
    top: 0.65rem;
    right: 0.85rem;
    z-index: 4;
    pointer-events: none;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
  }

  .sample-table {
    min-width: 800px;
    table-layout: auto;
  }

  .sample-table th,
  .sample-table td {
    font-size: var(--font-size-sm);
    padding: 0.4rem 0.45rem;
  }

  .sample-table th:first-child,
  .sample-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    box-shadow: 4px 0 10px rgba(15, 23, 42, 0.08);
  }

  .sample-table thead th:first-child {
    z-index: 7;
    top: var(--page-subnav-height, 4.75rem);
    background: var(--primary-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .sample-table th:first-child {
    background: var(--primary-color);
    color: var(--background-primary);
  }

  .sample-table td:first-child {
    background: var(--background-secondary);
  }
}

@media screen and (max-width: 768px) {
  .sample-container {
    overflow-x: visible;
    padding: 0.85rem;
  }

  .sample-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    overflow: visible;
  }

  .sample-table thead {
    display: none;
  }

  .sample-table tbody {
    display: block;
  }

  .sample-table tbody tr {
    display: block;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.9rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }

  .sample-table tbody tr:hover {
    background: var(--background-primary);
  }

  .sample-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .sample-table td {
    display: block;
    width: 100% !important;
    max-width: none !important;
    border: 0;
    padding: 0.65rem 0;
    text-align: left !important;
    background: transparent !important;
  }

  .sample-table td + td {
    border-top: 1px solid var(--background-accent);
  }

  .sample-table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
  }

  .sample-table td.ttv-base {
    background: transparent !important;
  }

  .sample-table td:first-child {
    padding-top: 0.15rem;
  }

  .sample-table .instruction-text {
    font-size: var(--font-size-base);
    line-height: 1.55;
  }

  .sample-table.has-prompt-col td.instruction-text {
    text-align: left !important;
  }

  .sample-table.edit-style-table td:first-child,
  .sample-table.edit-extra-table td:first-child,
  .sample-table.has-ref-edit-col td:first-child {
    min-width: 0 !important;
    width: 100% !important;
  }

  .edit-instruction,
  .sample-table.edit-style-table .edit-instruction,
  .sample-table.edit-extra-table .edit-instruction {
    display: block;
    white-space: normal !important;
    text-wrap: wrap;
    text-align: left !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0.15rem 0 0 !important;
    padding: 0 !important;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .edit-break {
    display: none;
  }

  .edit-ref-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
    text-align: left !important;
  }

  .edit-ref-cell .vd-player,
  .edit-ref-cell audio {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .sample-table .vd-player,
  .sample-table.data-aug-table .vd-player {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .sample-table audio,
  .sample-table.data-aug-table audio {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .sample-table.has-ref-edit-col td.instruction-text,
  .sample-table.has-ref-edit-col td:first-child {
    text-align: left !important;
  }

  .sample-table td.ours-cell {
    background: transparent !important;
  }

  .sample-table td.ours-cell::before {
    color: var(--primary-color);
  }

  .sample-expand {
    margin-top: 0.35rem;
    margin-bottom: 0.25rem;
  }

  .demo-divider {
    padding: 2rem 1rem 0.85rem;
  }

  .demo-divider::before {
    width: 2.4rem;
    height: 2.4rem;
  }

  .demo-divider-title {
    font-size: var(--font-size-base);
  }
}
