/* =============================================
   PGT Project Page — Global Styles
   ============================================= */

:root {
  --primary:    #1a56db;
  --primary-dk: #1241b0;
  --accent:     #e63946;
  --text:       #1c1c1e;
  --text-muted: #555;
  --bg:         #ffffff;
  --bg-light:   #f5f7fb;
  --border:     #e0e4ef;
  --radius:     10px;
  --max-width:  900px;
  --font-body:  'Inter', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }
section.bg-light { background: var(--bg-light); }

/* ---- Typography ---- */
h1, h2, h3 { line-height: 1.25; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 48px 0 12px;
  color: var(--text);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 780px;
}

/* ---- Header ---- */
header {
  background: linear-gradient(135deg, #0f1b4c 0%, #1a3a8f 50%, #1241b0 100%);
  color: #fff;
  padding: 72px 0 60px;
  text-align: center;
}


.paper-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #fff;
}

.paper-title .subtitle {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: #a8c4ff;
  margin-top: 6px;
}

.authors {
  margin: 20px 0 28px;
  font-size: 1rem;
  color: #c5d8ff;
}

.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }

.author {
  margin: 0 4px;
  white-space: nowrap;
}

.author:not(:last-child)::after {
  content: ',';
  color: #a8c4ff;
}

/* ---- Venue badge ---- */
.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  padding: 9px 22px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45), 0 0 0 1px rgba(255,255,255,0.15);
  letter-spacing: 0.015em;
}

/* ---- Author marks ---- */
.author-mark {
  font-size: 0.7em;
  vertical-align: super;
  color: #fbbf24;
  font-weight: 700;
  margin-left: 1px;
}

.author-notes {
  font-size: 0.82rem;
  color: rgba(197, 216, 255, 0.75);
  margin: 6px 0 20px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.author-note-sep { opacity: 0.5; }

/* ---- Buttons ---- */
.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

.btn-primary {
  background: #fff;
  color: var(--primary-dk);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}

/* ---- Stats ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- Abstract ---- */
#abstract { background: var(--bg); }

.abstract-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2c2c2e;
  margin-bottom: 16px;
  max-width: 800px;
}

/* ---- Method cards ---- */
.method-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.method-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.method-icon { font-size: 1.8rem; margin-bottom: 10px; }

.method-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.method-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ---- Figures ---- */
figure { margin: 0 0 48px; }

.figure-wide img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.figure-medium {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.figure-medium img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

/* ---- Quote ---- */
.quote-box {
  background: #fff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 28px;
  margin-top: 24px;
}

.quote-box p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
}

/* ---- Continual Learning ---- */
.task-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.task-node {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Mono', Menlo, monospace;
  color: var(--primary-dk);
  font-weight: 500;
}

.chain-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.table-wrapper { overflow-x: auto; margin: 0 0 12px; }

.cl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.cl-table th, .cl-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.cl-table thead tr:first-child th {
  background: #1a3a8f;
  color: #fff;
  font-weight: 600;
}

.cl-table thead tr:nth-child(2) th {
  background: #e8edf8;
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}

.cl-table .task-name {
  text-align: left;
  font-family: 'SF Mono', 'Fira Mono', Menlo, monospace;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.cl-table tbody tr:last-child td { border-bottom: none; }
.cl-table tbody tr:hover { background: #f5f7fb; }

.cl-table th.ours, .cl-table td.ours {
  background: #eef3ff;
  color: var(--primary-dk);
  font-weight: 600;
}

.cl-table td.best {
  color: #126e34;
  background: #e6f7ee;
  font-weight: 700;
}

.table-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 36px;
  text-align: center;
}

.cl-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.cl-insight {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.insight-icon { font-size: 1.6rem; margin-bottom: 10px; }

.cl-insight h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.cl-insight p { font-size: 0.88rem; color: var(--text-muted); }

/* ---- BibTeX ---- */
.bibtex-wrapper {
  position: relative;
}

.bibtex {
  background: #1c1c1e;
  color: #d4e2ff;
  border-radius: var(--radius);
  padding: 24px 28px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre;
}

.bibtex code { font-family: 'SF Mono', 'Fira Mono', Menlo, monospace; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #a8c4ff;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: var(--font-body);
}

.copy-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.copy-btn.copied {
  background: rgba(22, 163, 74, 0.25);
  border-color: rgba(22, 163, 74, 0.5);
  color: #4ade80;
}

/* ---- Footer ---- */
footer {
  background: #0f1b4c;
  color: #7a9dd4;
  text-align: center;
  padding: 28px;
  font-size: 0.9rem;
}

footer a { color: #a8c4ff; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  section { padding: 48px 0; }
  .method-cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cl-insight-grid { grid-template-columns: 1fr; }
  .task-chain { gap: 6px; }
}
