/* PREVIEW — sistema escandinavo (negro/blanco, Inter, aire) con escala tipográfica tipo Stripe */
:root {
  --ink: #000;
  --ink-2: rgb(0 0 0 / 64%);
  --ink-3: rgb(0 0 0 / 56%);       /* subido de 44% a 56% para llegar a 4.5:1 en texto real */
  --line: rgb(0 0 0 / 10%);
  --line-2: rgb(0 0 0 / 18%);
  --wash: rgb(0 0 0 / 4%);
  --bg-body: #fff;
  --text-main: #000;
  --text-muted: rgb(0 0 0 / 64%);
  --text-soft: rgb(0 0 0 / 56%);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(24px, 5vw, 64px);
}

html, body { background: #fff; }
body { font-family: var(--font-sans); font-size: 17px; line-height: 1.6; color: var(--ink); font-feature-settings: "cv11", "ss03"; }
.hero-halo { display: none !important; }
.container, .nav-wrapper { max-width: 1160px; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Navegación: plana, línea fina ---------- */
.site-header { background: rgb(255 255 255 / 92%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: 0; }
.nav-wrapper { padding-top: 12px; padding-bottom: 12px; }
.nav-shell { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; overflow: visible; }
.nav-shell::after { display: none; }
.nav-avatar { border: 1px solid var(--line); background: #fff; }
.nav-links { font-size: 15px; gap: 32px; }
.nav-links a { opacity: 1; color: var(--ink-2); font-weight: 500; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { display: none; }

/* ---------- Hero: titular en dos tonos, escala Stripe ---------- */
.hero { padding: 96px 0 56px; }
.hero-inner { max-width: 880px; }
h1 { font-size: clamp(2.4rem, 4.2vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; margin: 0 0 28px; }
.hero-intro { color: var(--ink-3); font-size: inherit; font-weight: 500; letter-spacing: inherit; }
.code-hero, .code-hero .code-word, .code-hero .code-bracket, .code-cursor { font-family: inherit !important; font-weight: 500; }
.code-hero .code-bracket, .code-cursor { color: var(--ink-3); }
.hero-subtitle { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin-bottom: 36px; letter-spacing: -0.005em; }
.btn-primary, .hero-cv { background: #000; color: #fff; border: 0; border-radius: 8px; box-shadow: none; font-size: 16px; font-weight: 500; padding: 12px 20px; }
.btn-primary:hover, .hero-cv:hover { background: rgb(0 0 0 / 82%); }
.hero-shortcut { font-size: 15px; color: var(--ink-3); }
.shortcut-key { border-radius: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); }
.cv-tooltip { font-size: 14px; border-radius: 8px; }

/* ---------- Logos: silenciosos y monocromos ---------- */
.brands-section { padding-top: 24px; }
.brand-logo img { filter: grayscale(1) contrast(1.1); opacity: .72; }

/* ---------- Capítulos: aire + franjas alternas ---------- */
.work-section, .experience-section, .testimonials-section, .music-section, .contact-section { padding-top: 112px; padding-bottom: 112px; }
.experience-section, .music-section { background: var(--wash); }
.section-header { margin-bottom: 40px; }
.section-label { text-transform: none; letter-spacing: -0.02em; font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 500; color: var(--ink); line-height: 1.15; margin-bottom: 12px; }
.work-intro { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }

/* ---------- Proyectos: sin cajas, línea superior ---------- */
.filter-btn { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); box-shadow: none; padding: 8px 16px; }
.filter-btn.is-active { background: #000; color: #fff; border-color: #000; }
.work-grid { gap: 40px; grid-auto-columns: calc((100% - 80px) / 3.1); }
.work-card { background: none; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; box-shadow: none; padding: 20px 0 8px; backdrop-filter: none; }
.work-card::before { display: none; }
.work-tag { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.work-title { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; margin: 8px 0 12px; }
.work-desc { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.work-link { font-size: 16px; font-weight: 500; color: var(--ink); }

/* ---------- Experiencia ---------- */
.exp-list { border-top: 0; }
.exp-item { border-top: 1px solid var(--line); padding: 32px 0; gap: 48px; }
.exp-item-date { font-size: 15px; color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.exp-location-pill { font-size: 14px; letter-spacing: 0; text-transform: none; background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; }
.exp-item-role { font-size: 20px; letter-spacing: -0.015em; font-weight: 500; }
.exp-item-desc { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 64ch; }
/* Experiencia: dos párrafos, uno debajo del otro, a todo el ancho del bloque de texto */
.exp-item-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 8px; }
.exp-item-cols .exp-item-desc { max-width: none; margin: 0; }
.exp-company-icon { border-radius: 6px; box-shadow: none; }

/* ---------- Testimonios ---------- */
.testimonial-card { background: none; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; box-shadow: none; padding: 24px 0 0; }
.testimonial-quote { font-size: 20px; line-height: 1.55; letter-spacing: -0.01em; color: var(--ink); }
.testimonial-name { font-size: 16px; font-weight: 500; }
.testimonial-meta { font-size: 15px; color: var(--ink-2); }
.testimonial-cta-link { font-size: 15px; font-weight: 500; }
.stack-badge { text-transform: none; letter-spacing: -0.01em; font-size: 20px; font-weight: 500; color: var(--ink); }
.stack-subtitle { font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.lang-pill { font-size: 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); }

/* ---------- Fuera de la pantalla: tarjeta neutra + rejilla limpia ---------- */
.music-spotify-card { background: #000; border-radius: 12px; padding: 20px 24px; margin-bottom: 56px; }
.music-spotify-album { border-radius: 8px; background: #111; }
.music-spotify-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.music-spotify-artist { font-size: 16px; opacity: 1; color: rgb(255 255 255 / 72%); }
.music-spotify-sub { font-size: 14px; opacity: 1; color: rgb(255 255 255 / 56%); }
.music-spotify-cta { font-size: 15px; font-weight: 500; background: #fff; color: #000; border: 0; border-radius: 8px; }
.music-spotify-cta::after { display: none; }

/* ---------- Contacto ---------- */
.contact-form { background: none; border: 0; box-shadow: none; padding: 0; max-width: 720px; }
.contact-field input, .contact-field textarea { font-family: inherit; font-size: 17px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 14px 16px; box-shadow: none; }
.contact-field input::placeholder, .contact-field textarea::placeholder { color: var(--ink-3); }
.contact-submit { border-radius: 8px; }
.contact-hint { font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: #000; }
.footer-label, .footer-link { font-size: 16px; }
.footer-icon { border-radius: 6px; }
.footer-credit { font-size: 14px; color: rgb(255 255 255 / 56%); letter-spacing: 0; }
.desktop-spacer { display: none; }

@media (max-width: 900px) {
  .work-section, .experience-section, .testimonials-section, .music-section, .contact-section { padding-top: 72px; padding-bottom: 72px; }
  .hero { padding-top: 56px; }
}

/* ---------- Restaurado: degradado de "diseño", pastilla, polaroids superpuestas ---------- */
.hero-noline .gradient-word { letter-spacing: 0; }
.hero-subtitle { font-size: 22px; line-height: 1.45; letter-spacing: -0.012em; color: var(--ink-3); max-width: 60ch; font-weight: 400; }
.hero-subtitle .lead { color: var(--ink); }
.love-code-badge { box-shadow: 0 0 0 1px rgb(0 0 0 / 7%), 0 6px 18px rgb(0 0 0 / 6%); }

/* ---------- Ronda 3: escala algo más compacta (cuerpo 16px como suelo), carrusel, formulario ---------- */
body { font-size: 16px; }
h1 { font-size: clamp(2.25rem, 3.8vw, 3.25rem); }
.hero-subtitle { font-size: 20px; }
.section-label { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.work-intro { font-size: 17px; }
.work-title { font-size: 20px; }
.work-desc, .work-link { font-size: 16px; }
.exp-item-role { font-size: 18px; }
.exp-item-desc { font-size: 16px; }
.testimonial-quote { font-size: 18px; }
.stack-badge { font-size: 18px; }
.contact-field input, .contact-field textarea { font-size: 16px; }
.work-grid { gap: 32px; grid-auto-columns: calc((100% - 96px) / 3.35); }
.contact-form { max-width: none; }

/* ---------- Ronda 4: "diseño" en la misma fuente (con degradado) y saludo más pequeño ---------- */
.hero-noline .gradient-word { font-family: inherit; font-weight: 500; font-size: 1em; line-height: inherit; letter-spacing: inherit; }
.hero-intro { display: inline-block; font-size: clamp(1.25rem, 1.9vw, 1.625rem); letter-spacing: -0.012em; margin-bottom: 14px; }

/* ---------- Ronda 5: carrusel legible en móvil/tablet y "diseño" en negrita con efecto de escritura ---------- */
@media (max-width: 900px) {
  .work-grid { gap: 24px; grid-auto-columns: calc((100% - 24px) / 2.3); }
}
@media (max-width: 600px) {
  .work-grid { gap: 20px; grid-auto-columns: 84%; }
  .work-title { font-size: 20px; }
}
.hero-noline .gradient-word {
  font-family: "Londrina Sketch", cursive;
  font-weight: 400;
  font-size: 1.35em;
  line-height: 1;
  letter-spacing: 0.01em;
  display: inline-block;
  background: none;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0.014em currentColor;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-noline .gradient-word { animation: none; }
}

/* ---------- Tarjetas de proyecto con la misma altura: enlace anclado abajo y título a dos líneas reservado ---------- */
.work-card { justify-content: flex-start; }
.work-desc { flex: 1; }
.work-card[data-type="graphic"] .work-title { min-height: 2.5em; }

/* ---------- Elemento 3D del hero (WebGL) ---------- */
.hero-3d {
  position: absolute; top: -78px; right: 0; width: min(54vw, 860px); height: calc(100% + 78px);
  z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%), linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0%, #000 55%), linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-composite: intersect;
}
.hero-3d.is-ready { opacity: 1; }
.hero-inner, .hero-halo { position: relative; z-index: 1; }
@media (max-width: 900px) {
  .hero-3d { top: -78px; right: -10%; width: 100%; height: 340px;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
    -webkit-mask-composite: source-over; mask-composite: add; }
  .hero-3d.is-ready { opacity: .5; }
}

/* ---------- Botón de Spotify: texto oscuro sobre fondo blanco (gana a a:visited/hover de la regla global) ---------- */
.music-spotify-card a.music-spotify-cta,
.music-spotify-card a.music-spotify-cta:visited,
.music-spotify-card a.music-spotify-cta:hover,
.music-spotify-card a.music-spotify-cta:active { color: #000; }
.music-spotify-card a.music-spotify-cta:hover { background: rgb(255 255 255 / 88%); }

/* ---------- Cursor del titular: barra dibujada del ancho justo para que el punto quede pegado ---------- */
.code-hero .code-cursor {
  display: inline-block;
  width: 0.26em;
  height: 0.8em;
  margin: 0 0.03em 0 0.08em;
  vertical-align: -0.06em;
  overflow: hidden;
  color: transparent;
  background: rgb(0 0 0 / 56%);
}

/* ---------- Polaroids con rebote (js/bounce-cards.js): la física mueve la transformación, CSS solo anima borde y sombra ---------- */
.polaroid-wrap.bounce-on .polaroid { transition: border-color .28s ease, box-shadow .3s ease; will-change: transform; }
.polaroid-wrap.bounce-on .polaroid[data-active] { box-shadow: 0 18px 36px -14px rgb(0 0 0 / 30%); }

/* ---------- Las polaroids se montan ligeramente sobre la barra de Spotify (solo escritorio) ---------- */
@media (min-width: 901px) {
  .polaroid-wrap { margin-top: -50px; }
}

/* ---------- Hero v2 (demo): centrado, una sola tipografía, franja inferior y retícula ---------- */
.hero-viewport { position: relative; }
@media (min-width: 901px) { .hero-viewport { transform: none; justify-content: flex-start; } }
.hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 0 40px; text-align: center; }
.hero > .container { width: 100%; }
.hero-inner { max-width: none; margin: 0 auto; text-align: center; }
h1 { font-size: clamp(2.6rem, 6vw, 5.25rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; margin: 0 0 40px; }
.hero-intro { display: inline-block; font-size: clamp(1.1rem, 1.6vw, 1.375rem); font-weight: 500; letter-spacing: -0.01em; margin-bottom: 22px; }
.hero-noline .gradient-word { font-family: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; display: inline; color: inherit; background: none; -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0; animation: none; }
.code-hero, .code-hero .code-word, .code-hero .code-bracket { font-weight: inherit; }
.hero-actions { justify-content: center; }
.hero-band { border-top: 1px solid var(--line); padding-top: 44px; }
.hero-band .hero-subtitle { margin: 0 auto; text-align: center; max-width: 62ch; }
.hero-band .brands-section { padding-top: 28px; padding-bottom: 20px; }
@media (max-width: 900px) { .hero { padding: 40px 0 28px; } .hero-band { padding-top: 32px; } }

/* Retícula (js/crosshair.js) */
.crosshair { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; opacity: 0; transition: opacity .2s ease; }
.crosshair.is-on { opacity: 1; }
.ch-line { position: absolute; left: 0; top: 0; background: rgb(0 0 0 / 15%); transition: background-color .2s ease, opacity .2s ease; }
.ch-v1, .ch-v2 { width: 1px; height: 100%; }
.ch-h1, .ch-h2 { height: 1px; width: 100%; }
.ch-v2, .ch-h2 { opacity: 0; }
.crosshair.is-locked .ch-v2, .crosshair.is-locked .ch-h2 { opacity: 1; }
.crosshair.is-locked .ch-line { background: rgb(168 85 247 / 70%); }
.ch-box { position: absolute; left: 0; top: 0; border: 1px solid rgb(168 85 247 / 0); background: rgb(168 85 247 / 0); transition: background-color .2s ease, border-color .2s ease; }
.crosshair.is-locked .ch-box { border-color: rgb(168 85 247 / 80%); background: rgb(168 85 247 / 7%); }
.ch-tag { position: absolute; left: 0; top: 0; font: 500 11px/1 ui-monospace, "SF Mono", Menlo, monospace; color: rgb(0 0 0 / 56%); white-space: nowrap; padding: 4px 6px; border-radius: 4px; transition: background-color .2s ease, color .2s ease; }
.crosshair.is-locked .ch-tag { background: #a855f7; color: #fff; }
.crosshair-on .cursor-ring { opacity: 0 !important; }
.hero > .container { max-width: 1320px; }
h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }

/* "diseño" del titular: vuelve la tipografía de dibujo (Londrina Sketch) con contorno fino */
.hero-noline .gradient-word { font-family: "Londrina Sketch", cursive; font-weight: 400; font-size: 1.3em; line-height: 1; letter-spacing: 0.01em; display: inline-block; -webkit-text-stroke: 0.014em currentColor; }

/* Tarjeta de Spotify optimizada para móvil y tablet: portada y texto en fila, botón a todo el ancho debajo */
@media (max-width: 900px) {
  .music-spotify-card { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; row-gap: 14px; align-items: center; padding: 16px; margin-bottom: 32px; }
  .music-spotify-album { width: 56px; height: 56px; }
  .music-spotify-title { font-size: 17px; }
  .music-spotify-artist { font-size: 15px; margin-bottom: 2px; }
  .music-spotify-sub { font-size: 14px; }
  .music-spotify-cta { grid-column: 1 / -1; width: 100%; justify-content: center; margin: 0; align-self: stretch; padding: 12px 16px; }
}

/* Móvil: botón de CV centrado y titular con más aire */
.hero-actions { align-items: center; }
@media (max-width: 640px) {
  .hero { padding: 48px 0 36px; }
  h1 { font-size: clamp(2.15rem, 9.4vw, 2.7rem); line-height: 1.16; letter-spacing: -0.03em; margin-bottom: 36px; }
  .hero-intro { font-size: 1.05rem; margin-bottom: 20px; }
  .hero-noline .gradient-word { margin: 0.04em 0.02em; }
}

/* "Pulsa C para copiar mi email" ahora vive junto al botón de contacto */
.contact-actions .hero-shortcut { margin: 0; }

/* Bloque del hero centrado de verdad: el saludo pasa a su propia línea (sin el hueco de la primera línea del titular) y el relleno es simétrico */
.hero-intro { display: block; }
.hero-intro + br { display: none; }
.hero-actions { margin-bottom: 0; }
@media (min-width: 901px) { .hero { padding: 56px 0; } }

/* Ritmo del hero (huecos en múltiplos de 8): saludo y titular con más aire, franja inferior con más respiro */
.hero-intro { margin-bottom: 32px; }
h1 { margin-bottom: 54px; }
.hero-band .hero-subtitle { font-size: 18px; max-width: 60ch; }
@media (min-width: 901px) {
  .hero-band { padding-top: 61px; }
  .hero-band .brands-section { padding-top: 20px; padding-bottom: 48px; }
}
@media (max-width: 640px) { .hero-band .hero-subtitle { font-size: 17px; } }
.hero-subtitle .lead { font-weight: 500; }

/* Cabecera en tres columnas: foto | enlaces centrados en la página | pastilla + tema.
   Con espacio, los enlaces quedan en el centro exacto; si no cabe, solo se desplazan lo justo. */
.nav-shell { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav-avatar { justify-self: start; }
.nav-main { justify-self: center; align-items: center; flex: initial; }
.nav-shell > .nav-actions { justify-self: end; }
@media (max-width: 820px) { .nav-links { display: none; } }
