*{
    font-family: "Fira Code", monospace;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* --- Barra de navegación de iconos --- */
.icon-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.icon-nav.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nav-icon {
    color: #71717a;
    font-size: 1rem;
    padding: 8px 14px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    border-radius: 8px;
}

.nav-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-icon.active {
    color: #e11d48;
}

.nav-icon.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #e11d48;
    border-radius: 50%;
}

#hero, #about-section, #tech-section {
    scroll-margin-top: 60px;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: clip; 
    background-color: rgba(0,0,0);
}

h2{
    font-size: clamp(2rem, 5vw, 3.5rem);
    opacity: 0;
    animation: h2-animation  ease forwards;
    animation-timeline: view();
    animation-range: contain 15% cover 40%;
}

@keyframes h2-animation {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}



.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.glitch-wrapper {
  margin-top: 10px;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.glitch-wrapper.show {
  opacity: 1;
  transform: translateY(0);
}

.glitch-text {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  color: #e11d48;
  letter-spacing: 1px;
  margin: 0;
  position: relative;
  display: inline-block;
}

/* Pseudo-elementos para el efecto Glitch (ahora más leve y de un solo color) */
.glitch-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  left: 2px;
  text-shadow: -2px 0 #fb7185; 
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 8s infinite linear alternate-reverse; 
}

/* Solo usamos una capa suave de distorsión */
@keyframes glitch-anim {
  0% { clip: rect(21px, 9999px, 83px, 0); }
  5% { clip: rect(6px, 9999px, 83px, 0); }
  10% { clip: rect(69px, 9999px, 20px, 0); }
  15% { clip: rect(78px, 9999px, 49px, 0); }
  20% { clip: rect(25px, 9999px, 66px, 0); }
  25% { clip: rect(2px, 9999px, 92px, 0); }
  30% { clip: rect(85px, 9999px, 34px, 0); }
  35% { clip: rect(25px, 9999px, 46px, 0); }
  40% { clip: rect(66px, 9999px, 2px, 0); }
  45% { clip: rect(54px, 9999px, 68px, 0); }
  50% { clip: rect(2px, 9999px, 32px, 0); }
  55% { clip: rect(32px, 9999px, 51px, 0); }
  60% { clip: rect(82px, 9999px, 8px, 0); }
  65% { clip: rect(66px, 9999px, 81px, 0); }
  70% { clip: rect(74px, 9999px, 7px, 0); }
  75% { clip: rect(10px, 9999px, 84px, 0); }
  80% { clip: rect(16px, 9999px, 42px, 0); }
  85% { clip: rect(37px, 9999px, 78px, 0); }
  90% { clip: rect(74px, 9999px, 42px, 0); }
  95% { clip: rect(82px, 9999px, 54px, 0); }
  100% { clip: rect(2px, 9999px, 71px, 0); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: 100%;
  max-width: 1400px;
  padding: 0 40px 0 80px;
  box-sizing: border-box;
  transition: padding 1.2s cubic-bezier(0.25, 1, 0.5, 1), 
              gap 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-content.booting {
  gap: 0px;
  padding: 0 60px;
}

/* Bloquear scroll durante la carga de la consola */
body.no-scroll {
  overflow: hidden;
}

/* Flechita de scroll oculta al inicio */
.scroll-down-icon {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  pointer-events: none;
}

.scroll-down-icon.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.presentation {
  position: relative;
  z-index: 2;
  pointer-events: none; 
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
  flex: 1;
  min-width: 480px;
  max-width: 1000px;
  max-height: 1500px;
  opacity: 1;
  overflow: hidden;
  transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-content.booting .presentation {
  flex: 0;
  min-width: 0;
  max-width: 0;
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.presentation h1 {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  margin: 0;
  margin-bottom: 5px;
  color: #fff;
  white-space: nowrap;
}

/* --- Terminal interactiva --- */
.terminal {
  width: 620px;
  max-width: 100%;
  flex-shrink: 0;
  background: #0c0c0c;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid #333;
  z-index: 3;
  pointer-events: auto;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  gap: 10px;
}


.terminal-title {
  flex: 1;
  text-align: center;
  color: #71717a;
  font-size: 0.85rem;
  font-family: "Fira Code", monospace;
}

.terminal-body {
  padding: 18px;
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  color: #cccccc;
  min-height: 280px;
  max-height: 350px;
  overflow-y: auto;
  line-height: 1.7;
  text-align: left;
  background: #0c0c0c;
}

.terminal-line {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal-body::-webkit-scrollbar {
  width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 3px;
}

.terminal-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line .arrow {
  color: #28c840;
  margin-right: 8px;
}

.terminal-line .cmd {
  color: #fff;

}

.terminal-line .green {
  color: #28c840;
}

.terminal-line .cyan{
    color: #22d3ee;
}
.terminal-line .pink {
  color: #e11d48;
}

.terminal-line .dim {
  color: #71717a;
}

.terminal-line .yellow {
  color: #ffbd2e;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.terminal-input-line .prompt {
  color: #fff;
  margin-right: 10px;
  white-space: nowrap;
  font-size: 0.9rem;
}

#terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  flex: 1;
  caret-color: #e11d48;
}

/* --- Flecha de scroll --- */
.scroll-down-icon {
  position: absolute;
  bottom: 40px; 
  left: 50%;
  transform: translateX(-50%);
  color: #a1a1aa; 
  font-size: 1.8rem;
  z-index: 10;
  text-decoration: none;
  animation: bounce 2s infinite ease-in-out;
  transition: color 0.3s ease;
  pointer-events: auto; 
}

.scroll-down-icon:hover {
  color: #fff;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-15px) translateX(-50%);
  }
  60% {
    transform: translateY(-7px) translateX(-50%);
  }
}

.animated-text h3 {
  height: 3.2em;
  line-height: 3.2em;
  margin: 0;
  font-size: 2.6em;
  color: #e11d48;
  letter-spacing: 1px;
}


.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;

    
}

.box {
    width: 100%;
    font-family: sans-serif;
    color: #d1d4d7;
    text-align: center;
    font-size: 1em;
}


.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}
#spotlight-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* --------------------------
 * DISEÑO DIVIDIDO Y BARRA LATERAL 
 * -------------------------- */
.layout-wrapper {
    width: 100%;
    background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px), 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
    padding: 100px 40px;
    align-items: flex-start;
}

.sidebar {
    position: sticky;
    top: 150px;
    width: 320px;
    flex-shrink: 0;
}

.profile-card {
    background: #09090b; 
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: #e4e4e7;
    border: 1px solid #27272a;
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    user-select: none; /* Previene la selección de texto */
    -webkit-user-select: none; 
}




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

.profile-img-container {
    width: 230px;
    height: 230px;
    margin: 0 auto 24px auto;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #1e1b4b, #312e81);
}

.profile-img-container::before {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    z-index: 1;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    position: relative;
    z-index: 0;
    filter: contrast(1.1) saturate(1.1);
}

.profile-info h2 {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    color: #fff;
    opacity: 1;
    animation: none;
}

.profile-role {
    color: #a1a1aa;
    font-size: 1rem;
    margin: 0 0 16px 0;
}

.profile-location {
    color: #71717a;
    font-size: 0.9rem;
    margin: 0 0 24px 0;
}

.profile-location i {
    margin-right: 4px;
}

.profile-bio {
    font-size: 0.9rem;
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
}

.profile-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-social a {
    color: #a1a1aa;
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.profile-social a:hover {
    color: #fff;
    transform: scale(1.1);
}

.contact-btn {
    display: inline-block;
    width: auto;
    min-width: 180px;
    margin: 0 auto;
    padding: 14px;
    background: #e11d48; 
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-btn:hover {
    background: #be123c; 
    transform: translateY(-2px);
}

/* --------------------------
 * ÁREA DE CONTENIDO PRINCIPAL
 * -------------------------- */
.content-area {
    flex: 1;
    min-width: 0; /* Evita el desbordamiento flexbox */
    display: flex;
    flex-direction: column;
    gap: 200px;
}

/* --- About Section --- */
.about-section {
    background-color: transparent;
    padding: 20px 40px 60px 40px;
    border-radius: 20px;
    border: none;
    text-align: left;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

.about-section h2, .tech-stack h2, .project-section h2 {
    margin-bottom: 30px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    animation: none;
    animation-timeline: none;
    opacity: 1;
}

.about-content p {
    color: #a1a1aa;
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.about-content strong {
    color: #e11d48;
    font-weight: 500;
}

/* Education Timeline */
.education-timeline {
    margin-top: 40px;
    padding-left: 20px;
    border-left: 2px solid #27272a;
    position: relative;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
    padding-left: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -27px; /* Alinear con el borde */
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e11d48;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
}

.timeline-date {
    font-size: 0.9rem;
    color: #e11d48;
    font-weight: 500;
    margin-bottom: 5px;
}

.timeline-details h4 {
    margin: 0 0 5px 0;
    color: #e4e4e7;
    font-size: 1.1rem;
    font-weight: 500;
}

.timeline-institution {
    color: #71717a;
    font-size: 0.9rem;
}

/* --- About Skills --- */
.about-skills {
    margin-top: 50px;
    text-align: center;
}

.about-skills h3 {
    color: #e4e4e7;
    font-size: 1.2rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-pill {
    padding: 10px 24px;
    border: 1px solid #e11d48;
    background-color: transparent;
    border-radius: 50px;
    color: #e11d48;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-pill:hover {
    background-color: rgba(225, 29, 72, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.2);
}

/* --- Download CV Button --- */
.download-cv-container {
    margin-top: 60px;
    text-align: center;
}

.download-cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background-color: #e11d48;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.download-cv-btn i {
    margin-right: 10px;
}

.download-cv-btn:hover {
    background-color: #be123c; 
    transform: translateY(-2px);
}

.tech-stack {
  background-color: transparent;
  padding: 20px 40px 60px 40px;
  border-radius: 20px;
  border: none;
  flex-direction: column;
  gap: 60px;
  justify-content: center;
  opacity: 0;
  transform: translateX(150px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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



/* --- Tech Accordion --- */
.tech-accordion {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.tech-category {
    border-bottom: 2px solid #fff;
    cursor: pointer;
}

.tech-category-header {
    font-size: 2.5rem;
    font-weight: 500;
    color: #fff;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.tech-category:hover .tech-category-header {
    color: #e11d48;
}

.tech-category-header i {
    font-size: 1.8rem;
    transition: transform 0.4s ease;
}

.tech-category:hover .tech-category-header i {
    transform: rotate(180deg);
}

.tech-category-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.tech-category:hover .tech-category-content {
    max-height: 250px;
    opacity: 1;
    padding: 15px 0 20px 0;
}

.tech-icon {
    font-size: 4.5em; 
    color: #e0e0e0;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), text-shadow 0.3s ease;
    cursor: default;
}

.tech-icon:hover {
    color: #e11d48;
    transform: scale(1.3) translateY(-5px);
    text-shadow: 0 0 20px rgba(225, 29, 72, 0.4);
}
.container-projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

.project-section{
    background-color: transparent;
    padding: 20px 40px 60px 40px;
    border-radius: 20px;
    border: none;
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.project-section h2 {
    margin-bottom: 40px; 
}

@property --border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.project {
    display: flex;
    flex-direction: column;
    min-height: 560px;
    height: auto;
    width: 400px;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    user-select: none; 
    -webkit-user-select: none; 
    /* Configuración para el borde animado*/
    border: 2px solid transparent; 
    border-radius: 32px;
    background: 
        linear-gradient(#09090b, #09090b) padding-box,
        conic-gradient(from 0deg, #e11d48 var(--border-angle), #27272a 0deg) border-box;
    
    box-shadow: 0 0 15px 0 #080808b5;
    transition: transform .6s ease, --border-angle .8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .4s ease;
}

.project:hover {
    transform: translateY(-8px);
    z-index: 100;
    --border-angle: 360deg; /* La pintura en sentido horario hasta el 100% */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(225, 29, 72, 0.2);
}

.project-img,
.project img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
    border-radius: 0;
    transition: transform .45s cubic-bezier(.2,.9,.2,1);
    transform-origin: center center;
}

.project:hover img {
    transform: scale(1.05); /* Efecto zoom */
}


/* Propiedad personalizada animable para la revelación circular */
@property --reveal {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

/* Superposición en escala de grises con revelación de color circular desde el centro */
.project::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 220px;
    backdrop-filter: grayscale(1) brightness(0.7);
    z-index: 2;
    --reveal: 0%;
    -webkit-mask-image: radial-gradient(circle at center, transparent var(--reveal), black var(--reveal));
    mask-image: radial-gradient(circle at center, transparent var(--reveal), black var(--reveal));
    transition: --reveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}
.project:hover::before {
    --reveal: 150%;
}


.project-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 20px;
  flex-grow: 1;
  background-color: #09090b;
  z-index: 3;
  opacity: 1;
}

.project-overlay h3 {
  margin: 0 0 8px 0;
  font-size: 1.4em;
  color: #ffffff;
  font-weight: 600;
}

.project-overlay p {
  margin: 0;
  font-size: 0.95em;
  color: #a1a1aa;
  line-height: 1.5;
}

.project-desc {
  font-size: 0.9em;
  color: #d4d4d8;
  margin-bottom: auto !important; 
}

.project-tech {
  font-size: 0.85em;
  color: #e11d48;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.visit-site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: #e11d48;
  border: 1px solid #e11d48;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: auto;
  align-self: center;
}

.visit-site-btn:hover {
  background-color: rgba(225, 29, 72, 0.1);
  border-color: #f43f5e;
}

.visit-site-btn i {
  font-size: 0.9em;
  color: #e11d48;
}

@media screen and (max-width: 1500px){
    *{
        font-size: 1em;
    }
    .hero{
        min-height: 100vh;
    }
    .animated-text{
        height: 50px;
      }
    .animated-text h3{
        font-size: 1.3em;
        padding: 10px;
  
    }
    
    @keyframes text-move{
        0%{
          margin-top: 0;
        }
        50%{
          margin-top: -90px;
        }
        100%{
          margin-top: 0;
        }
    
    }

    .container-projects{
        padding-bottom: 50px;
    }
    .terminal {
        width: 450px;
    }
}

@media screen and (max-width: 1000px){
    *{
        font-size: 1em;
    }
    .main-layout {
        flex-direction: column;
        padding: 60px 20px 40px 20px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .main-layout * {
        box-sizing: border-box;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
    }
    
    .box:nth-child(2){
        height: auto;
    }
    .tech-accordion{
        width: 100%;
    }

    .container-projects{
        grid-template-columns: 1fr;
    }

    .hero{
        min-height: 100vh;
    }
    .hero-content {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }

    .hero-content.booting {
        padding: 0 20px;
    }

    .presentation {
        text-align: center;
        min-width: 0;
        width: 100%;
    }

    .presentation h1 {
        white-space: normal;
        font-size: clamp(1.4rem, 6vw, 2.4rem);
    }

    .terminal {
        width: 100%;
        max-width: 100%;
    }

    /* --- Content area responsive --- */
    .content-area {
        gap: 80px;
    }

    /* --- About section responsive --- */
    .about-section {
        padding: 20px 20px 40px 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .about-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

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

    /* --- Tech Stack responsive --- */
    .tech-stack {
        padding: 20px 20px 40px 20px;
    }

    /* --- Projects responsive --- */
    .project-section {
        padding: 20px 20px 40px 20px;
    }
}

@media screen and (max-width: 600px) {
    .hero {
        min-height: 100vh;
        padding: 60px 0 30px 0;
    }

    .hero-content {
        gap: 20px;
        padding: 0 15px;
    }

    .hero-content.booting {
        padding: 0 15px;
    }

    .presentation h1 {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    .glitch-text {
        font-size: clamp(1rem, 4vw, 1.4rem);
    }

    .terminal {
        width: 100%;
        max-width: 100%;
    }

    .terminal-body {
        min-height: 200px;
        max-height: 280px;
        font-size: 0.75rem;
        padding: 12px;
    }

    .content-area {
        gap: 60px;
    }

    .about-section,
    .tech-stack,
    .project-section {
        padding: 15px 15px 30px 15px;
        border-radius: 12px;
    }

    .icon-nav {
        padding: 8px 16px;
        gap: 4px;
    }

    .nav-icon {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

/* --- Animación de Cuadrícula Infinita --- */
.infinite-grid-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1; /* Por debajo del texto de presentación */
  pointer-events: none;
}

/* Grilla base de fondo, opacidad muy baja */
.grid-base, .grid-mask {
  position: absolute;
  /* Margen excedente para que no corte al trasladarse */
  top: -200px; bottom: -200px; left: -200px; right: -200px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px), 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: translate(var(--grid-offset-x, 0px), var(--grid-offset-y, 0px));
  will-change: transform;
}

/* Grilla enmascarada, iluminada donde pasa el cursor */
.grid-mask {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.25) 1px, transparent 1px), 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  /* Máscara de gradiente radial que sigue al ratón */
  -webkit-mask-image: radial-gradient(300px circle at calc(var(--mouse-x, 50%) + 200px) calc(var(--mouse-y, 50%) + 200px), black, transparent);
  mask-image: radial-gradient(300px circle at calc(var(--mouse-x, 50%) + 200px) calc(var(--mouse-y, 50%) + 200px), black, transparent);
}

/* Orbes Brillantes del Hero */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
}

.orange-orb {
  right: -20%;
  top: -20%;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  background-color: rgba(249, 115, 22, 0.20); /* Naranja */
}

.primary-orb {
  right: 10%;
  top: -10%;
  width: 20vw;
  height: 20vw;
  max-width: 300px;
  max-height: 300px;
  background-color: rgba(225, 29, 72, 0.20); /* Rojo insignia #e11d48 */
  filter: blur(100px);
}

.blue-orb {
  left: -10%;
  bottom: -20%;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  background-color: rgba(59, 130, 246, 0.20); /* Azul */
}
