@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: #252535;
  --text: #e4e4ec;
  --text-muted: #8888a0;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff0;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #a855f7 50%, #06b6d4 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.theme-btn:hover {
  border-color: var(--accent);
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a855f7);
  transition: background 0.3s ease;
}

.theme-btn[data-theme="1"] .theme-icon {
  background: linear-gradient(135deg, #facc15, #3b82f6);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 32px var(--accent-glow);
}

/* Sections */
section {
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent);
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  overflow: hidden;
  font-family: "ui-monospace", "SF Mono", "Cascadia Code", monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.code-block .keyword {
  color: #c792ea;
}
.code-block .string {
  color: #c3e88d;
}
.code-block .func {
  color: #82aaff;
}
.code-block .comment {
  color: #546e7a;
}
.code-block .prop {
  color: #ffcb6b;
}

/* Services */
#services {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Technologies */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.tech-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Contact */
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
}

.contact-email {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.25);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 24px;
  transition: all 0.3s ease;
}

.contact-email:hover {
  background: rgba(108, 92, 231, 0.2);
}

.contact-info {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 2;
}

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

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

footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 20px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
