/* ===== FORGE Project Website Styles ===== */

:root {
  --primary: #1a3a5c;
  --primary-light: #2d5a8e;
  --accent: #e67e22;
  --accent2: #0d9488;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Nav --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* --- Containers --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 4rem 0; }
.section-alt { background: #fff; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8f0fe 50%, #f0f4f8 100%);
}
.hero-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--accent), #d35400);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-video {
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.hero-video video {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 1rem auto 2rem;
  line-height: 1.6;
}
.hero-authors {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.hero-affiliations {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 2rem;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d35400; }

/* --- Stat cards --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* --- Section headings --- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

/* --- Figure containers --- */
.figure-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin: 2rem 0;
  text-align: center;
}
.figure-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.figure-caption {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Task cards --- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.task-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.task-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.task-card p { font-size: 0.9rem; color: var(--text-muted); }
.task-card.t1 { border-left-color: #3b82f6; }
.task-card.t2 { border-left-color: #10b981; }
.task-card.t3 { border-left-color: #f59e0b; }

/* --- Result tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: 0.85rem;
}
thead {
  background: var(--primary);
  color: #fff;
}
thead th {
  padding: 0.7rem 0.6rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
thead th:first-child { text-align: left; padding-left: 1rem; }
tbody td {
  padding: 0.55rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
tbody td:first-child {
  text-align: left;
  padding-left: 1rem;
  font-weight: 500;
  white-space: nowrap;
}
tbody tr:hover { background: #f1f5f9; }
.best { font-weight: 700; color: var(--accent); }
.cat-header td {
  background: #f1f5f9;
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
}

/* --- Image gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}
.gallery-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; }
.gallery-item .caption {
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.gallery-item .caption strong { color: var(--text); }

/* --- Key findings --- */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin: 2rem 0;
}
.finding-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.finding-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.finding-card h4 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--primary); }
.finding-card p { font-size: 0.88rem; color: var(--text-muted); }

/* --- Citation --- */
.citation-box {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  position: relative;
  overflow-x: auto;
  white-space: pre;
}
.copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.78rem;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .task-grid { grid-template-columns: 1fr; }
  .findings-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.8rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* --- Tabs for tables --- */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--border);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4f8;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Two-col layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }
