/* ==========================================================
   Ultravioleta: portafolio de Yosef Puetate
   ========================================================== */

:root {
  --ink: #1b0a3c;
  --ink-2: #2a1260;
  --uv: #7b3cff;
  --uv-deep: #5a1fe0;
  --lilac: #cdb9ff;
  --paper: #f4efff;
  --orchid: #f25cdb;

  --on-ink: var(--paper);
  --on-ink-muted: #b9a8e6;
  --on-paper: var(--ink);
  --on-paper-muted: #5b4a85;
  --on-lilac-muted: #3f2f66;

  --display: 'Anybody', 'Arial Black', sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --section-y: clamp(5rem, 11vw, 9rem);
  --compact-y: clamp(2.5rem, 6vh, 4.5rem);
  --max: 1320px;
  /* Margen lateral común: todas las secciones alinean su borde izquierdo aquí */
  --page-x: max(var(--gutter), (100% - var(--max)) / 2);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

section[id] {
  scroll-margin-top: 5rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--orchid);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* "hidden" no aplica a elementos SVG: sin esto el sprite ocupa 300×150 px */
svg[hidden] {
  display: none;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

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

.display-2 {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(3rem, 7.5vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.display-3 {
  font-family: var(--display);
  font-weight: 750;
  font-variation-settings: 'wdth' 115;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-solid {
  background: var(--paper);
  color: var(--ink);
}

.btn-solid:hover {
  background: var(--orchid);
}

.btn-ghost {
  border: 1.5px solid var(--lilac);
  color: var(--paper);
}

.btn-ghost:hover {
  background: var(--lilac);
  color: var(--ink);
}

/* ---------- Barra superior ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--page-x);
  transition: background-color 0.3s;
}

.topbar.is-solid {
  background: rgb(27 10 60 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'wdth' 150;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  font-weight: 500;
  font-size: 0.95rem;
}

.topnav a {
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.topnav a:hover,
.topnav a[aria-current] {
  border-bottom-color: var(--orchid);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: clamp(0.5rem, 1.5vw, 1rem);
  border-left: 1px solid rgb(205 185 255 / 0.3);
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-switch > * {
  padding: 0.5rem 0.35rem;
}

.lang-current {
  text-decoration: underline;
  text-decoration-color: var(--orchid);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.topnav .lang-switch a {
  color: var(--on-ink-muted);
}

.topnav .lang-switch a {
  border-bottom: 0;
}

.topnav .lang-switch a:hover {
  color: var(--orchid);
}

.topnav .topnav-cta {
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--uv);
}

.topnav .topnav-cta:hover {
  background: var(--orchid);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 5fr);
  /* 1fr absorbe el alto extra de la foto para que el texto no se separe del nombre */
  grid-template-rows: auto 1fr;
  align-items: start;
  align-content: start;
  justify-content: start;
  /* La barra superior es fija (4.5rem): el aire real sobre el nombre es el clamp */
  padding: calc(4.5rem + clamp(24px, 5vh, 56px)) var(--page-x) 3.5rem;
  column-gap: 2rem;
}

.hero-name {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
}

.hero-line {
  display: block;
  font-variation-settings: 'wdth' 150;
  animation: stretch 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-line--last {
  animation-delay: 0.12s;
  color: var(--lilac);
}

.hero-figure {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: end;
  position: relative;
  z-index: 2;
  width: 116%;
  justify-self: end;
  margin-right: -4%;
  margin-bottom: -3.5rem;
  pointer-events: none;
}

.hero-disc {
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--uv);
  translate: -50% 0;
  animation: rise 1.1s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-photo {
  position: relative;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%), linear-gradient(to right, transparent 0, #000 14%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%), linear-gradient(to right, transparent 0, #000 14%);
  mask-composite: intersect;
  max-height: calc(100svh - 6rem);
  object-fit: contain;
  object-position: bottom;
  animation: fade-up 1s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-intro {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 3;
  padding-top: 1.75rem;
  max-width: 36rem;
  animation: fade-up 0.9s 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--on-ink-muted);
  margin-bottom: 1.25rem;
}

.pulse {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--orchid);
  box-shadow: 0 0 0 0 rgb(242 92 219 / 0.6);
  animation: pulse 2.4s infinite;
}

.hero-lead {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 1rem;
  color: var(--on-ink-muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgb(205 185 255 / 0.4);
  text-underline-offset: 0.3em;
}

.hero-links a:hover {
  text-decoration-color: var(--orchid);
}

/* Sin opacity: el nombre es el LCP y debe pintarse desde el primer frame */
@keyframes stretch {
  from {
    font-variation-settings: 'wdth' 50;
    letter-spacing: 0.04em;
  }
  to {
    font-variation-settings: 'wdth' 150;
  }
}

@keyframes rise {
  from {
    scale: 0.4;
    opacity: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    translate: 0 2rem;
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 0.7rem rgb(242 92 219 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(242 92 219 / 0);
  }
}

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

.projects {
  position: relative;
  z-index: 4;
  background: var(--ink);
  padding: var(--section-y) var(--page-x);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-note {
  max-width: 34ch;
  color: var(--on-ink-muted);
}

.project--feature {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.project--feature + .project--feature {
  margin-top: clamp(4rem, 8vw, 6rem);
}

/* Captura del proyecto dentro de un marco de ventana. Es un enlace: abre el proyecto en otra pestaña. */
.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgb(205 185 255 / 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-2);
  cursor: pointer;
  transition: translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s;
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.shot:hover,
.shot:focus-visible {
  translate: 0 -4px;
  border-color: var(--uv);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(205 185 255 / 0.3);
}

.project-name {
  font-family: var(--display);
  font-weight: 750;
  font-variation-settings: 'wdth' 112;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.project--feature .project-name {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.project-goal {
  margin-top: 0.6rem;
  color: var(--on-ink-muted);
  max-width: 46ch;
}

.project-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.project-facts div {
  display: flex;
  gap: 0.4rem;
}

.project-facts dt {
  color: var(--on-ink-muted);
}

.project-facts dd {
  margin: 0;
  font-weight: 600;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.project-tech li {
  padding: 0.2rem 0.7rem;
  border: 1px solid rgb(205 185 255 / 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--lilac);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.btn-sm {
  min-height: 2.75rem;
  padding: 0 1.15rem;
  font-size: 0.92rem;
}

button.btn {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Ejercicios y experimentos: bloque secundario, más pequeño */
.practice {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid rgb(205 185 255 / 0.16);
}

.practice-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 1.5rem;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project--small .project-info {
  margin-top: 1.1rem;
}

/* ---------- Servicios ---------- */

.services {
  background: var(--ink-2);
  padding: var(--section-y) var(--page-x);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid rgb(205 185 255 / 0.2);
  border-radius: 14px;
  background: var(--ink);
}

.service p {
  color: var(--on-ink-muted);
}

.service-icon {
  font-size: 1.4rem;
  color: var(--lilac);
}

.service-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.1;
}

/* Botón de WhatsApp al pie de cada tarjeta, alineado aunque el texto varíe */
.service .service-cta {
  gap: 0.6rem;
  align-self: flex-start;
  margin-top: auto;
}

.service-cta .icon {
  font-size: 1.15rem;
}

.process-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: clamp(3.5rem, 7vw, 5rem) 0 1.5rem;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 2px solid var(--uv);
}

.process li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--lilac);
}

.process h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

.process p {
  margin-top: 0.3rem;
  color: var(--on-ink-muted);
}

/* ---------- Sobre mí ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.5rem;
  background: var(--paper);
  color: var(--on-paper);
  padding: var(--section-y) var(--page-x);
}

.about .display-2 {
  grid-column: 1 / 6;
}

.about-body {
  grid-column: 6 / -1;
  display: grid;
  gap: 1.1rem;
  max-width: 62ch;
  font-size: 1.15rem;
  line-height: 1.6;
}

.tools {
  grid-column: 6 / -1;
}

.tools-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-list li {
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ---------- Trayectoria ---------- */

.record {
  background: var(--lilac);
  color: var(--on-paper);
  padding: var(--compact-y) var(--page-x);
}

.timeline {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr);
  gap: 0.5rem clamp(1.5rem, 4vw, 4rem);
  padding: 1.6rem 0;
  border-top: 1.5px solid rgb(27 10 60 / 0.25);
}

.timeline-date {
  font-family: var(--display);
  font-weight: 650;
  font-variation-settings: 'wdth' 100;
  font-size: 1.05rem;
}

.timeline-body {
  display: grid;
  gap: 0.35rem;
  max-width: 62ch;
}

.timeline-kind {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-lilac-muted);
}

.timeline-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.1;
}

.timeline-role {
  font-weight: 600;
}

/* Varios roles dentro de una misma organización, el más reciente primero */
.timeline-roles {
  display: grid;
  gap: 0.9rem;
  margin: 0.2rem 0 0;
  padding: 0 0 0 1rem;
  list-style: none;
  border-left: 1.5px solid rgb(27 10 60 / 0.25);
}

.timeline-roles li {
  display: grid;
  gap: 0.15rem;
}

.timeline-subdate {
  font-size: 0.92rem;
  color: var(--on-lilac-muted);
}

.timeline-links a {
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.courses {
  margin-top: 1rem;
  padding-top: 1.6rem;
  border-top: 1.5px solid rgb(27 10 60 / 0.25);
  font-size: 0.95rem;
  color: var(--on-lilac-muted);
}

.courses strong {
  color: var(--on-paper);
}

/* ---------- Fuera del código ---------- */

.offcode {
  padding: var(--compact-y) 0;
}

.offcode-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 3rem;
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto 1.25rem;
}

.offcode-head p {
  margin-top: 0.75rem;
  color: var(--on-ink-muted);
  max-width: 52ch;
}

.strip-controls {
  display: flex;
  gap: 0.5rem;
}

.strip-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--lilac);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.strip-btn:hover:not(:disabled) {
  background: var(--lilac);
  color: var(--ink);
}

.strip-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Sin desbordamiento (todo cabe) los botones sobran */
.offcode.is-static .strip-controls {
  display: none;
}

/* Las tarjetas ocupan todo el contenedor; con 4 o 2 columnas nunca desborda
   y script.js oculta los botones anterior/siguiente (.is-static) */
.anime-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.5vw, 1.5rem);
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.anime-strip::-webkit-scrollbar {
  display: none;
}

.anime {
  scroll-snap-align: start;
}

/* Tratamiento uniforme: mismo formato, borde y tinte violeta */
.anime-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.anime-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--uv);
  mix-blend-mode: color;
  opacity: 0.45;
  pointer-events: none;
}

.anime-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.anime-title {
  display: block;
  font-weight: 600;
}

/* Ajedrez: mismo ancho que la cabecera de la sección */
.chess {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  align-items: start;
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(205 185 255 / 0.2);
}

.chess-copy {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}

.chess-title {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}

.chess-copy p {
  color: var(--on-ink-muted);
  max-width: 52ch;
}

.chess-copy .chess-moves {
  min-height: 1.6em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  font-weight: 600;
}

button.chess-play {
  border: 1.5px solid var(--lilac);
  background: transparent;
}

.chess-play:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Tamaño fijo: filas y columnas iguales, ninguna pieza afecta el layout */
.chess-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: clamp(15rem, 100%, 22rem);
  aspect-ratio: 1 / 1;
  justify-self: end;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--lilac);
  container-type: size;
}

.chess-sq {
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  transition: background-color 0.25s, box-shadow 0.25s;
}

.chess-sq.is-light {
  background: var(--lilac);
}

.chess-sq.is-dark {
  background: var(--uv-deep);
}

.chess-sq.is-from,
.chess-sq.is-to {
  box-shadow: inset 0 0 0 3px var(--orchid);
}

.chess-sq.is-mate {
  background: var(--orchid);
}

.chess-pieces {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chess-piece {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 12.5%;
  height: 12.5%;
  font-family: 'Segoe UI Symbol', 'DejaVu Sans', 'Noto Sans Symbols 2', serif;
  font-size: 9cqi;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.45s ease, opacity 0.3s;
}

.chess-piece.is-white {
  color: var(--paper);
  text-shadow: 0 0 1px var(--ink), 0 1px 2px rgb(27 10 60 / 0.8);
}

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

.contact {
  background: var(--uv);
  padding: var(--section-y) var(--page-x);
}

.contact-title {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'wdth' 140;
  font-size: clamp(2.6rem, 7vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  max-width: 12ch;
}

.contact-copy {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  max-width: 40ch;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.5rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.contact-link .icon {
  font-size: 1.2rem;
}

.contact-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.contact-link:focus-visible {
  outline-color: var(--paper);
}

.contact-link--ghost {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid var(--paper);
}

.contact-link--ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 44rem;
  margin-top: 2.5rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgb(244 239 255 / 0.6);
  border-radius: 10px;
  background: rgb(27 10 60 / 0.25);
  color: var(--paper);
  font: inherit;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-color: var(--paper);
  border-color: var(--paper);
}

.contact-form .btn {
  justify-self: start;
}

.contact-minor {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 2rem var(--page-x);
  font-size: 0.9rem;
  color: var(--on-ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-links a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--paper);
  text-underline-offset: 0.3em;
}

.footer-links a:hover {
  color: var(--orchid);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    padding-top: 6rem;
  }

  .hero-name {
    font-size: 13.4vw;
  }

  .hero-figure {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 30rem);
    justify-self: center;
    margin: 1.5rem 0 0;
  }

  .hero-photo {
    max-height: 62svh;
  }

  .hero-intro {
    grid-row: 3;
    padding-top: 0;
    margin-top: -1rem;
  }

  .anime-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project--feature,
  .practice,
  .practice-grid,
  .service-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
  }

  .about .display-2,
  .about-body,
  .tools {
    grid-column: 1 / -1;
  }

}

@media (max-width: 600px) {
  .topnav > a:not(.topnav-cta) {
    display: none;
  }

  .timeline-item,
  .process,
  .chess,
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .display-2 {
    font-size: 10.5vw;
  }

  .contact-title {
    font-size: 10vw;
    font-variation-settings: 'wdth' 105;
  }

  .hero-intro {
    background: var(--ink);
    padding-top: 1.5rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .chess-board {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  .anime-strip {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-height: 100svh;
  padding: 4rem var(--page-x);
}

.not-found p {
  max-width: 52ch;
  color: var(--on-ink-muted);
}

.not-found .not-found-code {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'wdth' 150;
  font-size: clamp(5rem, 22vw, 14rem);
  line-height: 0.85;
  color: var(--uv);
}
