/* Custom CSS for Chumps Project Page */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* --- Custom Properties / Design System --- */
:root {
  --font-header: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Harmonious slate & indigo palette */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-accent: #4f46e5;       /* Indigo */
  --color-accent-hover: #4338ca;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);

  --max-width: 960px;
}

/* --- Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* --- Layout Elements --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

section.alt-bg {
  background-color: var(--color-bg-secondary);
}

/* --- GitHub Ribbon Corner --- */
.github-corner {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  z-index: 1000;
}
.github-corner svg {
  fill: var(--color-text-primary);
  color: var(--color-bg-primary);
  transition: fill 0.2s ease;
}
.github-corner:hover svg {
  fill: var(--color-accent);
}
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
  0%, 100% { transform: rotate(0); }
  20%, 60% { transform: rotate(-25deg); }
  40%, 80% { transform: rotate(10deg); }
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 6rem 0 3rem 0;
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero h1.title {
  font-family: var(--font-header);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.hero h2.subtitle {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  max-width: 750px;
  margin: 0 auto 1rem auto;
  line-height: 1.3;
}

.hero .venue {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

/* --- Authors & Affiliations --- */
.authors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
}

.author {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.author sup {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.8rem;
  margin-left: 1px;
}

.affiliations-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

.affiliation sup {
  color: var(--color-accent);
  font-weight: 600;
}

/* --- Action Links Bar --- */
.links-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background-color: var(--color-text-primary);
  color: var(--color-bg-primary);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.btn-link:hover {
  background-color: var(--color-accent);
  color: var(--color-bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Carousel / Slider Showcase --- */
.carousel-container {
  margin: 2rem 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  padding: 1.5rem 2rem;
  font-size: 1rem;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.carousel-arrow:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.05);
}

.carousel-arrow.left { left: 1.5rem; }
.carousel-arrow.right { right: 1.5rem; }

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background-color: #fff;
  transform: scale(1.2);
}

/* --- Section Headings --- */
h3.section-title {
  font-family: var(--font-header);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* --- Abstract & Method --- */
.abstract-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.abstract-text {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  text-align: justify;
}

.method-diagram {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  margin-top: 1rem;
  text-align: center;
}

.method-diagram img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.method-caption {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.method-youtube {
  width: 100%;
  max-width: 100%;       /* Spans the full width of the white diagram card */
  aspect-ratio: 2.39;  /* Forces the exact widescreen frame shape */
  border-radius: 6px;    /* Matches the border-radius of your blender image */
  display: block;
}

.method-video {
  width: 100%;
  height: auto;       /* Keeps the video's natural aspect ratio */
  display: block;
  border-radius: 6px; /* Matches the border-radius of your blender image */
}

/* --- Image & Video Grids (Results) --- */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .grid-2col {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background-color: #000;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

/* --- Model Viewer Section --- */
.model-viewer-wrapper {
  width: 100%;
  height: 500px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: var(--color-bg-secondary);
  position: relative;
}

model-viewer {
  width: 100%;
  height: 100%;
}

.model-viewer-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  pointer-events: none;
}

/* --- Citation / BibTeX Section --- */
.citation-container {
  position: relative;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

pre.bibtex {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.copy-btn:hover {
  background-color: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg-primary);
}

.copy-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg-secondary);
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
  .hero h1.title {
    font-size: 2.25rem;
  }
  .hero h2.subtitle {
    font-size: 1.2rem;
  }
  .links-bar {
    flex-wrap: wrap;
  }
  section {
    padding: 3rem 0;
  }
}
