*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080b12;
  --surface: #0f1420;
  --surface2: #151c2e;
  --border: rgba(255,255,255,0.07);
  --accent: #5b6ef5;
  --accent2: #a855f7;
  --text: #e8eaf0;
  --muted: #6b7280;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(91,110,245,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,110,245,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-glow {
  position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px; z-index: 0;
  background: radial-gradient(ellipse, rgba(91,110,245,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,11,18,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--text);
}

.dot { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(91,110,245,0.1);
  border: 1px solid rgba(91,110,245,0.3);
  color: #818cf8;
  font-size: 0.8rem; font-weight: 500;
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 2rem;
}

.hero-tag::before {
  content: '';
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-btns {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 4rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #4a5de0; transform: translateY(-1px); }
.btn-primary.small { padding: 9px 20px; font-size: 0.85rem; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }

.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  flex-wrap: wrap; justify-content: center;
}

.stat span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text);
  display: block;
}
.stat p { font-size: 0.8rem; color: var(--muted); }

.stat-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

/* Sections */
.section {
  position: relative; z-index: 1;
  padding: 6rem 2rem;
}
.section.alt { background: rgba(15,20,32,0.5); }

.section-inner {
  max-width: 1100px; margin: 0 auto;
}
.section-inner.center { text-align: center; }

.section-label {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: #9ca3af;
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.skill-card:hover {
  border-color: rgba(91,110,245,0.4);
  background: rgba(91,110,245,0.05);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column; gap: 0.75rem;
}

.project-card:hover {
  border-color: rgba(91,110,245,0.35);
  transform: translateY(-3px);
}

.project-card.featured {
  border-color: rgba(168,85,247,0.3);
  background: linear-gradient(135deg, rgba(168,85,247,0.05), var(--surface));
}

.project-card.open {
  border: 1px dashed rgba(91,110,245,0.3);
  background: rgba(91,110,245,0.03);
  justify-content: center; align-items: flex-start;
}

.project-icon { font-size: 1.8rem; }

.project-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 600;
}

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 0.5rem;
}

.project-tags span {
  background: rgba(91,110,245,0.1);
  border: 1px solid rgba(91,110,245,0.2);
  color: #818cf8;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Contact */
.contact-sub {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 3rem;
  font-size: 1rem;
}

.contact-cards {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  min-width: 200px;
  transition: border-color 0.2s, transform 0.2s;
}

.contact-card:hover {
  border-color: rgba(91,110,245,0.4);
  transform: translateY(-3px);
}

.contact-card svg {
  width: 32px; height: 32px;
  color: var(--accent);
}

.contact-card span {
  font-weight: 600;
  font-size: 1rem;
}

.contact-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Footer */
footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}
