:root {
  --hf-bg: #ffffff;
  --hf-bg-accent: #f8f9fa;
  --hf-surface: rgba(248, 249, 250, 0.95);
  --hf-surface-strong: rgba(233, 236, 239, 0.98);
  --hf-border: rgba(0, 0, 0, 0.1);
  --hf-primary: #007bff;
  --hf-accent: #f6c343;
  --hf-muted: #6c757d;
  --hf-text: #212529;
  --hf-gradient-blue: rgba(0, 123, 255, 0.03);
  --hf-gradient-yellow: rgba(246, 195, 67, 0.03);
}

.dark-theme {
  --hf-bg: #050915;
  --hf-bg-accent: #0d1324;
  --hf-surface: rgba(16, 22, 36, 0.85);
  --hf-surface-strong: rgba(18, 27, 49, 0.95);
  --hf-border: rgba(255, 255, 255, 0.08);
  --hf-primary: #6cf0ff;
  --hf-accent: #6cf0ff;
  --hf-muted: #9db1d1;
  --hf-text: #f8fbff;
  --hf-gradient-blue: rgba(108, 240, 255, 0.05);
  --hf-gradient-yellow: rgba(246, 195, 67, 0.05);
}

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

body {
  font-family: 'Inter', 'Noto Sans', sans-serif;
  font-weight: 500;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, var(--hf-gradient-blue), transparent 45%),
              radial-gradient(circle at 80% 0%, var(--hf-gradient-yellow), transparent 35%),
              var(--hf-bg);
  color: var(--hf-text);
  line-height: 1.6;
}

b, strong {
  font-weight: 800;
}

body.hf-app-active #hf-app {
  display: block;
}

body.hf-app-active .hero,
body.hf-app-active .section.site-content,
body.hf-app-active .footer {
  display: none !important;
}

.theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.theme-toggle-btn:hover {
  background: var(--hf-surface-strong);
}

#hf-app {
  padding: 2.5rem 0 4rem;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: 'Space Grotesk', 'Fira Code', monospace;
  font-size: 0.9rem;
}

.hf-hero {
  padding: 3rem 0 2rem;
}

.hf-hero .container {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hf-paper-label {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--hf-accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.hf-title {
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  margin: 0.4rem 0 1rem;
  line-height: 1.2;
}

.hf-tagline {
  max-width: 960px;
  font-size: 1.1rem;
  color: var(--hf-muted);
  margin-bottom: 1rem;
}

.hf-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.hf-author-block {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--hf-muted);
}

.hf-author-list,
.hf-affiliations {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  justify-content: center;
}

.hf-author-list a {
  color: var(--hf-text);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.2rem;
}

.hf-author-list a:hover {
  color: var(--hf-primary);
}

.hf-author-list sup {
  font-size: 0.75rem;
  margin-left: 0.2rem;
  color: var(--hf-muted);
  line-height: 1;
  position: relative;
  top: -0.5em;
}

.hf-affiliations {
  margin-top: 0.35rem;
  gap: 1rem;
  font-size: 0.85rem;
}

.hf-hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.hf-button {
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  border: 1px solid var(--hf-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--hf-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  font-size: 0.8rem;
}

.hf-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hf-chip {
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  border: 1px solid var(--hf-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--hf-text);
}

.hf-note {
  margin: 0;
  color: var(--hf-muted);
}

.hf-overview {
  padding: 1rem 0 2.5rem;
}

.hf-abstract {
  padding: 2rem 0 2rem;
}

.hf-abstract .container {
  max-width: 900px;
  margin: 0 auto;
}

.hf-section-title {
  text-align: center;
}

.hf-abstract-text {
  text-align: left;
}

.hf-abstract-text {
  margin-top: 0.5rem;
  color: var(--hf-muted);
  font-size: 1rem;
}

.hf-abstract-text b {
  color: var(--hf-accent);
  font-weight: 700;
}

.hf-method {
  padding: 4rem 0;
}

.hf-method-text {
  margin: 1rem 0;
  color: var(--hf-muted);
  font-size: 1rem;
  /* text-align: center; */
}

.hf-method-text b {
  color: var(--hf-accent);
  font-weight: 700;
}

.hf-method embed {
  border-radius: 8px;
  border: 1px solid var(--hf-border);
  margin-top: 2rem;
}

.hf-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.hf-highlight-card {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.hf-highlight-label {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  font-size: 0.75rem;
  color: var(--hf-muted);
  margin: 0 0 0.4rem;
}

.hf-highlight-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem;
  margin: 0;
}

.hf-highlight-caption {
  margin: 0.3rem 0 0;
  color: var(--hf-muted);
  font-size: 0.9rem;
}

.hf-overview-text {
  margin-top: 1.5rem;
  max-width: 840px;
  color: var(--hf-muted);
}

.hf-demos {
  padding: 1rem 0 2rem;
}

.hf-demos-header {
  margin-bottom: 1.5rem;
}

.hf-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin: 0 0 0.35rem;
}

.hf-section-copy {
  margin: 0;
  color: var(--hf-muted);
}

.hf-demo-root {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hf-group {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hf-group-header {
  border-bottom: 1px solid var(--hf-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.hf-group-label {
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.8rem;
  color: var(--hf-accent);
  margin: 0 0 0.3rem;
}

.hf-group-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  margin: 0;
}

.hf-group-copy {
  margin: 0.35rem 0 0;
  color: var(--hf-muted);
}

.hf-task-card {
  background: var(--hf-surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.2rem;
  margin-bottom: 1.25rem;
}

.hf-task-card:last-child {
  margin-bottom: 0;
}

.hf-task-header {
  margin-bottom: 0.8rem;
}

.hf-task-title {
  margin: 0;
  font-size: 1.35rem;
}

.hf-task-summary {
  margin: 0.35rem 0 0;
  color: var(--hf-muted);
}

.hf-sample-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.hf-sample-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

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

.hf-pair-card {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
}

.hf-variant-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  color: var(--hf-primary);
}

.hf-scene-title {
  font-weight: 600;
  margin: 0;
}

.hf-video-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media screen and (max-width: 768px) {
  .hf-video-pair {
    grid-template-columns: 1fr;
  }
}

.hf-video-panel {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.hf-panel-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  color: var(--hf-muted);
  margin-bottom: 0.35rem;
}

.hf-video-panel video {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
}

.hf-video-panel video::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.35);
}

.hf-video-panel video:hover {
  border-color: var(--hf-primary);
}

.hf-empty-message {
  color: var(--hf-muted);
  font-size: 0.95rem;
  padding: 1rem 0;
}

@media screen and (max-width: 600px) {
  .hf-highlight-grid {
    grid-template-columns: 1fr;
  }
  .hf-group {
    padding: 1rem;
  }
  .hf-task-card {
    padding: 0.9rem;
  }
}
