@font-face {
  font-family: 'desordenadoTitulo';
  src: url('/assets/fonts/3d.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'tituloRedondeado';
  src: url('/assets/fonts/Chalkzone.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'boliCuqui';
  src: url('/assets/fonts/Pusingkali.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* =========================================
   1. VARIABLES (:root)
   ========================================= */
:root {
  --color-boli-azul: #002395;
  --color-rojo-margen: #d90000;
  --color-verde-acento: #008f39;
  --color-texto: #333;
  --fondo-papel: rgba(253, 251, 247, 0.1);

  /* Colores Post-it */
  --postit-amarillo: #ffe921;
  --postit-azul: #4fc3f7;
  --postit-verde: #aed581;
  --postit-rosa: #ff8a80;
}

/* =========================================
   2. BASE Y RESET
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image:
    linear-gradient(rgba(0, 78, 146, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 78, 146, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: 'Roboto Mono', monospace;
  color: var(--color-texto);
}

span {
  color: var(--color-verde-acento);
  font-weight: bold;
}

/* =========================================
   3. LAYOUT PRINCIPAL (Header, Footer, Container)
   ========================================= */
.container {
  max-width: 80vw;
  height: auto;
  min-height: 90vh;
  margin: auto;
  padding: 2rem;
  border-radius: 2px;
  position: relative;
  border-left: 3px solid var(--color-rojo-margen);
  backdrop-filter: blur(0.4px);
  -webkit-backdrop-filter: blur(0.4px);
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px dashed #ddd;
  padding-bottom: 1.4rem;
}

.brand-name h1 {
  font-family: 'tituloRedondeado', sans-serif;
  font-size: 4.3rem;
  font-weight: 200;
  color: var(--color-texto);
  line-height: 1;
  transform: rotate(-2deg);
  text-shadow: 1px 1px 1px #148514;
}

.brand-name h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
  color: #666;
  margin-top: 0.8rem;
}

footer {
  display: flex;
  width: 80vw;
  margin: auto;
  padding: 0.8rem;
  font-size: 1.2rem;
  box-sizing: border-box;
  position: relative;
  border-left: 3px solid var(--color-rojo-margen);
  backdrop-filter: blur(0.4px);
  -webkit-backdrop-filter: blur(0.4px);
}

.social {
  width: 100%;
  height: 3.4rem;
  display: flex;
  justify-content: flex-end;
  list-style: none;
  align-items: center;
  margin: auto;
}
.social > li:first-child {
  width: 200px;
}
.social > li {
  background: none;
  margin: 0;
  width: 3rem;
}
.social > li > a > img {
  width: 2.4rem;
  height: 2.4rem;
  cursor: pointer;
}
.social > li > a > img:hover {
  transform: rotate(3deg);
  transition: transform 0.1s ease;
  scale: calc(1.2);
}

/* =========================================
   4. NAVEGACIÓN (POST-ITS)
   ========================================= */
.main-nav {
  display: flex;
  gap: 15px;
}

.nav-item {
  text-decoration: none;
  color: #333;
  font-family: 'Patrick Hand', cursive;
  font-weight: 700;
  font-size: 1.4rem;
  padding: 1rem;
  display: inline-block;
  min-width: 100px;
  text-align: center;
  box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

/* Colores individuales */
.nav-item[data-target='quien-soy'] {
  background-color: var(--postit-amarillo);
  transform: rotate(-2deg);
}
.nav-item[data-target='portfolio'] {
  background-color: var(--postit-azul);
  transform: rotate(1deg);
}
.nav-item[data-target='contacto'] {
  background-color: var(--postit-verde);
  transform: rotate(-1.5deg);
}

/* Estados */
.nav-item:hover {
  transform: translateY(-15px) rotate(-8deg) scale(1.05) !important;
  box-shadow: 8px 15px 20px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.nav-item.active {
  box-shadow: 8px 15px 20px rgba(0, 0, 0, 0.25);
  font-weight: bold;
  transform: rotate(4deg) scale(1.1);
}

/* =========================================
   5. COMPONENTES GLOBALES (Títulos, Animaciones)
   ========================================= */
.content-section {
  display: none;
  animation: fadeIn 0.5s ease;
}
.content-section.active {
  display: block;
}
.content-section p {
  margin-bottom: 1.5em;
  line-height: 1.6;
}

/* Títulos estilo manuscrito */
.h2secction,
.h2about {
  font-family: 'tituloRedondeado', normal;
  color: var(--color-boli-azul);
  font-size: 1.8rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 25px;
  position: relative;
  padding: 0.2rem;
  line-height: 1.1;
}

.h2secction::after,
.h2about::after {
  content: '';
  position: absolute;
  left: -1.5%;
  bottom: -0.1rem;
  width: 105%;
  height: 3px;
  background-color: var(--color-texto);
  border-radius: 18px;
  transform: rotate(-1.5deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================
   6. SECCIÓN: SOBRE MÍ (Photo Stack)
   ========================================= */
.about-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 3rem; /* Espacio antes del botón de descarga */
}

.about-text {
  flex: 1;
  font-family: 'Roboto Mono', monospace;
  line-height: 1.7;
  font-size: 1.1rem;
}

.photo-stack-wrapper {
  width: 20vw;
  max-width: 350px;
  min-width: 300px;
  flex-shrink: 0;
  position: relative;
  margin-top: 20px;
  perspective: 1000px;
}

.photo-stack {
  position: relative;
  width: 100%;
  padding-bottom: 125%;
  cursor: pointer;
}

.stack-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid aliceblue;
  box-shadow: 1px 2px 4px rgba(215, 215, 215, 0.2);
  transition: all 0.4s ease-in-out;
  border-radius: 2px;
}

/* Rotación fotos */
.stack-photo:nth-child(1) {
  z-index: 4;
  transform: rotate(-3deg);
}
.stack-photo:nth-child(2) {
  z-index: 3;
  transform: rotate(2deg);
}
.stack-photo:nth-child(3) {
  z-index: 2;
  transform: rotate(-1deg);
}
.stack-photo:nth-child(4) {
  z-index: 1;
  transform: rotate(4deg);
}

.photo-stack:hover .stack-photo:nth-child(1) {
  transform: rotate(-3deg) scale(1.02) translateY(-2px);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

.peeling-off {
  transform: translateX(120%) rotate(20deg) !important;
  opacity: 0;
  box-shadow: none;
}

/* =========================================
   7. SECCIÓN: CURRICULUM (Grid, Sidebar, Timeline)
   ========================================= */
.cv-layout {
  display: grid;
  grid-template-columns: minmax(289px, 300px) 1fr;
  gap: 40px;
  margin-top: 2rem;
}

/* Sidebar Skills */
.cv-sidebar h3 {
  font-family: 'tituloRedondeado', cursive;
  color: var(--color-boli-azul);
  font-size: 1.4rem;
  font-weight: 500;
  display: inline-block;
  position: relative;
  padding: 0.1rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.cv-sidebar h3::after {
  content: '';
  position: absolute;
  left: -1.5%;
  bottom: -0.1rem;
  width: 105%;
  height: 2px;
  background-color: var(--color-texto);
  border-radius: 10px;
  transform: rotate(-1.5deg);
}

/* Contenedor para dar un poco de aire respecto al texto */
.about-cta {
  margin-top: 25px;
  display: flex;
  justify-content: center; /* Alineado a la izquierda */
}

/* El botón estilo "Trazo a mano" */
.btn-cv-hand {
  display: inline-block;
  padding: 12px 25px;

  /* Tipografía y color */
  font-family: 'tituloRedondeado', normal;
  background-color: rgba(0, 35, 149, 0.05);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-texto);
  text-decoration: none;

  /* El Borde Irregular (parece dibujado) */
  border: 2px solid var(--color-texto);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;

  /* Animación */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  transform: rotate(-7deg); /* Ligera inclinación orgánica */
}

/* Efecto Hover */
.btn-cv-hand:hover {
  background-color: rgba(0, 35, 149, 0.05);
  transform: scale(1.05) rotate(-5deg); /* Se endereza y crece */
  box-shadow: 3px 5px 10px var(--color-texto);
}

.status-stamp {
  margin-top: 30px;
  text-align: center;
  transform: rotate(-2deg);
}

.stamp-box {
  display: inline-block;
  /* Color del texto */
  color: var(--color-rojo-margen);

  /* Tipografía */
  font-family: 'Permanent Marker', cursive;
  font-size: 1.5rem;
  font-weight: bold; /* Forzamos negrita por si acaso */
  text-transform: uppercase;

  /* Efecto visual */
  opacity: 0.8;
  letter-spacing: 2px;

  mix-blend-mode: multiply;
}

.hand-drawn-separator {
  width: 96%;
  margin: 3rem auto; /* Margen superior e inferior para separar */
  border-bottom: 2px solid var(--color-rojo-margen); /* Línea roja */
  opacity: 0.7;
  transform: rotate(1deg); /* Ligera rotación para el efecto "a mano" */
  border-radius: 18px;
  max-width: 98%; /* Para que no llegue hasta los bordes exactos, opcional */
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.tech-item {
  text-align: center;
  font-size: 0.8rem;
  font-family: 'Roboto Mono', monospace;
}
.tech-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto 5px;
  filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}
.tech-item:hover img {
  transform: scale(1.1) rotate(5deg);
}

.cert-list {
  list-style: none;
  font-size: 0.9rem;
}
.cert-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 15px;
}
.cert-list li::before {
  content: '✔';
  color: var(--color-verde-acento);
  position: absolute;
  left: 0;
  font-weight: bold;
}

#microsoft {
  display: inline-block;
  color: var(--color-verde-acento);
  font-weight: bold;
  transition: transform 0.3s ease;
  text-decoration: none;
}
#microsoft:hover {
  transform: scale(1.1);
}

/* Timeline Central */
.timeline {
  border-left: 3px solid var(--color-boli-azul);
  padding-left: 20px;
  margin-left: 10px;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--fondo-papel);
  border: 3px solid var(--color-rojo-margen);
  border-radius: 50%;
}

.timeline-item .date {
  display: inline-block;
  background: var(--color-verde-acento);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 5px;
  transform: rotate(-1deg);
}

.timeline-item .job-title {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.4rem;
  color: #333;
  margin: 5px 0;
}

.timeline-item .company {
  font-weight: bold;
  color: #555;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 5px;
}
.timeline-item p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* Certificaciones Destacadas en Timeline */
.cert-featured {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.4);
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed #ccc;
}

.cert-img-wrapper {
  flex-shrink: 0;
  width: 150px;
  transition: transform 0.3s ease;
}
.cert-img-wrapper img {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}
.cert-img-wrapper:hover {
  transform: translateY(-5px) scale(1.1);
}
.cert-details p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Grid Badges */
.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.badge-item {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.badge-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.badge-item:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 3px 6px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* =========================================
   8. SECCIÓN: PORTFOLIO (Polaroid Gallery)
   ========================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 40px;
  padding: 20px 10px;
}

.polaroid-card {
  background: white;
  padding: 15px 15px 50px 15px; /* Espacio extra abajo */
  box-shadow: 3px 4px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  position: relative;
  text-align: center;
}

/* Rotación Aleatoria */
.polaroid-card:nth-child(even) {
  transform: rotate(1.5deg);
}
.polaroid-card:nth-child(3n) {
  transform: rotate(-1deg);
}

.polaroid-card:hover {
  transform: scale(1.05) rotate(0deg) translateY(-5px);
  box-shadow: 10px 15px 25px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.polaroid-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: #eee;
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid #ddd;
}

.polaroid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(20%);
  transition: filter 0.3s;
}
.polaroid-card:hover .polaroid-img img {
  filter: sepia(0%);
}

.caption {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.3rem;
  color: #444;
}

.pin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--color-rojo-margen);
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* =========================================
   9. MODAL / VENTANA EMERGENTE
   ========================================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background-color: rgba(255, 255, 255, 0.95);
  background-image:
    linear-gradient(rgba(0, 78, 146, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 78, 146, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.visible {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #fff;
  width: 90vw;
  height: 90vh; /* Tamaño Grande */
  max-width: 1600px;
  padding: 40px;
  margin: auto;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid #333;
  border-radius: 2px 2px 2px 25px/25px;
  display: flex;
  flex-direction: column;
  overflow: visible !important; /* Permite post-its fuera */
}

/* Layout Interno */
.modal-body-grid {
  display: flex;
  gap: 40px;
  box-sizing: border-box;
  flex: 1;
  overflow: hidden; /* IMPORTANTE: Esto evita que el modal crezca infinitamente */
  min-height: 0; /* Truco vital para Flexbox anidados: permite que los hijos se encojan */
}
/* Imagen Modal */
.modal-img-container {
  flex: 6;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  padding: 10px;
}
.modal-img-container img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 5px solid white;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.2);
}

.tape-effect {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 120px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.6);
  border-left: 2px dotted rgba(0, 0, 0, 0.1);
  border-right: 2px dotted rgba(0, 0, 0, 0.1);
  opacity: 0.8;
}

/* Info Modal (Columna derecha) */
.modal-info {
  flex: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Control del scroll */
  overflow-y: auto; /* Scroll automático solo si hace falta */
  height: 100%; /* Ocupa toda la altura disponible del padre */
  max-height: 100%; /* Asegura que no se salga */
  padding-right: 15px; /* Espacio para que la barra de scroll no pegue al texto */
  box-sizing: border-box;
}

#modal-title {
  font-family: 'tituloRedondeado', normal;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--color-texto);
  margin-bottom: 10px;
  position: relative;
  padding: 0.2rem;
  line-height: 1.1;
}
#modal-title::after {
  content: '';
  position: absolute;
  left: -1.5%;
  bottom: -0.1rem;
  width: 92%;
  height: 2px;
  background-color: var(--color-boli-azul);
  border-radius: 18px;
  transform: rotate(-1deg);
}

.tech-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tech-tag {
  background: #eee;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Roboto Mono', monospace;
  border: 1px dashed #ccc;
  color: var(--color-boli-azul);
}

#modal-desc {
  font-size: 1rem;
  line-height: 1.6;
  margin: 1.2rem 0;
  font-family: 'Roboto Mono', monospace;
}

.btn-ver-proyecto {
  display: inline-block;
  color: var(--color-boli-azul); /* Texto azul boli */
  background: transparent;
  padding: 10px 20px;
  text-decoration: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  font-weight: bold;
  border: 2px solid var(--color-boli-azul);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  transition: all 0.3s ease;
  align-self: flex-start;
  position: relative;
  margin: 10px 0 10px 15px;
}

.btn-ver-proyecto span {
  display: inline-block;
  transition: transform 0.2s;
}

.btn-ver-proyecto:hover {
  background-color: rgba(0, 35, 149, 0.05); /* Fondo azul muy sutil */
  transform: scale(1.05) rotate(-2deg); /* Se mueve un poco */
  box-shadow: 2px 3px 0px rgba(0, 0, 0, 0.1); /* Sombra dura */
  z-index: 50;
}

.btn-ver-proyecto:hover span {
  transform: translateX(5px); /* La flecha se mueve */
}

/* Post-its de Cierre */
.postit-close {
  position: absolute;
  width: 3rem;
  height: 3rem;
  background-color: var(--postit-azul);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 4px 5px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 2001;
  transition: transform 0.2s ease;
}
.postit-close:hover {
  transform: scale(1.1) rotate(0deg) !important;
}

.pin-top-right {
  top: -25px;
  right: -25px;
  transform: rotate(15deg);
}
.x-mark {
  font-size: 2rem;
  line-height: 1;
}

.pin-bottom-center {
  bottom: -25px;
  right: 50px;
  width: auto;
  padding: 5px 15px;
  transform: rotate(-5deg);
  background-color: var(--postit-amarillo);
}
.text-mark {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: 'Permanent Marker', cursive;
  color: #c62828;
  font-size: 1.5rem;
}

/* =========================================
   10. SECCIÓN CONTACTO (FICHA RETRO)
   ========================================= */

.contact-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  perspective: 1000px;
}

/* La Tarjeta / Ficha */
.index-card {
  background-color: #fdfbf7; /* Color crema papel */
  width: 100%;
  max-width: 600px;
  padding: 40px 30px;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #d3d3d3;
  /* Línea roja superior clásica de fichas */
  border-top: 5px solid var(--color-rojo-margen);
  font-family: 'Roboto Mono', monospace;
  transform: rotate(1deg); /* Ligera inclinación natural */
}

/* El Clip (CSS Puro) */
.paper-clip {
  position: absolute;
  top: -15px;
  right: 30px;
  width: 20px;
  height: 45px;
  border: 3px solid #555;
  border-radius: 10px;
  border-bottom: none;
  z-index: 10;
  background: transparent;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}
.paper-clip::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 4px;
  width: 6px;
  height: 30px;
  border: 3px solid #555;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

/* Encabezado de la ficha */
.card-header-line {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
  margin-bottom: 30px;
  font-size: 0.9rem;
  color: #666;
}

.handwritten {
  font-family: 'Patrick Hand', cursive;
  color: var(--color-boli-azul);
  font-size: 1.2rem;
}

/* Grupos del formulario */
.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: bold;
  font-size: 0.8rem;
  color: #444;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Inputs estilo "Línea de puntos" */
.index-card input,
.index-card textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px dashed #999; /* Línea discontinua para escribir encima */
  font-family: 'Patrick Hand', cursive; /* Parece escrito a mano al escribir */
  font-size: 1.3rem;
  color: var(--color-boli-azul);
  padding: 5px 0;
  transition: border-color 0.3s;
  resize: none; /* Quitar redimensión del textarea */
}

.index-card input:focus,
.index-card textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--color-boli-azul); /* Se pone azul al escribir */
}

/* El textarea con líneas de cuaderno de fondo */
.index-card textarea {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 30px,
    #eee 31px
  );
  line-height: 31px;
  padding: 0;
}

/* Botón Sello */
.stamp-button {
  display: block;
  margin: 30px auto 0;
  background: transparent;
  border: 3px solid var(--color-rojo-margen);
  color: var(--color-rojo-margen);
  padding: 10px 20px;
  font-family: 'Permanent Marker', cursive;
  font-size: 1.5rem;
  cursor: pointer;
  transform: rotate(-3deg);
  transition: all 0.2s;
  opacity: 0.8;
}

.stamp-button:hover {
  transform: rotate(0deg) scale(1.1);
  opacity: 1;
  background-color: rgba(217, 0, 0, 0.05);
}

/* Mensajes de estado */
.status-msg {
  text-align: center;
  margin-top: 15px;
  font-family: 'Roboto Mono', monospace;
  font-weight: bold;
}
.status-success {
  color: var(--color-verde-acento);
}
.status-error {
  color: var(--color-rojo-margen);
}

/* =========================================
   11. MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* --- TABLET / PORTÁTIL PEQUEÑO (max-width: 769px) --- */
@media (max-width: 820px) {
  .container {
    max-width: 95vw;
    padding: 1.5rem;
  }
  footer {
    width: 95vw;
  }

  /* Nav */
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* About */
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }
  .photo-stack-wrapper {
    width: 60%;
    margin-bottom: 30px;
  }
  .about-text {
    width: 100%;
  }

  /* Botón descarga */
  .download-section.center-separator {
    margin: 20px 0;
  }

  /* CV */
  .cv-layout {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .cv-sidebar {
    order: 2;
    border-top: 2px dashed #ccc;
    padding-top: 30px;
    margin-top: 30px;
    border-bottom: none;
    margin-bottom: 0;
  }

  /* Certificaciones */
  .cert-featured {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }
  .cert-img-wrapper {
    width: 130px;
    margin-bottom: 15px;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  /* Modal */
  .modal-content {
    width: 90vw;
    height: 90vh;
  }
  .modal-body-grid {
    flex-direction: column;
    overflow-y: auto;
  }
  .modal-img-container {
    flex: none;
    height: auto;
    max-height: 40vh;
    margin-bottom: 20px;
  }
  .modal-info {
    overflow-y: visible;
  }

  /* Contacto boton */
  .about-cta {
    justify-content: center;
    margin-bottom: 20px;
  }
  .btn-cv-hand {
    font-size: 1.2rem;
    padding: 10px 20px;
    transform: rotate(-4deg);
  }
  .btn-cv-hand:hover {
    transform: scale(1.05) rotate(-2deg);
  }

  /* Separador mano */
  .hand-drawn-separator {
    margin: 1.5rem auto; /* Menor margen en móviles */
    transform: rotate(-0.5deg); /* Menor rotación en móviles */
  }
}

/* --- MÓVIL (max-width: 560px) --- */
@media (max-width: 560px) {
  /* Layout */
  .container {
    padding: 1rem;
    max-width: 100vw;
    border-left: none;
  }
  footer {
    width: 100vw;
    border-left: none;
  }

  /* Header */
  .main-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .brand-name h1 {
    font-size: 3rem;
    margin-top: 2rem;
  }

  /* Nav */
  .nav-item {
    padding: 0.5rem;
    min-width: 70px;
    font-size: 1rem;
  }

  /* About */
  .photo-stack-wrapper {
    width: 80%;
  }
  .about-text {
    font-size: 1rem;
  }

  /* Badges */
  .badges-grid {
    justify-content: center;
  }
  .badge-item {
    width: 80px;
    height: 80px;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .polaroid-card {
    transform: rotate(0deg) !important;
    margin-bottom: 20px;
  }

  /* Modal Post-its */
  .modal-content {
    width: 90vw;
    height: 85vh;
  }
  .pin-top-right {
    top: -15px;
    right: -10px;
    width: 45px;
    height: 45px;
  }
  .x-mark {
    font-size: 1.5rem;
  }

  /* Contacto Ficha */
  .index-card {
    padding: 20px;
    width: 95%;
  }
  .card-header-line {
    flex-direction: column;
    gap: 5px;
  }
}
