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

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --accent: #0e75b6;
  --accent2: #58a6ff;
  --green: #3fb950;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --card: #161b22;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent2); text-decoration: none; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { font-family: 'Fira Code', monospace; color: var(--accent2); font-size: 1.1rem; font-weight: 500; }
nav ul { list-style: none; display: flex; gap: 28px; align-items: center; }
nav ul a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
nav ul a:hover { color: var(--text); }
.btn-nav {
  background: var(--accent); color: #fff !important;
  padding: 7px 16px; border-radius: 6px; font-size: 0.85rem !important;
  transition: opacity 0.2s !important;
}
.btn-nav:hover { opacity: 0.85; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 80px 24px 40px;
  max-width: 1100px; margin: 0 auto;
  gap: 60px;
}
.hero-inner { flex: 1; }
.hero-tag { color: var(--text-muted); font-size: 1rem; margin-bottom: 8px; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.typewriter {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--green); font-weight: 500;
  font-family: 'Fira Code', monospace;
  margin-bottom: 20px;
}
.hero-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 480px; margin-bottom: 32px; }
.hero-desc strong { color: var(--text); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 8px; font-weight: 500;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; color: #fff; }
.btn-secondary {
  border: 1px solid var(--border); color: var(--text);
  padding: 12px 24px; border-radius: 8px; font-weight: 500;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent2); color: var(--accent2); }
.btn-secondary.small { padding: 8px 16px; font-size: 0.85rem; }

/* CODE CARD */
.hero-graphic { flex: 1; display: flex; justify-content: center; }
.code-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.code-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.code-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border);
}
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
pre { font-family: 'Fira Code', monospace; font-size: 0.85rem; line-height: 1.7; }
.kw { color: #ff7b72; }
.cls { color: #d2a8ff; }
.str { color: #a5d6ff; }
.fn  { color: #79c0ff; }

/* SECTIONS */
.section { padding: 80px 24px; }
.section-dark { background: var(--bg2); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  margin-bottom: 48px; text-align: center;
  position: relative;
}
.section-title::after {
  content: ''; display: block;
  width: 50px; height: 3px;
  background: var(--accent); border-radius: 2px;
  margin: 12px auto 0;
}

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 1.02rem; }
.about-text strong { color: var(--text); }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  text-align: center;
}
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--accent2); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skill-group {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.skill-group h3 { font-size: 1rem; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  background: rgba(14, 117, 182, 0.15); border: 1px solid rgba(14, 117, 182, 0.3);
  color: var(--accent2); padding: 4px 12px; border-radius: 20px; font-size: 0.82rem;
}

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: var(--accent2); transform: translateY(-4px); }
.project-card.featured { border-color: var(--accent); }
.project-header { display: flex; justify-content: space-between; align-items: center; }
.project-icon { font-size: 1.8rem; }
.badge {
  background: rgba(14, 117, 182, 0.2); color: var(--accent2);
  font-size: 0.75rem; padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(14, 117, 182, 0.3);
}
.project-card h3 { font-size: 1.05rem; font-weight: 600; }
.project-card p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.78rem; padding: 3px 10px; border-radius: 20px;
}
.project-link { color: var(--accent2); font-size: 0.88rem; font-weight: 500; }
.project-link:hover { text-decoration: underline; }

/* OPEN SOURCE */
.oss-list { display: flex; flex-direction: column; gap: 16px; }
.oss-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.oss-left { display: flex; align-items: flex-start; gap: 16px; }
.oss-icon { font-size: 1.5rem; }
.oss-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; font-family: 'Fira Code', monospace; }
.oss-item p { color: var(--text-muted); font-size: 0.9rem; }
.oss-item code {
  background: var(--bg2); padding: 1px 6px; border-radius: 4px;
  font-family: 'Fira Code', monospace; font-size: 0.85em; color: var(--accent2);
}

/* CONTACT */
.contact-container { text-align: center; }
.contact-desc { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 36px; }
.contact-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 1rem; color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-card span:first-child { font-size: 2rem; }
.contact-card:hover { border-color: var(--accent2); transform: translateY(-4px); color: var(--accent2); }

/* FOOTER */
footer {
  text-align: center; padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent2); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 100px; }
  .hero-desc { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .oss-item { flex-direction: column; align-items: flex-start; }
  nav ul { gap: 16px; }
}
