/* ═══════════════════════════════════════
   TOKENS / VARIABLES
═══════════════════════════════════════ */
:root {
  --sky:        #0ea5e9;
  --sky-light:  #38bdf8;
  --sky-mid:    #0284c7;
  --sky-deep:   #0369a1;
  --sky-pale:   #e0f2fe;
  --sky-ultra:  #f0f9ff;
  --navy:       #07172a;
  --text:       #0f172a;
  --text-mid:   #334155;
  --text-soft:  #64748b;
  --white:      #ffffff;
  --border:     rgba(14,165,233,0.16);
  --border-mid: rgba(14,165,233,0.28);
  --r:          16px;
  --shadow:     0 4px 28px rgba(14,165,233,0.09);
  --shadow-lg:  0 16px 56px rgba(14,165,233,0.16);
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Sora', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%; height: 66px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: var(--shadow); }

.nav-logo {
  font-size: 1.05rem; font-weight: 800;
  color: var(--navy); letter-spacing: -.03em; text-decoration: none;
  display: flex; align-items: center; gap: .5rem;
}
.nav-logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--sky); flex-shrink: 0;
}

.nav-links { display: flex; gap: 1.8rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-mid);
  font-size: .85rem; font-weight: 500;
  transition: color .2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -3px; left: 0; width: 0; height: 2px;
  background: var(--sky); border-radius: 2px; transition: width .25s;
}
.nav-links a:hover { color: var(--sky-deep); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--sky) !important; color: var(--white) !important;
  padding: .42rem 1.1rem; border-radius: 100px;
  font-weight: 700 !important;
  box-shadow: 0 3px 14px rgba(14,165,233,.3);
  transition: background .2s, transform .2s, box-shadow .2s !important;
}
.nav-cta:hover {
  background: var(--sky-mid) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14,165,233,.36) !important;
}
.nav-cta::after { display: none !important; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--sky-deep); border-radius: 2px; display: block; transition: .3s;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 92px 6% 60px;
  background:
    radial-gradient(ellipse 70% 55% at 75% 38%, rgba(14,165,233,.09) 0%, transparent 62%),
    radial-gradient(ellipse 45% 38% at 8% 78%, rgba(56,189,248,.06) 0%, transparent 55%),
    var(--white);
  overflow: hidden; position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 420px;
  gap: 4rem; align-items: center;
  max-width: 1160px; margin: 0 auto; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--sky-pale); color: var(--sky-deep);
  border: 1px solid var(--border-mid);
  padding: .28rem .9rem; border-radius: 100px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 1.3rem;
  animation: fadeUp .55s ease both;
}
.badge-dot {
  width: 7px; height: 7px; background: #22c55e;
  border-radius: 50%; animation: blink 2s infinite;
}
.hero-name {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -.04em; color: var(--navy);
  margin-bottom: .4rem;
  animation: fadeUp .6s .08s ease both;
}
.hero-name .sky { color: var(--sky); }
.hero-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: clamp(.85rem, 1.6vw, 1.05rem);
  color: var(--text-soft); margin-bottom: 1.5rem;
  animation: fadeUp .6s .16s ease both;
}
.hero-desc {
  font-size: .97rem; color: var(--text-mid);
  line-height: 1.78; margin-bottom: 2rem; max-width: 490px;
  animation: fadeUp .6s .24s ease both;
}
.hero-pills {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem;
  animation: fadeUp .6s .3s ease both;
}
.hero-pill {
  display: flex; align-items: center; gap: .35rem;
  background: var(--sky-ultra); border: 1px solid var(--border);
  color: var(--sky-deep); border-radius: 100px;
  padding: .22rem .8rem; font-size: .72rem; font-weight: 600;
}
.hero-pill svg { flex-shrink: 0; }
.hero-actions {
  display: flex; gap: .9rem; flex-wrap: wrap;
  animation: fadeUp .6s .36s ease both;
}

/* Botones */
.btn-primary {
  background: var(--sky); color: var(--white);
  padding: .75rem 1.7rem; border-radius: 100px;
  text-decoration: none; font-weight: 700; font-size: .88rem;
  display: inline-flex; align-items: center; gap: .45rem;
  box-shadow: 0 4px 20px rgba(14,165,233,.32);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-primary:hover { background: var(--sky-mid); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(14,165,233,.36); }
.btn-outline {
  border: 1.5px solid var(--border-mid); color: var(--text-mid);
  padding: .75rem 1.7rem; border-radius: 100px;
  text-decoration: none; font-weight: 600; font-size: .88rem;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: border-color .2s, color .2s, transform .2s;
}
.btn-outline:hover { border-color: var(--sky); color: var(--sky-deep); transform: translateY(-2px); }

/* Foto */
.hero-photo-wrap { display: flex; justify-content: center; animation: fadeLeft .7s .1s ease both; }
.photo-frame { position: relative; width: 340px; height: 340px; }
.photo-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed rgba(14,165,233,.3);
  animation: spin 22s linear infinite;
}
.photo-ring-2 {
  position: absolute; inset: -26px; border-radius: 50%;
  border: 1px solid rgba(14,165,233,.12);
  animation: spin 35s linear infinite reverse;
}
.photo-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
  border: 4px solid var(--white); box-shadow: var(--shadow-lg);
}
.photo-placeholder {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--sky-pale), #dbeafe);
  border: 4px solid var(--white); box-shadow: var(--shadow-lg);
  color: var(--sky-deep); font-size: .78rem; font-weight: 600;
  gap: .6rem; text-align: center;
}
.photo-badge {
  position: absolute; bottom: 18px; right: -12px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: .5rem .9rem;
  font-size: .74rem; font-weight: 700; color: var(--navy);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.photo-badge-top {
  position: absolute; top: 22px; left: -18px;
  background: var(--sky); color: var(--white);
  border-radius: 12px; padding: .5rem .9rem;
  font-size: .74rem; font-weight: 700;
  box-shadow: 0 4px 16px rgba(14,165,233,.4);
  display: flex; align-items: center; gap: .4rem; white-space: nowrap;
}

/* ═══════════════════════════════════════
   STATS BAR
═══════════════════════════════════════ */
.stats-bar { background: var(--navy); padding: 2.2rem 6%; }
.stats-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem;
}
.stat-item { text-align: center; padding: .5rem; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--sky-light); letter-spacing: -.04em; line-height: 1; }
.stat-label { font-size: .76rem; color: rgba(255,255,255,.45); margin-top: .35rem; }
.stat-sep { width: 1px; background: rgba(255,255,255,.07); align-self: center; height: 46px; }

/* ═══════════════════════════════════════
   SECCIONES GENÉRICAS
═══════════════════════════════════════ */
section { padding: 88px 6%; }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section-tag {
  display: block; font-family: 'DM Mono', monospace;
  font-size: .7rem; color: var(--sky); font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase; margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800; color: var(--navy);
  letter-spacing: -.035em; line-height: 1.12; margin-bottom: .9rem;
}
.section-sub { font-size: .95rem; color: var(--text-soft); max-width: 540px; line-height: 1.72; }
.section-head { margin-bottom: 3.2rem; }

/* ═══════════════════════════════════════
   SOBRE MÍ
═══════════════════════════════════════ */
#sobre { background: var(--sky-ultra); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.acard {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.8rem; box-shadow: var(--shadow);
}
.acard + .acard { margin-top: 1.3rem; }
.acard-title {
  font-size: .88rem; font-weight: 700; color: var(--sky-deep);
  margin-bottom: 1rem; display: flex; align-items: center; gap: .55rem;
}
.acard-title svg { color: var(--sky); flex-shrink: 0; }
.acard p { font-size: .9rem; color: var(--text-mid); line-height: 1.76; }
.acard p + p { margin-top: .65rem; }
.contact-list { list-style: none; }
.contact-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .68rem 0; border-bottom: 1px solid var(--border);
  font-size: .88rem; color: var(--text-mid);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list a { color: var(--sky-deep); text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.icon-pill {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--sky-pale); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; color: var(--sky);
}

/* ═══════════════════════════════════════
   EXPERIENCIA
═══════════════════════════════════════ */
#experiencia { background: var(--white); }
.timeline { position: relative; padding-left: 2.4rem; }
.timeline::before {
  content: ''; position: absolute;
  top: 6px; left: 9px; width: 2px; height: calc(100% - 12px);
  background: linear-gradient(to bottom, var(--sky) 0%, rgba(14,165,233,.08) 100%);
}
.tl-item {
  position: relative; margin-bottom: 2.2rem;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s, transform .5s;
}
.tl-item.visible { opacity: 1; transform: translateY(0); }
.tl-dot {
  position: absolute; left: -2.4rem; top: 7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sky); border: 3px solid var(--white);
  box-shadow: 0 0 0 3px rgba(14,165,233,.2);
}
.tl-dot.current { animation: blink 2s infinite; }
.tl-card {
  background: var(--sky-ultra); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem 1.75rem;
  transition: box-shadow .2s, transform .2s;
}
.tl-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.tl-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem; }
.tl-company { font-family: 'DM Mono', monospace; font-size: .68rem; font-weight: 500; color: var(--sky); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }
.tl-role { font-size: 1rem; font-weight: 700; color: var(--navy); }
.tl-period { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--text-soft); white-space: nowrap; margin-top: .2rem; }
.tl-desc { font-size: .87rem; color: var(--text-mid); line-height: 1.74; margin-bottom: .9rem; }
.tl-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tl-tag {
  background: rgba(14,165,233,.1); color: var(--sky-deep);
  border-radius: 100px; padding: .18rem .65rem; font-size: .7rem; font-weight: 600;
}

/* ═══════════════════════════════════════
   HABILIDADES
═══════════════════════════════════════ */
#habilidades { background: var(--sky-ultra); }
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.3rem; }
.skill-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.6rem;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s, transform .5s, box-shadow .25s;
}
.skill-card.visible { opacity: 1; transform: translateY(0); }
.skill-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.skill-icon-wrap {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-pale), var(--sky-ultra));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .9rem; color: var(--sky);
}
.skill-card h3 { font-size: .92rem; font-weight: 700; color: var(--navy); margin-bottom: .7rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .38rem; }
.skill-tag {
  background: var(--sky-pale); color: var(--sky-deep);
  border-radius: 6px; padding: .22rem .6rem; font-size: .7rem; font-weight: 500;
}

/* ═══════════════════════════════════════
   EDUCACIÓN
═══════════════════════════════════════ */
#educacion { background: var(--white); }
.edu-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.3rem; }
.edu-card {
  background: var(--sky-ultra); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  display: flex; gap: 1.1rem; align-items: flex-start;
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s, transform .5s;
}
.edu-card.visible { opacity: 1; transform: translateY(0); }
.edu-icon-wrap {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--sky); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; color: var(--white);
}
.edu-inst { font-family: 'DM Mono', monospace; font-size: .68rem; font-weight: 600; color: var(--sky); text-transform: uppercase; letter-spacing: .06em; }
.edu-degree { font-size: .93rem; font-weight: 700; color: var(--navy); margin: .22rem 0; }
.edu-period { font-size: .74rem; color: var(--text-soft); font-family: 'DM Mono', monospace; }
.edu-note { font-size: .74rem; color: var(--sky-deep); font-weight: 600; margin-top: .35rem; display: flex; align-items: center; gap: .3rem; }

/* ═══════════════════════════════════════
   CERTIFICACIONES
═══════════════════════════════════════ */
#certificaciones { background: var(--sky-ultra); }
.certs-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.3rem; }
.cert-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.4rem 1.6rem;
  display: flex; align-items: center; gap: 1.1rem;
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s, transform .5s, box-shadow .2s;
}
.cert-card.visible { opacity: 1; transform: translateY(0); }
.cert-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cert-icon {
  width: 50px; height: 50px; border-radius: 13px;
  background: linear-gradient(135deg, var(--sky), var(--sky-deep));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--white);
  box-shadow: 0 4px 14px rgba(14,165,233,.3);
}
.cert-name { font-size: .93rem; font-weight: 700; color: var(--navy); margin-bottom: .15rem; }
.cert-issuer { font-size: .8rem; color: var(--text-soft); }
.cert-date { font-family: 'DM Mono', monospace; font-size: .7rem; color: var(--sky); font-weight: 600; margin-top: .3rem; }

/* ═══════════════════════════════════════
   CONTACTO
═══════════════════════════════════════ */
#contacto { background: var(--navy); position: relative; overflow: hidden; }
#contacto::before {
  content: ''; position: absolute; top: -40%; left: -15%; width: 550px; height: 550px;
  border-radius: 50%; background: radial-gradient(circle, rgba(14,165,233,.13) 0%, transparent 70%);
  pointer-events: none;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.contact-left .section-tag  { color: var(--sky-light); }
.contact-left .section-title { color: var(--white); }
.contact-left .section-sub  { color: rgba(255,255,255,.5); }
.contact-cards { display: flex; flex-direction: column; gap: .9rem; }
.ccard {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r); padding: 1.1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.ccard:hover { background: rgba(14,165,233,.13); border-color: rgba(14,165,233,.35); transform: translateX(5px); }
.ccard-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(14,165,233,.14); display: flex;
  align-items: center; justify-content: center; color: var(--sky-light); flex-shrink: 0;
}
.ccard-label { font-size: .68rem; color: rgba(255,255,255,.42); font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .05em; }
.ccard-value { font-size: .92rem; color: var(--white); font-weight: 600; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: #040e1a; text-align: center;
  padding: 1.6rem 6%; color: rgba(255,255,255,.28); font-size: .78rem;
}

/* ═══════════════════════════════════════
   ANIMACIONES
═══════════════════════════════════════ */
@keyframes fadeUp   { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeLeft { from{opacity:0;transform:translateX(22px)} to{opacity:1;transform:translateX(0)} }
@keyframes blink    { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.5)} }
@keyframes spin     { to{transform:rotate(360deg)} }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--white); padding: 1.5rem 6%;
    gap: 1.1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-photo-wrap { order: -1; }
  .photo-frame { width: 220px; height: 220px; }
  .photo-badge-top { left: -10px; font-size: .68rem; }
  .photo-badge     { right: -8px; font-size: .68rem; }
  .hero-desc, .hero-pills { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-sep { display: none; }
  .about-grid  { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid    { grid-template-columns: 1fr; }
  .certs-grid  { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 420px) {
  .photo-frame { width: 190px; height: 190px; }
  .photo-badge-top, .photo-badge { display: none; }
}
