:root {
  --bg: #f5f6fa;
  --card-bg: #f1f2f5;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius-lg: 18px;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-xl);
}

/* HERO CARD */

.hero {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.hero-card {
  width: 100%;
  padding: var(--space-lg) var(--space-lg);
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.hero-card h1 {
  margin: 0 0 var(--space-sm);
  font-size: 2rem;
  font-weight: 600;
}

.venue {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-weight: 500;
}

.authors {
  margin: 0;
  font-size: 0.98rem;
}

.author + .author::before {
  content: " · ";
}

.affiliations {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.links {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.link-button {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  border: 1px solid #c7d2fe;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
}

.link-button:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.link-button:active {
  transform: translateY(0);
}

.link-button-disabled {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: #e5e7eb;
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  cursor: not-allowed;
  user-select: none;
}


.paper-teaser {
  max-width: 1000px;
  margin: 0 auto;
}

.paper-teaser img {
  width: 100%;
  height: auto;
  display: block;
}

.teaser-caption {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #6b7280; /* or var(--text-muted) if you use tokens */
  text-align: center;
}


/* LINK STRIP */

.link-strip {
  margin-top: 3rem;
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.link-icon {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  border: 2px solid #d4d4d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.link-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}


.link-card:hover .link-icon {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.link-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.link-purple {
  color: #4f46e5;
}

.link-green {
  color: #16a34a;
}

.link-black {
  color: #111827;
}

/* SECTIONS */

.section {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--space-xl);
}

.section h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  font-size: 1.4rem;
}

.section p {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

/* ---- Two-column layout (method) ---- */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-lg);
}

.method-figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.placeholder-figure {
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: #f9fafb;
}

.figure-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Multi-edit flow */

.multi-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.multi-edit-prompts {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.prompt-card {
  flex: 1 1 300px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md);
  text-align: center;
}

.prompt-caption {
  margin: 0;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.multi-edit-models {
  display: flex;
  align-items: stretch;
  gap: var(--space-md);
  justify-content: space-between;
}

.multi-edit-models .edit-step {
  flex: 1 1 0;
  min-width: 0;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: center;
}

.edit-caption {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.flow-arrow {
  align-self: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-size: 2rem;
  color: var(--text-muted);
}

.repeat-note {
  border: 1px dashed rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.06);
  text-align: center;
  padding: var(--space-md) var(--space-lg);
}

.section-note {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #312e81;
}

/* Gallery switcher */

.gallery-switcher {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.gallery-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-sm);
}

#gallery-six .gallery-tabs {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.gallery-tab,
.gallery-tab-six {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-tab:hover,
.gallery-tab:focus-visible,
.gallery-tab-six:hover,
.gallery-tab-six:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(79, 70, 229, 0.5);
}

.gallery-tab.is-active,
.gallery-tab-six.is-active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #312e81;
  box-shadow: var(--shadow-soft);
}

.gallery-display {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.gallery-model {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: center;
}

.gallery-caption {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.interactive-note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.gallery-prompt {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  border: 1px solid var(--border-subtle);
}

/* ---- Results cards ---- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.result-card {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.result-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}



/* BIBTEX (if used) */

.bibtex {
  margin: 0;
  padding: var(--space-md);
  border-radius: 12px;
  background: #0b1020;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ---- Video embed ---- */

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* FOOTER */

.footer {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* RESPONSIVE */

@media (max-width: 720px) {
  .hero-card {
    padding-inline: var(--space-md);
  }

  .hero-card h1 {
    font-size: 1.6rem;
  }

  .link-strip {
    gap: 2rem;
  }

  .multi-edit {
    gap: var(--space-md);
  }

  .multi-edit-prompts {
    flex-direction: column;
    align-items: stretch;
  }

  .prompt-card {
    flex-basis: auto;
  }

  .multi-edit-models {
    flex-direction: column;
  }

  .flow-arrow {
    align-self: center;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .gallery-tabs {
    grid-template-columns: 1fr;
  }

  .gallery-display {
    grid-template-columns: 1fr;
  }

  .gallery-prompt {
    order: -1;
  }
}
