@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

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

:root {
  --p1: #7c3aed; --p2: #a78bfa; --p3: #ddd6fe; --p4: #f5f3ff;
  --dk: #1a1f2e; --dk2: #2d3561; --dk3: #3d2e6b;
  --tx1: #1a1f2e; --tx2: #475569; --tx3: #94a3b8;
  --bg: #f0f2f8; --card: #fff; --border: #e2e8f0;
  --gr: #22c55e; --pk: #f472b6; --bl: #3b82f6;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--tx1); margin: 0; }
.wrap { max-width: 700px; margin: 0 auto; padding-bottom: 4rem; }

/* ── COVER ── */
.cover { height: 260px; position: relative; overflow: hidden; background: var(--dk); border-radius: 0 0 28px 28px; }
.cover-bg { position: absolute; inset: 0; background: url('bia.JPG') center top / cover; opacity: .55; }
.cover-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,31,46,.7) 0%, rgba(45,53,97,.6) 50%, rgba(61,46,107,.65) 100%); }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 36px 36px; }
.cover-glow { position: absolute; top: -40px; right: -40px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(124,58,237,.25) 0%, transparent 70%); }
.cover-tag { position: absolute; top: 20px; right: 20px; font-size: 11px; letter-spacing: .08em; color: rgba(255,255,255,.35); background: rgba(255,255,255,.07); padding: 5px 12px; border-radius: 20px; border: .5px solid rgba(255,255,255,.12); }
.cover-badge { position: absolute; top: 20px; left: 20px; font-size: 10px; letter-spacing: .1em; color: rgba(167,139,250,.8); background: rgba(124,58,237,.15); padding: 4px 11px; border-radius: 20px; border: .5px solid rgba(124,58,237,.3); text-transform: uppercase; }
.cover-text { position: absolute; bottom: 36px; left: 28px; }
.cover-eyebrow { font-size: 10px; letter-spacing: .2em; color: rgba(255,255,255,.4); text-transform: uppercase; margin-bottom: 8px; }
.cover-title { font-family: 'Playfair Display', serif; font-size: 30px; color: #fff; line-height: 1.2; font-weight: 700; }
.cover-title .dot { color: #a78bfa; }
.cur { display: inline-block; width: 2px; height: 18px; background: #a78bfa; margin-left: 3px; vertical-align: middle; animation: blink 1.1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── FLOATING STATS ── */
.stats-float { position: absolute; bottom: -22px; right: 24px; display: flex; gap: 10px; }
.stat-pill { background: #fff; border: .5px solid var(--border); border-radius: 12px; padding: 8px 14px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--tx2); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.stat-pill strong { color: var(--p1); font-size: 13px; font-weight: 600; }

/* ── BODY ── */
.body { padding: 0 24px; position: relative; }
.avatar-wrap { margin-top: -54px; margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; }
.ava { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--bg); overflow: hidden; flex-shrink: 0; position: relative; }
.ava img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.online-dot { position: absolute; bottom: 6px; right: 4px; width: 15px; height: 15px; background: var(--gr); border-radius: 50%; border: 2.5px solid var(--bg); }
.status-pill { font-size: 11px; color: #64748b; background: #fff; border: .5px solid var(--border); padding: 5px 12px; border-radius: 20px; display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gr); }
.name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; margin-bottom: 2px; }
.handle { font-size: 12px; color: var(--p2); font-family: 'Inter', monospace; margin-bottom: 4px; }
.loc { font-size: 12px; color: var(--tx3); display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }

/* ── BIO ── */
.bio { font-size: 13.5px; line-height: 1.9; color: var(--tx2); margin-bottom: 18px; }
.bio strong { color: var(--tx1); font-weight: 500; }

/* ── CHIPS ── */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { font-size: 11.5px; padding: 5px 13px; border-radius: 20px; border: .5px solid var(--border); background: #fff; color: #64748b; display: flex; align-items: center; gap: 5px; transition: .2s; }
.chip:hover { transform: translateY(-1px); }
.chip.v { border-color: #ddd6fe; background: #f5f3ff; color: var(--p1); }
.chip.p { border-color: #fce7f3; background: #fdf2f8; color: #db2777; }
.chip.g { border-color: #d1fae5; background: #f0fdf4; color: #059669; }
.chip.b { border-color: #dbeafe; background: #eff6ff; color: var(--bl); }

/* ── DIVIDER / SECTION LABEL ── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 24px 0; }
.sec-lbl { font-size: 10.5px; letter-spacing: .15em; color: var(--tx3); text-transform: uppercase; margin-bottom: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.sec-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── CODE CARD ── */
.code-card { background: var(--dk); border-radius: 16px; padding: 20px 22px; font-family: 'Inter', monospace; font-size: 12px; line-height: 2.1; color: #94a3b8; margin-bottom: 24px; position: relative; overflow: hidden; }
.code-card::before { content: '● ● ●'; position: absolute; top: 12px; left: 16px; font-size: 10px; color: rgba(255,255,255,.2); letter-spacing: 4px; }
.code-inner { margin-top: 20px; }
.ck { color: #f472b6; } .cs { color: #7dd3fc; } .cn { color: #86efac; } .cv { color: #c4b5fd; } .cm { color: #475569; }

/* ── SKILLS BARS ── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.skill-item { background: #fff; border: .5px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.skill-name { font-weight: 500; color: var(--tx1); }
.skill-pct { color: var(--p1); font-weight: 600; }
.skill-bar { height: 5px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--p1), var(--p2)); transition: width 1.2s cubic-bezier(.4,0,.2,1); }

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; margin-bottom: 24px; }
.svc-card { background: #fff; border: .5px solid var(--border); border-radius: 14px; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; transition: .2s; cursor: default; }
.svc-card:hover { border-color: var(--p2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,.1); }
.svc-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.si1 { background: #f5f3ff; color: var(--p1); } .si2 { background: #fdf2f8; color: #db2777; } .si3 { background: #f0fdf4; color: #059669; } .si4 { background: #fffbeb; color: #d97706; } .si5 { background: #eff6ff; color: var(--bl); } .si6 { background: #fff1f2; color: #e11d48; }
.svc-name { font-size: 12.5px; font-weight: 600; color: var(--tx1); }
.svc-desc { font-size: 11px; color: #64748b; line-height: 1.55; }

/* ── TECH GRID ── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-bottom: 24px; }
.tech-card { background: #fff; border: .5px solid var(--border); border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: .2s; }
.tech-card:hover { border-color: var(--p2); transform: translateY(-2px); }
.tech-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.tech-icon img { width: 38px; height: 38px; object-fit: contain; }
.tech-name { font-size: 11px; font-weight: 500; color: var(--tx1); text-align: center; }
.tech-level { font-size: 9.5px; color: var(--tx3); text-align: center; }

/* ── PROJECTS ── */
.proj-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.proj { background: #fff; border: .5px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; cursor: pointer; transition: .2s; }
.proj:hover { border-color: var(--p2); box-shadow: 0 4px 16px rgba(124,58,237,.1); transform: translateY(-2px); }
.proj-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.pi1 { background: #f5f3ff; color: var(--p1); } .pi2 { background: #fdf2f8; color: #db2777; } .pi3 { background: #fffbeb; color: #d97706; } .pi4 { background: #f0fdf4; color: #059669; }
.proj-body { flex: 1; }
.proj-name { font-size: 13.5px; font-weight: 500; color: var(--tx1); margin-bottom: 3px; }
.proj-desc { font-size: 12px; color: #64748b; line-height: 1.6; margin-bottom: 8px; }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 4px; background: #f5f3ff; color: var(--p1); border: .5px solid #ddd6fe; font-family: 'Inter', monospace; }
.tag.p { background: #fdf2f8; color: #db2777; border-color: #fce7f3; }
.tag.g { background: #f0fdf4; color: #059669; border-color: #bbf7d0; }
.tag.b { background: #eff6ff; color: var(--bl); border-color: #bfdbfe; }
.tag.y { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.proj-arrow { font-size: 14px; color: var(--tx3); flex-shrink: 0; margin-top: 2px; transition: .2s; }
.proj:hover .proj-arrow { color: var(--p1); transform: translateX(3px); }

/* ── TIMELINE ── */
.timeline { margin-bottom: 24px; }
.tl-item { display: flex; gap: 16px; margin-bottom: 18px; }
.tl-dot-col { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p1); flex-shrink: 0; margin-top: 4px; }
.tl-line { width: 1px; flex: 1; background: var(--p3); margin-top: 4px; }
.tl-body { flex: 1; padding-bottom: 16px; }
.tl-year { font-size: 10px; color: var(--p2); font-weight: 600; letter-spacing: .08em; margin-bottom: 2px; }
.tl-title { font-size: 13.5px; font-weight: 500; color: var(--tx1); margin-bottom: 3px; }
.tl-desc { font-size: 12px; color: var(--tx2); line-height: 1.6; }

/* ── AI CHAT ── */
.ai-section { background: #fff; border: .5px solid var(--border); border-radius: 20px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 2px 16px rgba(0,0,0,.05); }
.ai-header { background: var(--dk); padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.ai-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--p1), #7c3aed); display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; flex-shrink: 0; }
.ai-header-info { flex: 1; }
.ai-name { font-size: 13px; font-weight: 600; color: #fff; }
.ai-subtitle { font-size: 11px; color: rgba(255,255,255,.45); }
.ai-status { display: flex; align-items: center; gap: 5px; font-size: 10px; color: rgba(167,139,250,.8); }
.ai-status-dot { width: 5px; height: 5px; border-radius: 50%; background: #a78bfa; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.ai-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; scroll-behavior: smooth; }
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-track { background: transparent; }
.ai-messages::-webkit-scrollbar-thumb { background: var(--p3); border-radius: 2px; }
.msg { display: flex; gap: 8px; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg.user { flex-direction: row-reverse; }
.msg-bubble { max-width: 75%; padding: 9px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.6; }
.msg.bot .msg-bubble { background: var(--p4); color: var(--tx1); border-radius: 4px 14px 14px 14px; }
.msg.user .msg-bubble { background: var(--p1); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--p4); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; color: var(--p1); }
.msg.user .msg-avatar { background: #e0e7ff; color: var(--bl); }
.typing-dots { display: flex; gap: 4px; padding: 10px 14px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--p2); animation: typingBounce .8s infinite; }
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } }
.ai-input-row { display: flex; gap: 8px; padding: 12px 14px; border-top: .5px solid var(--border); background: #fafbfc; }
.ai-quick { display: flex; gap: 6px; padding: 10px 14px 0; flex-wrap: wrap; }
.quick-btn { font-size: 11px; padding: 5px 12px; border-radius: 20px; border: .5px solid var(--p3); background: var(--p4); color: var(--p1); cursor: pointer; transition: .2s; white-space: nowrap; }
.quick-btn:hover { background: var(--p3); }
.ai-input { flex: 1; padding: 8px 12px; border-radius: 10px; border: .5px solid var(--border); font-family: 'Inter', sans-serif; font-size: 12.5px; outline: none; color: var(--tx1); background: #fff; }
.ai-input:focus { border-color: var(--p2); }
.ai-send { width: 36px; height: 36px; border-radius: 10px; background: var(--p1); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: .2s; flex-shrink: 0; }
.ai-send:hover { background: var(--dk3); }

/* ── CONTACT ── */
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cb { display: flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; transition: .2s; border: none; font-family: 'Inter', sans-serif; text-decoration: none; }
.cb:hover { opacity: .88; transform: translateY(-1px); }
.cb.fb { background: #1877f2; color: #fff; }
.cb.dc { background: #5865f2; color: #fff; }
.cb.soft { background: #fff; color: var(--tx2); border: .5px solid var(--border); }
.cb i { font-size: 15px; }

/* ── MODAL ── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(15,15,26,.55); backdrop-filter: blur(6px); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: 22px; max-width: 480px; width: 100%; padding: 28px 28px 24px; position: relative; animation: popIn .22s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: .5px solid var(--border); background: #f8f9fb; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--tx3); font-size: 16px; transition: .15s; }
.modal-close:hover { background: #f1f5f9; color: var(--tx2); }
.modal-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--tx1); margin-bottom: 6px; }
.modal-desc { font-size: 13.5px; color: var(--tx2); line-height: 1.75; margin-bottom: 18px; }
.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.modal-detail { background: #f8f9fb; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; }
.modal-detail-row { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: #64748b; padding: 5px 0; border-bottom: .5px solid #f1f5f9; }
.modal-detail-row:last-child { border-bottom: none; }
.modal-detail-row i { font-size: 15px; color: var(--p2); margin-top: 1px; flex-shrink: 0; }
.modal-detail-row strong { color: var(--tx1); font-weight: 500; min-width: 80px; }
.modal-btn { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; transition: .2s; border: none; font-family: 'Inter', sans-serif; background: var(--dk); color: #fff; width: 100%; }
.modal-btn:hover { opacity: .88; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   ══════════════════════════════════════ */
@media (max-width: 640px) {
  .wrap { padding-bottom: 3rem; }
  .body { padding: 0 16px; }

  /* Cover */
  .cover { height: 210px; border-radius: 0 0 20px 20px; }
  .cover-badge, .cover-tag { font-size: 9px; padding: 4px 9px; top: 14px; }
  .cover-badge { left: 14px; } .cover-tag { right: 14px; }
  .cover-text { left: 16px; bottom: 30px; right: 16px; }
  .cover-eyebrow { font-size: 9px; margin-bottom: 6px; }
  .cover-title { font-size: 22px; }
  .stats-float { right: 14px; bottom: -18px; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .stat-pill { font-size: 10px; padding: 6px 10px; }

  /* Avatar */
  .avatar-wrap { margin-top: -40px !important; flex-wrap: wrap; gap: 8px; }
  .ava { width: 80px; height: 80px; border-width: 3px; }
  .status-pill { font-size: 10px; padding: 4px 10px; }

  .name { font-size: 20px; }
  .bio { font-size: 13px; }

  /* Grids collapse to fewer columns */
  .skills-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .tech-icon img { width: 30px; height: 30px; }

  /* Code card */
  .code-card { padding: 16px; font-size: 11px; overflow-x: auto; }

  /* Timeline */
  .tl-item { gap: 12px; }
  .tl-title { font-size: 13px; }

  /* Projects */
  .proj { padding: 12px; gap: 10px; }
  .proj-icon { width: 36px; height: 36px; font-size: 16px; }

  /* AI chat */
  .ai-quick { gap: 5px; }
  .quick-btn { font-size: 10.5px; padding: 5px 10px; }
  .ai-messages { max-height: 240px; }
  .msg-bubble { max-width: 82%; font-size: 12px; }

  /* Contact buttons */
  .contact-row { gap: 6px; }
  .cb { padding: 10px 16px; font-size: 12.5px; flex: 1 1 auto; justify-content: center; }

  /* Modal */
  .modal { padding: 22px 20px 20px; border-radius: 18px; max-height: 90vh; overflow-y: auto; }
  .modal-title { font-size: 17px; }
  .modal-detail-row strong { min-width: 68px; }
}

@media (max-width: 380px) {
  .cover { height: 190px; }
  .cover-title { font-size: 19px; }
  .stats-float { position: static; margin-top: 10px; padding: 0 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
  .ava { width: 72px; height: 72px; }
}
