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

:root {
  --bg: #09090b;
  --bg-card: #131318;
  --bg-card-hover: #1a1a22;
  --border: #252530;
  --purple: #a855f7;
  --purple-dark: #7c3aed;
  --purple-light: #c084fc;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-muted: #71717a;
  --gradient-1: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #4f46e5 100%);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(9,9,11,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 40px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* ===== Buttons ===== */
.btn-primary {
  background: var(--gradient-1); color: #fff; border: none;
  padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(168,85,247,0.3);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 0 30px rgba(168,85,247,0.5); }
.btn-ghost { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.btn-ghost:hover { color: var(--text); }
.btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--purple); background: rgba(168,85,247,0.05); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 120px 24px 80px; overflow: hidden;
  gap: 80px; flex-wrap: wrap;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(168,85,247,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.2);
  color: var(--purple-light); font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 24px;
}
.badge-dot { width: 6px; height: 6px; background: var(--purple); border-radius: 50%; box-shadow: 0 0 8px var(--purple); }
.hero h1 { font-size: clamp(42px, 6vw, 64px); font-weight: 900; line-height: 1.08; letter-spacing: -2px; margin-bottom: 20px; }
.gradient-text { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 17px; color: var(--text-dim); line-height: 1.7; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }

.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag {
  background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.18);
  color: var(--purple-light); font-size: 13px; padding: 5px 14px; border-radius: 100px;
  font-weight: 500; letter-spacing: 0.2px;
}

/* ===== Preview Window ===== */
.hero-preview { position: relative; z-index: 1; }
.preview-window {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; width: 480px; max-width: 100%;
  box-shadow: 0 0 80px rgba(168,85,247,0.08), 0 20px 60px rgba(0,0,0,0.4);
}
.preview-bar {
  height: 36px; background: #0f0f15; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
}
.preview-bar span { width: 10px; height: 10px; border-radius: 50%; }
.preview-bar span:nth-child(1) { background: #ff5f56; }
.preview-bar span:nth-child(2) { background: #ffbd2e; }
.preview-bar span:nth-child(3) { background: #27c93f; }
.preview-code { padding: 24px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; line-height: 2; }
.line { display: block; }
.keyword { color: #c084fc; }
.string { color: #6ee7b7; }
.fn { color: #f9a8d4; }
.comment { color: #555; }

/* ===== Sections ===== */
section { padding: 100px 24px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; text-align: center; letter-spacing: -1px; margin-bottom: 12px; }
.section-desc { text-align: center; color: var(--text-dim); font-size: 17px; max-width: 520px; margin: 0 auto 56px; }

/* ===== About ===== */
.about { max-width: 1100px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: start; margin-top: 48px; }
.about-text p { color: var(--text-dim); font-size: 16px; line-height: 1.8; margin-bottom: 16px; }
.about-text strong { color: var(--text); }
.about-stats { display: flex; gap: 40px; margin-top: 28px; }
.astat span { display: block; font-size: 26px; font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.astat { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.about-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; position: sticky; top: 100px;
}
.about-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gradient-1); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #fff;
}
.about-avatar::before { content: "B"; }
.about-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.about-role { color: var(--purple-light); font-size: 14px; margin-bottom: 20px; }
.about-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.about-links a {
  color: var(--text-dim); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.about-links a:hover { border-color: var(--purple); color: var(--text); }

/* ===== Skills ===== */
.skills { max-width: 1000px; margin: 0 auto; }
.skill-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.skill-cat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color 0.3s;
}
.skill-cat:hover { border-color: rgba(168,85,247,0.4); }
.skill-cat h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  background: rgba(168,85,247,0.06); border: 1px solid rgba(168,85,247,0.15);
  color: var(--text-dim); font-size: 12px; padding: 4px 12px; border-radius: 6px;
  font-weight: 500; transition: background 0.2s, color 0.2s;
}
.skill-tags span:hover { background: rgba(168,85,247,0.15); color: var(--text); }

/* ===== Projects ===== */
.projects { max-width: 1100px; margin: 0 auto; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: border-color 0.3s, transform 0.3s;
}
.project-card:hover { border-color: var(--purple); transform: translateY(-4px); }
.project-img {
  height: 160px; position: relative;
  background: linear-gradient(135deg, #1a1025 0%, #0d0d1a 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.project-img::after {
  font-size: 60px; opacity: 0.3;
}
.project-img.img-agent::after { content: "🧠"; }
.project-img.img-rag::after { content: "🔗"; }
.project-img.img-data::after { content: "📊"; }
.project-img.img-llm::after { content: "📖"; }
.project-info { padding: 24px; }
.project-tag { font-size: 11px; color: var(--purple-light); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.project-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.project-info p { color: var(--text-dim); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.project-tech { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.project-tech span {
  background: rgba(168,85,247,0.08); color: var(--text-dim); font-size: 11px;
  padding: 3px 10px; border-radius: 4px; font-weight: 500;
}
.project-link {
  color: var(--purple-light); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: color 0.2s;
}
.project-link:hover { color: var(--text); }

/* ===== Contact ===== */
.contact { position: relative; padding: 100px 24px; text-align: center; overflow: hidden; }
.cta-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(124,58,237,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168,85,247,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.cta-content { position: relative; z-index: 1; }
.contact h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; }
.contact p { color: var(--text-dim); font-size: 17px; max-width: 480px; margin: 0 auto 40px; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-link-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; text-decoration: none; min-width: 180px;
  transition: border-color 0.3s, transform 0.3s;
}
.contact-link-item:hover { border-color: var(--purple); transform: translateY(-4px); }
.contact-icon { font-size: 28px; }
.contact-link-item span:not(.contact-icon) { font-size: 16px; font-weight: 600; color: var(--text); }
.contact-link-item small { font-size: 12px; color: var(--text-muted); }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 48px 24px; text-align: center; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-inner p { color: var(--text-dim); font-size: 14px; margin-bottom: 6px; }
.footer-social { display: flex; gap: 20px; justify-content: center; margin: 16px 0; }
.footer-social a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-social a:hover { color: var(--purple-light); }
.footer-copy { color: var(--text-muted); font-size: 12px; margin-top: 12px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-card { position: static; }
  .skill-cats { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding-top: 100px; gap: 40px; }
  .hero-preview .preview-window { width: 100%; }
  .preview-code { font-size: 11px; padding: 16px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .hero-btns { flex-direction: column; }
  .about-stats { gap: 20px; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-link-item { min-width: auto; width: 100%; max-width: 260px; }
}
