@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
}

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

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* === NAV === */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800; text-decoration: none;
}
.nav-logo .logo-t { color: var(--primary); }
.nav-logo .logo-e { color: var(--secondary); }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  transition: background 0.2s;
}
.nav-link:hover { background: var(--bg-alt); color: var(--primary); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem;
  min-width: 280px; box-shadow: var(--shadow-xl);
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.8125rem; color: var(--text); white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-cta {
  display: inline-flex; padding: 0.5rem 1.25rem;
  background: var(--gradient); color: #fff !important;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: #fff; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* === HERO === */
.hero {
  background: var(--gradient); color: #fff;
  padding: 5rem 1.5rem; text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 1rem;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem); opacity: 0.9;
  max-width: 700px; margin: 0 auto 2rem;
}
.hero-cta {
  display: inline-flex; padding: 0.875rem 2rem;
  background: #fff; color: var(--primary); font-weight: 700;
  border-radius: 9999px; font-size: 1.125rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); color: var(--primary-dark); }

/* === PAGE HERO (smaller) === */
.page-hero {
  background: var(--gradient); color: #fff;
  padding: 3rem 1.5rem; text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 800;
  line-height: 1.2; margin-bottom: 0.5rem; max-width: 800px; margin-left: auto; margin-right: auto;
}
.page-hero .subtitle {
  font-size: 1rem; opacity: 0.85; max-width: 600px; margin: 0.75rem auto 0;
}
.page-meta {
  display: flex; gap: 1rem; justify-content: center; margin-top: 1rem;
  font-size: 0.8125rem; opacity: 0.75;
}
.page-updated {
  font-size: 0.8125rem; opacity: 0.7; margin-top: 0.75rem;
}

/* === TL;DR BLOCK === */
.content blockquote:first-of-type {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #f0f9ff 0%, #ede9fe 100%);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* === CONTAINER === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.content-container { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem; }

/* === SECTIONS === */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 1.75rem; font-weight: 800; text-align: center;
  margin-bottom: 0.5rem; color: var(--text);
}
.section-subtitle {
  text-align: center; color: var(--text-muted);
  margin-bottom: 2.5rem; font-size: 1.0625rem;
}

/* === CARDS GRID === */
.cards-grid {
  display: grid; gap: 1.25rem; max-width: 1200px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); color: var(--text); }
.card-badge {
  display: inline-block; padding: 0.25rem 0.625rem;
  background: var(--bg-alt); border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--primary); margin-bottom: 0.75rem;
  width: fit-content;
}
.card-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.card-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; flex-grow: 1; }
.card-arrow { margin-top: 1rem; color: var(--primary); font-weight: 600; font-size: 0.875rem; }

/* === CONTENT (markdown body) === */
.content h1 { font-size: 2rem; font-weight: 800; margin: 2rem 0 1rem; line-height: 1.25; }
.content h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.content h3 { font-size: 1.125rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul, .content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content li { margin-bottom: 0.375rem; }
.content strong { font-weight: 600; }
.content blockquote {
  border-left: 4px solid var(--primary); background: var(--bg-alt);
  padding: 1rem 1.5rem; margin: 1.5rem 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* === TABLES === */
.content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.5rem 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  font-size: 0.875rem;
}
.content th {
  background: var(--bg-dark); color: #fff; font-weight: 600;
  padding: 0.75rem 1rem; text-align: left;
}
.content td { padding: 0.625rem 1rem; border-top: 1px solid var(--border); }
.content tr:nth-child(even) td { background: var(--bg-alt); }
.content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* === CTA SECTION === */
.cta-section {
  background: var(--gradient); color: #fff;
  padding: 3rem 1.5rem; text-align: center;
  border-radius: var(--radius); margin: 3rem 0;
}
.cta-section h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.75rem; }
.cta-section p { opacity: 0.9; margin-bottom: 1.5rem; }
.cta-btn {
  display: inline-flex; padding: 0.75rem 2rem;
  background: #fff; color: var(--primary); font-weight: 700;
  border-radius: 9999px; font-size: 1rem;
  transition: transform 0.2s;
}
.cta-btn:hover { transform: translateY(-2px); color: var(--primary-dark); }

/* === STATS === */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem; max-width: 900px; margin: 0 auto 3rem;
}
.stat-card {
  text-align: center; padding: 1.5rem;
  background: rgba(255,255,255,0.15); border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.stat-number { font-size: 2.5rem; font-weight: 800; }
.stat-label { font-size: 0.8125rem; opacity: 0.85; margin-top: 0.25rem; }

/* === FOOTER === */
.footer {
  background: var(--bg-dark); color: #fff; padding: 3rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer a { color: var(--text-light); }
.footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 1.5rem; font-size: 0.875rem; }
.footer-copy { font-size: 0.8125rem; color: var(--text-light); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 1rem; gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display: flex; }
  .dropdown-menu {
    position: static; box-shadow: none; border: none;
    padding-left: 1rem; min-width: auto;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.active .dropdown-menu { display: block; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .content table { font-size: 0.75rem; }
  .content th, .content td { padding: 0.5rem; }
}
