/* ============================================
   AE WORKS — Antonio Echeverría
   Stylesheet v1.0
   Estética: Dark Tech / AI / Developer
   ============================================ */

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

:root {
  --bg:        #080c14;
  --bg2:       #0d1220;
  --bg3:       #111827;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00e5ff;
  --accent2:   #7c3aed;
  --green:     #00ff88;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --font:      'Space Grotesk', sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 32px rgba(0,229,255,0.08);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

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

/* ---- PARTICLES ---- */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* ---- UTILITIES ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.highlight  { color: var(--accent); }
.highlight-green { color: var(--green); }
.mono { font-family: var(--mono); font-size: 0.9em; color: var(--accent); }
.section-tag { font-family: var(--mono); font-size: 0.8rem; color: var(--accent2); letter-spacing: 0.1em; margin-bottom: 16px; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; margin-bottom: 16px; }
.section-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 560px; margin-bottom: 48px; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #000;
  font-weight: 700; font-size: 0.95rem;
  padding: 14px 28px; border-radius: var(--radius);
  text-decoration: none; transition: var(--transition);
  border: none; cursor: pointer;
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,229,255,0.3); }
.btn-primary.small { padding: 10px 20px; font-size: 0.85rem; }
.btn-primary.full { width: 100%; justify-content: center; font-size: 1rem; padding: 16px; }

.btn-ghost {
  display: inline-flex; align-items: center;
  color: var(--text); font-weight: 500;
  padding: 14px 24px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--border);
  transition: var(--transition); background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,12,20,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo img {
  height: 144px; width: auto;
}
.hero-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 8px;
}
.hero-logo-hero {
  height: clamp(72px, 10vw, 128px);
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 20px rgba(0,229,255,0.45)) drop-shadow(0 0 8px rgba(124,58,237,0.3));
}
h1.hero-tagline {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text);
}
.nav-logo-text {
  font-family: var(--mono); font-size: 1.2rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
}
.nav-logo-text span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  background: var(--accent); color: #000; font-weight: 700;
  padding: 8px 20px; border-radius: 8px; transition: var(--transition);
}
.nav-links .nav-cta:hover { background: #fff; color: #000; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

.nav-mobile {
  display: none; flex-direction: column;
  padding: 16px 24px 20px; gap: 16px;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--text-muted); text-decoration: none; font-size: 1rem; font-weight: 500; }

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

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 24px 80px;
  max-width: 1120px; margin: 0 auto;
  gap: 64px; position: relative; z-index: 1;
}
.hero-content { flex: 1; }
.hero-visual { flex: 0 0 420px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.2);
  color: var(--green); font-size: 0.85rem; font-weight: 500;
  padding: 8px 16px; border-radius: 100px; margin-bottom: 24px;
}
.badge-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:0.3; } }

#hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 0; letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-muted); line-height: 1.8;
  margin-bottom: 36px; max-width: 560px;
  border-left: 2px solid rgba(0,229,255,0.25);
  padding-left: 16px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.stat-num { display: block; font-size: 1.35rem; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.stat-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.03em; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Code Window */
.code-window {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28ca41; }
.window-title { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); margin-left: 8px; }
.code-content { padding: 24px; font-family: var(--mono); font-size: 0.85rem; line-height: 1.8; }
.code-line { white-space: nowrap; }
.pad1 { padding-left: 20px; }
.pad2 { padding-left: 40px; }
.kw   { color: #c084fc; }
.var  { color: #60a5fa; }
.prop { color: #34d399; }
.str  { color: #fbbf24; }
.bool { color: #f87171; }

@media (max-width: 1024px) {
  #hero { flex-direction: column; padding: 100px 24px 60px; }
  .hero-visual { flex: none; width: 100%; max-width: 480px; }
}
@media (max-width: 600px) {
  .hero-visual { display: none; }
}

/* ============================================
   ABOUT
   ============================================ */
#about { padding: 100px 0; background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: start; }
.about-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag {
  background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.25);
  color: #a78bfa; font-size: 0.82rem; font-weight: 500;
  padding: 6px 14px; border-radius: 100px;
}

.about-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 288px; height: 288px; border-radius: 50%;
  background: #03060f;
  border: 2px solid rgba(0,229,255,0.35);
  box-shadow: 0 0 32px rgba(0,229,255,0.12), 0 0 8px rgba(0,229,255,0.08) inset;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 16px;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.profile-role { font-size: 0.85rem; color: var(--accent); font-family: var(--mono); margin-bottom: 20px; }
.profile-items { display: flex; flex-direction: column; gap: 12px; }
.profile-item { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--text-muted); }
.pi-icon { font-size: 1.1rem; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 380px; }
}

/* ============================================
   SERVICES
   ============================================ */
#services { padding: 100px 0; }
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 40px; }

.service-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.03), transparent);
  opacity: 0; transition: var(--transition);
}
.service-card:hover { border-color: rgba(0,229,255,0.3); transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card:hover::before { opacity: 1; }
.service-card.featured { border-color: rgba(0,229,255,0.25); background: linear-gradient(135deg, rgba(0,229,255,0.04), var(--bg2)); }

.service-icon { font-size: 2rem; margin-bottom: 16px; }
.service-badge {
  display: inline-block; background: var(--accent); color: #000;
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 100px; margin-bottom: 12px; letter-spacing: 0.05em;
}
.service-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.service-list { list-style: none; margin-bottom: 24px; }
.service-list li { color: var(--text-muted); font-size: 0.88rem; padding: 5px 0; padding-left: 18px; position: relative; }
.service-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.service-cta { color: var(--accent); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.service-cta:hover { text-decoration: underline; }

/* Availability banner en servicios */
.avail-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.25);
  border-radius: var(--radius-lg); padding: 20px 28px;
  margin-bottom: 32px; color: var(--green); font-size: 0.9rem;
}
.avail-banner strong { color: #fff; }
.avail-banner .btn-primary { margin-left: auto; flex-shrink: 0; }

.ai-banner {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(0,229,255,0.06));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-lg); padding: 28px 32px;
}
.ai-icon { font-size: 2.2rem; flex-shrink: 0; }
.ai-text { flex: 1; }
.ai-text strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.ai-text span { color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .ai-banner { flex-direction: column; text-align: center; }
}

/* ============================================
   STACK
   ============================================ */
#stack { padding: 100px 0; background: var(--bg2); }
.stack-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stack-group {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.stack-group-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 20px; }
.stack-items { display: flex; flex-direction: column; gap: 10px; }
.stack-item {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted);
  transition: var(--transition);
}
.stack-item:hover { border-color: var(--accent); color: var(--accent); }
.stack-item.highlight-item { border-color: rgba(124,58,237,0.3); color: #a78bfa; background: rgba(124,58,237,0.06); }

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

/* ============================================
   PORTFOLIO
   ============================================ */
#portfolio { padding: 100px 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.portfolio-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px;
  text-align: center; position: relative; transition: var(--transition);
}
.portfolio-card:hover { border-color: rgba(0,229,255,0.2); transform: translateY(-4px); }
.portfolio-card.coming { opacity: 0.6; }
.coming-badge {
  position: absolute; top: 16px; right: 16px;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
  color: #a78bfa; font-size: 0.72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 100px;
}
.portfolio-icon { font-size: 2.5rem; margin-bottom: 16px; }
.portfolio-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.portfolio-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.portfolio-card.cta-card { border-color: rgba(0,229,255,0.15); background: linear-gradient(135deg, rgba(0,229,255,0.04), var(--bg2)); }

@media (max-width: 900px) { .portfolio-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* ============================================
   WHY ME
   ============================================ */
#why { padding: 100px 0; background: var(--bg2); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.why-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.why-text p { color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }
.why-items { display: flex; flex-direction: column; gap: 28px; }
.why-item { display: flex; gap: 20px; }
.why-num { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--accent2); flex-shrink: 0; line-height: 1; }
.why-item strong { display: block; font-size: 1rem; margin-bottom: 6px; }
.why-item p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
@media (max-width: 768px) { .why-grid { grid-template-columns: 1fr; } }

/* ============================================
   CONTACT
   ============================================ */
#contact { padding: 100px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  color: var(--text); font-family: var(--font); font-size: 0.95rem;
  transition: border-color var(--transition); resize: vertical;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
.form-group select option { background: var(--bg3); }
.form-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.contact-card {
  background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(124,58,237,0.06));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 24px;
}
.cc-title { font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.contact-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.contact-links { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: var(--transition);
}
.contact-link:hover { border-color: var(--accent); }
.cl-icon { font-size: 1.2rem; }
.contact-link strong { display: block; font-size: 0.88rem; }
.contact-link span { font-size: 0.82rem; color: var(--text-muted); font-family: var(--mono); }
.availability {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--green);
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.15);
  border-radius: 100px; padding: 10px 16px;
}
.avail-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; flex-shrink: 0; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
#footer { padding: 60px 0 32px; background: var(--bg2); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo-wrap img { height: 128px; width: auto; }
.footer-logo-text { font-family: var(--mono); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.footer-logo-text span { color: var(--accent); }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color var(--transition); }
.footer-social a:hover { color: var(--accent); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.footer-col a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
}
.avail-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.avail-dot-sm { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ---- SCROLL REVEAL ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
