/* =========================================================
   Hillary Ogilvie · Ingeniería Eléctrica & Mecatrónica
   Paleta: lila, morado claro, rosa, blanco
========================================================= */

:root{
  --purple-deep:   #4B2E83;
  --purple:        #7C4DBF;
  --purple-light:  #A97FE0;
  --lilac:         #C9A6EE;
  --lilac-soft:    #E7D6FA;
  --pink:          #F2A6D6;
  --pink-soft:     #FBE1F0;
  --white:         #FFFFFF;
  --off-white:     #FBF8FE;
  --ink:           #2C1E42;
  --ink-soft:      #6B5C82;

  --gradient-main: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 45%, var(--pink) 100%);
  --gradient-soft: linear-gradient(135deg, var(--lilac-soft) 0%, var(--pink-soft) 100%);

  --shadow-sm: 0 4px 14px rgba(75, 46, 131, 0.10);
  --shadow-md: 0 12px 32px rgba(75, 46, 131, 0.16);
  --shadow-glow: 0 0 24px rgba(201, 166, 238, 0.55);

  --radius: 18px;
  --font-head: 'Sora', 'Manrope', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{ font-family: var(--font-head); margin: 0; color: var(--purple-deep); }
p{ line-height: 1.7; color: var(--ink-soft); margin: 0; }
a{ text-decoration: none; color: inherit; }
img{ max-width: 100%; display: block; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; cursor: pointer; }

.container{
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- Fondo de circuitos global ---------- */
.circuit-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(124,77,191,0.10) 1.5px, transparent 1.6px);
  background-size: 42px 42px;
  opacity: 0.6;
}

/* ---------- Utilidades ---------- */
.text-gradient{
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-bolt{
  width: 16px; height: 16px;
  fill: currentColor;
}

.tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--pink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tag .icon-bolt{ color: var(--pink); }

.section{ padding: 96px 0; position: relative; }
.section-alt{ background: linear-gradient(180deg, var(--lilac-soft) 0%, var(--off-white) 100%); }

.section-head{ max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-sub{ margin-top: 12px; }

/* ---------- Botones ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn .icon{ width: 18px; height: 18px; fill: currentColor; }
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--gradient-main);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover{ filter: brightness(1.05); box-shadow: var(--shadow-glow); }

.btn-whatsapp{
  background: var(--white);
  color: #25D366;
  border: 2px solid #d9f2e3;
  box-shadow: var(--shadow-sm);
}
.btn-whatsapp:hover{ border-color: #25D366; }

.btn-small{ padding: 9px 16px; font-size: 0.82rem; }
.btn-full{ width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lilac-soft);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand{ display: flex; align-items: center; gap: 10px; }
.brand-logo{ width: 42px; height: 42px; border-radius: 10px; }
.brand-text{ font-family: var(--font-head); font-size: 1.05rem; color: var(--purple-deep); }
.brand-text strong{ color: var(--purple); }

.main-nav{ display: flex; gap: 28px; }
.main-nav a{
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after{
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gradient-main);
  transition: width 0.25s ease;
}
.main-nav a:hover::after{ width: 100%; }

.header-actions{ display: flex; align-items: center; gap: 14px; }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span{
  width: 22px; height: 2px;
  background: var(--purple-deep);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 90px 0 60px;
  overflow: hidden;
  background: var(--gradient-soft);
}

.hero-bolt{
  position: absolute;
  width: 140px;
  opacity: 0.18;
  fill: var(--purple);
  filter: blur(0.3px);
}
.hero-bolt-1{ top: -20px; left: -20px; transform: rotate(-10deg); fill: var(--purple); }
.hero-bolt-2{ bottom: -40px; right: 4%; transform: rotate(12deg) scale(1.3); fill: var(--pink); opacity: 0.22; }
.hero-bolt-3{ top: 10%; right: -30px; transform: rotate(18deg); fill: var(--pink); opacity: 0.15; width: 180px; }

.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--purple);
  background: var(--white);
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.dot-pulse{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 rgba(52,199,89,0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,199,89,0.55); }
  70%{ box-shadow: 0 0 0 8px rgba(52,199,89,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,199,89,0); }
}

.hero h1{
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.hero-role{
  font-weight: 700;
  color: var(--purple);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.hero-desc{ max-width: 480px; margin-bottom: 30px; }

.hero-cta{ display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero-stats{
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(124,77,191,0.2);
  padding-top: 24px;
}
.stat{ display: flex; flex-direction: column; gap: 4px; }
.stat strong{ font-family: var(--font-head); color: var(--purple-deep); font-size: 1.1rem; }
.stat span{ font-size: 0.8rem; color: var(--ink-soft); }

/* Hero visual: marco hexagonal tipo logo */
.hero-visual{ display: flex; justify-content: center; }
.hex-frame{
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hex-ring{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hex-ring-path{
  fill: rgba(255,255,255,0.5);
  stroke: var(--purple-light);
  stroke-width: 3;
  stroke-dasharray: 14 8;
  animation: rotate-dash 30s linear infinite;
  filter: drop-shadow(0 10px 30px rgba(124,77,191,0.25));
}
@keyframes rotate-dash{
  to{ stroke-dashoffset: -400; }
}
.hero-logo{
  position: relative;
  width: 58%;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}
.node{
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px var(--pink-soft);
  animation: float 3.5s ease-in-out infinite;
}
.node-1{ top: 4%; left: 48%; animation-delay: 0s; }
.node-2{ top: 48%; right: 0%; animation-delay: 0.6s; background: var(--purple); box-shadow: 0 0 0 4px var(--lilac-soft); }
.node-3{ bottom: 4%; left: 48%; animation-delay: 1.2s; }
.node-4{ top: 48%; left: 0%; animation-delay: 1.8s; background: var(--purple); box-shadow: 0 0 0 4px var(--lilac-soft); }
@keyframes float{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}

.circuit-divider{
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--purple-light) 0 24px, transparent 24px 40px);
  opacity: 0.5;
  margin-top: 60px;
}

/* ---------- Sobre mi ---------- */
.about-grid{
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.badges{ display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.badge{
  background: var(--white);
  border: 1px solid var(--lilac-soft);
  color: var(--purple);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Timeline (Formacion) ---------- */
.timeline{
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.timeline::before{
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--purple-light) 0 10px, transparent 10px 18px);
}
.timeline-item{
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 22px;
  align-items: start;
}
.timeline-node{
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 0 0 6px var(--pink-soft);
  margin-top: 4px;
}
.timeline-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--lilac-soft);
}
.timeline-tag{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--gradient-main);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.timeline-card h3{ font-size: 1.15rem; margin-bottom: 8px; }

/* ---------- Servicios ---------- */
.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  border: 1px solid var(--lilac-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--pink);
}
.service-icon{
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg{
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--purple);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card:nth-child(1) .service-icon svg path{ fill: var(--pink); stroke: none; }
.service-card h3{ font-size: 1.08rem; margin-bottom: 10px; }
.service-card p{ font-size: 0.92rem; }

/* ---------- Portafolio ---------- */
.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portfolio-card{
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--lilac-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.portfolio-media{
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gradient-soft);
}
.portfolio-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.portfolio-card:hover .portfolio-media img{ transform: scale(1.06); }
.portfolio-body{ padding: 22px 24px 26px; text-align: left; }
.portfolio-tag{
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--pink-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.portfolio-card h3{ font-size: 1.05rem; margin-bottom: 10px; }
.portfolio-card p{ font-size: 0.88rem; }

/* ---------- Contacto ---------- */
.contact-section{ position: relative; overflow: hidden; }

.contact-grid{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.contact-info{ display: flex; flex-direction: column; gap: 16px; }
.contact-item{
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--lilac-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-item:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-icon{
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg{ width: 22px; height: 22px; fill: none; stroke: var(--purple); stroke-width: 1.8; }
.contact-item div{ display: flex; flex-direction: column; }
.contact-item strong{ color: var(--purple-deep); font-size: 0.95rem; }
.contact-item span{ font-size: 0.85rem; color: var(--ink-soft); }

.contact-note{
  display: flex;
  gap: 12px;
  background: var(--gradient-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 8px;
}
.contact-note .icon-bolt{ width: 20px; height: 20px; color: var(--purple); flex-shrink: 0; margin-top: 2px; }
.contact-note p{ font-size: 0.86rem; }

.contact-form{
  background: var(--white);
  border-radius: 22px;
  padding: 34px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--lilac-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row{ display: flex; flex-direction: column; }
.form-row-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label{
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-deep);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form .opt{ font-weight: 400; color: var(--ink-soft); font-size: 0.78rem; }
.contact-form input,
.contact-form select,
.contact-form textarea{
  font-family: inherit;
  font-size: 0.94rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--lilac-soft);
  background: var(--off-white);
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--pink-soft);
}
.form-status{
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 20px;
  text-align: center;
}
.form-status.ok{ color: #1e8a4c; }
.form-status.err{ color: #c23b5c; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--purple-deep);
  color: var(--lilac-soft);
  padding: 48px 0 28px;
}
.footer-inner{ display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.site-footer .brand-text{ color: var(--white); }
.site-footer .brand-text strong{ color: var(--pink); }
.footer-role{ color: var(--lilac-soft); font-size: 0.9rem; }
.footer-links{ display: flex; gap: 22px; margin-top: 6px; }
.footer-links a{ font-weight: 700; font-size: 0.88rem; color: var(--pink); }
.footer-links a:hover{ text-decoration: underline; }
.footer-copy{ margin-top: 18px; font-size: 0.78rem; color: rgba(255,255,255,0.5); }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 60;
  animation: float-btn 3s ease-in-out infinite;
}
.whatsapp-float svg{ width: 30px; height: 30px; fill: var(--white); }
.whatsapp-float:hover{ transform: scale(1.08); }
@keyframes float-btn{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

/* ---------- Reveal on scroll ----------
   Content is always visible, independent of JavaScript. A JS failure,
   a blocked script, or a slow connection must never hide the site. */
.reveal{
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; }
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid{ grid-template-columns: repeat(2, 1fr); }
  .contact-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .main-nav{
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    z-index: 40;
  }
  .main-nav.is-open{ transform: translateY(0); }
  .nav-toggle{ display: flex; }
  .header-actions .btn-small span{ display: none; }
  .services-grid{ grid-template-columns: 1fr; }
  .portfolio-grid{ grid-template-columns: 1fr; }
  .form-row-2{ grid-template-columns: 1fr; }
  .hero-stats{ gap: 20px; }
}
