:root {
  --light-gray: 211 211 211;
  --medium-light-gray: 169 169 169;
  --medium-gray: 128 128 128;
  --dark-gray: 105 105 105;

  --background-rgb: 0 0 0;
  --box-shadow: rgb(255 255 255 / 25%);
  --primary-blue: #00adde;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.247);
}

::-webkit-scrollbar-thumb {
  background-color: #00aede62;
  border: 1px solid #00aede83;
  border-radius: 8px;
}

/* CAMBIAR EL COLOR DE SELECCIÓN DE TEXTO */
::selection {
  background-color: var(--primary-blue);
  color: #000; /* Texto negro para contraste */
  text-shadow: none;
}

::-moz-selection { /* Para Firefox */
  background-color: var(--primary-blue);
  color: #000;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  cursor: none;
}

.mouse-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  background-color: var(--primary-blue);
  border-radius: 50%;
  pointer-events: none; /* Click-through */
  transform: translate(-50%, -50%);

  /* EFECTOS DE LUZ */
  filter: blur(10px); /* Muy difuminado */
  opacity: 0.5;
  mix-blend-mode: screen; /* Fusión de luz con la cuadrícula */

  z-index: 9999;
  transition: transform 0.08s cubic-bezier(0.075, 0.82, 0.165, 1); /* Movimiento fluido */
}

.hidden {
  opacity: 0;
  transform: translateX(-100%);
  transition: all 1s;
}

.show {
  opacity: 1;
  transform: translateX(0);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #ccc,
    transparent
  ); /* Línea más elegante */
  margin: 40px 0;
  width: 100%;
  opacity: 0.3;
}

h1,
h2,
h3 {
  font-family: "Montserrat", serif;
  font-weight: 500;
  color: white;
}

h1,
h2 {
  filter: drop-shadow(0px 0px 7px #fff);
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.65rem;
}

h3 {
  font-size: 1.35rem;
}

span {
  color: var(--primary-blue);
}

.nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  height: 80px;
  top: 0;
  width: 100%;
  background-color: rgba(5, 5, 5, 0.8); /* Coincide con el tono del body */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  z-index: 1000;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid #00aede57;
}

.nav a img {
  width: 60px;
  cursor: pointer;
  transition: 0.2s;
}

.nav a img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0px 0px 5px var(--primary-blue));
}

.nav-items-container {
  width: 300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.nav-item {
  padding: 10px 20px;
  color: white;
  transition: 0.2s;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 4px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-blue);
  text-shadow: 0 0 10px var(--primary-blue);
}

.nav-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

body {
  font-family: "Montserrat", serif;
  height: 100%; /* Cambiado a 100% para permitir que el contenido determine la altura */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgb(var(--background-rgb));
  overflow-x: hidden; /* Mantener la restricción del desbordamiento horizontal */
  -webkit-font-smoothing: antialiased;

  /* FONDO DE CUADRÍCULA INFINITA */
  background-color: #050505; /* Un negro no tan absoluto para suavizar */
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed; /* IMPORTANTE: La cuadrícula se queda fija al scrollear */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-blue);
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 999;
  box-shadow: 0 0 15px 4px var(--primary-blue);
}

.back-to-top.show-btn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden; /* Importante para contener el efecto 3D */
}

/* El contenedor base */
.container {
  perspective: 2000px;
  width: 120rem;
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: repeat(40, 1fr);
  grid-template-columns: repeat(40, 1fr);
  position: absolute;
  
  /* CAMBIO 1: Fondo transparente en lugar de negro.
     Esto evita el "parpadeo" visual al pasar a flat, ya que siempre verás
     la cuadrícula del body de fondo fusionada. */
  background-color: transparent; 
  
  transform: rotateX(50deg) rotateY(-5deg) rotateZ(20deg) scale(1.25);
  
  /* CAMBIO 2: Aumentamos el tiempo a 1.2s y usamos una curva suave
     para que el objeto "aterrice" suavemente en lugar de golpear. */
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  
  margin-top: 10rem;

  /* MÁSCARA MÁGICA */
  -webkit-mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 30%,
    rgba(0, 0, 0, 0) 70%
  );
  mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 30%,
    rgba(0, 0, 0, 0) 70%
  );
}

.container-flat {
  transform: translateY(0) scale(1);
  width: 120rem;
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: repeat(40, 1fr);
  grid-template-columns: repeat(40, 1fr);
  position: absolute;

  /* CAMBIO 3: Misma transición suave para cuando vuelvas a subir */
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);

  /* Mantener la máscara */
  -webkit-mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0) 80%
  );
  mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0) 80%
  );

  opacity: 0.3;
  pointer-events: auto;
}

/* Pseudo-elementos del container (Limpieza de estilos viejos) */
#container:before {
  /* Eliminamos la imagen de patrón vieja para que no choque con la grid del body */
  content: none;
}

#container:after {
  /* Eliminamos el parche negro que tapaba la grid del body */
  content: none;
}

/* Estilos de los Azulejos (Tiles) */
.tile {
  /* BORDE CASI INVISIBLE: Usamos 0.03 para que apenas se insinúe. 
     La textura real la da el body */
  border: 1px solid rgba(255, 255, 255, 0.048);
  transition: background-color 1500ms, box-shadow 1500ms;
  background-color: transparent;
}

.tile:hover {
  transition-duration: 0ms;
}

/* Efectos Hover (Neon Lights) - Usando RGBA para transparencia */
.tile:nth-child(4n):hover {
  background-color: rgba(211, 211, 211, 0.2);
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

.tile:nth-child(4n + 1):hover {
  background-color: rgba(169, 169, 169, 0.2);
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

.tile:nth-child(4n + 2):hover {
  background-color: rgba(128, 128, 128, 0.2);
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

.tile:nth-child(4n + 3):hover {
  background-color: rgba(105, 105, 105, 0.2);
  box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

/* Repetimos patrones (Simplificado) */
.tile:nth-child(7n):hover,
.tile:nth-child(11n + 1):hover {
  background-color: rgba(0, 173, 222, 0.3); /* Un toque de azul primary */
  box-shadow: 0px 0px 20px var(--primary-blue);
}

/* =========================================
   HEADER CONTENT (HERO)
   ========================================= */
.content {
  display: flex;
  flex-direction: column;
  transform: rotateX(50deg) rotateY(-5deg) rotateZ(20deg) scale(5);
  gap: 0.5rem;
  position: absolute;
  
  /* CAMBIO 4: Sincronizamos la velocidad del contenido con la del contenedor */
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  
  z-index: 100;
  pointer-events: none;
}

.content-flat {
  opacity: 1;
  transform: translateY(0) scale(3.65);
  
  /* CAMBIO 5: Transición de vuelta suave */
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  z-index: 100;
}
.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  pointer-events: auto; /* Reactivar clicks en botones */
}

.button-group a {
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-direction: row;
  background-color: #00000031;
  border: 1px solid rgb(var(--light-gray));
  color: white;
  width: 100%;
  height: 10px;
  padding: 7px;
  font-size: 0.5rem;
  transition: 0.2s;
  text-decoration: none;
  text-wrap: nowrap;
}

.button-group a img {
  width: 0.6rem;
  margin: 5px;
}

.button-group a:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.178);
}

.meta-link {
  font-family: "Montserrat", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  gap: 0.5rem;
  pointer-events: auto;
}

.meta-link span {
  filter: drop-shadow(0px 0px 2px rgb(0, 0, 0));
}

.meta-link span:nth-child(2) {
  color: var(--primary-blue);
}

.meta-link-social {
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
}

.meta-link-social > a > img {
  width: 30px;
}

.meta-link > :is(span, a) {
  font-weight: 500;
  font-size: 1.25rem;
  color: white;
}

.social-img {
  transition-duration: 0.2s;
}

.social-img:hover {
  filter: drop-shadow(5px 10px 1px rgba(255, 255, 255, 0.39));
  transform: scale(1.1);
}

.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  max-width: 1200px;
  color: white;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 100;
}

.section.show {
  opacity: 1;
}

.section p {
  font-size: 1rem;
}

/* General Section Styles */
.about,
.experience,
.projects,
.certifications,
.education {
  width: 100%;
  max-width: 1200px;
  padding: 4rem 1rem;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

/* =========================================
   CARDS STYLING (GLASSMORPHISM)
   Esto es vital para que el texto se lea sobre la cuadrícula
   ========================================= */
.experience-card,
.certification-card,
.education-card,
.about-individual-achievement,
.about-item {
  background-color: rgba(18, 18, 18, 0.7); /* Semitransparente */
  backdrop-filter: blur(
    8px
  ); /* Difumina la cuadrícula de fondo detrás del texto */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.experience-card:hover,
.certification-card:hover,
.education-card:hover,
.about-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-blue);
  box-shadow: 0 10px 30px rgba(0, 173, 222, 0.1);
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: white;
}

h2 span {
  color: var(--primary-blue);
}

h3 {
  font-size: 1.2rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

h3 span {
  color: white;
}

/* About Section */

.about-body {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  text-align: left;
}

@media (min-width: 768px) {
  .about-body {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.about-body-left,
.about-body-right {
  flex: 1;
}

.about-body-left p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #e0e0e0;
}

.about-body-left p span {
  color: var(--primary-blue);
  font-weight: bold;
}

.about-body-left ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-body-left li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.about-body-left li img {
  width: 2rem;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-item {
  background-color: #ffffff12;
  border: 1px solid var(--primary-blue);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: rgb(var(--light-gray));
  transition: background-color 0.2s, color 0.2s;
  border-radius: 5px;
}

.skills-item:hover {
  background-color: var(--primary-blue);
  color: black;
  border-color: var(--primary-blue);
}

.about-footer {
  margin-top: 5rem;
}

.about-footer h3 {
  text-align: start;
  font-size: 1.2rem;
}

.about-items-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  height: 230px;
  margin-top: 40px;
  margin-bottom: 40px;
  transition: 0.2s ease-in-out;
}

.about-item {
  width: 270px;
  height: 210px;
  border: 1px solid rgb(var(--dark-gray));
  padding: 15px;
  border-radius: 5px;
  transition: 0.2s ease-in-out;
}

.about-item h3 {
  text-align: center;
  font-size: 1.6;
}

.about-item-data {
  color: rgb(var(--medium-gray));
  list-style-type: circle;
  padding: 15px;
  margin-left: 10px;
}

.about-item-data li {
  margin-bottom: 15px;
}

.about-item h3 {
  font-weight: bold;
  font-size: 1.6rem;
  color: var(--primary-blue);
  filter: drop-shadow(0px 0px 3px var(--primary-blue));
}

.about-item p {
  font-size: 1.2rem;
}

.about-item:hover {
  background-color: rgba(255, 255, 255, 0.137);

}

.about-achievements {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2rem auto;
}

.about-individual-achievement {
  border: 1px solid #ffffff12;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: #ffffff0a;
  padding: 1.5rem;
  border-radius: 8px;
}

.about-individual-achievement p {
  text-align: left;
}

.about-individual-achievement p span {
  color: var(--primary-blue);
}

/* Experience Section */
.experience-card {
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.experience-details p {
  margin-bottom: 20px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.experience-header .period {
  color: var(--primary-blue);
  font-size: 0.9rem;
}

.experience-body li {
  margin-bottom: 0.8rem;
  color: #d1d1d1;
  display: flex;
  gap: 10px;
}

.experience-body li::before {
  content: "▹";
  color: var(--primary-blue);
}

.sub-experience-card {
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* projects Section */

.projects-link {
  margin-top: 1rem;
  text-decoration: none;
  color: white;
}

.projects-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: rgba(56, 56, 56, 0.5);
  padding: 15px;
  border-radius: 8px;
}

.projects-filter select {
  background-color: #000;
  color: white;
  border: 1px solid var(--primary-blue);
  padding: 5px 15px;
  border-radius: 5px;
}

.projects-filter p {
  font-size: 1.2rem;
  color: rgb(var(--medium-gray));
}

.projects-body {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}
.projects-card-body {
  width: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.projects-card h3 {
  position: absolute;
  right: 30px;
  top: 30px;
  padding: 10px;
  font-weight: 100;
  opacity: 0;
}

.projects-card:hover .projects-card-body {
  opacity: 1;
}

.projects-card:hover h3 {
  opacity: 1;
}

.projects-card {
  width: 570px;
  height: 400px;
  position: relative;
  text-align: center;
  cursor: pointer;
  border-radius: 15px;
}

.projects-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid white;
  opacity: 0;
  transition: 0.2s ease-in-out;
}

.projects-card:hover img {
  filter: grayscale(1) brightness(0.1);
}

.projects-card:hover::after {
  opacity: 1;
  inset: 20px;
}

.projects-card .projects-card-img {
  width: 100%;
  height: 100%;
  filter: grayscale(0.2);
}

.projects-card .projects-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 90%;
  transition: 0.2s ease-in-out;
  border: 1px solid rgb(var(--medium-gray));
}

/* Certifications Section */
.certifications {
  padding-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.certifications-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.certification-card {
  background-color: #121212;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.certification-card h3 {
  color: white;
  margin-bottom: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.1rem;
}

.certification-card .issuer {
  color: var(--primary-blue);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.certification-card .date {
  color: rgb(var(--medium-gray));
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.certification-card .note {
  color: rgb(var(--medium-light-gray));
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.certification-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.certification-skills .skill-item {
  background-color: #ffffff12;
  border: 1px solid #ffffff12;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  color: rgb(var(--light-gray));
  cursor: pointer;
}

.credential-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 1rem;
}

/* Education Section */
.education {
  padding-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  scroll-margin-top: 90px;
  margin-top: 3rem;
}

.education h2 {
  text-align: center;
}

.education-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.education-card {
  background-color: #121212;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.education-card .education-title-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.education-card .education-title-container h3 {
  color: white;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.1rem;
}

.education-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.education-card .institution {
  color: var(--primary-blue);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.education-card .date {
  color: rgb(var(--medium-gray));
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.education-card .description {
  color: rgb(var(--medium-light-gray));
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer Section */
#main-footer {
  text-align: center;
  padding: 3rem 1rem;
  width: 100%;
  color: #888;
  font-size: 0.9rem;
  background-color: rgba(0, 0, 0, 0.8);
  margin-top: auto;
  border-top: 1px solid #00aede57;
}

/* =========================
   Responsive Styles
========================= */

/* Tablets (pantallas medianas) */
@media (max-width: 1024px) {
  .container {
    width: 90rem;
    transform: rotateX(35deg) rotateY(-3deg) rotateZ(15deg) scale(1);
  }

  .content {
    transform: rotateX(35deg) rotateY(-3deg) rotateZ(15deg) scale(3.5);
  }

  /* Después del scroll (flat) */
  .container-flat {
    width: 90rem;
    transform: scale(1);
  }

  .content-flat {
    transform: scale(2.8);
  }

  /* Contenedores generales */
  .about,
  .experience,
  .projects,
  .certifications,
  .education {
    width: 100%;
    padding: 1.5rem 1rem;
  }

  /* Navbar */
  .nav-items-container {
    width: auto;
    gap: 10px;
  }
  .nav-item {
    font-size: 1rem;
    padding: 10px;
  }

  /* About section */
  .about-body {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .about-body-left,
  .about-body-right {
    width: 100%;
  }

  /* Proyectos */
  .projects-card {
    width: 100%;
    height: auto;
  }

  .about-items-container {
    margin-bottom: 15rem;
    justify-content: space-around;
  }

  .about-item {
    margin-bottom: 20px;
  }

  .about-skills {
    justify-content: center;
  }

  .about-body-left li {
    justify-content: center;
  }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 768px) {
  .container {
    width: 65rem;
    transform: rotateX(20deg) rotateY(-2deg) rotateZ(10deg) scale(1);
  }

  .content {
    transform: rotateX(20deg) rotateY(-2deg) rotateZ(10deg) scale(2);
  }

  /* Después del scroll (flat) */
  .container-flat {
    width: 65rem;
    transform: scale(0.8);
  }

  .content-flat {
    transform: scale(2);
  }
  /* Navbar */
  .nav {
    flex-direction: row;
    height: auto;
    padding: 10px;
    background-color: black;
  }

  .nav-items-container {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background-color: black;
    width: 100%;
    padding: 1rem;
    position: absolute;
    top: 80px; /* altura navbar */
    border-bottom: white 1px solid;
  }

  .nav-items-container.show {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  /* About section */
  .about-items-container {
    flex-direction: column;
    height: auto;
    gap: 20px;
    margin-bottom: 40px;
  }

  .about-item {
    margin-bottom: 0px;
    width: 100%;
  }

  /* Experiencia */
  .experience-card {
    padding: 1rem;
  }

  /* Proyectos */
  .projects-body {
    flex-direction: column;
    gap: 1.5rem;
  }
  .projects-card {
    width: 100%;
    height: 250px;
  }

  .experience-card,
  .certification-card,
  .education-card,
  .about-individual-achievement {
    /* Mantenemos tu color pero lo hacemos un pelín transparente */
    background-color: rgba(18, 18, 18, 0.85);
    /* Desenfocamos lo que haya detrás (la cuadrícula) para mejorar legibilidad */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil */
    /* ... resto de tus estilos ... */
  }

  /* Certificaciones */
  .certifications-container {
    grid-template-columns: 1fr;
  }

  /* Educación */
  .education-container {
    grid-template-columns: 1fr;
  }

  /* Botón back-to-top */
  .back-to-top {
    width: 40px;
    height: 40px;
  }

  .projects-filter {
    flex-direction: column;
    gap: 15px;
  }

  .about-individual-achievement {
    align-items: center;
  }
}

