/* CSS styles for PGDG project page */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto+Mono:wght@300;700&display=swap');

:root {
  /* Self-define these two colors to match your preference */
  --term-sampler-color: #ccefd6;
  --term-curator-color: #d6e8ff;
  --term-relabel-color: #e9ddff;
  --term-label-text-color: #1b1b1b;
}

body {
  background-color: #fdfaf4;
  font-family: 'Playfair Display', serif;
  color: #1b1b1b;
  padding: 60px 30px;
}

.term-sampler,
.term-curator,
.term-relabel {
  color: var(--term-label-text-color);
  border-radius: 0.3em;
  padding: 0 0.22em;
}

.term-sampler {
  background-color: var(--term-sampler-color);
}

.term-curator {
  background-color: var(--term-curator-color);
}

.term-relabel {
  background-color: var(--term-relabel-color);
}

/* --- Table of Contents --- */
.toc {
  width: 180px;
  font-family: 'Roboto Mono', monospace;
  position: fixed;
  top: 250px;
  display: none;
  z-index: 1000;
}
@media (min-width: 1400px) {
  .toc {
    display: block;
    left: max(30px, calc(25vw - 330px));
  }
}
.toc h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 10px;
}
.toc hr {
  border: 0;
  height: 1px;
  background-color: #ccc;
  margin-bottom: 15px;
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li {
  margin-bottom: 10px;
}
.toc a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
}
.toc a:hover {
  color: #000;
  text-decoration: underline;
}
.toc-subsection {
  margin-left: 20px;
  font-size: 0.95em;
}

/* --- Main Content --- */
.main-content {
  max-width: 960px;
  margin: 0 auto;
}

.hero-text {
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.sub-hero-text {
  font-size: 40px;
  font-weight: 400;
  margin-bottom: 50px;
  line-height: 1.2;
}

/* --- Authors --- */
.authors {
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-top: -32.5px;
  margin-bottom: 17.5px;
  text-align: left;
}
.authors span {
  display: block;
  font-size: 14px;
  color: #555;
  margin-top: 0;
}
.authors .affiliation {
  font-weight: 600;
  font-size: 16px;
  color: #111;
}
.authors a {
  color: inherit;
  text-decoration: none;
}
.authors a:hover {
  text-decoration: underline;
}

/* --- Section Styles --- */
.tagline {
  font-family: 'Roboto Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: transparent;
  color: #111;
  display: inline-block;
  padding: 0;
  margin: 40px 0;
}

.section-subtitle {
  font-family: 'Roboto Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: transparent;
  color: #111;
  display: inline-block;
  padding: 0;
  margin: 30px 0;
}

.section {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* --- Images --- */
img {
  width: 100%;
  border: 1.5px solid #000;
  border-radius: 15px;
  box-sizing: border-box;
}

.figure-img {
  border: none;
  outline: none;
  box-shadow: none;
  display: block;      /* avoids inline whitespace artifacts */
  max-width: 100%;
  height: auto;
  margin: 0 auto;      /* center image when width is less than container */
}

.figure-pdf {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 480px;
  margin: 0 auto;
  border: 1.5px solid #000;
  border-radius: 15px;
  box-sizing: border-box;
}
/* --- Figure Placeholders --- */
.figure-placeholder {
  width: 100%;
  height: 280px;
  background: #e8e8e8;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  border: 2px dashed #aaa;
  box-sizing: border-box;
}
.figure-placeholder span {
  font-family: 'Roboto Mono', monospace;
  color: #888;
  font-size: 15px;
  text-align: center;
}

/* --- Figure Captions --- */
.figure-caption {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  color: #555;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 40px;
  padding: 0 20px;
}

.two-video-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  width: 100%;
}

.two-video-card {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.two-video-card video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .two-video-row {
    flex-direction: column;
  }
}

/* --- Video Gallery Carousel --- */
.video-gallery-section {
  position: relative;
  margin-bottom: 30px;
}

.video-gallery-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.video-gallery-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.video-gallery-inner {
  display: flex;
  gap: 15px;
  width: max-content;
}

.video-gallery-item {
  width: 220px;
  flex-shrink: 0;
}

.video-gallery-item video {
  width: 220px;
  height: 180px;
  border-radius: 8px;
  display: block;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
  user-select: none;
}

.gallery-nav-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav-btn.left {
  left: -20px;
}

.gallery-nav-btn.right {
  right: -20px;
}

.task-gallery-wrapper {
  margin-bottom: 40px;
}

.task-gallery-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.realworld-task-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 36px;
}

.realworld-demo-panel {
  flex: 0 0 220px;
}

.realworld-demo-panel video {
  width: 220px;
  height: 180px;
  display: block;
  border-radius: 8px;
}

.realworld-gallery-panel {
  flex: 1 1 auto;
  min-width: 0;
}

.realworld-task-row .video-gallery-section {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .realworld-task-row {
    flex-direction: column;
    gap: 14px;
  }

  .realworld-demo-panel {
    flex: 1 1 auto;
    max-width: 420px;
  }

  .realworld-demo-panel video {
    width: 100%;
    height: auto;
  }
}

/* --- Quick Links --- */
.quick-links {
  text-align: center;
  margin-top: -10px;
  margin-bottom: 30px;
}
.quick-links a {
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  margin: 0 36px;
  padding: 5px 8px;
}
.quick-links a:hover,
.quick-links a:focus {
  text-decoration: underline;
  color: #000;
}

.interactive-demo-shell {
  margin: 0 auto 24px;
  padding: 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66));
  box-shadow: 0 18px 40px rgba(31, 25, 14, 0.08);
}

.interactive-demo-frame {
  display: block;
  width: 100%;
  min-height: 1480px;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

@media (max-width: 760px) {
  .interactive-demo-shell {
    padding: 10px;
    border-radius: 18px;
  }

  .interactive-demo-frame {
    min-height: 1820px;
  }
}

/* --- Footer --- */
.footer {
  font-size: 14px;
  font-family: 'Roboto Mono', monospace;
  color: #666;
  margin-top: 80px;
  border-top: 1px solid #ccc;
  padding-top: 30px;
  text-align: center;
}
.footer a {
  color: #337ab7;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* --- BibTeX --- */
.bibtex-code {
  background-color: rgba(80, 80, 80, 0.8);
  color: #f1f1f1;
  padding: 20px;
  border-radius: 8px;
  margin: 80px auto -40px;
  max-width: 1000px;
  box-sizing: border-box;
  font-size: 14px;
}
.bibtex-title {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 1.15em;
  margin-bottom: 10px;
  color: #f1f1f1;
}
.bibtex-code pre {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0;
}
.bibtex-code code {
  font-family: 'Courier New', Courier, monospace;
  overflow-wrap: break-word;
}
