/* ProgressLM - Academic Project Page Styles */
/* Dark theme inspired by VAGEN */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-color: #58a6ff;
  --accent-hover: #79c0ff;
  --border-color: #30363d;
  --code-bg: #1f2428;
  --success-color: #3fb950;
  --gradient-start: #58a6ff;
  --gradient-end: #a371f7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(163, 113, 247, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #0d1117 0%, #161b22 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Title with Icon */
.title-with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.title-icon {
  height: 4rem;
  width: auto;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

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

/* Hero Section */
#hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

#hero .container {
  max-width: 900px;
}

#hero .logo {
  max-width: 120px;
  margin-bottom: 24px;
}

#hero h1 {
  margin-bottom: 0;
}

#hero .subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

/* Teaser Caption */
.teaser-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 900px;
  margin: 16px auto 0;
  text-align: justify;
  line-height: 1.6;
  padding: 0 16px;
}

.teaser-caption em {
  color: var(--accent-color);
  font-style: italic;
}

/* Buttons */
.buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.btn i {
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border: none;
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  color: white;
}

/* Authors Box */
.authors-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 32px;
  margin-top: 8px;
  display: inline-block;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.author {
  white-space: nowrap;
}

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

.equal-contribution {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.equal-contribution sup {
  color: var(--accent-color);
}

.authors a {
  color: var(--text-primary);
}

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

/* Collapsible Sections */
.collapsible-section {
  background-color: #e8f0fe;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.15);
}

.collapsible-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
  background: linear-gradient(90deg, var(--accent-color), var(--gradient-end));
  cursor: pointer;
  list-style: none;
  transition: opacity 0.2s ease;
}

.collapsible-title::-webkit-details-marker {
  display: none;
}

.collapsible-title:hover {
  opacity: 0.9;
}

.collapsible-title .collapse-icon {
  color: white;
  font-size: 1.5rem;
  font-weight: 300;
}

/* Toggle plus/minus icon */
details.collapsible-section .collapse-icon::before {
  content: "\f067"; /* fa-plus */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

details.collapsible-section[open] .collapse-icon::before {
  content: "\f068"; /* fa-minus */
}

.collapsible-content {
  padding: 32px;
  background-color: #e8f0fe;
  color: #1a1a2e;
}

.collapsible-content p {
  color: #2d3748;
}

.collapsible-content strong {
  color: #1a1a2e;
}

/* Result Subsections (for Performance section) */
.result-subsection {
  margin-bottom: 32px;
  border-left: 4px solid var(--accent-color);
  padding-left: 24px;
}

.result-subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.subsection-content {
  background-color: #d4e5f7;
  border-radius: 8px;
  padding: 20px;
}

.subsection-content p {
  margin: 0;
  text-align: justify;
  line-height: 1.8;
  color: #2d3748;
}

.subsection-content p:not(:last-child) {
  margin-bottom: 12px;
}

/* Sections */
section {
  padding: 80px 0;
}

/* Abstract */
#abstract {
  background-color: transparent;
}

#abstract h2 {
  text-align: center;
}

#abstract p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  text-align: justify !important;
}

/* Demo Section */
#demo {
  background-color: transparent;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.demo-item {
  background-color: var(--bg-tertiary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.demo-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

.demo-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--bg-primary);
}

.demo-item p {
  padding: 16px;
  text-align: center;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.placeholder {
  background-color: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.placeholder i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholder p {
  margin: 0;
  font-size: 1.1rem;
}

/* Method Section */
#method {
  background-color: transparent;
}

.method-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.method-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.method-card:hover {
  border-color: var(--accent-color);
}

.method-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.method-card h3 i {
  color: var(--accent-color);
}

.method-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Benchmarks Section */
#benchmarks {
  background-color: var(--bg-secondary);
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.benchmark-category {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.benchmark-category h3 {
  margin-bottom: 16px;
  color: var(--accent-color);
}

.benchmark-category ul {
  list-style: none;
  padding: 0;
}

.benchmark-category li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.benchmark-category li:last-child {
  border-bottom: none;
}

.benchmark-category li i {
  color: var(--success-color);
  font-size: 0.8rem;
}

.metrics {
  margin-top: 32px;
  padding: 24px;
  background-color: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.metrics h3 {
  margin-bottom: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.metric-item {
  text-align: left;
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
}

.metric-item strong {
  display: block;
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.metric-item .metric-name {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.metric-item .metric-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Results Section */
#results {
  background-color: transparent;
}

.models-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.model-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.model-badge i {
  color: var(--accent-color);
}

/* Citation Section */
#citation {
  background-color: transparent;
}

.bibtex-container {
  position: relative;
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.bibtex-container pre {
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.6;
}

#copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

#copy-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

#copy-btn.copied {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  background-color: transparent;
}

footer p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .title-icon {
    height: 2.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  #hero .subtitle {
    font-size: 1.1rem;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  section {
    padding: 60px 0;
  }

  .demo-grid,
  .method-overview,
  .benchmark-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 2rem;
  }

  .title-icon {
    height: 2rem;
  }

  .title-with-icon {
    gap: 10px;
  }

  #hero {
    min-height: 60vh;
    padding: 60px 0;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

section {
  animation: fadeIn 0.6s ease-out;
}

/* Hero Section Entry Animations */
#hero .title-with-icon {
  animation: fadeInUp 0.8s ease-out;
}

#hero .subtitle {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

#hero .buttons {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero .authors-box {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

#hero .teaser-image {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}
