/* ===== Neural Slate Design System — SkillClaw ===== */
/* Fonts: Space Grotesk (display), Inter (body), JetBrains Mono */

:root {
  --bg: #0b1326;
  --bg-low: #131b2e;
  --bg-surface: #171f33;
  --bg-high: #222a3d;
  --bg-highest: #2d3449;
  --bg-lowest: #060e20;
  --primary: #4cd7f6;
  --primary-dim: #06b6d4;
  --accent: #4edea3;
  --accent-dim: #00a572;
  --tertiary: #7bd0ff;
  --text: #dae2fd;
  --text-muted: #bcc9cd;
  --text-faint: #869397;
  --outline: rgba(76,215,246,0.15);
  --outline-subtle: rgba(76,215,246,0.08);
  --glow: rgba(76,215,246,0.06);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 1rem;
  --radius-sm: 0.75rem;
  --radius-full: 9999px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== STICKY NAV ===== */
.flecto-nav {
  position: sticky; top: 0; z-index: 9999;
  background: rgba(11,19,38,0.95);
  backdrop-filter: blur(12px);
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  border-bottom: 1px solid var(--outline-subtle);
}
.flecto-nav a { color: #8b8bcd; text-decoration: none; }
.flecto-nav a:hover { color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('./assets/bg_hero.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(11,19,38,0.88) 0%, rgba(11,19,38,0.72) 60%, rgba(6,182,212,0.06) 100%);
  z-index: 1;
}
/* Network motif pseudo-element */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 50%, rgba(76,215,246,0.07) 0%, transparent 60%),
                    radial-gradient(circle at 70% 30%, rgba(78,222,163,0.05) 0%, transparent 40%);
  z-index: 2;
}
.hero-content {
  position: relative; z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}
.hero-badges {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(78,222,163,0.2), rgba(76,215,246,0.2));
  color: var(--primary);
  border: 1px solid rgba(76,215,246,0.3);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}
.hero h1 .highlight {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-authors {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-authors strong { color: var(--text); }
.hero-meta-badge {
  display: inline-block;
  background: rgba(11,19,38,0.7);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-left: 8px;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: #003640;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(76,215,246,0.25);
}
.btn-secondary {
  background: rgba(45,52,73,0.8);
  color: var(--primary);
  border: 1px solid rgba(76,215,246,0.3);
}
.btn-secondary:hover {
  background: rgba(76,215,246,0.1);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}
section.content-section {
  padding: 72px 0;
}
section.content-section.alt-bg {
  background: var(--bg-low);
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 1.4em;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== CARDS ===== */
.glass-card {
  background: rgba(45,52,73,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--glow);
}
.surface-card {
  background: var(--bg-low);
  border-radius: var(--radius);
  padding: 28px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}
.card-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

/* ===== GRID LAYOUTS ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.two-col {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

/* ===== FIGURES ===== */
figure {
  margin: 32px 0;
}
figure img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--outline);
  display: block;
}
figcaption {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.5;
  padding: 0 20px;
}

/* ===== ABSTRACT ===== */
.abstract-card {
  background: var(--bg-low);
  border-radius: var(--radius);
  padding: 40px;
  border-left: 4px solid var(--primary);
  max-width: 760px;
  margin: 0 auto;
}
.abstract-pullquote {
  font-style: italic;
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.6;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--outline-subtle);
}

/* ===== ALGORITHM CARD ===== */
.algo-card {
  background: var(--bg-lowest);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--outline);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}
.algo-card .algo-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--outline);
  padding-bottom: 12px;
}
.algo-step { color: var(--text-muted); }
.algo-keyword { color: var(--tertiary); font-weight: 600; }
.algo-accent { color: var(--accent); }
.algo-comment { color: var(--text-faint); font-style: italic; }

/* ===== TABLE ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--outline-subtle);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
thead tr { background: var(--bg-highest); }
thead th {
  padding: 12px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(76,215,246,0.04); }
tbody td {
  padding: 11px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(76,215,246,0.06);
}
tbody tr:last-child td { border-bottom: none; }
.cell-positive { color: var(--accent); font-weight: 600; }
.row-highlight { background: rgba(78,222,163,0.06) !important; }
.row-highlight td:first-child { border-left: 3px solid var(--accent); }

/* ===== BENCHMARK PILLS ===== */
.pill-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.pill {
  background: rgba(76,215,246,0.1);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(76,215,246,0.2);
}

/* ===== CONCLUSION BANNER ===== */
.conclusion-banner {
  border-radius: var(--radius);
  padding: 32px 36px;
  background: linear-gradient(135deg, #004e5c, #003824);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.conclusion-banner .banner-icon { font-size: 1.6rem; flex-shrink: 0; }

/* ===== REFERENCES ACCORDION ===== */
details {
  background: var(--bg-lowest);
  border-radius: var(--radius);
  border: 1px solid var(--outline-subtle);
  overflow: hidden;
}
details summary {
  padding: 16px 24px;
  cursor: pointer;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}
details summary:hover { background: rgba(76,215,246,0.05); }
details summary::marker, details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '▸';
  float: right;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(90deg); }
.refs-list {
  padding: 20px 28px;
  list-style: none;
  counter-reset: ref-counter;
}
.refs-list li {
  counter-increment: ref-counter;
  padding: 6px 0 6px 36px;
  position: relative;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1.5;
  border-bottom: 1px solid rgba(76,215,246,0.04);
}
.refs-list li::before {
  content: '[' counter(ref-counter) ']';
  position: absolute; left: 0;
  color: var(--primary);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* ===== FLECTO EXPLANATION UI ===== */
.flecto-note,
.flecto-callout,
.flecto-card,
.flecto-panel {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  position: relative;
}
.flecto-note::before,
.flecto-callout::before,
.flecto-card::before,
.flecto-panel::before {
  content: '🤖 AI explanation';
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #60a5fa;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.5em;
}
.flecto-note {
  background: rgba(76,215,246,0.05);
  border-left: 3px solid var(--primary);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.flecto-callout {
  background: rgba(78,222,163,0.07);
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}
.flecto-card {
  background: rgba(45,52,73,0.4);
  border: 1px solid var(--outline);
  color: var(--text-muted);
}
.flecto-card h4, .flecto-panel h4 {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 0;
}
.flecto-card ul, .flecto-panel ul {
  padding-left: 1.2em;
  color: var(--text-muted);
}
.flecto-panel {
  background: rgba(23,31,51,0.8);
  border: 1px solid var(--outline);
  color: var(--text-muted);
}
.flecto-panel h3 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 0;
}

/* ===== PROSE ===== */
.prose p { margin-bottom: 16px; }
.prose h2, .prose h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}
.prose h2 { font-size: 1.4rem; font-weight: 600; }
.prose h3 { font-size: 1.1rem; font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }

/* ===== NUMBERED LIST ===== */
.numbered-list { list-style: none; padding: 0; }
.numbered-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--outline-subtle);
  color: var(--text-muted);
}
.numbered-list li:last-child { border-bottom: none; }
.numbered-list .num {
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  min-width: 24px;
  margin-top: 2px;
}
.numbered-list .label {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--outline-subtle);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.site-footer a { color: var(--primary); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 20px; }
  .hero-content { padding: 0 20px; }
  .hero { min-height: 75vh; padding: 80px 0 60px; }
  .hero h1 { font-size: 1.7rem; }
  section.content-section { padding: 48px 0; }
  .abstract-card { padding: 24px; }
  .conclusion-banner { font-size: 0.95rem; padding: 24px; }
}
