/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #050a14;
  --bg2:        #0a1628;
  --accent:     #00d4ff;
  --accent2:    #7b5ea7;
  --accent3:    #00ff9d;
  --text:       #e2e8f0;
  --text-muted: #7a8fa6;
  --card-bg:    rgba(255,255,255,0.03);
  --card-border:rgba(0,212,255,0.12);
  --radius:     16px;
  --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===========================
   CANVAS PARTÍCULAS
=========================== */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===========================
   NAVBAR
=========================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(5,10,20,0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,212,255,0.08);
  transition: background var(--transition);
}
#navbar.scrolled {
  background: rgba(5,10,20,0.92);
  border-bottom-color: rgba(0,212,255,0.18);
}

.nav-brand {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.3rem; font-weight: 700;
  text-decoration: none; color: var(--text);
}
.brand-icon { color: var(--accent); font-size: 1.1rem; }
.brand-text .accent { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }

.nav-mail-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  font-size: .85rem !important;
  font-weight: 600 !important;
  transition: opacity var(--transition), transform var(--transition) !important;
}
.nav-mail-btn:hover { opacity: .85; transform: translateY(-1px); color: #fff !important; }

.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);
}

/* ===========================
   SECTIONS BASE
=========================== */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 { font-size: 2.5rem; font-weight: 800; margin: .5rem 0 1rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.25);
  padding: .3rem .9rem;
  border-radius: 50px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content { flex: 1; max-width: 580px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600;
  color: var(--accent3);
  background: rgba(0,255,157,.08);
  border: 1px solid rgba(0,255,157,.25);
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.dot {
  width: 8px; height: 8px;
  background: var(--accent3);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.hero-sub strong { color: var(--accent); }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.1); }

/* Hero Visual / Orbital */
.hero-visual {
  flex-shrink: 0;
  position: relative;
  width: 340px; height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,.2);
  animation: orbit-spin linear infinite;
}
.ring1 { width: 160px; height: 160px; animation-duration: 8s; border-color: rgba(0,212,255,.35); }
.ring2 { width: 240px; height: 240px; animation-duration: 14s; animation-direction: reverse; }
.ring3 { width: 320px; height: 320px; animation-duration: 20s; }

.core-icon {
  position: relative;
  z-index: 2;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 0 40px rgba(0,212,255,.4), 0 0 80px rgba(0,212,255,.15);
  animation: float 4s ease-in-out infinite;
}

.orbit-dot {
  position: absolute;
  width: 40px; height: 40px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  animation: float linear infinite;
}
.d1 { top: 10px;  left: 50%;  transform: translateX(-50%); animation-duration: 3s; }
.d2 { top: 50%;   right: 8px; transform: translateY(-50%); animation-duration: 3.8s; color: #2965f1; }
.d3 { bottom: 10px; left: 50%; transform: translateX(-50%); animation-duration: 4.5s; color: #f7df1e; }
.d4 { top: 50%;   left: 8px;  transform: translateY(-50%); animation-duration: 2.8s; color: var(--accent3); }

/* ===========================
   BUTTONS
=========================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, var(--accent), #0099bb);
  color: #fff;
  text-decoration: none;
  padding: .8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  border: none; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(0,212,255,.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,212,255,.4);
}
.btn-primary.full-width { width: 100%; justify-content: center; }

.btn-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  padding: .8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===========================
   SERVICES
=========================== */
.services-section { max-width: 1200px; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(30px);
}
.service-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s ease, border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,.35);
  box-shadow: 0 12px 40px rgba(0,212,255,.12);
}

.card-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(123,94,167,.15));
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .6rem; }
.service-card p  { color: var(--text-muted); font-size: .9rem; }

.card-glow {
  position: absolute;
  bottom: -60px; right: -60px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(0,212,255,.08), transparent 70%);
  pointer-events: none;
  transition: opacity var(--transition);
}
.service-card:hover .card-glow { opacity: 2; }

.inline-link { color: var(--accent); text-decoration: underline; }

/* ===========================
   ABOUT
=========================== */
.about-section { max-width: 1200px; margin: 0 auto; }

.about-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem;
}

.about-visual { flex-shrink: 0; position: relative; }

.about-card-3d {
  width: 220px; height: 280px;
  background: linear-gradient(135deg, rgba(0,212,255,.1), rgba(123,94,167,.1));
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  animation: float 5s ease-in-out infinite;
}

.about-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  color: #fff;
}

.about-tag-floating {
  position: absolute;
  background: rgba(5,10,20,.9);
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 50px;
  padding: .35rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  display: flex; gap: .4rem; align-items: center;
}
.t1 { top: 20px; right: -70px; }
.t2 { top: 50%;  right: -80px; transform: translateY(-50%); }
.t3 { bottom: 20px; right: -75px; }

.about-content { flex: 1; }
.about-content h2 { font-size: 2rem; font-weight: 800; margin: .5rem 0 1rem; }
.about-content p  { color: var(--text-muted); margin-bottom: 1rem; }

.skills-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.skill-badge {
  background: rgba(0,212,255,.08);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--accent);
  padding: .3rem .9rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
}

/* ===========================
   CONTACT
=========================== */
.contact-section { max-width: 1200px; margin: 0 auto; }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }

.contact-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(0,212,255,.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--accent);
}
.contact-label { display: block; font-size: .75rem; color: var(--text-muted); }
.contact-value { display: block; font-weight: 600; font-size: .95rem; }
.contact-value.link { color: var(--accent); text-decoration: none; }
.contact-value.link:hover { text-decoration: underline; }

.webmail-btn { margin-top: .5rem; }

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: .75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,.12);
}

.form-success {
  background: rgba(0,255,157,.1);
  border: 1px solid rgba(0,255,157,.3);
  color: var(--accent3);
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: .9rem;
  display: flex; gap: .6rem; align-items: center;
}
.form-success.hidden { display: none; }

.form-error {
  background: rgba(255,80,80,.08);
  border: 1px solid rgba(255,80,80,.3);
  color: #ff6b6b;
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: .9rem;
  display: flex; gap: .6rem; align-items: center;
}
.form-error.hidden { display: none; }

button:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none !important;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 2rem;
  background: rgba(5,10,20,.8);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: .4rem; font-weight: 700; }
.footer-copy  { color: var(--text-muted); font-size: .85rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--text-muted); font-size: .85rem;
  text-decoration: none; transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,157,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(0,255,157,0); }
}

/* ===========================
   SECTION DIVIDERS (glow lines)
=========================== */
.services-section::before,
.contact-section::before {
  content: '';
  display: block;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,.3), transparent);
  margin: 0 auto 4rem;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 7rem; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { width: 260px; height: 260px; }
  .ring1 { width: 120px; height: 120px; }
  .ring2 { width: 190px; height: 190px; }
  .ring3 { width: 250px; height: 250px; }

  .about-inner { flex-direction: column; padding: 2rem; }
  .about-visual { align-self: center; }
  .t1, .t2, .t3 { display: none; }

  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(5,10,20,.97); padding: 1.5rem 2rem; gap: 1.2rem;
    border-bottom: 1px solid rgba(0,212,255,.1); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .section { padding: 4rem 1.2rem; }
  .section-header h2 { font-size: 1.9rem; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
