/* ==========================================================================
   Portafolio — estilos propios (bento hero + páginas de proyecto)
   Se carga DESPUÉS del CSS compilado de Tailwind, no lo modifica.
   ========================================================================== */

:root {
  --pf-bg: #0f172a;
  --pf-sky: #38bdf8;
  --pf-blue: #2563eb;
  --pf-navy: #1e3a8a;
  --pf-deep: #0b1b4d;
  --pf-text: #e8f1ff;
  --pf-muted: #9fb3d1;
  --pf-line: rgba(147, 197, 253, 0.22);
  --pf-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Superficie de vidrio azul (base compartida) ---------- */
.glass {
  position: relative;
  border-radius: 1.75rem;
  border: 1px solid var(--pf-line);
  background:
    linear-gradient(140deg, rgba(56, 189, 248, 0.20) 0%, rgba(37, 99, 235, 0.13) 45%, rgba(30, 58, 138, 0.30) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(56, 189, 248, 0.06),
    0 24px 48px -24px rgba(2, 8, 40, 0.65);
  overflow: hidden;
}
.glass--deep {
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.22) 0%, rgba(30, 58, 138, 0.38) 55%, rgba(11, 27, 77, 0.55) 100%);
}
.glass--bright {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.55) 0%, rgba(37, 99, 235, 0.55) 60%, rgba(30, 64, 175, 0.65) 100%);
  border-color: rgba(186, 230, 253, 0.45);
}
.glass--link {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s, box-shadow 0.35s;
}
.glass--link:hover,
.glass--link:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(186, 230, 253, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 30px 60px -24px rgba(56, 189, 248, 0.35);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #bae6fd;
  outline-offset: 3px;
}

/* ==========================================================================
   HERO · BENTO GRID
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(37, 99, 235, 0.35), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(56, 189, 248, 0.16), transparent 60%),
    var(--pf-bg);
}
/* Orbes difusos: dan al vidrio algo que desenfocar. Quedan detrás de las partículas. */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.hero__orb--a { width: 420px; height: 420px; left: 4%; top: 12%; background: #2563eb; opacity: 0.55; }
.hero__orb--b { width: 360px; height: 360px; right: 6%; top: 8%; background: #38bdf8; opacity: 0.35; }
.hero__orb--c { width: 460px; height: 460px; left: 38%; bottom: -6%; background: #1d4ed8; opacity: 0.5; }

.bento {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.1rem;
  color: var(--pf-text);
}

.tile {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tile h2 {
  font-family: var(--pf-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tile h2 iconify-icon { color: var(--pf-sky); font-size: 1.25rem; }

/* Posiciones (escritorio) */
.tile--photo  { grid-column: 1 / 5;  grid-row: 1 / 4; align-items: center; justify-content: center; text-align: center; gap: 1.25rem; }
.tile--name   { grid-column: 5 / 13; grid-row: 1; justify-content: center; }
.tile--code   { grid-column: 5 / 10; grid-row: 2; }
.tile--design { grid-column: 10 / 13; grid-row: 2; }
.tile--ai     { grid-column: 5 / 13; grid-row: 3; }
.tile--cta    { grid-column: 1 / 9;  grid-row: 4; flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
.tile--github { grid-column: 9 / 13; grid-row: 4; justify-content: center; }

/* ---------- Foto en marco redondo ---------- */
.avatar {
  position: relative;
  width: min(100%, 15.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 7px;
  background: conic-gradient(from 210deg, #38bdf8, #2563eb, #1e3a8a, #7dd3fc, #38bdf8);
  box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.10), 0 30px 60px -20px rgba(37, 99, 235, 0.7);
}
.avatar__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, #1e3a8a, #0b1b4d);
  display: grid;
  place-items: center;
  border: 4px solid var(--pf-bg);
}
.avatar__fallback {
  font-family: var(--pf-display);
  font-weight: 800;
  font-size: 5.5rem;
  color: rgba(186, 230, 253, 0.9);
  letter-spacing: -0.04em;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile--photo p { margin: 0; color: var(--pf-muted); font-size: 0.95rem; max-width: 16rem; line-height: 1.5; }

/* ---------- Nombre ---------- */
.name-title {
  font-family: var(--pf-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 0.9rem;
  color: #fff;
  background: linear-gradient(180deg, #fff 30%, #a5d8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.name-role {
  font-family: var(--pf-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--pf-sky);
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}
.name-lead { margin: 0; color: var(--pf-muted); max-width: 34rem; line-height: 1.6; font-size: 1rem; }

/* ---------- Chips de tecnología ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(186, 230, 253, 0.16);
  font-size: 0.85rem;
  font-weight: 500;
  color: #eaf3ff;
  line-height: 1;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.chip:hover { background: rgba(56, 189, 248, 0.18); border-color: rgba(186, 230, 253, 0.4); transform: translateY(-2px); }
.chip__icon {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  flex: none;
}
.chip__icon iconify-icon { font-size: 0.95rem; }
.chip__icon--dark { background: rgba(15, 23, 42, 0.55); }
.chip__icon--dark iconify-icon { color: #bae6fd; }

/* ---------- CTA cotizar ---------- */
.cta-copy h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.cta-copy p { margin: 0; color: #dbeafe; font-size: 0.95rem; line-height: 1.5; max-width: 26rem; }
.cta-copy a.mail { color: #fff; text-underline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn--light {
  background: #fff;
  color: #0b1b4d;
  box-shadow: 0 10px 30px -8px rgba(2, 8, 40, 0.55);
}
.btn--light:hover { background: #e0f2fe; transform: translateY(-2px) scale(1.03); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(186, 230, 253, 0.35);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.btn--sky { background: #38bdf8; color: #06223a; }
.btn--sky:hover { background: #fff; transform: translateY(-2px); }
.btn iconify-icon { font-size: 1.25rem; }

.tile--github h2 { margin-bottom: 0.35rem; }
.tile--github p { margin: 0 0 1rem; color: var(--pf-muted); font-size: 0.9rem; line-height: 1.5; }
.tile--github .btn { align-self: flex-start; }

/* Una única secuencia de entrada al cargar */
@media (prefers-reduced-motion: no-preference) {
  .bento > .tile { animation: tile-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes tile-in { from { opacity: 0; transform: translateY(22px) scale(0.985); } to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .tile--photo  { grid-column: 1 / 13; grid-row: auto; flex-direction: row; text-align: left; justify-content: flex-start; gap: 1.75rem; }
  .tile--photo .avatar { width: 11rem; flex: none; }
  .tile--name   { grid-column: 1 / 13; grid-row: auto; }
  .tile--code   { grid-column: 1 / 8;  grid-row: auto; }
  .tile--design { grid-column: 8 / 13; grid-row: auto; }
  .tile--ai     { grid-column: 1 / 13; grid-row: auto; }
  .tile--cta    { grid-column: 1 / 13; grid-row: auto; }
  .tile--github { grid-column: 1 / 13; grid-row: auto; }
}
@media (max-width: 719px) {
  .hero { padding: 6rem 1rem 3.5rem; }
  .bento { gap: 0.85rem; }
  .tile { padding: 1.35rem; }
  .tile--photo { flex-direction: column; text-align: center; }
  .tile--photo .avatar { width: min(70vw, 14rem); }
  .tile--code, .tile--design { grid-column: 1 / 13; }
  .tile--cta { flex-direction: column; align-items: stretch; text-align: left; }
  .tile--cta .btn { width: 100%; }
  .tile--github .btn { align-self: stretch; }
}

/* Botón "Cotizar" de la barra de navegación */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #06223a;
  background: #38bdf8;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s;
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }

/* ==========================================================================
   PÁGINAS DE PROYECTO (case study)
   ========================================================================== */
.case-body {
  background:
    radial-gradient(900px 520px at 90% -5%, rgba(37, 99, 235, 0.32), transparent 60%),
    radial-gradient(700px 500px at -5% 30%, rgba(56, 189, 248, 0.13), transparent 60%),
    var(--pf-bg);
  min-height: 100vh;
}
.case-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(15, 23, 42, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.case-nav__in { max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.case-nav a.back { display: inline-flex; align-items: center; gap: 0.5rem; color: #9fb3d1; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.case-nav a.back:hover { color: var(--pf-sky); }

.case { max-width: 72rem; margin: 0 auto; padding: 6.5rem 1.5rem 4rem; color: var(--pf-text); }

/* Cabecera del proyecto */
.case-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.1rem; align-items: stretch; }
.case-intro { grid-column: 1 / 6; padding: 2.25rem; display: flex; flex-direction: column; }
.case-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(186, 230, 253, 0.3);
  color: #bae6fd; font-size: 0.85rem; font-weight: 500;
}
.case-title {
  font-family: var(--pf-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 1.4rem 0 1rem;
  color: #fff;
}
.case-lead { color: #bcd0ee; line-height: 1.65; margin: 0 0 1.75rem; font-size: 1.02rem; max-width: 30rem; }
.case-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Marco de navegador con la captura */
.browser { grid-column: 6 / 13; padding: 0; display: flex; flex-direction: column; }
.browser__bar { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; background: rgba(8, 18, 56, 0.55); border-bottom: 1px solid var(--pf-line); }
.browser__dots { display: flex; gap: 0.4rem; }
.browser__dots i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: rgba(186, 230, 253, 0.28); display: block; }
.browser__url { flex: 1; min-width: 0; text-align: center; font-size: 0.78rem; color: #9fb3d1; background: rgba(255, 255, 255, 0.07); border-radius: 999px; padding: 0.3rem 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser__view { height: 34rem; overflow-y: auto; background: #0b1230; scrollbar-width: thin; scrollbar-color: #38bdf8 transparent; }
.browser__view img { display: block; width: 100%; height: auto; }
.browser__hint { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; font-size: 0.8rem; color: #9fb3d1; border-top: 1px solid var(--pf-line); background: rgba(8, 18, 56, 0.4); }
.browser__hint iconify-icon { color: var(--pf-sky); }

/* Bento de detalles */
.case-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.1rem; }
.case-card { padding: 1.75rem; min-width: 0; }
.case-card h2 {
  font-family: var(--pf-display);
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em;
  color: #fff; margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.case-card h2 iconify-icon { color: var(--pf-sky); font-size: 1.4rem; }
.c-stack { grid-column: 1 / 6; }
.c-arch  { grid-column: 6 / 13; }
.c-pal   { grid-column: 1 / 7; }
.c-type  { grid-column: 7 / 13; }

.stack-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.stack-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(186, 230, 253, 0.12); transition: border-color 0.25s, background 0.25s; }
.stack-item:hover { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.1); }
.stack-item iconify-icon { font-size: 1.9rem; flex: none; }
.stack-item strong { display: block; color: #fff; font-size: 1rem; }
.stack-item span { display: block; color: #9fb3d1; font-size: 0.85rem; margin-top: 0.1rem; }

.arch-list { display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.arch-item { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; align-items: start; padding: 1rem 1.1rem; border-radius: 1.1rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(186, 230, 253, 0.1); }
.arch-item__icon { width: 2.6rem; height: 2.6rem; border-radius: 0.85rem; display: grid; place-items: center; background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(186, 230, 253, 0.25); }
.arch-item__icon iconify-icon { font-size: 1.35rem; color: var(--pf-sky); }
.arch-item p { margin: 0; color: #c3d4ef; font-size: 0.92rem; line-height: 1.6; }
.arch-item strong { color: #fff; }
.arch-item em, .arch-item b { color: #e8f1ff; }
.arch-item code { color: #7dd3fc; background: rgba(0, 0, 0, 0.2); padding: 0.1rem 0.35rem; border-radius: 0.35rem; font-size: 0.85em; }
.arch-item .hl { color: #7dd3fc; }

/* Paleta */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr)); gap: 0.8rem; }
.swatch { border-radius: 1.1rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.18); transition: transform 0.3s; }
.swatch:hover { transform: translateY(-4px); }
.swatch__color { height: 5.5rem; }
.swatch__hex { display: block; padding: 0.55rem 0.7rem; font-size: 0.8rem; color: #cfe0f8; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* Tipografía */
.type-sample { padding: 1rem 1.1rem; border-radius: 1.1rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(186, 230, 253, 0.1); display: flex; align-items: center; gap: 1.1rem; }
.type-sample + .type-sample { margin-top: 0.8rem; }
.type-sample__aa { font-size: 3rem; line-height: 1; color: #fff; width: 4.2rem; flex: none; text-align: center; }
.type-sample__name { font-size: 1.3rem; color: #fff; display: block; }
.type-sample__role { font-size: 0.85rem; color: #9fb3d1; display: block; margin-top: 0.15rem; }

/* Navegación entre proyectos */
.case-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.1rem; }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.6rem; text-decoration: none; color: #fff; }
.next-card small { display: block; color: #9fb3d1; font-size: 0.8rem; margin-bottom: 0.2rem; }
.next-card strong { font-family: var(--pf-display); font-size: 1.5rem; letter-spacing: -0.03em; }
.next-card iconify-icon { font-size: 1.6rem; color: var(--pf-sky); flex: none; }
.next-card--quote { background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(37, 99, 235, 0.55)); border-color: rgba(186, 230, 253, 0.45); }
.next-card--quote small { color: #dbeafe; }
.next-card--quote iconify-icon { color: #fff; }

.case-footer { max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; border-top: 1px solid rgba(255, 255, 255, 0.06); text-align: center; color: #64748b; font-size: 0.8rem; }

@media (max-width: 1023px) {
  .case-intro, .browser { grid-column: 1 / 13; }
  .browser__view { height: 28rem; }
  .c-stack, .c-arch, .c-pal, .c-type { grid-column: 1 / 13; }
}
@media (max-width: 719px) {
  .case { padding: 5.5rem 1rem 3rem; }
  .case-intro { padding: 1.5rem; }
  .case-card { padding: 1.35rem; }
  .browser__view { height: 22rem; }
  .case-next { grid-template-columns: 1fr; }
  .case-actions .btn { flex: 1 1 100%; }
  .type-sample__aa { font-size: 2.4rem; width: 3.4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .case-hero > * { animation: tile-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .case-hero > *:nth-child(2) { animation-delay: 120ms; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   HERO A PANTALLA COMPLETA (escritorio)
   ========================================================================== */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-top: 5.25rem; padding-bottom: 1.5rem; }
.hero .bento { width: 100%; }
@media (min-width: 1024px) {
  .hero .bento {
    min-height: calc(100vh - 6.75rem);
    min-height: calc(100svh - 6.75rem);
    grid-template-rows: 1.15fr 1fr 0.75fr auto;
  }
  .tile--photo .avatar { width: min(100%, 17rem); }
}

/* ==========================================================================
   SECCIONES INFERIORES: mismo lenguaje que el hero
   ========================================================================== */
.sec { position: relative; overflow: hidden; }
.sec--a {
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(37, 99, 235, 0.30), transparent 60%),
    radial-gradient(800px 520px at 100% 70%, rgba(56, 189, 248, 0.14), transparent 60%),
    #0f172a;
}
.sec--b {
  background:
    radial-gradient(900px 520px at 92% 0%, rgba(37, 99, 235, 0.30), transparent 60%),
    radial-gradient(800px 520px at 0% 80%, rgba(56, 189, 248, 0.14), transparent 60%),
    #0f172a;
}
.sec::before, .sec::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0;
}
.sec--a::before { width: 380px; height: 380px; left: -6%; top: 28%; background: #2563eb; opacity: 0.35; }
.sec--a::after  { width: 340px; height: 340px; right: -4%; bottom: 6%; background: #38bdf8; opacity: 0.22; }
.sec--b::before { width: 380px; height: 380px; right: -6%; top: 22%; background: #1d4ed8; opacity: 0.38; }
.sec--b::after  { width: 340px; height: 340px; left: -4%; bottom: 8%; background: #38bdf8; opacity: 0.2; }
.sec > .max-w-6xl { position: relative; z-index: 1; }
.sec h2 { font-family: var(--pf-display); font-weight: 800; letter-spacing: -0.04em; }
.sec h3, .sec h4 { font-family: var(--pf-display); letter-spacing: -0.02em; }

/* Texto sobre imagen en tarjetas: degradado azul en lugar de negro */
.sec a.glass > div.absolute.inset-0,
.sec .glass > .absolute.inset-0 > .absolute.inset-0 {
  background-image: linear-gradient(to top, rgba(11, 27, 77, 0.96) 0%, rgba(30, 58, 138, 0.55) 55%, rgba(30, 58, 138, 0) 100%);
}
.sec .glass--link:hover { transform: translateY(-4px); }

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(186, 230, 253, 0.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(56, 189, 248, 0.2); border-color: rgba(186, 230, 253, 0.6); }

.site-footer {
  background: linear-gradient(180deg, #0f172a, #0b1b4d);
  border-top: 1px solid var(--pf-line);
}

/* ---- Ajuste fino: que el hero quepa exactamente en la pantalla (escritorio) ---- */
@media (min-width: 1024px) {
  .hero { padding-top: 4.9rem; padding-bottom: 1.25rem; }
  .hero .bento { gap: 0.9rem; min-height: calc(100svh - 6.15rem); }
  .hero .tile { padding: 1.35rem 1.6rem; }
  .hero .tile h2 { margin-bottom: 0.7rem; font-size: 1rem; }
  .name-title { font-size: clamp(2.6rem, min(6vw, 9.5vh), 5rem); margin-bottom: 0.55rem; }
  .name-role { margin-bottom: 0.45rem; }
  .name-lead { font-size: 0.95rem; line-height: 1.5; }
  .hero .chips { gap: 0.4rem; }
  .hero .chip { padding: 0.35rem 0.7rem 0.35rem 0.45rem; font-size: 0.82rem; }
  .hero .chip__icon { width: 1.3rem; height: 1.3rem; }
  .hero .btn { padding: 0.8rem 1.4rem; }
  .cta-copy h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
  .tile--github p { margin-bottom: 0.7rem; }
  .tile--photo .avatar { width: min(100%, min(17rem, 30vh)); }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .name-lead, .tile--photo p { display: none; }
  .hero .tile { padding: 1.1rem 1.4rem; }
}
@media (min-width: 1024px) and (max-height: 740px) {
  .hero { padding-top: 4.5rem; }
  .hero .bento { gap: 0.7rem; min-height: calc(100svh - 5.75rem); }
  .cta-copy p { display: none; }
  .tile--github p { display: none; }
  .hero .tile { padding: 0.9rem 1.3rem; }
  .name-role { font-size: 1.05rem; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { padding-top: 4.6rem; padding-bottom: 1rem; }
  .hero .bento { gap: 0.7rem; min-height: calc(100svh - 5.7rem); }
  .hero .tile { padding: 0.8rem 1.25rem; }
  .hero .tile h2 { margin-bottom: 0.45rem; font-size: 0.95rem; }
  .name-title { font-size: clamp(2.4rem, min(5.4vw, 8vh), 4.4rem); margin-bottom: 0.3rem; }
  .name-role { margin-bottom: 0.2rem; font-size: 1.05rem; }
  .hero .chips { gap: 0.3rem; }
  .hero .chip { padding: 0.28rem 0.6rem 0.28rem 0.4rem; font-size: 0.78rem; }
  .hero .chip__icon { width: 1.15rem; height: 1.15rem; }
  .hero .btn { padding: 0.65rem 1.2rem; font-size: 0.9rem; }
  .tile--cta { padding-top: 0.7rem; padding-bottom: 0.7rem; }
}

/* ==========================================================================
   SERVICIOS · PROCESO · CONTACTO · WHATSAPP
   ========================================================================== */
.cta-actions { display: flex; gap: 0.6rem; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 719px) {
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
}
@media (min-width: 1024px) and (max-width: 1180px) {
  .cta-actions { flex-direction: column; }
}

.chip--sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.service { padding: 2rem; display: flex; flex-direction: column; gap: 0.9rem; color: var(--pf-text); }
.service__icon {
  width: 3.2rem; height: 3.2rem; border-radius: 1rem; display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(186, 230, 253, 0.3);
}
.service__icon iconify-icon { font-size: 1.6rem; color: var(--pf-sky); }
.service h3 { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0.3rem 0 0; }
.service p { margin: 0; color: #bcd0ee; line-height: 1.65; font-size: 0.95rem; flex: 1; }
.services__note { margin: 1.75rem 0 0; color: #9fb3d1; font-size: 0.95rem; text-align: center; }

.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; position: relative; }
.process::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 3.6rem; height: 2px; z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), rgba(56, 189, 248, 0.55), transparent);
}
.step { padding: 1.75rem; color: var(--pf-text); z-index: 1; }
.step__n {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%;
  font-family: var(--pf-display); font-weight: 800; font-size: 1.4rem; color: #06223a;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8 60%, #2563eb);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.15);
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 0.5rem; }
.step p { margin: 0; color: #bcd0ee; line-height: 1.6; font-size: 0.92rem; }

.contact { padding: 2.75rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; color: #fff; }
.contact__title { font-family: var(--pf-display); font-size: clamp(1.8rem, 3.6vw, 2.8rem) !important; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 0.5rem; line-height: 1.05; font-style: normal !important; }
.contact p { margin: 0; color: #dbeafe; max-width: 26rem; line-height: 1.55; }
.contact__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

@media (max-width: 1023px) {
  .services { grid-template-columns: 1fr; }
  .process::before { display: none; }
}
@media (max-width: 719px) {
  .process { grid-template-columns: 1fr; }
  .service { padding: 1.5rem; }
  .contact { padding: 1.75rem; }
  .contact__actions { width: 100%; flex-direction: column; }
  .contact__actions .btn { width: 100%; }
}

/* ==========================================================================
   HERO · DISTRIBUCIÓN B (GitHub junto al nombre, 3 paneles técnicos en una
   fila, vitrina de proyectos y cotización a todo el ancho)
   ========================================================================== */
.tile--showcase { padding-bottom: 1.1rem; }
.showcase__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.showcase__head h2 { margin: 0 !important; }
.showcase__all { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: #bae6fd; text-decoration: none; }
.showcase__all:hover { color: #fff; }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; flex: 1; min-height: 0; }
.shot {
  position: relative; display: block; border-radius: 1rem; overflow: hidden; min-height: 5.5rem;
  border: 1px solid rgba(186, 230, 253, 0.22); background: #0b1230;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s; }
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 27, 77, 0.92), rgba(30, 58, 138, 0.15) 60%, transparent); }
.shot span { position: absolute; left: 0.85rem; bottom: 0.65rem; z-index: 1; font-family: var(--pf-display); font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: -0.02em; }
.shot:hover { transform: translateY(-3px); border-color: rgba(186, 230, 253, 0.6); box-shadow: 0 18px 36px -18px rgba(56, 189, 248, 0.5); }
.shot:hover img { transform: scale(1.06); }

@media (min-width: 1024px) {
  .tile--photo    { grid-column: 1 / 5;  grid-row: 1 / 4; }
  .tile--name     { grid-column: 5 / 10; grid-row: 1; }
  .tile--github   { grid-column: 10 / 13; grid-row: 1; }
  .tile--code     { grid-column: 5 / 9;  grid-row: 2; }
  .tile--design   { grid-column: 9 / 11; grid-row: 2; }
  .tile--ai       { grid-column: 11 / 13; grid-row: 2; }
  .tile--showcase { grid-column: 5 / 13; grid-row: 3; }
  .tile--cta      { grid-column: 1 / 13; grid-row: 4; }
  .hero .bento { grid-template-rows: 1.15fr 1fr 1.2fr auto; }
  .tile--github { justify-content: center; }
  .tile--github .btn { align-self: stretch; }
  .tile--design .chips, .tile--ai .chips { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .showcase__head { margin-bottom: 0.4rem; }
  .shot { min-height: 3.6rem; }
  .shot span { font-size: 0.85rem; bottom: 0.45rem; }
  .tile--showcase { padding-bottom: 0.8rem; }
}
@media (min-width: 1024px) and (max-height: 740px) {
  .showcase__head { display: none; }
}

@media (max-width: 1023px) {
  .tile--github   { grid-column: 1 / 13; grid-row: auto; }
  .tile--code     { grid-column: 1 / 13; grid-row: auto; }
  .tile--design   { grid-column: 1 / 7;  grid-row: auto; }
  .tile--ai       { grid-column: 7 / 13; grid-row: auto; }
  .tile--showcase { grid-column: 1 / 13; grid-row: auto; }
  .tile--github .btn { align-self: flex-start; }
  .shot { aspect-ratio: 16 / 10; }
}
@media (max-width: 719px) {
  .tile--design, .tile--ai { grid-column: 1 / 13; }
  .showcase { grid-template-columns: 1fr; }
  .shot { aspect-ratio: 16 / 9; }
  .tile--github .btn { align-self: stretch; }
}

/* Ajuste B: Diseño e IA comparten panel; la vitrina absorbe la altura sobrante */
.chip { white-space: nowrap; }
@media (min-width: 1024px) {
  .tile--code   { grid-column: 5 / 10; grid-row: 2; }
  .tile--design { grid-column: 10 / 13; grid-row: 2; }
  .tile--design .chips { flex-direction: row; align-items: center; }
  .hero .bento { grid-template-rows: auto auto minmax(0, 1fr) auto; }
}
@media (max-width: 1023px) {
  .tile--design { grid-column: 1 / 13; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative; overflow: hidden; padding: 0;
  background:
    radial-gradient(700px 300px at 10% 0%, rgba(37, 99, 235, 0.28), transparent 65%),
    linear-gradient(180deg, #0f172a 0%, #0b1b4d 100%);
  border-top: 0;
  color: var(--pf-text);
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.7), transparent);
}
.footer__in {
  position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; text-align: left;
}
.footer__logo { font-weight: 700; font-size: 1.4rem; letter-spacing: -0.04em; color: #fff; text-decoration: none; }
.footer__logo span { color: var(--pf-sky); font-size: 1.9rem; line-height: 0; }
.footer__brand p { margin: 0.9rem 0 1.25rem; color: #9fb3d1; line-height: 1.6; max-width: 22rem; font-size: 0.95rem; }
.footer__social { display: flex; gap: 0.6rem; }
.footer__social a {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; color: #e8f1ff;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(186, 230, 253, 0.25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}
.footer__social a:hover { background: rgba(56, 189, 248, 0.25); border-color: rgba(186, 230, 253, 0.6); transform: translateY(-2px); }
.footer__social iconify-icon { font-size: 1.25rem; }
.footer__col h2 { font-family: var(--pf-display); font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 1rem; letter-spacing: -0.01em; font-style: normal; }
.footer__col ul { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a { color: #9fb3d1; text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer__col ul a:hover { color: #fff; }
.footer__cta {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: #38bdf8; color: #06223a !important; font-weight: 700; transition: background 0.25s, transform 0.25s;
}
.footer__cta:hover { background: #fff; transform: translateY(-2px); }
.footer__bar {
  position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem 1.75rem;
  border-top: 1px solid rgba(186, 230, 253, 0.14); display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap;
}
.footer__bar p { margin: 0; color: #64748b; font-size: 0.82rem; }
@media (max-width: 860px) {
  .footer__in { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / 3; }
}
@media (max-width: 520px) {
  .footer__in { grid-template-columns: 1fr; padding-top: 2.75rem; gap: 2rem; }
  .footer__brand { grid-column: auto; }
  .footer__bar { flex-direction: column; }
}
@media (max-width: 860px) { .footer__bar { padding-right: 5.5rem; } }

/* ==========================================================================
   LOGO E ISOTIPO
   ========================================================================== */
.brand-logo { display: inline-flex; align-items: center; transition: transform 0.25s, filter 0.25s; }
.brand-logo img { height: 2.1rem; width: auto; display: block; }
.brand-logo:hover { transform: translateY(-1px); filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6)); }

.avatar img.avatar__iso { height: 46%; width: auto; max-width: none; position: static !important; inset: auto !important; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(56, 189, 248, 0.45)); }

.footer__logo { display: inline-block; line-height: 0; }
.footer__logo img { height: 2.6rem; width: auto; display: block; }