/* ==========================================================================
   Franco Pérez Osuna — Portfolio
   Archetype: Mouse-Reactive Gradient (dark, adapted) — one accent, image-forward
   ========================================================================== */

:root {
  --bg:            #0a0a0d;
  --bg-soft:       #0e0f13;
  --surface:       #131419;
  --surface-2:     #17181e;
  --glass:         rgba(255,255,255,0.045);
  --glass-strong:  rgba(255,255,255,0.075);
  --border:        rgba(255,255,255,0.09);
  --border-soft:   rgba(255,255,255,0.06);

  --ink:           #f3f3f6;
  --ink-soft:      #a7a7b3;
  --ink-faint:     #6c6c78;

  --accent:        #7c6cff;
  --accent-soft:   #a99bff;
  --accent-dim:    rgba(124,108,255,0.14);
  --accent-line:   rgba(124,108,255,0.35);

  --grad-1: #7c6cff;
  --grad-2: #4a3fc4;
  --grad-3: #1c1740;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);

  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --container: 1220px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html, body { background: var(--bg); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* ---------- layout helpers ---------- */
.section { padding: 128px 24px; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 20%, rgba(255,255,255,0.015) 80%, transparent); }
.section-inner { max-width: var(--container); margin: 0 auto; }

.section-head { max-width: 640px; margin-bottom: 64px; }
.section-kicker {
  display: inline-block; font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15; color: var(--ink); letter-spacing: -.01em;
}
.section-text { margin-top: 16px; font-size: 17px; line-height: 1.65; color: var(--ink-soft); max-width: 54ch; }

/* ---------- background layers ---------- */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(560px circle at var(--mx,50%) var(--my,30%), rgba(124,108,255,.16), transparent 60%),
    radial-gradient(900px circle at 15% 0%, rgba(124,108,255,.10), transparent 55%),
    radial-gradient(700px circle at 100% 30%, rgba(74,63,196,.10), transparent 55%);
  transition: background .5s ease;
}
.bg-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- custom cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease-out); }
.cursor.is-ready { opacity: 1; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate3d(-50%,-50%,0); }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid var(--border); transition: width .2s, height .2s, border-color .2s, background .2s; }
.cursor-ring.is-active { width: 52px; height: 52px; border-color: var(--accent-line); background: var(--accent-dim); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .35s var(--ease-out), border-color .35s var(--ease-out), backdrop-filter .35s;
}
.nav.is-scrolled {
  background: rgba(10,10,13,0.72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border-soft);
}
.nav-inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.nav-brand span { color: var(--ink-soft); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 14.5px; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: var(--accent);
  transition: right .3s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: inline-flex; }

.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 30px; height: 30px; }
.nav-burger span { display: block; width: 100%; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 95; background: rgba(9,9,12,0.98); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility .35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.mobile-menu nav a { font-family: var(--font-display); font-size: 26px; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 100px; font-size: 14.5px; font-weight: 600;
  font-family: var(--font-body); letter-spacing: .01em;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s, color .25s, border-color .25s;
  will-change: transform;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgba(124,108,255,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(124,108,255,.65); }
.btn-outline { border: 1px solid var(--border); color: var(--ink); background: var(--glass); }
.btn-outline:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--glass-strong); }
.btn-ghost { border: 1px solid var(--border); color: var(--ink-soft); background: transparent; }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent-line); background: var(--accent-dim); }
.btn-small { padding: 9px 16px; font-size: 13px; }
.btn-full { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1; min-height: 100vh; overflow-x: clip;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 24px 60px;
}
.hero-inner {
  max-width: var(--container); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-soft); padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 100px; background: var(--glass); margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(44px, 6.4vw, 84px); line-height: 1.02; color: var(--ink); margin-bottom: 24px;
}
.hero-title em { font-style: normal; background: linear-gradient(100deg, var(--accent-soft), var(--accent) 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-soft); max-width: 46ch; margin-bottom: 18px; }
.hero-complement { font-size: 15.5px; font-style: italic; color: var(--ink-faint); max-width: 44ch; margin-bottom: 36px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}
.hero-scroll-hint span { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: scrollHint 2.2s ease-in-out infinite; }
@keyframes scrollHint { 0% { opacity: 0; transform: scaleY(0); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); transform-origin: top; } 100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; } }

/* hero visual composition */
.hero-visual { position: relative; height: 460px; }
.hv-glow {
  position: absolute; inset: -60px; z-index: 0; filter: blur(70px);
  background: radial-gradient(circle at 60% 40%, var(--grad-1), var(--grad-2) 45%, transparent 70%);
  opacity: .28; border-radius: 50%; animation: hvGlow 12s ease-in-out infinite;
}
@keyframes hvGlow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.hv-card {
  position: absolute; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-m); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
}
.hv-browser { top: 0; left: 0; width: 78%; padding: 0; overflow: hidden; animation: hvFloat1 7s ease-in-out infinite; }
.hv-browser-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.hv-browser-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); opacity: .5; }
.hv-url { margin-left: 10px; font-size: 11px; color: var(--ink-faint); font-family: var(--font-body); background: rgba(255,255,255,.04); padding: 3px 10px; border-radius: 6px; }
.hv-browser-body { padding: 22px 20px 24px; }
.hv-line { height: 9px; border-radius: 5px; background: rgba(255,255,255,.10); margin-bottom: 10px; }
.hv-line.w70 { width: 70%; } .hv-line.w40 { width: 40%; margin-bottom: 20px; }
.hv-grid { display: flex; gap: 10px; margin-top: 6px; }
.hv-block { flex: 1; height: 54px; border-radius: 8px; background: linear-gradient(150deg, rgba(124,108,255,.22), rgba(124,108,255,.04)); border: 1px solid var(--border-soft); }

.hv-code {
  bottom: 6%; right: 0; width: 62%; padding: 18px 20px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px;
  animation: hvFloat2 8s ease-in-out infinite; line-height: 1.9;
}
.hv-code-line.indent { padding-left: 16px; }
.tk-tag { color: var(--accent-soft); } .tk-attr { color: #7fd8c8; } .tk-str { color: #f2c98a; } .tk-num { color: #f28a8a; }

.hv-metric {
  top: 42%; left: -4%; padding: 10px 16px; display: flex; align-items: center; gap: 10px;
  animation: hvFloat3 6.5s ease-in-out infinite;
}
.hv-metric-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.hv-metric-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fd8a0; box-shadow: 0 0 0 4px rgba(127,216,160,.15); }

@keyframes hvFloat1 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hvFloat2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
@keyframes hvFloat3 { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-8px) translateX(6px); } }

/* ---------- reveal on scroll ----------
   Progressive enhancement: content is visible by default (JS off, or JS
   fails). Only once html.js is present (set by an inline script in <head>,
   before first paint) do .reveal elements start hidden and animate in. */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
html.js .reveal[data-split] { opacity: 1; transform: none; }

/* ---------- projects ---------- */
.projects { display: flex; flex-direction: column; gap: 32px; }
.project-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-l);
  overflow: hidden; transition: transform .5s var(--ease-out), border-color .4s, box-shadow .5s var(--ease-out);
  position: relative;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent-line); box-shadow: 0 40px 80px -30px rgba(124,108,255,.25); }
.project-card:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.project-card:nth-child(even) .project-media { order: 2; }
.project-media { position: relative; overflow: hidden; min-height: 260px; background: var(--surface-2); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-tag {
  position: absolute; left: 18px; bottom: 18px; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 8px 14px; border-radius: 100px; background: rgba(10,10,13,.6); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14); color: var(--ink);
}
.project-body { padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-head h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.project-category { font-size: 13px; color: var(--accent-soft); margin-top: 4px; }
.project-desc { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.project-tech { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tech span { font-size: 12px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--border); color: var(--ink-faint); }
.project-case { display: grid; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.project-case dt { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); margin-bottom: 5px; }
.project-case dd { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card {
  padding: 32px 26px; background: var(--glass); border: 1px solid var(--border-soft); border-radius: var(--radius-m);
  transition: transform .4s var(--ease-out), border-color .3s, background .3s;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--accent-line); background: var(--glass-strong); }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--accent-dim); color: var(--accent-soft); margin-bottom: 22px;
  transition: transform .4s var(--ease-out), background .3s;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: #fff; }
.service-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.service-card p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

.ai-highlight {
  margin-top: 20px; display: flex; align-items: flex-start; gap: 22px;
  padding: 32px; border-radius: var(--radius-l); border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-dim), var(--glass) 65%);
  position: relative; overflow: hidden;
}
.ai-highlight::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(460px 240px at 10% 0%, rgba(124,108,255,.18), transparent 70%);
}
.ai-highlight-icon {
  position: relative; z-index: 1; flex-shrink: 0; width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px; background: var(--accent-dim); color: var(--accent-soft); border: 1px solid var(--accent-line);
}
.ai-highlight-icon svg { width: 22px; height: 22px; }
.ai-highlight-body { position: relative; z-index: 1; }
.ai-highlight-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 3px 11px; border-radius: 999px; margin-bottom: 12px;
}
.ai-highlight-body h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.ai-highlight-body p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }
.ai-highlight-cta {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--accent-soft);
  background: transparent; border: none; padding: 0; cursor: pointer;
}
.ai-highlight-cta span { display: inline-block; transition: transform .25s var(--ease-out); }
.ai-highlight-cta:hover { color: var(--ink); }
.ai-highlight-cta:hover span { transform: translateX(4px); }

/* ---------- pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.pillar { padding-top: 28px; border-top: 1px solid var(--border); }
.pillar-num { font-family: var(--font-display); font-size: 13px; color: var(--accent-soft); font-weight: 600; }
.pillar h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 16px 0 12px; }
.pillar p { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 28px; padding: 30px 0;
  border-bottom: 1px solid var(--border-soft); position: relative;
}
.timeline-item:first-child { border-top: 1px solid var(--border-soft); }
.timeline-num { font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--ink-faint); transition: color .3s; }
.timeline-item:hover .timeline-num { color: var(--accent-soft); }
.timeline-item h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.timeline-item p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 56ch; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: center; }
.about-photo {
  border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 3/4; background: var(--surface);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); margin-top: 18px; }
.about-copy .section-title { margin-top: 6px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.about-facts li { font-size: 13.5px; padding: 10px 18px; border-radius: 100px; border: 1px solid var(--border); color: var(--ink-soft); background: var(--glass); }

/* ---------- stack ---------- */
.stack-row { display: flex; gap: 16px; flex-wrap: wrap; }
.stack-chip {
  font-family: var(--font-display); font-size: 15px; font-weight: 600; padding: 16px 30px;
  border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--glass); color: var(--ink);
  transition: transform .3s var(--ease-out), border-color .3s, background .3s;
}
.stack-chip:hover { transform: translateY(-4px); border-color: var(--accent-line); background: var(--accent-dim); color: var(--accent-soft); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr .95fr; gap: 60px; align-items: start; }
.contact-copy .hero-actions { margin-top: 32px; }
.contact-direct { margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.contact-direct-item {
  display: inline-flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-soft);
  transition: color .25s;
}
.contact-direct-item:hover { color: var(--ink); }
.cd-icon { display: inline-flex; width: 22px; height: 22px; color: var(--accent-soft); }
.cd-icon svg { width: 100%; height: 100%; }

.contact-form {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 36px; display: flex; flex-direction: column; gap: 18px;
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 13px 16px; color: var(--ink); font-size: 14.5px; transition: border-color .25s, background .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-line); background: rgba(255,255,255,.05);
}
.field textarea { resize: vertical; min-height: 96px; }
.form-note { font-size: 13.5px; color: var(--accent-soft); min-height: 18px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding: 64px 24px 28px; position: relative; z-index: 1; }
.footer-inner {
  max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.footer-role { font-size: 13.5px; color: var(--ink-faint); }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a, .footer-contact a { font-size: 14px; color: var(--ink-soft); transition: color .2s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent-soft); }
.footer-contact { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; text-align: right; }
.footer-bottom {
  max-width: var(--container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border-soft); padding-top: 24px;
}
.footer-bottom p { font-size: 12.5px; color: var(--ink-faint); }
.back-to-top {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; transition: transform .3s var(--ease-out), border-color .3s, color .3s;
}
.back-to-top:hover { transform: translateY(-3px); border-color: var(--accent-line); color: var(--accent-soft); }

/* ---------- asistente IA "Nova" ---------- */
.assistant { position: fixed; right: 20px; bottom: 20px; z-index: 300; }

.assistant-fab {
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px -10px rgba(124,108,255,.65), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  position: relative;
}
.assistant-fab:hover { transform: translateY(-3px) scale(1.04); }
.assistant-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent-line);
  opacity: .6; animation: assistantPulse 2.6s ease-out infinite;
}
@keyframes assistantPulse { 0% { transform: scale(.9); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }
.assistant-fab svg { width: 24px; height: 24px; position: absolute; transition: opacity .25s, transform .25s; }
.assistant-fab .ico-close { opacity: 0; transform: scale(.6) rotate(-45deg); }
.assistant-fab .ico-chat { opacity: 1; transform: scale(1) rotate(0); }
.assistant.is-open .assistant-fab .ico-chat { opacity: 0; transform: scale(.6) rotate(45deg); }
.assistant.is-open .assistant-fab .ico-close { opacity: 1; transform: scale(1) rotate(0); }

.assistant-panel {
  position: absolute; right: 0; bottom: 76px; width: min(380px, calc(100vw - 40px)); max-height: min(560px, 70vh);
  display: flex; flex-direction: column;
  background: rgba(15,16,21,.86); border: 1px solid var(--border); border-radius: var(--radius-l);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 40px 90px -25px rgba(0,0,0,.7);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transform-origin: bottom right;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s;
}
.assistant.is-open .assistant-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.assistant-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.assistant-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
}
.assistant-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.assistant-status { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }

.assistant-messages { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; font-size: 13.5px; line-height: 1.55; padding: 11px 14px; border-radius: 14px; }
.msg p { margin: 0; }
.msg-bot { align-self: flex-start; background: var(--glass); border: 1px solid var(--border-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-typing { align-self: flex-start; display: flex; gap: 4px; padding: 13px 16px; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); animation: typingDot 1.1s ease-in-out infinite; }
.msg-typing span:nth-child(2) { animation-delay: .15s; } .msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px; padding: 8px 13px; border-radius: 100px; border: 1px solid var(--border);
  color: var(--ink-soft); background: var(--glass); transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--accent-line); color: var(--ink); background: var(--accent-dim); }

.assistant-input { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--border-soft); }
.assistant-input input {
  flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 100px;
  padding: 11px 16px; color: var(--ink); font-size: 13.5px;
}
.assistant-input input:focus { outline: none; border-color: var(--accent-line); }
.assistant-input button {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: transform .25s var(--ease-out);
}
.assistant-input button:hover { transform: scale(1.06); }
.assistant-input button svg { width: 17px; height: 17px; }

@media (max-width: 560px) {
  .assistant { right: 14px; bottom: 14px; }
  .assistant-panel { position: fixed; right: 14px; left: 14px; bottom: 84px; width: auto; }
}

/* ---------- progress bar ---------- */
.progress-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: var(--accent); z-index: 200; transition: width .1s linear; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { height: 380px; max-width: 560px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .project-card, .project-card:nth-child(even) { grid-template-columns: 1fr; }
  .project-card:nth-child(even) .project-media { order: 0; }
  .project-body { padding: 30px 26px; }
  .pillars { grid-template-columns: 1fr; gap: 40px; }
  .services { grid-template-columns: 1fr 1fr; }
  .timeline-item { grid-template-columns: 56px 1fr; gap: 18px; }
  .timeline-num { font-size: 24px; }
  .ai-highlight { flex-direction: column; padding: 26px 24px; }
  .footer-inner { flex-direction: column; }
  .footer-contact { align-items: flex-start; text-align: left; }
}

@media (max-width: 560px) {
  .section { padding: 88px 20px; }
  .section-head { margin-bottom: 44px; }
  .hero { padding-top: calc(var(--nav-h) + 20px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .services { grid-template-columns: 1fr; }
  .hv-code { display: none; }
  .hv-metric { display: none; }
  .hv-browser { width: 100%; position: relative; }
  .hero-visual { height: auto; }
  .hv-glow { inset: -20px; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ==========================================================================
   Reduced motion — only intrusive effects are gated
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hv-glow, .hv-browser, .hv-code, .hv-metric, .hero-scroll-hint span { animation: none !important; }
  html { scroll-behavior: auto; }
}
