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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

:root{
  --accent-1: #ff7a59;  /* start color */
  --accent-2: #6aa9ff;  /* end color   */
}

/* Hero Section (MineDojo Style) */
.hero {
  position: relative;
  width: 100%;
  height: 900px;

  /* optional: the page’s background color will show through the image’s transparency */
  background-color: white;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Dim just the background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('figures/TopBackground.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.5;            /* 0.0–1.0; “50% opacity” */
  z-index: 0;
}

/* Foreground content sits above the dim layer */
.hero > .foreground {
  position: relative;
  z-index: 1;
}
.hero-overlay {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.fancy-headline {
  font-family: "Spectral", ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(20px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variation-settings: "wght" 700, "opsz" 32;
  color: #111;
  display: inline-block;
}

/* Fallback color if gradient text isn't supported */
.fancy-headline .accent {
  --grad: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  display: inline-block;
  color: var(--accent-fallback, currentColor); /* fallback shows solid text */
}

/* Use gradient text when supported (no underline) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fancy-headline .accent {
    background-image: var(--grad);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero-title {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 8px;
    color: #ffffff;
}

.hero-subtitle {
    color: black;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-award {
    font-size: 1.5rem;
    font-weight: 400;
    color: #ffd700;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Title Section (LCM Style) */
.title-section {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
}

.paper-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.2;
}

.paper-subtitle {
    font-size: 1.3rem;
    color: #555;
    font-weight: 400;
    margin-bottom: 30px;
}

/* Authors Section */
.authors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.author {
    font-size: 1.1rem;
    color: #333;
}

.author sup {
    font-size: 0.8em;
}

/* Affiliations */
.affiliations {
    margin-bottom: 25px;
}

.affiliations p {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* Links Section */
.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.link-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.link-button:hover {
    background-color: #555;
}

/* Footnotes */
.footnotes {
    margin-top: 20px;
}

.footnotes p {
    font-size: 0.9rem;
    color: #888;
}

/* Content Blocks (Abstract, Method, Results, etc.) */
.content-block {
    margin-bottom: 60px;
}

.block-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
    text-align: center;
}

.block-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #333;
    text-align: justify;
}

.block-content p {
    margin-bottom: 20px;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery Styling */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.gallery-caption {
    padding: 15px;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    background-color: #f9f9f9;
}

/* BibTeX Styling */
.bibtex {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    overflow-x: auto;
}

.bibtex code {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #333;
    display: block;
    white-space: pre;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #f8f8f8;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-award {
        font-size: 1.1rem;
    }
    
    .paper-title {
        font-size: 1.8rem;
    }
    
    .paper-subtitle {
        font-size: 1.1rem;
    }
    
    .authors {
        flex-direction: column;
        gap: 10px;
    }
    
    .block-title {
        font-size: 1.5rem;
    }
    
    .block-content {
        font-size: 1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .links {
        flex-direction: column;
        align-items: center;
    }
    
    .link-button {
        width: 80%;
        text-align: center;
    }
}

/* Visually hide but keep for accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.content-block.mini-abstract {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 1rem;
}

.fancy-headline {
  /* font-family: ui-serif, "Iowan Old Style", "Georgia", "Times New Roman", "Noto Serif", serif;
  font-weight: 600;
  font-size: clamp(28px, 6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em; */

  /* font-family: "Playfair Display", ui-serif, "Iowan Old Style", Georgia, serif;
  font-weight: 700;
  font-size: clamp(30px, 6.5vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.015em; */


  font-family: "Spectral", ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(20px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variation-settings: "wght" 700, "opsz" 32; /* optical sizing */

  color: #111;
  display: inline-block;
}

.fancy-headline .accent {
  position: relative;
  display: inline-block;
  padding: 0 .15em;
}

.fancy-headline .accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: .12em;
  height: .38em;
  background: linear-gradient(90deg, #ffd6a5, #b8c0ff);
  border-radius: .35em;
  z-index: -1; /* highlight sits behind text */
}

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

/* Optional: dark mode tweak if you have one */
@media (prefers-color-scheme: dark) {
  .fancy-headline { color: #f3f4f6; }
  .fancy-headline .accent::after {
    background: linear-gradient(90deg, #5eead4, #93c5fd);
  }
}

/* Progressive Image Loading Styles */
img {
    transition: filter 0.8s ease, opacity 0.8s ease;
}

/* Low-res image is blurred while loading */
img.progressive-loading {
    filter: blur(20px);
    transform: scale(1.05);
}

/* High-res image fades in smoothly */
img.progressive-loaded {
    filter: blur(0);
    transform: scale(1);
    animation: fadeInSharp 0.8s ease;
}

@keyframes fadeInSharp {
    from {
        opacity: 0.5;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Prevent layout shift during image loading */
img[data-src] {
    background-color: #f0f0f0;
    min-height: 200px;
}

/* Add a subtle loading indicator */
.progressive-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Gallery items need relative positioning for loading indicator */
.gallery-item {
    position: relative;
}

.gallery-item img {
    position: relative;
}
