/* =========================================================
   Portafolio · sistema visual
   Grafito de fondo, plata para texto y superficies,
   rojo profundo para identidad y acciones, morado solo en luz.
   Motivo de marca: el punto rojo que rompe el anillo del logo.

   Rendimiento: el aspecto de vidrio se logra con gradientes y
   bordes finos, no con desenfoque en tiempo real. Solo la barra
   de navegación usa backdrop-filter (es pequeña).
   ========================================================= */

:root {
  /* Grafito */
  --bg: #0c0d10;
  --bg-raise: #121318;

  /* Plata */
  --silver-50: #f2f3f6;
  --silver-100: #dcdfe6;
  --silver-300: #a8acb7;
  --silver-500: #80848f;

  /* Rojo profundo */
  --red: #b3132b;
  --red-hi: #c91a35;
  --red-text: #ff7084;
  --red-glow: rgb(179 19 43 / 0.3);

  /* Morado tenue (iluminación) */
  --violet: #9a8cf0;

  /* Vidrio y bordes */
  --line: rgb(220 224 235 / 0.1);
  --line-strong: rgb(220 224 235 / 0.18);
  --glass: linear-gradient(180deg, rgb(32 34 41 / 0.72), rgb(20 21 26 / 0.6));
  --glass-hi: rgb(220 224 235 / 0.07);
  --glass-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    inset 0 0 0 1px var(--line),
    0 24px 48px -24px rgb(0 0 0 / 0.7);

  --metal: linear-gradient(176deg, #fbfbfd 8%, #d4d7de 38%, #8f939e 62%, #c9ccd4 78%, #eef0f3 96%);
  --red-dot: radial-gradient(circle at 35% 30%, #ff5068, #a8102a 75%);

  --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 9vw, 120px);
  --radius-card: 16px;
  --nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 28px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--silver-100);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--red); color: var(--silver-50); }

:focus-visible {
  outline: 2px solid var(--silver-50);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--silver-50);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(80px); }

/* Espacios pendientes de completar: punteado violeta, fácil de ver y buscar */
.ph {
  text-decoration: underline dotted rgb(154 140 240 / 0.7);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}
.ph-block {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed rgb(154 140 240 / 0.35);
  background: rgb(124 104 230 / 0.05);
}
.ph-block + .ph-block { margin-top: 10px; }

/* ---------- Ambiente ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(220 224 235 / 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(220 224 235 / 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 75%);
}
/* Grano fino dentro de la capa fija: se pinta una vez, no en cada scroll */
.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Brillos: el rojo baja y el morado sube a medida que avanzas en la página.
   Sin filtro de desenfoque: el borde suave sale del propio gradiente. */
.ambient__glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  will-change: transform;
}
.ambient__glow--red {
  left: -16vmax;
  top: -18vmax;
  background: radial-gradient(closest-side, rgb(179 19 43 / 0.26), rgb(179 19 43 / 0.1) 45%, transparent);
}
.ambient__glow--violet {
  right: -16vmax;
  bottom: -18vmax;
  background: radial-gradient(closest-side, rgb(124 104 230 / 0.2), rgb(124 104 230 / 0.07) 45%, transparent);
}
@supports (animation-timeline: scroll()) {
  .ambient__glow--red {
    animation: glow-down linear both;
    animation-timeline: scroll(root);
  }
  .ambient__glow--violet {
    animation: glow-up linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes glow-down { to { transform: translate3d(8vw, 78vh, 0); } }
@keyframes glow-up { to { transform: translate3d(-8vw, -78vh, 0); } }

/* ---------- Tipografía ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-300);
}
/* El punto rojo de la marca abre cada sección */
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-dot);
  box-shadow: 0 0 10px rgb(201 26 53 / 0.6);
}

/* Títulos: grotesca firme + itálica serif para la palabra con acento */
.heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--silver-50);
  text-wrap: balance;
}
.heading--xl { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
.heading em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  color: var(--silver-300);
}

.lead {
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--silver-300);
  max-width: 34em;
  text-wrap: pretty;
}
.body-lg {
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.7;
  color: var(--silver-100);
  text-wrap: pretty;
}
.body { font-size: 0.9375rem; color: var(--silver-300); text-wrap: pretty; }

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-300);
}

/* Plateado metálico: solo para el nombre */
.metal {
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Logo: el zorro ---------- */

.logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* ---------- Superficies ---------- */

.glass {
  position: relative;
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

/* ---------- Botones ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--lg { min-height: 48px; padding: 14px 22px; font-size: 0.9375rem; }

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.18),
    inset 0 -1px 0 rgb(0 0 0 / 0.25),
    0 8px 24px -10px var(--red-glow);
}
/* Reflejo que cruza el botón rojo al pasar el cursor */
.btn--red::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.25) 50%, transparent 65%);
  transform: translateX(-110%);
  pointer-events: none;
}
.btn--glass {
  background: var(--glass-hi);
  color: var(--silver-50);
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.btn__icon {
  width: 16px;
  height: 16px;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn--red:hover {
    background: var(--red-hi);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.22),
      inset 0 -1px 0 rgb(0 0 0 / 0.25),
      0 10px 28px -10px rgb(201 26 53 / 0.5);
  }
  .btn--red:hover::before {
    transform: translateX(110%);
    transition: transform 650ms var(--ease-in-out);
  }
  .btn--glass:hover { background: rgb(220 224 235 / 0.11); }
  .btn:hover .btn__icon { transform: translateY(2px); }
  .contact .btn:hover .btn__icon,
  .project .btn:hover .btn__icon { transform: translate(2px, -2px); }
}

/* ---------- Navegación ---------- */

.nav {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 3vw, 24px);
  height: var(--nav-h);
  width: min(calc(100% - 24px), 660px);
  padding: 0 6px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgb(18 19 24 / 0.7);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgb(255 255 255 / 0.06), 0 16px 32px -16px rgb(0 0 0 / 0.8);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

/* Progreso de lectura: una línea roja fina en la base de la barra */
.nav__progress {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-hi) 20%, var(--red-hi) 80%, transparent);
  transform: scaleX(0);
  transform-origin: left;
}
@supports (animation-timeline: scroll()) {
  .nav__progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
}
.nav__brand .logo { transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .nav__brand:hover .logo { transform: translateY(-2px) scale(1.08); }
}
.nav__name {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--silver-50);
}

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--silver-300);
  transition: color 180ms ease, background-color 180ms ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red-hi);
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
  transition: opacity 200ms ease, transform 240ms var(--ease-out);
}
.nav__links a[aria-current="true"] { color: var(--silver-50); }
.nav__links a[aria-current="true"]::after { opacity: 1; transform: translateX(-50%) scale(1); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--silver-50); background: var(--glass-hi); }
}

@media (max-width: 560px) {
  .nav__name { display: none; }
  .nav__links a { padding: 0 10px; }
}

/* ---------- Presentación ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 36px);
}

/* Foco de luz plateado que cae desde arriba (reinterpreta el halo cónico) */
.hero__spot {
  position: absolute;
  inset: 0 0 auto;
  height: 80vh;
  z-index: -1;
  background: conic-gradient(from 180deg at 62% -8%,
    transparent 43%,
    rgb(200 205 220 / 0.06) 47%,
    rgb(220 224 235 / 0.11) 50%,
    rgb(200 205 220 / 0.06) 53%,
    transparent 57%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: min(calc(100svh - var(--nav-h) - 140px), 640px);
  padding-block: clamp(24px, 4vw, 48px) clamp(48px, 6vw, 72px);
}

/* Nombre: nombre en grotesca, apellido en itálica, cerrado con el punto rojo */
.hero__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.375rem, 1.3rem + 3.9vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.hero__name em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.1em;
  letter-spacing: -0.02em;
  padding-right: 0.06em;
}
.hero__name .line:nth-child(2) { padding-left: 0.5em; }
.dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.04em;
  border-radius: 50%;
  background: var(--red-dot);
  box-shadow: 0 0 0.3em rgb(201 26 53 / 0.5);
}

/* Cada línea sube desde una máscara */
.line {
  display: block;
  overflow: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.line__in { display: inline-block; }
.js .line__in {
  animation: line-up 1000ms var(--ease-out) both;
  animation-delay: calc(120ms + var(--i) * 100ms);
}
@keyframes line-up {
  from { transform: translateY(105%); }
}

.hero .lead { margin-top: 24px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--silver-300);
}
.status__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-hi);
}
.status__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--red-hi);
  opacity: 0;
  animation: ping 2.6s var(--ease-out) 3 1.6s;
}
@keyframes ping {
  0% { opacity: 0.8; transform: scale(0.6); }
  70%, 100% { opacity: 0; transform: scale(1.6); }
}

/* Retrato */
.portrait {
  position: relative;
  width: min(100%, 340px);
  justify-self: end;
  perspective: 1000px;
}
/* Luz detrás de la foto: gradientes, sin desenfoque */
.portrait__halo {
  position: absolute;
  inset: -12% -18% -14%;
  z-index: -1;
  background:
    radial-gradient(40% 40% at 28% 72%, rgb(179 19 43 / 0.3), transparent),
    radial-gradient(40% 40% at 76% 26%, rgb(124 104 230 / 0.22), transparent);
}
.portrait__frame {
  position: relative;
  padding: 8px;
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  transform-style: preserve-3d;
}
.portrait__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 15px;
  background: var(--bg-raise);
}
/* Reflejo plateado sobre el vidrio */
.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 15px;
  background: linear-gradient(125deg, rgb(255 255 255 / 0.08) 0%, transparent 32%, transparent 70%, rgb(255 255 255 / 0.03) 100%);
  pointer-events: none;
}
.js .portrait__frame {
  animation: unveil 1200ms var(--ease-in-out) both 200ms;
}
@keyframes unveil {
  from { clip-path: inset(100% 0 0 0 round 22px); }
  to { clip-path: inset(0 0 0 0 round 22px); }
}

/* Sello: el logo rodeado de tu nombre, girando despacio */
.seal {
  position: absolute;
  top: -30px;
  left: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a2c34, #0f1014 70%);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    0 16px 32px -12px rgb(0 0 0 / 0.7),
    0 0 28px -8px rgb(201 26 53 / 0.35);
}
.js .seal { animation: pop-in 800ms var(--ease-out) both 900ms; }
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9) rotate(-30deg); }
}
.seal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  fill: var(--silver-300);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.seal__logo {
  position: absolute;
  inset: 23%;
  width: 54%;
  height: 54%;
  object-fit: contain;
}

.portrait__tag {
  position: absolute;
  right: -20px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 200px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--silver-100);
  background: rgb(22 23 29 / 0.94);
  box-shadow: var(--glass-shadow);
}
.js .portrait__tag { animation: rise 700ms var(--ease-out) both 1100ms; }
.portrait__tag-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-text);
}

/* Entrada escalonada del resto del texto (solo opacidad y posición) */
.js .hero__in {
  animation: rise 800ms var(--ease-out) both;
  animation-delay: calc(100ms + var(--i) * 80ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* Franja de servicios */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 14px;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  line-height: 1;
  color: var(--silver-300);
  white-space: nowrap;
}
.marquee i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-dot);
  flex: none;
}
@keyframes marquee {
  to { transform: translate3d(calc(-50% - 14px), 0, 0); }
}

@media (max-width: 880px) {
  .hero { padding-top: calc(var(--nav-h) + 20px); }
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
  }
  /* En el celular, tu cara y tu marca van primero */
  .portrait {
    order: -1;
    justify-self: center;
    width: min(62%, 260px);
    margin-top: 32px;
  }
  .seal { width: 80px; height: 80px; top: -24px; left: -26px; }
  .seal__ring { font-size: 15px; }
  .portrait__tag { right: -18px; bottom: 16px; max-width: 170px; font-size: 0.75rem; padding: 8px 12px; }
}
@media (max-width: 480px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__name .line:nth-child(2) { padding-left: 0.3em; }
}

/* ---------- Secciones ---------- */

.section { padding-block: var(--section-y); }
.section__head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }

/* Sobre mí */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.about__bio {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  max-width: 32em;
}
.about__bio .body { margin-top: 16px; }

.interests { margin-top: 36px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--silver-100);
  background: var(--glass-hi);
  box-shadow: inset 0 0 0 1px var(--line);
}

.about__side { display: grid; gap: 16px; }
.panel { padding: clamp(18px, 2.4vw, 24px); }

.method { display: grid; gap: 18px; margin-top: 18px; }
.method li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}
.method__n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.9;
  color: var(--red-text);
}
.method h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--silver-50);
}
.method p {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--silver-300);
}

.panel__note {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--silver-500);
}
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.skill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 5px 5px 10px;
  border-radius: 7px;
  font-size: 0.8125rem;
  color: var(--silver-100);
  background: var(--glass-hi);
  box-shadow: inset 0 0 0 1px var(--line);
}
.js .is-in .skill {
  animation: rise 500ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--k) * 40ms);
}
.skill__count {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-align: center;
  color: var(--silver-300);
  background: rgb(0 0 0 / 0.25);
}
.panel__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--silver-300);
}

@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__bio { position: static; }
  .interests { margin-top: 28px; }
}

/* ---------- Proyectos ---------- */

.work__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.work__head > div { max-width: 540px; }
.work__intro { margin-top: 14px; }

.filters[hidden] { display: none; }
.filters {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass-hi);
  box-shadow: inset 0 0 0 1px var(--line);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--silver-300);
  cursor: pointer;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, transform 160ms var(--ease-out);
}
.filter:active { transform: scale(0.97); }
.filter span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--silver-500);
}
.filter[aria-pressed="true"] {
  color: var(--silver-50);
  background: rgb(220 224 235 / 0.09);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.filter[aria-pressed="true"] span { color: var(--red-text); }
@media (hover: hover) and (pointer: fine) {
  .filter:hover { color: var(--silver-50); }
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-h) + 36px);
  transition: transform 450ms var(--ease-out), box-shadow 450ms ease;
}
.project[hidden] { display: none; }

/* Luz que sigue al puntero dentro de la tarjeta: un solo elemento que se
   mueve con transform, así no se recalculan estilos en cada movimiento */
.project__light {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(220 224 235 / 0.07), rgb(201 26 53 / 0.04) 50%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.project > :not(.project__light) { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .project:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.08),
      inset 0 0 0 1px var(--line-strong),
      0 28px 48px -24px rgb(0 0 0 / 0.8);
  }
  .project:hover .project__light { opacity: 1; }
}

/* Vista previa: navegador de escritorio + teléfono */
.preview {
  position: relative;
  isolation: isolate;
}
.preview::before {
  content: "";
  position: absolute;
  inset: 0 -4% -10%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 60%, rgb(201 26 53 / 0.18), transparent);
  opacity: 0.6;
  transition: opacity 400ms ease;
}
.project:hover .preview::before { opacity: 1; }

.shot {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line), 0 16px 32px -20px rgb(0 0 0 / 0.8);
}
.shot__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.015));
}
.shot__bar i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(220 224 235 / 0.16);
}
.shot__bar i:first-child { background: rgb(201 26 53 / 0.7); }
.shot__url {
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--silver-500);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.shot__hint {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver-500);
  opacity: 0;
  transition: opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .project:hover .shot__hint { opacity: 1; }
}
.shot__view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
/* La captura es de la página completa: al pasar el cursor se recorre de arriba abajo */
.shot__view img {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: auto;
}

/* Captura pendiente */
.shot__empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  height: 100%;
  background:
    radial-gradient(60% 80% at 30% 100%, rgb(179 19 43 / 0.14), transparent 70%),
    radial-gradient(50% 60% at 80% 0%, rgb(124 104 230 / 0.12), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(220 224 235 / 0.025) 14px 15px);
  color: var(--silver-500);
  text-align: center;
}
.shot__empty b {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--silver-300);
  opacity: 0.6;
}
.shot__empty span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Teléfono con la versión móvil */
.phone {
  position: absolute;
  right: 5%;
  bottom: -7%;
  width: 21%;
  min-width: 72px;
  padding: 3px;
  border-radius: 18px;
  background: linear-gradient(160deg, #e9ebef, #7d818c 45%, #c9ccd4 70%, #5d606a);
  box-shadow:
    0 18px 32px -12px rgb(0 0 0 / 0.75),
    0 0 0 1px rgb(0 0 0 / 0.5);
  transform: rotate(4deg);
  transition: transform 550ms var(--ease-out);
}
.phone__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 15px;
  background: #000;
}
.phone__screen::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  z-index: 1;
  width: 30%;
  height: 6px;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
@media (hover: hover) and (pointer: fine) {
  .project:hover .phone { transform: rotate(0deg) translateY(-8px); }
}
.preview--phone { margin-bottom: 16px; }

.project__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 10px 10px;
}
.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.75rem;
  color: var(--silver-500);
}
.badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-100);
  background: var(--glass-hi);
  box-shadow: inset 0 0 0 1px var(--line);
}
.badge--encargo,
.badge--emprendimiento { color: var(--red-text); box-shadow: inset 0 0 0 1px rgb(255 112 132 / 0.25); background: rgb(179 19 43 / 0.1); }
.badge--estado { color: var(--violet); box-shadow: inset 0 0 0 1px rgb(154 140 240 / 0.25); background: rgb(124 104 230 / 0.08); }

.project__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--silver-50);
}

.project__facts {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.project__facts dt {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-500);
}
.project__facts dd {
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--silver-100);
  text-wrap: pretty;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 18px;
}
.tag {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  color: var(--silver-300);
  box-shadow: inset 0 0 0 1px var(--line);
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}
.project__links .btn { min-height: 40px; padding: 9px 16px; font-size: 0.8125rem; }
.project__pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--silver-500);
}
.project__pending::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--silver-500);
}

/* Proyecto destacado: ocupa toda la fila */
.project--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: clamp(10px, 1.6vw, 18px);
}
.project--featured .preview { margin-bottom: 6%; }
.project--featured .project__body { padding: 16px clamp(10px, 2vw, 24px); }
.project--featured .project__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }

@media (max-width: 960px) {
  .project--featured { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .projects { grid-template-columns: 1fr; }
  .work__head { align-items: flex-start; }
  .filters { width: 100%; justify-content: space-between; }
  .filter { flex: 1; justify-content: center; padding: 0 8px; }
  .project, .project--featured { padding: 8px; }
  .project__body, .project--featured .project__body { padding: 16px 8px 8px; }
  .phone { width: 24%; border-radius: 14px; }
  .phone__screen { border-radius: 11px; }
  .phone__screen::before { height: 4px; top: 4px; }
}

/* ---------- Contacto ---------- */

.contact__panel {
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  text-align: center;
  isolation: isolate;
}
.contact__logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgb(201 26 53 / 0.35));
}
.contact__panel .eyebrow { justify-content: center; }
.contact__glow {
  position: absolute;
  inset: 30% -10% -40%;
  z-index: -1;
  background:
    radial-gradient(45% 50% at 50% 60%, rgb(179 19 43 / 0.26), transparent),
    radial-gradient(30% 35% at 72% 40%, rgb(124 104 230 / 0.14), transparent);
}
.contact__text {
  max-width: 30em;
  margin: 20px auto 0;
  color: var(--silver-300);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin-top: 28px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--silver-300);
  text-decoration: underline;
  text-decoration-color: rgb(220 224 235 / 0.2);
  text-underline-offset: 0.3em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .socials a:hover { color: var(--silver-50); text-decoration-color: var(--red-hi); }
}
@media (max-width: 480px) {
  .contact__actions .btn { flex: 1 1 100%; }
}

/* ---------- Pie ---------- */

.footer { padding-block: 0 40px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--silver-500);
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand .logo { width: 26px; height: 26px; }
.footer__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--silver-300);
}
@media (hover: hover) and (pointer: fine) {
  .footer__top:hover { color: var(--silver-50); }
}

/* ---------- Aparición al desplazarse ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
/* Una vez visible, la tarjeta vuelve a su transición rápida de hover */
.js .project[data-reveal].is-done {
  transition: transform 450ms var(--ease-out), box-shadow 450ms ease;
  transition-delay: 0ms;
}

/* ---------- Aviso ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--silver-50);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 300ms var(--ease-out);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__in,
  .js .line__in,
  .js .seal,
  .js .portrait__tag,
  .js .portrait__frame { animation: fade 400ms ease both; }
  .seal__ring,
  .marquee__track,
  .ambient__glow,
  .status__dot::after { animation: none; }
  .js [data-reveal] { transform: none; transition: opacity 400ms ease; }
  .js .is-in .skill { animation: fade 400ms ease both; }
  .portrait__frame { transform: none !important; }
  .project,
  .phone,
  .btn,
  .btn__icon,
  .filter { transition-property: opacity, background-color, box-shadow, color; }
  .project:hover,
  .project:hover .phone { transform: none; }
  .project__light,
  .btn--red::before { display: none; }
  .shot__view img { transform: none !important; }
  .toast { transition: opacity 200ms ease; }
}
@keyframes fade { from { opacity: 0; } }
