/* ========================================
   PORTFOLIO — STATIC CSS
   ======================================== */

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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --accent: #7c6bff;
  --accent-light: #b8b0ff;
  --accent2: #00d4aa;
  --text: #f0eff8;
  --muted: #8a8a9e;
  --border: rgba(255, 255, 255, 0.07);
  --font-display: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

.section {
  padding: 6rem 5vw;
  position: relative;
  overflow: hidden;
}

.section-surface {
  background: var(--surface);
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5vw;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

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

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(124, 107, 255, 0.35);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 5vw 5rem;
  position: relative;
  overflow: hidden;
}

/* Grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Noise texture */
.hero-noise,
.projects-noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Floating orbs */
.hero-orb,
.projects-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 15s ease-in-out infinite;
}

.hero-orb-1 {
  width: 350px;
  height: 350px;
  background: rgba(124, 107, 255, 0.08);
  top: 10%;
  right: 12%;
}

.hero-orb-2 {
  width: 250px;
  height: 250px;
  background: rgba(0, 212, 170, 0.06);
  bottom: 15%;
  left: 5%;
  animation-delay: -5s;
}

/* Static glows */
.hero-glow-1 {
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -100px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -20px) scale(1.05);
  }

  50% {
    transform: translate(-10px, 20px) scale(0.95);
  }

  75% {
    transform: translate(-30px, -10px) scale(1.02);
  }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 107, 255, 0.12);
  border: 1px solid rgba(124, 107, 255, 0.25);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  width: fit-content;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.4
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero h1 .accent2 {
  color: var(--accent2);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(124, 107, 255, 0.35);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 2rem;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.stat-num span {
  color: var(--accent);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ========================================
   CODE EDITOR ANIMATION
   ======================================== */
.hero-code {
  position: relative;
}

.code-editor {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(124, 107, 255, 0.15), 0 0 80px rgba(124, 107, 255, 0.07);
  animation: editorFloat 6s ease-in-out infinite;
}

.code-editor-glow {
  position: absolute;
  inset: -16px;
  background: rgba(124, 107, 255, 0.08);
  border-radius: 32px;
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

@keyframes editorFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red {
  background: rgba(255, 95, 87, 0.7);
}

.dot-yellow {
  background: rgba(255, 189, 46, 0.7);
}

.dot-green {
  background: rgba(39, 201, 63, 0.7);
}

.code-filename {
  margin-left: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.code-body {
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  min-height: 300px;
  position: relative;
}

.code-line {
  opacity: 0;
  transform: translateX(-10px);
  animation: codeLine 0.4s ease forwards;
}

@keyframes codeLine {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.code-line .line-num {
  display: inline-block;
  width: 28px;
  color: rgba(138, 138, 158, 0.4);
  font-size: 0.75rem;
  user-select: none;
  margin-right: 12px;
}

.code-line .kw {
  color: var(--accent);
}

.code-line .fn {
  color: var(--accent2);
}

.code-line .str {
  color: #ffaa44;
}

.code-line .num {
  color: #ff8aaa;
}

.code-line .tag {
  color: #7c9dff;
}

.code-line .attr {
  color: #ffaa44;
}

.code-line .sel {
  color: var(--accent2);
}

.code-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--muted);
  max-width: 500px;
  font-weight: 300;
}

/* ========================================
   SERVICES
   ======================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  border-color: rgba(124, 107, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(124, 107, 255, 0.08);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}

.service-card:hover .service-icon {
  transform: scale(1.15);
}

.service-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.service-price {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 500;
}

/* ========================================
   PROJECTS
   ======================================== */
.section-projects {
  position: relative;
  overflow: hidden;
}

.projects-bg-dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
}

.projects-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(124, 107, 255, 0.06);
  top: -100px;
  left: -100px;
}

.projects-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(0, 212, 170, 0.05);
  bottom: 10%;
  right: 5%;
  animation-delay: -8s;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 107, 255, 0.3);
  box-shadow: 0 20px 60px rgba(124, 107, 255, 0.08);
}

.project-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s;
}

.project-card:hover .project-thumb {
  transform: scale(1.03);
}

.thumb-site {
  background: linear-gradient(135deg, #1a1a3e, #2d1f5e);
}

.thumb-sistema {
  background: linear-gradient(135deg, #0f2a1a, #1a4a2e);
}

.thumb-auto {
  background: linear-gradient(135deg, #2a1a0f, #4a2e0f);
}

.thumb-bot {
  background: linear-gradient(135deg, #1a1a2a, #2a1a4a);
}

.project-body {
  padding: 1.5rem;
}

.project-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 0.75rem;
}

.tag-site {
  background: rgba(124, 107, 255, 0.15);
  color: #b8b0ff;
}

.tag-sistema {
  background: rgba(0, 212, 170, 0.12);
  color: #00d4aa;
}

.tag-auto {
  background: rgba(255, 165, 0, 0.12);
  color: #ffaa44;
}

.tag-bot {
  background: rgba(255, 100, 130, 0.12);
  color: #ff8aaa;
}

.project-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tech-pill {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

.demo-banner {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.25);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: #ffaa44;
  margin-top: 2rem;
  display: inline-block;
}

/* ========================================
   PROCESS
   ======================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.step {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.3s, border-color 0.3s;
}

.step:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 107, 255, 0.2);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(124, 107, 255, 0.2);
  line-height: 1;
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.step:hover .step-number {
  color: rgba(124, 107, 255, 0.45);
}

.step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ========================================
   CONTACT
   ======================================== */
.contact-wrapper {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: rgba(124, 107, 255, 0.1);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
}

.contact-desc {
  color: var(--muted);
  margin-bottom: 2rem;
  font-weight: 300;
  position: relative;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.contact-link.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.25);
  color: #25d366;
}

.contact-link.whatsapp:hover {
  background: rgba(37, 211, 102, 0.18);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  text-align: center;
  padding: 2rem 5vw;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

footer strong {
  color: var(--text);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-code {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(16px);
    padding: 1.5rem 5vw;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }
}