:root {
  --bg: #0a0a0f;
  --text: #e0e0e0;
  --text-secondary: #c0c0d0;
  --text-light: #a0a0b0;
  --text-muted: #888;
  --heading: #f0f0f0;
  --header-bg: rgba(10, 10, 15, 0.9);
  --border: rgba(255, 255, 255, 0.05);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.06);
  --section-alt: rgba(255, 255, 255, 0.015);
  --nav-bg-mobile: rgba(10, 10, 15, 0.98);
  --primary: #6c63ff;
  --primary-hover: #5a52e0;
  --primary-shadow: rgba(108, 99, 255, 0.3);
  --primary-bg: rgba(108, 99, 255, 0.05);
  --primary-bg-light: rgba(108, 99, 255, 0.12);
  --primary-text-light: #8b84ff;
  --text-footer: #666;
  --text-muted-footer: #555;
  --gradient-hero: radial-gradient(circle at 30% 50%, rgba(108, 99, 255, 0.06), transparent 50%),
                   radial-gradient(circle at 70% 50%, rgba(108, 99, 255, 0.04), transparent 50%);
  --project-gradient: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(108, 99, 255, 0.05));
  --toggle-color: #f0f0f0;
}

[data-theme="light"] {
  --bg: #f8f9fa;
  --text: #333;
  --text-secondary: #555;
  --text-light: #666;
  --text-muted: #888;
  --heading: #1a1a2e;
  --header-bg: rgba(255, 255, 255, 0.95);
  --border: rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --section-alt: rgba(0, 0, 0, 0.02);
  --nav-bg-mobile: rgba(255, 255, 255, 0.98);
  --text-footer: #999;
  --text-muted-footer: #bbb;
  --gradient-hero: radial-gradient(circle at 30% 50%, rgba(108, 99, 255, 0.08), transparent 50%),
                   radial-gradient(circle at 70% 50%, rgba(108, 99, 255, 0.05), transparent 50%);
  --project-gradient: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(108, 99, 255, 0.03));
  --toggle-color: #1a1a2e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  font-family: 'Courier New', monospace;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--heading);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--toggle-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 10px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

.theme-toggle:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--toggle-color);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 10px;
  touch-action: manipulation;
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: 500;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.1;
}

h1 span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--heading);
  margin-bottom: 8px;
}

.section-title span {
  color: var(--primary);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 56px;
  font-size: 1rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.skill-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(108, 99, 255, 0.12);
  background: var(--primary-bg);
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.skill-card h3 {
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 8px;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Projects */
#projects {
  background: var(--section-alt);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(108, 99, 255, 0.12);
  border-color: rgba(108, 99, 255, 0.25);
}

.project-image {
  height: 200px;
  background: var(--project-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--primary);
  font-size: 3rem;
  position: relative;
}

.project-image span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 1px;
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  background: var(--primary-bg-light);
  color: var(--primary-text-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Contact */
#contact {
  text-align: center;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  margin-top: 8px;
}

.contact-btn {
  font-size: 1.05rem;
  padding: 14px 36px;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-social a {
  color: var(--text-footer);
  font-size: 1.3rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted-footer);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--nav-bg-mobile);
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
