/* Variables */
:root {
  /* Fondos */
  --bg: #0b1120;
  --bg-2: #0f172a;
  --surface-dark: #0a0f1c;   /* terminal y maqueta del proyecto destacado */
  --surface-bar: #111827;    /* barra superior de "ventana" */
  --card: #111a2e;
  --card-2: #16213a;

  /* Bordes */
  --line: #1e2a44;
  --line-2: #2a3a5c;

  /* Texto */
  --text: #cbd5e1;
  --muted: #8b9ab3;
  --white: #f1f5f9;
  --code: #99f6e4;

  /* Acento turquesa y variantes con transparencia */
  --accent: #2dd4bf;
  --accent-2: #22d3ee;
  --accent-light: #5eead4;
  --accent-ink: #042f2e;                     /* texto sobre fondo de acento */
  --accent-soft: rgba(45, 212, 191, .08);    /* fondos suaves */
  --accent-border: rgba(45, 212, 191, .3);
  --accent-hover: rgba(45, 212, 191, .45);   /* borde de tarjetas al pasar el ratón */

  /* Colores de cada lenguaje, los mismos que GitHub */
  --java: #f89820;
  --py: #4b8bbe;
  --js: #f7df1e;
  --html: #e34c26;

  --radius: 14px;
  --wrap: 1100px;
  --nav-height: 64px;
  --date-width: 150px; /* columna de fechas de la trayectoria */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Base y utilidades */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Deja hueco para la navegación fija al saltar a un #ancla */
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Brillos de fondo, fijos para que no se muevan con el scroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(34, 211, 238, .10), transparent 70%),
    radial-gradient(500px 400px at -10% 30%, rgba(45, 212, 191, .07), transparent 70%);
}

::selection {
  background: var(--accent-border);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-light);
}

strong,
b {
  color: var(--white);
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: .88em;
  color: var(--code);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--white);
  line-height: 1.2;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--mono);
}

.accent {
  color: var(--accent);
}

/* El svg con los iconos no tiene que ocupar sitio */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

/* "Saltar al contenido": escondido hasta que recibe el foco */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Botones e iconos */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px rgba(45, 212, 191, .6);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--accent-ink);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line-2);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--white);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
}

.nav-social {
  padding: 8px 10px;
}

.nav-social-label {
  display: none;
}

/* Los dos iconos más juntos que el resto de enlaces */
.nav-social + .nav-social {
  margin-left: -16px;
}

.btn-icon {
  padding: 11px 13px;
}

.btn-icon .icon {
  width: 20px;
  height: 20px;
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn-sm .icon {
  width: 16px;
  height: 16px;
}

/* Navegación */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 17, 32, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.logo:hover {
  color: var(--white);
}

.caret {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

.menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.menu-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

/* .active la pone script.js */
.menu-link:hover,
.menu-link.active {
  color: var(--white);
}

/* Hamburguesa, solo en móvil */
.menu-btn {
  display: none;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--white);
  transition: .2s;
}

/* Hero y terminal */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 96px;
}

.status {
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.pulse-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, .6);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -.03em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -.01em;
}

.hero-bio {
  max-width: 560px;
  margin-top: 22px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.terminal {
  min-width: 0; /* permite que el <pre> haga scroll horizontal dentro del grid */
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface-dark);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(45, 212, 191, .05);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-bar);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #f87171; }
.terminal-dot.yellow { background: #fbbf24; }
.terminal-dot.green  { background: #34d399; }

.terminal-title {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-body {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
}

.tok-prompt { color: var(--accent); }
.tok-key    { color: #7dd3fc; }
.tok-string { color: #fcd34d; }
.tok-bool   { color: #f0abfc; }

.cursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* Secciones */
.section {
  padding-top: 88px;
  padding-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
}

.section-title::after {
  content: "";
  flex: 1;
  max-width: 260px;
  height: 1px;
  margin-left: 8px;
  background: var(--line-2);
}

.section-num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: .62em;
  font-weight: 500;
}

.section-subtitle {
  margin-top: 10px;
  color: var(--muted);
}

/* Sobre mí: foto a la izquierda y texto a la derecha */
.about {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: start;
  gap: 40px;
  margin-top: 32px;
}

.about-photo img,
.photo-placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  object-fit: cover;
}

/* Mientras no hay foto, las iniciales sobre un degradado */
.photo-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(45, 212, 191, .18), rgba(34, 211, 238, .06)), var(--card);
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 600;
}

.about-text p + p {
  margin-top: 16px;
}

.about-more a {
  color: var(--accent);
  font-weight: 500;
}

/* Soft skills: 4 tarjetas en fila */
.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.skill {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color .2s ease, transform .2s ease;
}

.skill:hover {
  border-color: var(--accent-hover);
  transform: translateY(-3px);
}

.skill-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.skill-icon .icon {
  width: 22px;
  height: 22px;
}

.skill-title {
  margin-bottom: 6px;
  color: var(--white);
  font-size: 16px;
}

.skill-text {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Proyectos */
.project {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.project:hover {
  border-color: var(--accent-hover);
}

/* Proyecto destacado */
.featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 32px;
  padding: 34px;
}

.kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12.5px;
}

.featured h3 {
  margin: 8px 0 14px;
  font-size: 28px;
  letter-spacing: -.02em;
}

.checks {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
}

.checks li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  padding: 3px 9px;
  border: 1px solid rgba(45, 212, 191, .18);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--code);
  font-family: var(--mono);
  font-size: 12px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 20px;
}

/* Maqueta del visor de PDFs */
.featured-visual {
  min-width: 0;
}

.mock-window {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-dark);
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .9);
  transform: rotate(1.5deg);
}

.mock-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-bar);
}

.mock-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
}

/* Dos capas: las rayas blancas que hacen de texto y el color, que cambia por columna */
.mock-grid span {
  --thumb-color: linear-gradient(135deg, #134e4a, #164e63);
  display: block;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  background:
    linear-gradient(180deg,
      transparent 62%,
      rgba(255, 255, 255, .9) 62% 66%,
      transparent 66% 72%,
      rgba(255, 255, 255, .6) 72% 75%,
      transparent 75%),
    var(--thumb-color);
  animation: rise .6s ease both;
}

.mock-grid span:nth-child(3n+2) { --thumb-color: linear-gradient(135deg, #1e3a8a, #0e7490); }
.mock-grid span:nth-child(3n)   { --thumb-color: linear-gradient(135deg, #3b0764, #155e75); }

.mock-grid span:nth-child(5) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
}

.card h3 {
  margin: 12px 0 10px;
  font-size: 19px;
}

/* flex: 1 empuja los enlaces abajo para que queden alineados en todas las tarjetas */
.card p {
  flex: 1;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card .links a {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
}

.lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted); /* color por defecto para lenguajes sin color propio */
}

.lang-dot.java { background: var(--java); }
.lang-dot.py   { background: var(--py); }
.lang-dot.js   { background: var(--js); }
.lang-dot.html { background: var(--html); }

/* Actividad de GitHub */
.github-activity {
  margin-top: 40px;
  padding: 22px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.github-activity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.github-activity-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.github-activity-head a {
  font-family: var(--mono);
  font-size: 13.5px;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.repo-link {
  display: block;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.repo-link:hover {
  border-color: var(--accent-hover);
  color: var(--text);
}

.repo-name {
  color: var(--white);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

/* Máximo 2 líneas */
.repo-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

/* Placeholder mientras carga la API */
.skeleton {
  height: 92px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.stack-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stack-card h3 {
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

/* Fuera del código: adelanto en la portada */
.teaser {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 760px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}

.teaser:hover {
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

.teaser img {
  flex: none;
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}

.teaser-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 600;
}

/* Página fuera-del-codigo.html */
.back-link {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}

.back-link:hover {
  color: var(--accent);
}

.page-section {
  padding-bottom: 80px;
}

.page-title {
  margin-top: 18px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Bloques de la página: gata, LoL y gimnasio */
.hobby {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
  margin-top: 40px;
}

.hobby + .hobby {
  margin-top: 72px;
}

.hobby-reverse {
  grid-template-columns: 1fr 1.1fr;
}

.hobby-text h2 {
  margin: 8px 0 14px;
  color: var(--white);
  font-size: 26px;
}

.hobby-text p + p {
  margin-top: 12px;
}

.hobby-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* Collage: la foto grande ocupa las dos filas de la izquierda y las otras cuatro van en 2x2 */
.cat-collage {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 440px;
}

.cat-main {
  grid-row: span 2;
}

.cat-collage figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cat-collage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.cat-collage figure:hover img {
  transform: scale(1.05);
}

/* Recorte de las fotos pequeñas para que se vea el gato y no el suelo */
.cat-castanas img {
  object-position: center 65%;
}

.cat-street img {
  object-position: center 40%;
}

.cat-bag img {
  object-position: center 45%;
}

.cat-collage figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
  color: #fff;
  font-size: 13px;
}

/* Ficha en JSON, mismo estilo que la terminal de arriba */
.mini-json {
  margin: 20px 0 0;
  padding: 14px 18px;
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-dark);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

/* Brillo morado, el color del rango Master */
.rank-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(192, 132, 252, .35);
  border-radius: var(--radius);
  box-shadow: 0 0 60px -15px rgba(168, 85, 247, .5);
}

/* Tarjeta del gimnasio: el número en grande hace de imagen */
.gym-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 30%, var(--accent-soft), transparent 70%), var(--card);
  text-align: center;
}

.gym-number {
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
}

.gym-label {
  margin: 8px 0 22px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 15px;
}

.gym-card .chips {
  justify-content: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
}

.chips .is-main {
  border-color: rgba(45, 212, 191, .55);
  color: var(--white);
  font-weight: 600;
}

.learning {
  border-color: var(--accent-border);
  background: linear-gradient(160deg, var(--accent-soft), var(--card) 60%);
}

.learning-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Trayectoria */
/* Cada <li> es un grid fecha | contenido. La línea es el ::before del <ol>
   y cada punto el ::before de su <li>. */
.timeline {
  position: relative;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: var(--date-width);
  width: 2px;
  background: var(--line-2);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: var(--date-width) 1fr;
  gap: 32px;
  padding-bottom: 30px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: calc(var(--date-width) - 6px); /* centrado sobre la línea */
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  background: var(--bg);
}

.timeline li.is-current::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(45, 212, 191, .15);
}

.timeline-date {
  padding-top: 2px;
  padding-right: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

.timeline h3 {
  font-size: 18px;
}

.timeline-org {
  margin-top: 4px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.timeline-desc {
  max-width: 640px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.languages {
  margin-top: 4px;
  padding-left: calc(var(--date-width) + 32px); /* alineado con el contenido de la timeline */
  color: var(--muted);
  font-size: 15px;
}

/* Contacto y footer */
.contact {
  max-width: 860px; /* ancho para que los 4 botones quepan en una fila */
  padding-bottom: 96px;
  text-align: center;
}

.contact > .section-num {
  font-size: 14px;
}

.contact h2 {
  margin: 12px 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.02em;
}

.contact-text {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.copy-email-address {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.copy-email-hint {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

/* .copied la pone script.js un par de segundos */
.copy-email.copied .copy-email-hint {
  color: #86efac;
}

.contact-location {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer .mono {
  font-size: 12px;
}

/* Animaciones */
/* script.js añade .visible cuando la sección entra en pantalla */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* Para quien tiene activado "reducir movimiento" en el sistema */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
/* Tablet */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .about {
    grid-template-columns: 180px 1fr;
    gap: 28px;
  }

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

  .hobby,
  .hobby-reverse {
    grid-template-columns: 1fr;
  }

  /* En una columna la imagen va siempre primero */
  .hobby {
    gap: 24px;
  }

  .hobby-media {
    order: -1;
  }

  .rank-shot {
    max-width: 520px;
  }

  .featured {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .featured-visual {
    max-width: 420px;
  }

  .project-grid,
  .stack-grid,
  .repo-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Menú desplegable: con 6 enlaces ya no caben en una fila por debajo de 900px */
@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .menu {
    position: absolute;
    top: var(--nav-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 17, 32, .97);
  }

  .menu.open {
    display: flex;
  }

  .menu-link {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  .menu > .btn {
    justify-content: center;
    margin-top: 14px;
  }

  .nav-social-label {
    display: inline;
  }

  .nav-social + .nav-social {
    margin-left: 0;
  }

  /* Las 3 rayas se convierten en una X */
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Móvil pequeño */
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-photo {
    width: 180px;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  /* En móvil el icono va a la izquierda para que ocupen menos alto */
  .skill {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    padding: 16px;
  }

  .skill-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .teaser {
    flex-direction: column;
    align-items: flex-start;
  }

  .teaser img {
    width: 100%;
    height: 200px;
    object-position: center 35%;
  }

  .cat-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    height: auto;
  }

  .cat-collage figure {
    aspect-ratio: 1;
  }

  .cat-collage .cat-main {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .cat-main img {
    object-position: center 35%;
  }

  .gym-number {
    font-size: 96px;
  }

  .project-grid,
  .stack-grid,
  .repo-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
  }

  .section-title::after {
    display: none;
  }

  .terminal-body {
    padding: 16px;
    font-size: 12px;
  }

  .featured h3 {
    font-size: 24px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 32px;
  }

  .timeline li::before {
    left: 0;
  }

  .timeline-date {
    padding-right: 0;
    text-align: left;
  }

  .languages {
    padding-left: 32px;
  }

  .hero-actions .btn,
  .contact-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
