:root {
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --dark: #0b1026;
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.grad { background: linear-gradient(120deg, var(--indigo), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid #eef2f7; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 46px; width: auto; display: block; }
.brand-footer .brand-logo { background: #fff; border-radius: 14px; padding: 8px 14px; height: 56px; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { text-decoration: none; color: #475569; font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--indigo); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 14px; font-weight: 700; font-size: 15px; text-decoration: none; border: none; cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .15s; }
.btn-primary { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; box-shadow: 0 10px 28px rgba(99,102,241,.35); }
.btn-primary:hover { transform: translateY(-2px); opacity: .95; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid #e2e8f0; }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* hero */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(700px 340px at 50% -60px, rgba(99,102,241,.16), transparent 70%), linear-gradient(#f6f7ff, #fff); z-index: -1; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #eef2ff; border: 1px solid #e0e7ff; color: var(--indigo); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 8px 18px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.08; margin: 22px auto 0; max-width: 820px; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; margin: 20px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; justify-content: center; margin-top: 54px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 34px; font-weight: 900; }
.hero-stats span { font-size: 13px; color: var(--muted); }

/* sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(140deg, #141a38, #1e1b4b); }
.kicker { color: var(--indigo); font-weight: 800; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 10px; }
.kicker.light { color: #a5b4fc; }
.kicker.center, h2.center, .sub.center, .note.center { text-align: center; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.8px; }
h2.light { color: #fff; }
.sub { color: var(--muted); margin-top: 10px; font-size: 17px; }
.sub.light { color: #c7d2fe; }
.note { margin-top: 26px; color: var(--muted); }
.note a { color: var(--indigo); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-2 p { color: #475569; margin-top: 14px; }
.about-cards { display: grid; gap: 16px; }
.mini-card { background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius); padding: 22px; box-shadow: 0 6px 20px rgba(15,23,42,.05); }
.mini-card p { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* cards */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.card { background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 6px 20px rgba(15,23,42,.04); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(99,102,241,.14); }
.card .icon { font-size: 30px; }
.card h3 { margin: 14px 0 8px; font-size: 18px; }
.card p { font-size: 14.5px; color: var(--muted); }

/* flagship */
.flagship { background: linear-gradient(#fff, #f6f7ff); }
.flag-single { max-width: 640px; margin: 44px auto 0; }
.flag-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.flag-cta.center { justify-content: center; }
.ticks { list-style: none; display: grid; gap: 13px; }
.ticks li { position: relative; padding-left: 32px; font-size: 15.5px; color: #334155; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.flag-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* projects */
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.tag-live { background: #dcfce7; color: #15803d; }
.tag-done { background: #e0e7ff; color: #4338ca; }
.tag-soon { background: #fef3c7; color: #b45309; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack span { font-size: 12px; font-weight: 600; background: #f1f5f9; color: #475569; padding: 5px 11px; border-radius: 999px; }

/* skills */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.skill-group { background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius); padding: 24px; }
.skill-group h4 { font-size: 15px; margin-bottom: 14px; color: var(--indigo); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges span { font-size: 13px; font-weight: 600; background: linear-gradient(120deg, #eef2ff, #f5f3ff); border: 1px solid #e0e7ff; color: #4338ca; padding: 6px 13px; border-radius: 999px; }

/* timeline */
.timeline { margin-top: 44px; display: grid; gap: 4px; }
.tl-item { display: flex; gap: 18px; padding: 18px 0; border-left: 2px solid #e2e8f0; padding-left: 28px; margin-left: 8px; position: relative; }
.tl-dot { position: absolute; left: -8px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: #c7d2fe; border: 3px solid #fff; box-shadow: 0 0 0 2px #c7d2fe; }
.tl-item.now .tl-dot { background: #22c55e; box-shadow: 0 0 0 2px #22c55e; }
.tl-item p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* demo form */
.demo-form { background: #fff; border: 1px solid #eef2f7; border-radius: 22px; padding: 32px; margin-top: 36px; box-shadow: 0 20px 50px rgba(15,23,42,.08); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.demo-form input, .demo-form textarea { width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 13px 16px; font-size: 15px; font-family: inherit; outline: none; transition: border .15s, box-shadow .15s; }
.demo-form input:focus, .demo-form textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.demo-form textarea { min-height: 110px; resize: vertical; margin-bottom: 14px; }
.form-msg { margin-top: 12px; font-size: 14px; font-weight: 600; text-align: center; }
.form-msg.ok { color: #16a34a; }
.form-msg.err { color: #dc2626; }

/* contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.contact-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 30px 24px; text-align: center; text-decoration: none; color: #fff; transition: transform .18s, background .18s; display: block; }
.contact-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.contact-card .cicon { font-size: 34px; }
.contact-card strong { display: block; margin: 12px 0 4px; font-size: 17px; }
.contact-card span:last-child { color: #c7d2fe; font-size: 14px; word-break: break-all; }

/* footer */
.footer { background: var(--dark); color: #94a3b8; padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { font-size: 13px; }

/* chatbot */
/* floating buttons — right side */
.wa-fab { position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 60px; height: 60px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(37,211,102,.45); transition: transform .15s; text-decoration: none; }
.wa-fab:hover { transform: scale(1.08); }
.chat-fab { position: fixed; right: 22px; bottom: 94px; z-index: 200; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; font-size: 26px; background: linear-gradient(135deg, var(--indigo), var(--violet)); box-shadow: 0 12px 30px rgba(99,102,241,.45); transition: transform .15s; }
.chat-fab:hover { transform: scale(1.08); }
.chat-panel { position: fixed; right: 22px; bottom: 166px; z-index: 200; width: min(380px, calc(100vw - 44px)); height: 480px; max-height: calc(100vh - 202px); background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(15,23,42,.25); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #eef2f7; }
.chat-panel[hidden] { display: none; }
.chat-head { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.chat-head strong { display: block; font-size: 16px; }
.chat-head span { font-size: 12px; opacity: .85; }
.chat-head button { background: rgba(255,255,255,.18); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.msg { max-width: 85%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; }
.msg.bot { background: #fff; border: 1px solid #eef2f7; align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.msg.user { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.msg.bot a { color: var(--indigo); font-weight: 600; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-suggest button { font-size: 12.5px; font-weight: 600; background: #eef2ff; border: 1px solid #e0e7ff; color: var(--indigo); padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.chat-suggest button:hover { background: #e0e7ff; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eef2f7; background: #fff; }
.chat-input input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; font-size: 14px; outline: none; font-family: inherit; }
.chat-input input:focus { border-color: var(--indigo); }
.chat-input button { width: 44px; border: none; border-radius: 12px; background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; font-size: 17px; cursor: pointer; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a5b4fc; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* responsive */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3, .skill-groups { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-nav, .header-inner .btn { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px 20px 20px; gap: 4px; border-bottom: 1px solid #eef2f7; }
  .main-nav.open a { padding: 10px 4px; border-bottom: 1px solid #f1f5f9; }
  .cards-4, .cards-3, .skill-groups { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 120px 0 64px; }
}
