/* ==========================================
   ARGOS NETWORK — Portfolio CSS
   Diseño dark tech / ciberseguridad
   ========================================== */

/* --- VARIABLES --- */
:root {
  --bg: #080c14;
  --bg-2: #0d1220;
  --bg-card: #0f1622;
  --bg-card-hover: #141b2d;
  --border: rgba(100, 160, 255, 0.12);
  --border-hover: rgba(100, 160, 255, 0.3);
  --accent: #4f9cf9;
  --accent-2: #7b4fe8;
  --accent-glow: rgba(79, 156, 249, 0.2);
  --text: #e2e8f0;
  --text-muted: #7a8a9e;
  --text-dim: #3d4f63;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --cyan: #06b6d4;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.6);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 72px;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

/* --- CANVAS PARTÍCULAS --- */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* --- CURSOR --- */
.cursor, .cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(79, 156, 249, 0.5);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s, background 0.3s;
}
.cursor.hovering { transform: translate(-50%, -50%) scale(1.5); }
.cursor-follower.hovering {
  width: 48px; height: 48px;
  background: rgba(79, 156, 249, 0.08);
}
@media (pointer: coarse) { .cursor, .cursor-follower { display: none; } }

/* --- CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  line-height: 1;
}
.argos-logo-svg {
  display: block;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.nav-logo:hover .argos-logo-svg { opacity: 0.85; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(79, 156, 249, 0.08);
}
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition) !important;
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79, 156, 249, 0.4) !important;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(79, 156, 249, 0.1); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }
.btn svg { transition: transform var(--transition); flex-shrink: 0; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 156, 249, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 156, 249, 0.5);
}
.btn-secondary {
  background: rgba(79, 156, 249, 0.1);
  color: var(--accent);
  border: 1px solid rgba(79, 156, 249, 0.3);
}
.btn-secondary:hover {
  background: rgba(79, 156, 249, 0.15);
  transform: translateY(-2px);
}
.btn-large { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- GRADIENT TEXT --- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- SECTION HEADER --- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 20px; height: 1.5px;
  background: var(--accent);
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
  gap: 48px;
}

.hero-bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79, 156, 249, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 156, 249, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  flex: 1;
  z-index: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stat-plus { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  flex: 0 0 auto;
  position: relative;
  width: min(420px, 100%);
  z-index: 1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(79, 156, 249, 0.15), transparent 70%);
  top: -50px; left: -50px;
  animation: orb-float 6s ease-in-out infinite;
}
.orb-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(123, 79, 232, 0.12), transparent 70%);
  bottom: -20px; right: 20px;
  animation: orb-float 8s ease-in-out infinite reverse;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 60px rgba(79, 156, 249, 0.08);
  position: relative;
  z-index: 2;
}
.hcard-header {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.hcard-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.hcard-dot.green { background: var(--green); }
.hcard-dot.yellow { background: var(--yellow); }
.hcard-dot.red { background: var(--red); }
.hcard-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
}
.code-line { display: block; }
.code-indent { padding-left: 20px; }
.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-string { color: #c3e88d; }
.code-fn { color: #82aaff; }
.code-comment { color: #546e7a; font-style: italic; }

.floating { animation: float 4s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.typing .code-comment {
  overflow: hidden;
  border-right: 2px solid var(--accent);
  animation: blink-caret 1s step-end infinite;
}
@keyframes blink-caret {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: transparent; }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  z-index: 1;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================
   TECH BANNER
   ========================================== */
.tech-banner {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 5%, transparent 95%, var(--bg) 100%);
}
.tech-track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: scroll-tech 30s linear infinite;
  width: max-content;
}
.tech-track span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.tech-track span:nth-child(even) {
  color: var(--accent);
  opacity: 0.4;
}
@keyframes scroll-tech {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================
   SERVICES
   ========================================== */
.services {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  cursor: default;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,156,249,0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(79,156,249,0.08);
  background: var(--bg-card-hover);
}
.service-card:hover::before { opacity: 1; }

.card-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.service-card:hover .card-glow { opacity: 1; }

.card-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 156, 249, 0.08);
  border: 1px solid rgba(79, 156, 249, 0.15);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 20px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.card-icon svg { width: 28px; height: 28px; }
.service-card:hover .card-icon {
  background: rgba(79, 156, 249, 0.15);
  border-color: rgba(79, 156, 249, 0.3);
  transform: scale(1.05);
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.8;
}
.card-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}
.card-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.card-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-features li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}
.card-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.6;
  font-size: 0.7rem;
}
.card-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79,156,249,0.08);
  border: 1px solid rgba(79,156,249,0.15);
  border-radius: 8px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--transition), transform var(--transition);
}
.service-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Colores únicos por card */
.service-card[data-index="1"] .card-icon { color: var(--cyan); background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.15); }
.service-card[data-index="1"] .card-glow { background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%); }
.service-card[data-index="1"] .card-tag { color: var(--cyan); }
.service-card[data-index="1"] .card-arrow { color: var(--cyan); }
.service-card[data-index="1"] .card-features li::before { color: var(--cyan); }

.service-card[data-index="2"] .card-icon { color: var(--green); background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.15); }
.service-card[data-index="2"] .card-glow { background: radial-gradient(circle, rgba(34,197,94,0.12), transparent 70%); }
.service-card[data-index="2"] .card-tag { color: var(--green); }
.service-card[data-index="2"] .card-arrow { color: var(--green); }
.service-card[data-index="2"] .card-features li::before { color: var(--green); }

.service-card[data-index="3"] .card-icon { color: var(--yellow); background: rgba(234,179,8,0.08); border-color: rgba(234,179,8,0.15); }
.service-card[data-index="3"] .card-glow { background: radial-gradient(circle, rgba(234,179,8,0.12), transparent 70%); }
.service-card[data-index="3"] .card-tag { color: var(--yellow); }
.service-card[data-index="3"] .card-arrow { color: var(--yellow); }
.service-card[data-index="3"] .card-features li::before { color: var(--yellow); }

.service-card[data-index="4"] .card-icon { color: #c084fc; background: rgba(192,132,252,0.08); border-color: rgba(192,132,252,0.15); }
.service-card[data-index="4"] .card-glow { background: radial-gradient(circle, rgba(192,132,252,0.12), transparent 70%); }
.service-card[data-index="4"] .card-tag { color: #c084fc; }
.service-card[data-index="4"] .card-arrow { color: #c084fc; }
.service-card[data-index="4"] .card-features li::before { color: #c084fc; }

.service-card[data-index="5"] .card-icon { color: #fb923c; background: rgba(251,146,60,0.08); border-color: rgba(251,146,60,0.15); }
.service-card[data-index="5"] .card-glow { background: radial-gradient(circle, rgba(251,146,60,0.12), transparent 70%); }
.service-card[data-index="5"] .card-tag { color: #fb923c; }
.service-card[data-index="5"] .card-arrow { color: #fb923c; }
.service-card[data-index="5"] .card-features li::before { color: #fb923c; }

/* ==========================================
   ABOUT
   ========================================== */
.about {
  position: relative;
  z-index: 1;
  padding: 120px 0;
  background: linear-gradient(to bottom, transparent, rgba(79,156,249,0.02), transparent);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-visual { position: relative; }
.about-orb {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(79,156,249,0.08), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  pointer-events: none;
}
.terminal-window {
  position: relative;
  z-index: 1;
  background: #0a0f1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  font-family: var(--mono);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.terminal-body {
  padding: 20px 24px;
  font-size: 0.82rem;
  line-height: 2;
}
.terminal-line { display: block; }
.t-prompt { color: var(--accent); margin-right: 8px; }
.t-output { color: var(--text-muted); padding-left: 16px; }
.t-cyan { color: var(--cyan); }
.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.about-content .section-tag { display: block; }
.about-content h2 { margin-bottom: 20px; }
.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}
.about-values {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.value-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79,156,249,0.08);
  border: 1px solid rgba(79,156,249,0.15);
  border-radius: 10px;
  color: var(--accent);
}
.value-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.value-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================
   PORTFOLIO
   ========================================== */
.portfolio {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  color: var(--text);
  background: rgba(79,156,249,0.1);
  border-color: rgba(79,156,249,0.3);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}
.portfolio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.portfolio-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.portfolio-item.hidden { display: none; }
.portfolio-img {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portfolio-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, hsla(var(--hue), 70%, 50%, 0.12), transparent 70%);
}
.portfolio-icon {
  position: relative;
  z-index: 1;
  opacity: 0.8;
  transition: transform var(--transition), opacity var(--transition);
}
.portfolio-item:hover .portfolio-icon {
  transform: scale(1.1);
  opacity: 1;
}
.portfolio-info { padding: 24px; }
.portfolio-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.8;
}
.portfolio-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}
.portfolio-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.portfolio-tech {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.portfolio-tech span {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  background: rgba(79,156,249,0.08);
  border: 1px solid rgba(79,156,249,0.15);
  border-radius: 4px;
  color: var(--accent);
}

/* ==========================================
   CTA SECTION
   ========================================== */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,156,249,0.06) 0%, rgba(123,79,232,0.06) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-content {
  position: relative;
  text-align: center;
}
.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 640px;
  margin: 0 auto 16px;
}
.cta-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}
.contact-info { padding-top: 8px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.contact-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79,156,249,0.08);
  border: 1px solid rgba(79,156,249,0.15);
  border-radius: 10px;
  color: var(--accent);
}
.contact-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-item span {
  font-size: 0.95rem;
  color: var(--text);
}
.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}
.social-link {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link:hover {
  color: var(--accent);
  background: rgba(79,156,249,0.1);
  border-color: rgba(79,156,249,0.3);
  transform: translateY(-2px);
}

/* FORM */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8a9e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-group select option {
  background: var(--bg-2);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(79,156,249,0.5);
  background: rgba(79,156,249,0.04);
  box-shadow: 0 0 0 3px rgba(79,156,249,0.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error {
  font-size: 0.78rem;
  color: var(--red);
  min-height: 16px;
  display: block;
}
.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 10px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 12px;
}
.form-success.show { display: flex; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.6;
}
.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================
   ANIMACIONES DE ENTRADA
   ========================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding-top: calc(var(--nav-h) + 64px); }
  .hero-description { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { width: 100%; max-width: 500px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(8,12,20,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link { width: 100%; padding: 12px 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .contact-form { padding: 24px 16px; }
  .hero-stats { gap: 16px; }
  .stat-divider { display: none; }
}
