/* ===================================================================
   Iván Esteban Archila — Página personal
   Paleta: Azul marino profundo + Turquesa (acento) + Dorado suave
=================================================================== */

:root {
  --navy-900: #0b1f3a;
  --navy-800: #102a4c;
  --navy-700: #173a66;
  --navy-600: #1f4d85;
  --accent: #2dd4bf;       /* turquesa */
  --accent-dark: #14b8a6;
  --gold: #f0b429;         /* dorado suave */
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 31, 58, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 31, 58, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1140px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Sora', 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; }

a { text-decoration: none; color: inherit; }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 31, 58, 0.85);
  backdrop-filter: blur(10px);
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 14px 0;
}
.navbar.scrolled { background: rgba(11, 31, 58, 0.97); box-shadow: 0 6px 20px rgba(0,0,0,.2); padding: 8px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #fff; letter-spacing: .5px; }
.nav-logo span { color: var(--accent); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 28px; }
.nav-links a { color: #cbd5e1; font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--accent); color: var(--navy-900) !important;
  padding: 9px 18px; border-radius: 30px; font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(45,212,191,.4); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(45,212,191,.18), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: #e2e8f0;
  padding: 150px 0 90px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.hero-eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: #fff; font-weight: 800; }
.hero-role { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--accent); font-weight: 600; margin: 14px 0 18px; font-family: var(--font-head); }
.hero-desc { color: #cbd5e1; max-width: 560px; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 24px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 30px; font-weight: 600; font-size: .98rem; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: var(--navy-900); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(45,212,191,.4); }
.btn-ghost { border-color: rgba(255,255,255,.3); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.hero-socials { display: flex; gap: 16px; }
.hero-socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 1.15rem; transition: background .2s, transform .2s, color .2s; }
.hero-socials a:hover { background: var(--accent); color: var(--navy-900); transform: translateY(-3px); }

/* Foto */
.hero-photo { position: relative; justify-self: center; }
.photo-frame {
  position: relative; width: 300px; height: 360px; border-radius: 24px; overflow: hidden;
  border: 4px solid rgba(45,212,191,.5);
  box-shadow: 0 25px 60px rgba(0,0,0,.45);
  background: linear-gradient(160deg, var(--navy-600), var(--navy-800));
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; text-align: center; padding: 20px; }
.photo-placeholder span { font-family: var(--font-head); font-size: 3.4rem; font-weight: 800; color: var(--accent); letter-spacing: 3px; }
.photo-placeholder small { color: #94a3b8; font-size: .8rem; }
.photo-badge {
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy-900); font-weight: 700; font-size: .85rem;
  padding: 8px 18px; border-radius: 30px; white-space: nowrap; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
}

/* ===================== SECCIONES ===================== */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag { display: inline-block; color: var(--accent-dark); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: .8rem; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); position: relative; display: inline-block; }
.section-head h2::after { content: ""; display: block; width: 60px; height: 4px; border-radius: 4px; background: var(--accent); margin: 14px auto 0; }
.section-sub { color: var(--muted); margin-top: 14px; max-width: 520px; margin-inline: auto; }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-text p { margin-bottom: 18px; font-size: 1.05rem; }
.about-text strong { color: var(--ink); }
.about-highlights { list-style: none; display: grid; gap: 16px; }
.about-highlights li { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow); transition: transform .2s; }
.about-highlights li:hover { transform: translateX(6px); }
.about-highlights i { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(45,212,191,.12); color: var(--accent-dark); font-size: 1.2rem; }
.about-highlights strong { display: block; color: var(--ink); font-family: var(--font-head); }
.about-highlights span { font-size: .88rem; color: var(--muted); }

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.card-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(140deg, var(--navy-700), var(--navy-600)); color: var(--accent); font-size: 1.5rem; margin-bottom: 20px; }
.card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.card p { color: var(--text); margin-bottom: 16px; }
.card-list { list-style: none; display: grid; gap: 10px; }
.card-list li { position: relative; padding-left: 26px; font-size: .95rem; color: var(--muted); }
.card-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--accent-dark); font-size: .8rem; }

/* Tecnologías */
.tech-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.tech-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.tech-group h4 { font-size: 1.1rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; color: var(--navy-700); }
.tech-group h4 i { color: var(--accent-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--ink); padding: 8px 14px; border-radius: 30px; font-size: .9rem; font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.tag i { color: var(--accent-dark); }
.tag:hover { background: var(--navy-700); color: #fff; transform: translateY(-2px); }
.tag:hover i { color: var(--accent); }

/* Contacto */
.section-contact { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #e2e8f0; }
.section-head-light h2, .section-head-light .section-tag { color: #fff; }
.section-head-light .section-tag { color: var(--accent); }
.section-head-light .section-sub { color: #cbd5e1; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.contact-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .25s, background .25s, border-color .25s; }
.contact-card:hover { transform: translateY(-6px); background: rgba(45,212,191,.12); border-color: var(--accent); }
.contact-card i { font-size: 1.8rem; color: var(--accent); margin-bottom: 6px; }
.contact-card strong { color: #fff; font-family: var(--font-head); }
.contact-card span { color: #cbd5e1; font-size: .9rem; word-break: break-word; }

/* Footer */
.footer { background: var(--navy-900); color: #94a3b8; padding: 26px 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-socials { display: flex; gap: 14px; }
.footer-socials a { color: #94a3b8; font-size: 1.15rem; transition: color .2s; }
.footer-socials a:hover { color: var(--accent); }

/* Botón volver arriba */
.to-top { position: fixed; bottom: 26px; right: 26px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--accent); color: var(--navy-900); border-radius: 50%; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s; z-index: 90; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent-dark); }

/* Animación de aparición */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-inline: auto; }
  .hero-actions, .hero-socials { justify-content: center; }
  .hero-photo { margin-top: 40px; order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  .tech-groups { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--navy-900); padding: 0;
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 360px; padding: 10px 0 18px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 12px; }
  .nav-cta { display: inline-block; margin-top: 8px; }
  .section { padding: 64px 0; }
  .photo-frame { width: 260px; height: 320px; }
}
