/* Based on eliahuhorwitz/Academic-project-page-template, customized for the speech separation demo. */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --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-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-primary);
  color: var(--text-primary);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.button {
  border: 2px solid transparent !important;
  border-radius: var(--border-radius) !important;
  font-weight: 600 !important;
  overflow: hidden;
  position: relative;
  transition: var(--transition) !important;
}

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

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

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

.hero {
  overflow: hidden;
  position: relative;
}

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

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

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

.publication-title {
  color: var(--text-primary) !important;
  font-family: "Inter", sans-serif !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  margin-bottom: 2rem !important;
}

.publication-authors {
  font-family: "Inter", sans-serif !important;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

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

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

.publication-links {
  margin-top: 1.5rem;
}

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

.publication-banner img,
.publication-body img,
.results-carousel .item img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.publication-banner img {
  width: 100%;
}

.publication-banner img:hover,
.results-carousel .item:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

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

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

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

.results-carousel .item img {
  height: auto;
  margin: 0;
  width: 100%;
}

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

.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);
}

.title.is-3 {
  color: var(--text-primary);
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem;
  position: relative;
}

.title.is-3::after {
  background: var(--gradient-accent);
  border-radius: 2px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 60px;
}

.content.has-text-justified {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.project-table {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  padding: 1rem;
}

.project-table caption {
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: left;
}

.project-table th {
  color: var(--primary-color);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-direction {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 900;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.project-table .is-selected-row td {
  background: #e0f2fe;
  color: var(--text-primary);
  font-weight: 700;
}

.dataset-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.dataset-links a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

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

.sample-block {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  padding: 1.5rem;
}

.sample-row {
  border-top: 1px solid var(--border-color);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 11rem repeat(3, minmax(10rem, 1fr));
  padding: 1rem 0;
}

.sample-group-title {
  background: var(--background-accent);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  margin: 1.5rem 0 0.25rem;
  padding: 0.75rem 1rem;
}

.sample-title {
  color: var(--text-primary);
  font-weight: 800;
}

.audio-cell {
  display: grid;
  gap: 0.45rem;
}

.audio-cell span {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

audio {
  min-width: 8rem;
  width: 100%;
}

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

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

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

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

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

.copy-bibtex-btn.copied {
  background: #10b981;
}

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

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

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

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

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

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.button:focus,
a:focus,
.copy-bibtex-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
  .sample-row {
    grid-template-columns: 1fr;
  }
}

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

  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }

  .publication-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  .publication-authors {
    font-size: 1rem !important;
  }

  .button {
    font-size: 0.875rem !important;
    margin: 0.25rem !important;
    padding: 0.75rem 1rem !important;
  }

  .results-carousel .item {
    margin: 0.5rem;
    padding: 1rem;
  }

  .content.has-text-justified {
    font-size: 1rem;
  }
}

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

  .button {
    justify-content: center;
    width: 100%;
  }

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}

@media print {
  .hero,
  .section {
    animation: none;
  }

  .scroll-to-top {
    display: none;
  }
}
