/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f8f9fc;
  --bg-alt: #f0f2f8;
  --surface: #ffffff;
  --border: #e2e6ef;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #4f46e5;
  --accent-light: #818cf8;
  --accent-bg: rgba(79, 70, 229, .06);
  --radius: 12px;
  --max-w: 1100px;
  --shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.06);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-light); }
::selection { background: var(--accent); color: #fff; }

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 24px; height: 60px;
}
.logo {
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--text) !important;
  margin-right: 36px;
}
.nav-links {
  display: flex; gap: 2px; overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  font-size: .875rem; color: var(--text-secondary);
  white-space: nowrap; transition: all .2s;
  font-weight: 500;
}
.nav-links a:hover { background: var(--accent-bg); color: var(--accent); }
.nav-links a.active { background: var(--accent); color: #fff; }
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; margin-left: auto; }

/* === Hero === */
.hero {
  position: relative; overflow: hidden;
  padding: 140px 24px 80px;
  min-height: 60vh; display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero-content {
  max-width: var(--max-w); margin: 0 auto;
  position: relative; z-index: 1; width: 100%;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 1.15rem; color: var(--accent);
  font-weight: 500; margin-bottom: 10px;
}
.hero-desc {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 580px; line-height: 1.7;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px; border-radius: 10px;
  font-size: .9rem; font-weight: 500; cursor: pointer;
  transition: all .2s; border: none;
}
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(79,70,229,.3); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text) !important; border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn-secondary:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }

.hero-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: .08;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -200px; right: -150px; }
.orb-2 { width: 350px; height: 350px; background: #6366f1; bottom: -100px; left: -80px; }

/* === Sections === */
.section { padding: 72px 24px; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-title {
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all .25s; color: var(--text) !important;
  box-shadow: var(--shadow);
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.card p { font-size: .875rem; color: var(--text-secondary); line-height: 1.5; }

/* === About === */
.about-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  max-width: 650px; box-shadow: var(--shadow);
}
.about-box p { margin-bottom: 10px; color: var(--text-secondary); font-size: .95rem; line-height: 1.7; }
.about-box p:last-child { margin-bottom: 0; }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px; text-align: center;
  background: var(--surface);
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer p { font-size: .82rem; color: var(--text-muted); margin-bottom: 3px; }
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--accent); }

/* === Chat Widget (light theme) === */
#chat-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
}

/* === Page Content === */
.page { padding: 100px 24px 60px; min-height: 50vh; }
.page-inner { max-width: var(--max-w); margin: 0 auto; }
.page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 28px; color: var(--text); }
.empty-state { color: var(--text-muted); font-size: 1rem; text-align: center; padding: 60px 20px; }

/* === Blog Card (for /blog/index.html listing) === */
.blog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all .25s; color: var(--text) !important;
  box-shadow: var(--shadow);
  display: block;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card .date { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.blog-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.blog-card p { font-size: .875rem; color: var(--text-secondary); line-height: 1.5; }

/* === Blog Post Detail === */
.blog-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; box-shadow: var(--shadow); }
.blog-post h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.blog-post .meta { font-size: .85rem; color: var(--text-muted); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.blog-post .content { font-size: .95rem; line-height: 1.8; color: var(--text-secondary); }
.blog-post .content p { margin-bottom: 12px; }
.blog-post .content img { max-width: 100%; border-radius: 8px; margin: 16px 0; border: 1px solid var(--border); }

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px; box-shadow: var(--shadow-lg); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: 110px 20px 50px; min-height: 50vh; }
  .section { padding: 48px 20px; }
  .blog-post { padding: 20px; }
}
