/* ================= Tokens ================= */
:root {
  --bg: #050b18;
  --bg-2: #081226;
  --surface: #0b1830;
  --surface-2: #10213f;
  --border: #1a2d4f;
  --border-2: #274372;
  --text: #e8eefb;
  --muted: #93a7c7;
  --dim: #5f7599;
  --blue: #3d8bff;
  --blue-2: #6aa8ff;
  --blue-soft: rgba(61, 139, 255, .12);
  --green: #3fb950;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1240px;
  --header-h: 68px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Noto Sans", Helvetica, Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Fondo: resplandores azul marino + grano sutil */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(38, 99, 214, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(20, 60, 140, .22), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(18, 52, 120, .25), transparent 60%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-2); text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(61, 139, 255, .4); }
h1, h2, h3 { font-family: var(--display); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px;
  background: var(--blue); color: #fff; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ================= Header ================= */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(5, 11, 24, .6);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--border); background: rgba(5, 11, 24, .85); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 14px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #1a3a78, #0c1a33); border: 1px solid var(--border-2);
  color: #cfe0ff; font-size: 13px; font-weight: 800; letter-spacing: .02em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-6deg); box-shadow: 0 0 0 4px var(--blue-soft); }
.brand__text { font-family: var(--mono); font-size: 14px; }
.brand__text span { color: var(--dim); font-weight: 400; }
@media (max-width: 559px) { .brand__text { display: none; } }
@media (min-width: 860px) and (max-width: 1099px) { .brand__text { display: none; } }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: block; padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; flex: none;
  background: var(--surface); border: 1px solid var(--border);
}
.lang button {
  border: 0; background: transparent; color: var(--dim); cursor: pointer;
  font: 700 12px/1 var(--mono); padding: 7px 10px; border-radius: 999px; letter-spacing: .04em;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }

.header-cv {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px; border-radius: 999px;
  font: 700 12px/1 var(--mono); letter-spacing: .04em; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-2);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.header-cv svg { width: 14px; height: 14px; color: var(--blue-2); }
.header-cv:hover { border-color: var(--blue-2); transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 40px; height: 40px; flex: none; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; }
  .lang { margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; margin: 0;
    background: rgba(5, 11, 24, .97); border-bottom: 1px solid var(--border); padding: 8px 20px 18px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 13px 12px; font-size: 16px; }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { background: rgba(61, 139, 255, .1); }
}
@media (max-width: 859px) { .header-cv { margin-left: auto; } .header-cv + .lang { margin-left: 0; } }
@media (min-width: 860px) { .header-cv { order: 3; } .lang { order: 4; } }

/* ================= Botones ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font: 600 15px/1 var(--font); white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .2s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn--primary { background: linear-gradient(180deg, #4b95ff, #2f74e8); color: #fff; box-shadow: 0 10px 30px -12px rgba(61, 139, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn--primary:hover { box-shadow: 0 14px 36px -12px rgba(61, 139, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--primary:hover svg.arrow { transform: translateX(3px); }
.btn--ghost { background: rgba(16, 33, 63, .6); border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--blue-2); background: rgba(16, 33, 63, .9); }

/* ================= Secciones ================= */
section { padding: 80px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 12.5px; color: var(--blue-2); letter-spacing: .06em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.section-title { overflow-wrap: anywhere; margin: 0 0 14px; font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
.section-sub { margin: 0; color: var(--muted); max-width: 640px; font-size: 17px; }
.section-head { margin-bottom: 44px; }

/* Tarjeta base con brillo que sigue al cursor */
.panel {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 33, 63, .72), rgba(11, 24, 48, .72));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(61, 139, 255, .14), transparent 45%);
  transition: opacity .3s var(--ease);
}
.panel:hover { border-color: var(--border-2); }
.panel:hover::before { opacity: 1; }

/* ================= Hero ================= */
.hero { padding: 64px 0 40px; }
.hero__grid { display: grid; gap: 48px; align-items: center; }
.hero__grid > * { min-width: 0; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: rgba(16, 33, 63, .7); border: 1px solid var(--border); color: var(--muted);
  font-size: 13px; font-weight: 500;
}
.pill svg { width: 14px; height: 14px; color: var(--blue-2); }
.hero__kicker { margin: 0 0 6px; font-family: var(--mono); font-size: 15px; color: var(--blue-2); }
.hero__name {
  margin: 0; font-size: clamp(44px, 8.5vw, 88px); line-height: .98; letter-spacing: -.05em; font-weight: 800;
  background: linear-gradient(180deg, #ffffff 30%, #9cc2ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role { margin: 20px 0 0; font-size: clamp(18px, 2.4vw, 22px); font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.hero__role em { font-style: normal; color: var(--blue-2); }
.hero__lead { margin: 16px 0 32px; color: var(--muted); font-size: 17px; max-width: 580px; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__social { display: flex; gap: 8px; margin-top: 28px; }

.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(16, 33, 63, .6); border: 1px solid var(--border); color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { color: #fff; border-color: var(--blue-2); transform: translateY(-2px); }
.icon-btn svg { width: 18px; height: 18px; }

/* Foto */
.portrait { position: relative; justify-self: center; width: min(100%, 400px); }
.portrait__frame {
  position: relative; padding: 3px; border-radius: 32px;
  background: conic-gradient(from var(--angle, 0deg), #1b3d7a, #6aa8ff, #1b3d7a 40%, #0c1a33 60%, #3d8bff, #1b3d7a);
  box-shadow: 0 40px 80px -30px rgba(20, 70, 170, .7);
  animation: spin 10s linear infinite;
}
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --angle: 360deg; } }
.portrait__img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 29px;
  background: var(--surface); filter: saturate(.92) contrast(1.03);
}
.portrait__glow { position: absolute; inset: 10% 0 -8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(61, 139, 255, .35), transparent); filter: blur(20px); }
.float {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 12px;
  background: rgba(8, 18, 38, .88); border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .8);
  animation: bob 6s ease-in-out infinite;
}
.float svg { width: 16px; height: 16px; color: var(--blue-2); flex: none; }
.float small { display: block; font-weight: 500; color: var(--dim); font-size: 11px; font-family: var(--mono); }
.float--1 { top: 8%; left: -6%; }
.float--2 { top: 46%; right: -8%; animation-delay: -2s; }
.float--3 { bottom: 6%; left: 2%; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 640px) {
  .portrait { width: min(100%, 360px); }
  .float { font-size: 12px; padding: 7px 10px; }
  .float small { font-size: 10px; }
  .float--1 { left: 10px; top: 12px; }
  .float--2 { right: 10px; top: auto; bottom: 64px; }
  .float--3 { left: 10px; bottom: 12px; }
}

/* Marquesina de tecnologías */
.marquee {
  margin-top: 64px; padding: 18px 0; border-block: 1px solid var(--border); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: 44px; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { display: inline-flex; align-items: center; gap: 44px; font-family: var(--mono); font-size: 14px; color: var(--dim); white-space: nowrap; }
.marquee__track span::after { content: "◆"; font-size: 8px; color: var(--border-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= Sobre mí (bento) ================= */
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; }
.bento .panel { padding: 26px; }
.bento__intro { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.bento__intro p { margin: 0 0 14px; color: var(--muted); font-size: 16.5px; }
.bento__intro p:last-child { margin-bottom: 0; }
.bento__intro strong { color: var(--text); font-weight: 600; }
.feature__icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(61, 139, 255, .22), rgba(61, 139, 255, .06));
  border: 1px solid rgba(106, 168, 255, .25); color: var(--blue-2);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.card-title { margin: 0 0 14px; font-size: 13px; font-family: var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checklist li { display: flex; gap: 10px; font-size: 15px; color: var(--text); }
.checklist li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 6px; background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236aa8ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.langs { display: grid; gap: 16px; }
.langs__row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 7px; }
.langs__row span:last-child { font-family: var(--mono); font-size: 13px; color: var(--blue-2); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f74e8, var(--blue-2)); }

@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__intro { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento__intro { grid-column: span 2; grid-row: span 2; }
  .bento__soft { grid-column: span 2; }
  .bento__lang { grid-column: span 2; }
}

/* ================= Experiencia ================= */
.timeline { position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--blue), var(--border) 60%, transparent); }
.tl-item { position: relative; padding-left: 40px; }
.tl-item::before {
  content: ""; position: absolute; left: 4px; top: 30px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--blue); box-shadow: 0 0 0 5px rgba(61, 139, 255, .12);
}
.tl-item--edu::before { border-color: var(--border-2); box-shadow: none; }
.tl-card { padding: 24px 26px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 4px; }
.tl-role { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.tl-date { font-family: var(--mono); font-size: 13px; color: var(--blue-2); white-space: nowrap; }
.tl-org { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.tl-kind { display: inline-block; margin-bottom: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.tl-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.tl-list li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15px; }
.tl-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 2px; background: var(--blue-2); }
.tl-list strong { color: var(--text); font-weight: 600; }
.edu-grid { display: grid; gap: 18px; }
@media (min-width: 800px) { .edu-grid { grid-template-columns: 1fr 1fr; } }

/* ================= Proyectos ================= */
.projects { display: grid; gap: 18px; }
.project { display: flex; flex-direction: column; }
.project:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.project__kind { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.kind { font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 6px; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.kind--accent { color: color-mix(in srgb, var(--p) 80%, white); border-color: color-mix(in srgb, var(--p) 40%, transparent); background: color-mix(in srgb, var(--p) 10%, transparent); }
.project__title { margin: 0 0 8px; font-size: 23px; letter-spacing: -.025em; }
.project__desc { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.tag__icon { width: 13px; height: 13px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; color: #b9d3ff; background: rgba(61, 139, 255, .1); border: 1px solid rgba(61, 139, 255, .22); }
.project__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; }
.link {
  display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--text);
  transition: color .2s var(--ease);
}
.link svg { width: 16px; height: 16px; }
.link .arrow { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.link:hover { color: var(--blue-2); }
.link:hover .arrow { transform: translate(2px, -2px); }
.link--static { color: var(--dim); font-weight: 500; }

@media (min-width: 760px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .project--featured { grid-column: span 2; flex-direction: row; }
  .project--featured .cover { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--border); }
  .project--featured .project__body { padding: 34px; justify-content: center; }
  .project--featured .project__title { font-size: 30px; }
}

/* ---- Portadas de proyecto: imagen real o maqueta generada ---- */
.cover {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--p) 32%, transparent), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, color-mix(in srgb, var(--p) 16%, transparent), transparent 60%),
    linear-gradient(160deg, #0d1c38, #060e1f);
}
.cover::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.cover__img { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cover__badge {
  position: absolute; z-index: 2; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px 6px 7px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: rgba(5, 11, 24, .7); border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cover__badge i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--p); color: #051024; }
.cover__badge svg { width: 14px; height: 14px; }

.mock { position: absolute; z-index: 1; background: #0a1529; border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); transition: transform .5s var(--ease); }
.project:hover .mock { transform: translateY(-8px); }
.project:hover .mock--center { right: auto; left: 50%; top: 14%; width: 26%; transform: translateX(-50%); }
.project:hover .mock--center { transform: translate(-50%, -8px); }
.mock--back { transform: translateY(-4px); }
.mock--browser { left: 9%; right: 9%; top: 20%; bottom: -8%; border-radius: 12px 12px 0 0; }
.mock__bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.mock__bar i { width: 8px; height: 8px; border-radius: 50%; background: #1e3152; }
.mock__bar span { margin-left: 10px; padding: 2px 12px; border-radius: 99px; background: rgba(255, 255, 255, .04); font: 10px/1.6 var(--mono); color: var(--dim); }
.mock__body { display: grid; grid-template-columns: 20% 1fr; gap: 12px; height: calc(100% - 28px); padding: 12px; }
.mock__side { display: flex; flex-direction: column; gap: 8px; }
.mock__side b { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); }
.mock__side b:first-child { height: 14px; margin-bottom: 6px; background: color-mix(in srgb, var(--p) 70%, transparent); }
.mock__side b:nth-child(3) { background: color-mix(in srgb, var(--p) 30%, transparent); }
.mock__main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mock__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock__stats b { height: 44px; border-radius: 8px; background: color-mix(in srgb, var(--p) 12%, #0e1d38); border: 1px solid color-mix(in srgb, var(--p) 22%, transparent); }
.mock__rows { display: grid; gap: 8px; }
.mock__rows b { display: flex; align-items: center; gap: 8px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .035); }
.mock__rows b::before { content: ""; width: 30%; height: 6px; margin-left: 8px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.mock__rows b::after { content: ""; margin-left: auto; margin-right: 8px; width: 14%; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--p) 55%, transparent); }
.mock__rows b:nth-child(2n)::after { background: rgba(255, 255, 255, .12); }
.mock__cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mock__cal b { aspect-ratio: 1.4; border-radius: 5px; background: rgba(255, 255, 255, .045); }
.mock__cal b.on { background: var(--p); }
.mock__cal b.soft { background: color-mix(in srgb, var(--p) 32%, transparent); }
.mock__chip { align-self: flex-start; padding: 3px 9px; border-radius: 6px; font: 700 10px/1.5 var(--mono); color: #051024; background: var(--p); }

.mock--center { right: auto; left: 50%; top: 14%; width: 26%; transform: translateX(-50%); }
.project:hover .mock--center { transform: translate(-50%, -8px); }
.mock--back { left: 6%; top: 24%; width: 52%; bottom: -10%; border-radius: 12px 12px 0 0; opacity: .75; }
.mock--phone {
  right: 12%; top: 11%; width: 30%; max-width: 190px; aspect-ratio: 9 / 18.5; border-radius: 26px;
  border: 5px solid #172642; padding: 18px 10px 10px; display: flex; flex-direction: column; gap: 8px;
}
.mock--phone::before { content: ""; position: absolute; top: 6px; left: 50%; width: 34%; height: 6px; border-radius: 99px; background: #172642; transform: translateX(-50%); }
.mock__pizza {
  width: 70%; aspect-ratio: 1; margin: 4px auto; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #b91c1c 0 7%, transparent 8%),
    radial-gradient(circle at 64% 42%, #b91c1c 0 7%, transparent 8%),
    radial-gradient(circle at 45% 66%, #b91c1c 0 7%, transparent 8%),
    radial-gradient(circle at 60% 60%, #15803d 0 4%, transparent 5%),
    radial-gradient(circle, #fbbf24 0 58%, #d97706 60% 70%, #92400e 71%);
  box-shadow: 0 10px 20px -8px rgba(251, 146, 60, .5);
}
.mock__pill { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.mock__pill.w6 { width: 60%; } .mock__pill.w8 { width: 80%; }
.mock__btn { margin-top: auto; height: 22px; border-radius: 8px; background: var(--p); }

.mock--term { left: 9%; right: 9%; top: 20%; bottom: -8%; border-radius: 12px 12px 0 0; }
.mock__term { margin: 0; padding: 12px 14px; font: 11px/1.75 var(--mono); color: #c9d8f2; white-space: pre; overflow: hidden; }
.mock__term .g { color: #7ee787; } .mock__term .b { color: var(--blue-2); } .mock__term .d { color: var(--dim); }

/* ================= Stack ================= */
.stack { display: grid; gap: 14px; }
.stack .panel { padding: 24px 26px; }
.stack__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.stack__head .feature__icon { margin: 0; width: 38px; height: 38px; border-radius: 10px; }
.stack__head .feature__icon svg { width: 19px; height: 19px; }
.stack__head h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.stack__head p { margin: 0; font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px;
  background: rgba(5, 11, 24, .5); border: 1px solid var(--border); font-size: 14px; color: var(--text);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.chip__icon { width: 16px; height: 16px; flex: none; }
.chip:hover { border-color: var(--border-2); background: rgba(16, 33, 63, .8); transform: translateY(-1px); }
.stack__devops { border-color: rgba(61, 139, 255, .35); background: linear-gradient(160deg, rgba(30, 70, 150, .35), rgba(11, 24, 48, .75)); }
@media (min-width: 760px) { .stack { grid-template-columns: repeat(2, 1fr); } .stack__devops { grid-column: span 2; } }
@media (min-width: 1060px) { .stack { grid-template-columns: repeat(3, 1fr); } .stack__devops { grid-column: span 2; } }

/* ================= Contacto ================= */
.contact { padding: 56px 24px; text-align: center; }
.contact::after {
  content: ""; position: absolute; left: 50%; top: -40%; z-index: -1; width: 700px; height: 400px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(61, 139, 255, .28), transparent); pointer-events: none;
}
.contact .eyebrow::before { display: none; }
.contact .section-title { font-size: clamp(34px, 6vw, 60px); }
.contact .section-sub { margin: 0 auto 32px; }
.contact__mail { display: inline-block; margin-bottom: 28px; font-family: var(--mono); font-size: clamp(15px, 2.6vw, 20px); color: var(--text); border-bottom: 1px dashed var(--border-2); padding-bottom: 4px; word-break: break-all; }
.contact__mail:hover { color: var(--blue-2); border-color: var(--blue-2); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (min-width: 768px) { .contact { padding: 80px 48px; } }

.cv-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 560px; margin: 36px auto 0; padding: 16px 18px; text-align: left;
  border-radius: var(--radius); background: rgba(5, 11, 24, .55); border: 1px solid var(--border);
}
.cv-box__info { display: flex; align-items: center; gap: 12px; }
.cv-box__info strong { display: block; font-size: 15px; }
.cv-box__info span:not(.cv-box__icon) { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.cv-box__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-2); }
.cv-box__icon svg { width: 20px; height: 20px; }
.cv-box__links { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-box__links .btn { padding: 10px 14px; font-size: 14px; }

/* ================= Footer ================= */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer__meta { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.footer__host { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.footer__host svg { width: 14px; height: 14px; }
.footer__social { display: flex; gap: 8px; }
@media (min-width: 640px) {
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer__host { justify-content: flex-start; }
}

/* ================= Responsive ================= */
@media (min-width: 768px) { section { padding: 110px 0; } }
@media (min-width: 960px) {
  .hero { padding: 88px 0 40px; }
  .hero__grid { grid-template-columns: 1.25fr .75fr; gap: 64px; }
  .portrait { justify-self: end; }
}

/* ================= Animación de entrada ================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= Ajustes para pantallas pequeñas ================= */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding-top: 40px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .bento .panel, .stack .panel, .tl-card { padding: 20px; }
  .project__body { padding: 20px; }
  .tl-item { padding-left: 32px; }
  .timeline::before { left: 7px; }
  .tl-item::before { left: 0; }
  .contact { padding: 44px 18px; }
  .contact__actions .btn { flex: 1 1 100%; }
  .cv-box { flex-direction: column; align-items: stretch; }
  .cv-box__links .btn { flex: 1 1 0; }
  .header-cv { padding: 7px 10px; }
  .lang button { padding: 7px 9px; }
}
