/* Learning to Throw — project page styles (layout modeled on the RPG "Learning on the Fly" page) */
:root {
  --primary: #2c3e50;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --text: #2c3e50;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-light: 0 1px 3px rgba(15, 23, 42, 0.1);
  --radius: 10px;
  --transition: all 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
}

a { color: var(--accent); }
img, video { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 960px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar-container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.navbar-brand { font-weight: 700; color: var(--primary); text-decoration: none; font-size: 1.05rem; }
.navbar-menu { display: flex; gap: 6px; }
.navbar-item {
  color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 6px;
  font-weight: 500; font-size: 0.95rem; transition: var(--transition);
}
.navbar-item:hover { background: var(--accent-soft); color: var(--accent); }
.navbar-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.navbar-burger span { display: block; width: 22px; height: 2px; background: var(--primary); margin: 4px 0; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
  padding: 64px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.publication-title {
  font-family: "Crimson Text", Georgia, serif;
  font-size: 3.1rem; font-weight: 600; line-height: 1.18;
  color: var(--primary); max-width: 1000px; margin: 0 auto 1.2rem;
}
.venue-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-weight: 600; font-size: 0.95rem; margin-bottom: 1.4rem;
}
.author-row {
  font-family: "Crimson Text", Georgia, serif;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px;
  font-size: 1.32rem; max-width: 900px; margin: 0 auto;
}
.author-row a, .author-row span.author-plain { color: var(--accent); text-decoration: none; font-weight: 600; }
.author-row a:hover { text-decoration: underline; }
.affiliation { margin-top: 0.8rem; font-size: 1.05rem; color: var(--text-light); }
.affiliation a { color: var(--primary); font-weight: 600; text-decoration: none; }
.affiliation a:hover { color: var(--accent); }

.publication-links { margin-top: 1.8rem; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 2px solid transparent; transition: var(--transition); cursor: pointer;
  font-family: inherit; background: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary { color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-disabled {
  color: #94a3b8; border-color: #cbd5e1; border-style: dashed; cursor: not-allowed;
}
.btn-disabled .soon {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: #f1f5f9; color: #64748b; padding: 2px 8px; border-radius: 999px;
}

.hero-media { max-width: 1000px; margin: 2.6rem auto 0; }
.hero-media video {
  width: 100%; border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  background: #111;
}
.hero-caption { margin-top: 0.9rem; color: var(--text-light); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.paper-section { margin-bottom: 72px; }
.paper-section:last-child { margin-bottom: 0; }
.section-title {
  font-size: 2rem; font-weight: 700; color: var(--primary);
  text-align: center; margin-bottom: 1.8rem;
}
.section-title::after {
  content: ""; display: block; width: 60px; height: 3px; background: var(--accent);
  margin: 0.8rem auto 0; border-radius: 2px;
}
.subsection-title { font-size: 1.35rem; font-weight: 700; color: var(--primary); margin: 0 0 0.9rem; }
.lead { font-size: 1.06rem; color: var(--text); max-width: 860px; margin: 0 auto 1.6rem; text-align: center; }
p + p { margin-top: 0.9rem; }

/* ---------- Highlight box ---------- */
.highlight-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff; border-radius: 16px; padding: 36px 32px; text-align: center;
  box-shadow: var(--shadow);
}
.highlight-tagline { font-size: 1.55rem; font-weight: 600; line-height: 1.35; }
.highlight-description { margin-top: 0.7rem; color: #dbeafe; font-size: 1.02rem; max-width: 760px; margin-left: auto; margin-right: auto; }
.highlight-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 1.8rem; }
.highlight-stat { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 16px 10px; }
.stat-value { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.stat-label { display: block; margin-top: 4px; font-size: 0.86rem; color: #dbeafe; line-height: 1.35; }

/* ---------- Media ---------- */
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.figure { margin: 0 auto; }
.figure img, .figure video { width: 100%; border-radius: var(--radius); }
.figure.shadow img, .figure.shadow video { box-shadow: var(--shadow); }
.figure.white img { background: #fff; padding: 10px; border: 1px solid var(--border); }
.figure-caption { margin-top: 0.8rem; color: var(--text-light); font-size: 0.93rem; line-height: 1.55; }
.figure-caption strong { color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.grid-2.wide-left { grid-template-columns: 1.35fr 1fr; }
.speed-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px;
}

/* ---------- Abstract ---------- */
.abstract-content {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; box-shadow: var(--shadow-light); text-align: justify; hyphens: auto;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.four { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  box-shadow: var(--shadow-light); transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.15rem; margin-bottom: 12px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 0.45rem; color: var(--primary); }
.card p { font-size: 0.95rem; color: #475569; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.results {
  width: 100%; border-collapse: collapse; font-size: 0.96rem; background: #fff;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-light);
}
table.results caption { caption-side: bottom; text-align: left; padding-top: 0.7rem; color: var(--text-light); font-size: 0.9rem; }
table.results th, table.results td { padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--border); }
table.results thead th { background: var(--primary); color: #fff; font-weight: 600; font-size: 0.92rem; }
table.results td:first-child, table.results th:first-child { text-align: left; }
table.results td.target + td { text-align: left; }
table.results td:not(:first-child) { white-space: nowrap; }
table.results td:first-child:not(.wrap) { white-space: nowrap; }
table.results tr.ours td { background: var(--accent-soft); }
table.results tr.group-start td { border-top: 2px solid #cbd5e1; }
table.results td.target { font-weight: 700; color: var(--primary); background: #fff !important; }
table.results .best { font-weight: 700; color: var(--accent-dark); }
table.results tr.ref td { color: var(--text-light); font-style: italic; }

/* ---------- Callouts ---------- */
.callout {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin-top: 1.2rem; font-size: 0.97rem;
}

/* ---------- BibTeX ---------- */
.bibtex-block { position: relative; }
.bibtex-block pre {
  background: #0f172a; color: #e2e8f0; padding: 22px 24px; border-radius: var(--radius);
  font-size: 0.86rem; line-height: 1.55; overflow-x: auto; font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.12); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; padding: 5px 10px; font-size: 0.82rem;
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.6); padding: 20px; }
.modal.open { display: grid; place-items: center; }
.modal-content { background: #fff; border-radius: 14px; max-width: 760px; width: 100%; padding: 26px; position: relative; }
.modal-content h2 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary); }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 1.6rem; background: none; border: 0; cursor: pointer; color: var(--text-light); }

/* ---------- Footer ---------- */
.footer { background: var(--primary); color: #cbd5e1; padding: 44px 0 28px; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 28px; }
.footer h4 { color: #fff; font-size: 0.98rem; margin-bottom: 0.6rem; }
.footer a { color: #93c5fd; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer ul { list-style: none; }
.footer li + li { margin-top: 0.3rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 28px; padding-top: 18px; font-size: 0.82rem; color: #94a3b8; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .publication-title { font-size: 2.2rem; }
  .highlight-stats { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .card-grid.four, .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .navbar-burger { display: block; }
  .navbar-menu { display: none; position: absolute; top: 56px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 20px 14px; border-bottom: 1px solid var(--border); }
  .navbar-menu.open { display: flex; }
}
@media (max-width: 560px) {
  .publication-title { font-size: 1.8rem; }
  .author-row { font-size: 1.12rem; }
  .highlight-tagline { font-size: 1.25rem; }
  .highlight-box { padding: 28px 18px; }
  .highlight-stats { gap: 10px; }
  .stat-value { font-size: 1.25rem; white-space: nowrap; }
  .venue-badge { font-size: 0.85rem; }
  .abstract-content { padding: 20px; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
}
