/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0d1117;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Nav ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e6edf3;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #8b949e;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #e6edf3;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e6edf3;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 700px;
  margin: 0 auto;
}

.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

#hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 0.25rem;
}

.title {
  font-size: 1.3rem;
  color: #8b949e;
  margin-bottom: 1.5rem;
}

.bio {
  color: #8b949e;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: #8b949e;
  transition: color 0.2s, transform 0.2s;
}

.social-links a:hover {
  color: #58a6ff;
  transform: translateY(-2px);
}

.social-links svg {
  display: block;
}

/* ===== Projects ===== */
#projects {
  padding: 3rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

#projects h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ===== Cards ===== */
.card {
  position: relative;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem 1.5rem 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 166, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.category-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-tag[data-category="Web App"] {
  background: rgba(31, 111, 235, 0.2);
  color: #58a6ff;
}

.category-tag[data-category="Mobile App"] {
  background: rgba(35, 134, 53, 0.2);
  color: #3fb950;
}

.category-tag[data-category="Desktop App"] {
  background: rgba(110, 64, 201, 0.2);
  color: #bc8cff;
}

.category-tag[data-category="Chrome Extension"] {
  background: rgba(210, 153, 34, 0.2);
  color: #d29922;
}

.category-tag[data-category="Automation"] {
  background: rgba(210, 153, 34, 0.2);
  color: #e3b341;
}

.category-tag[data-category="Trading Bot"] {
  background: rgba(218, 54, 51, 0.2);
  color: #f85149;
}

.category-tag[data-category="SaaS"] {
  background: rgba(31, 111, 235, 0.25);
  color: #79c0ff;
}

.category-tag[data-category="AI Agent Infra"] {
  background: rgba(45, 186, 176, 0.2);
  color: #39d2c0;
}

.category-tag[data-category="Machine Learning"] {
  background: rgba(219, 97, 162, 0.2);
  color: #ff9bce;
}

.category-tag[data-category="Dev Tooling"] {
  background: rgba(240, 136, 62, 0.2);
  color: #f0883e;
}

.category-tag[data-category="Systems"] {
  background: rgba(139, 148, 158, 0.2);
  color: #8b949e;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 0.5rem;
}

.card p {
  color: #8b949e;
  font-size: 0.95rem;
  line-height: 1.6;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  background: #21262d;
  color: #8b949e;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

.card-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-github {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #58a6ff;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn-github:hover {
  background: #21262d;
}

.btn-demo {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #238636;
  border-radius: 6px;
  color: #3fb950;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn-demo:hover {
  background: rgba(35, 134, 54, 0.15);
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid #21262d;
  padding: 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #8b949e;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #58a6ff;
}

.footer-links svg {
  display: block;
}

.copyright {
  color: #8b949e;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 17, 23, 0.95);
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links.active {
    display: flex;
  }

  #hero {
    padding: 3rem 1.5rem 2rem;
  }

  #hero h1 {
    font-size: 2rem;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  #projects {
    padding: 2rem 1.5rem 3rem;
  }
}
