/* =====================
   RESET & VARIABLES
   ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #6366f1;
  --accent-light: #eef2ff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

/* =====================
   DARK THEME
   ===================== */
body.dark {
  --accent: #818cf8;
  --accent-light: #1e1b4b;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #374151;
  --bg: #111827;
}

body.dark nav {
  background: rgba(17, 24, 39, 0.85);
}

body.dark .stat-card {
  background: #1f2937;
}

body.dark .tag {
  background: #1f2937;
  color: var(--muted);
}

body.dark .project-card {
  background: #1f2937;
}

/* =====================
   NAV
   ===================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--text);
}

.theme-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
  color: var(--text);
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =====================
   SECTIONS
   ===================== */
section {
  padding: 100px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.section-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

/* =====================
   HERO
   ===================== */
#hero {
  padding-top: 160px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  width: fit-content;
}

.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

h1 span {
  color: var(--accent);
}

.tagline {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =====================
   ABOUT
   ===================== */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: .95rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: background .3s, border-color .3s;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* =====================
   PROJECTS
   ===================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all .2s;
  cursor: default;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(99, 102, 241, .1);
  transform: translateY(-2px);
}

.proj-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.proj-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.proj-desc {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f3f4f6;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background .3s;
}

.proj-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.proj-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.proj-link:hover {
  text-decoration: underline;
}

/* =====================
   CONTACT
   ===================== */
#contact {
  text-align: center;
}

#contact p {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: .95rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}

.contact-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.contact-chip svg {
  width: 18px;
  height: 18px;
}

/* =====================
   FOOTER
   ===================== */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 640px) {
  #about .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    display: none;
  }
}