html {
  background: #0b1b3a;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background: transparent;
  color: #f7f9fc;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
}

/* Fondo fijo para cubrir siempre toda la pantalla (evita franjas blancas en rotación) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0b1b3a 0%, #1a1f3b 100%);
  z-index: -1;
  pointer-events: none;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  --hero-content-top: 110px;
  --hero-subtitle-offset: 10px;
  --about-bg-height: calc(100% - 300px);
  --about-bg-x: calc(50% - 250px);
  --about-bg-y: 150px;
  --about-bg-y-shift: -150px;
  --about-bg-opacity: 1;
  --section-join-color: rgba(11,27,58,1);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

.about-content {
  gap: 24px;
  align-items: flex-start;
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.about h2 {
  font-size: 2.2rem;
}

.about {
  position: relative;
  overflow: hidden;
}

.projects {
  position: relative;
  overflow: hidden;
}

.projects h2,
.projects-grid {
  position: relative;
  z-index: 1;
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,27,58,0.72), rgba(11,27,58,0.9)),
    url('../assets/img/gb_aboutme.png');
  background-size: cover, auto calc(var(--about-bg-height) * 1.25);
  background-position: center, var(--about-bg-x) calc(var(--about-bg-y) + var(--about-bg-y-shift));
  background-repeat: no-repeat;
  opacity: var(--about-bg-opacity);
  pointer-events: none;
  z-index: 1;
}

.about::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--section-join-color) 0%,
    rgba(11,27,58,0) 18%,
    rgba(11,27,58,0) 82%,
    var(--section-join-color) 100%
  );
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.about h2,
.about-content {
  position: relative;
  z-index: 3;
}

.about-particles,
.skills-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.projects-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.social-orb {
  position: absolute;
  width: var(--orb-size, 40px);
  height: var(--orb-size, 40px);
  opacity: var(--orb-opacity, 0.32);
  filter: drop-shadow(0 0 10px rgba(0, 255, 231, 0.35));
  mix-blend-mode: screen;
  transform: translate3d(0,0,0);
  animation: floatSocial var(--orb-duration, 8s) ease-in-out infinite alternate;
  will-change: transform;
}

.social-orb.png-particle {
  width: var(--orb-size, 46px);
  height: var(--orb-size, 46px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 14px rgba(0, 255, 231, 0.28))
    drop-shadow(0 0 28px rgba(0, 255, 231, 0.12));
  animation-name: floatPng;
  opacity: var(--orb-opacity, 0.24);
}

.skills {
  position: relative;
  overflow: hidden;
}

.skills h2,
.skills-list {
  position: relative;
  z-index: 1;
}

.social-orb svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes floatSocial {
  0% {
    transform: translate3d(0,0,0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate3d(var(--orb-dx, 14px), var(--orb-dy, -34px), 0) rotate(360deg) scale(1.06);
  }
}

@keyframes floatPng {
  0% {
    transform: translate3d(0,0,0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate3d(var(--orb-dx, 14px), var(--orb-dy, -34px), 0) rotate(var(--orb-rot, 12deg)) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-orb {
    animation: none !important;
    transform: none !important;
  }
}

.about-photo {
  position: relative;
  overflow: hidden;
  flex: 1 1 42%;
  max-width: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: -140px;
  aspect-ratio: 3 / 4;
}

.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  box-shadow:
    0 16px 58px rgba(0, 255, 231, 0.34),
    0 0 32px rgba(0, 255, 231, 0.3),
    0 0 10px rgba(0, 255, 231, 0.35);
  max-height: 640px;
}

.about-photo-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11,27,58,0) 42%,
    rgba(11,27,58,0.5) 62%,
    rgba(11,27,58,0.95) 86%,
    rgba(11,27,58,1) 100%
  );
  pointer-events: none;
}

.about-text {
  flex: 1 1 50%;
  max-width: 720px;
  align-self: flex-start;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, rgba(11,27,58,0.72), rgba(11,47,95,0.78));
  border: 1px solid rgba(0,255,231,0.35);
  box-shadow: 0 14px 48px rgba(0,255,231,0.14);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 28px 28px 34px 28px;
  margin-top: 212px;
  min-height: calc(100% + 360px);
  position: relative;
  overflow: hidden;
  animation: aboutGlow 3s ease-in-out infinite alternate;
}
.about-text::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,255,231,0.08), rgba(0,255,231,0));
  pointer-events: none;
}

@keyframes aboutGlow {
  0% { box-shadow: 0 12px 40px rgba(0,255,231,0.12), 0 0 14px rgba(0,255,231,0.14); }
  50% { box-shadow: 0 16px 54px rgba(0,255,231,0.22), 0 0 18px rgba(0,255,231,0.2); }
  100% { box-shadow: 0 20px 64px rgba(0,255,231,0.3), 0 0 24px rgba(0,255,231,0.24); }
}

.about-text p {
  text-align: justify;
  font-size: 1.08rem;
  line-height: 1.6;
}

.focus-list {
  margin: 18px 0 0 0;
  padding-left: 18px;
  color: #00ffe7;
  font-size: 1.12rem;
  list-style: disc;
}

.location {
  color: #a3eaff;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* Animaciones de aparición */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* Contenedor de partículas */
.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Partículas flotantes */
.particle-orb {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ffe7 0%, #a3eaff 100%);
  opacity: 0.7;
  filter: blur(2px);
  animation: floatOrb 4.5s infinite ease-in-out alternate;
}

@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(12px, -36px) scale(1.18); }
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 27, 58, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  box-shadow: 0 2px 24px rgba(11, 47, 95, 0.15);
}
.header nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 0;
  margin: 0;
  width: min(1100px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}
.header nav ul {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.header nav a {
  color: #a3eaff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  transition: color 0.3s, text-shadow 0.3s;
}
.header nav a:hover {
  color: #fff;
  text-shadow: 0 0 12px #00ffe7, 0 0 2px #0b2f5f;
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 24px;
}
.nav-toggle-label span {
  display: block;
  width: 100%;
  height: 3px;
  background: #a3eaff;
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s;
}
.nav-toggle-label span:nth-child(1) {
  top: 0;
}
.nav-toggle-label span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle-label span:nth-child(3) {
  bottom: 0;
}
.nav-menu {
  position: relative;
  width: 100%;
}
.nav-menu ul {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
  position: static;
  width: auto;
  background: none;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav-menu ul li {
  margin: 0;
}
.nav-menu ul li a {
  color: #a3eaff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  transition: color 0.3s, text-shadow 0.3s;
}
.nav-menu ul li a:hover {
  color: #fff;
  text-shadow: 0 0 12px #00ffe7, 0 0 2px #0b2f5f;
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}
.section {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  scroll-snap-align: start;
  padding-top: 80px;
}

/* Une visualmente secciones con un desvanecimiento sutil */
.section:not(.hero):not(.about) {
  background-image:
    linear-gradient(to bottom, var(--section-join-color) 0%, rgba(11,27,58,0) 60%),
    linear-gradient(to top, var(--section-join-color) 0%, rgba(11,27,58,0) 60%);
  background-repeat: no-repeat;
  background-size: 100% 140px, 100% 170px;
  background-position: top, bottom;
}
.hero {
  background: radial-gradient(circle at 60% 40%, #00ffe7 0%, #0b1b3a 80%);
  position: relative;
  overflow: hidden;
  padding-top: 96px;
  min-height: 88vh;
}
.hero-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.hero-profile-bg {
  max-height: 100vh;
  max-width: 60vw;
  min-width: 360px;
  opacity: 1;
  filter: drop-shadow(0 10px 36px #00ffe7aa);
  object-fit: contain;
  user-select: none;
}
.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: linear-gradient(
    to bottom,
    rgba(11,27,58,0) 0%,
    rgba(11,27,58,0.55) 22%,
    rgba(11,27,58,0.92) 52%,
    rgba(11,27,58,1) 78%,
    rgba(11,27,58,1) 100%
  );
  z-index: 3;
}
.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding-top: var(--hero-content-top);
}
.futuristic-title {
  font-size: 3rem;
  font-weight: 700;
  color: #00ffe7;
  text-shadow: 0 0 24px #00ffe7, 0 0 2px #0b2f5f;
  animation: neonGlow 2s infinite alternate, titleBlinkReal 4.8s infinite;
  line-height: 1.05;
}
@keyframes neonGlow {
  from { text-shadow: 0 0 24px #00ffe7, 0 0 2px #0b2f5f; }
  to { text-shadow: 0 0 48px #00ffe7, 0 0 8px #0b2f5f; }
}
@keyframes titleBlinkReal {
  0%, 7%   { opacity: 1; }
  8%       { opacity: 0.35; }
  9%       { opacity: 1; }
  10%      { opacity: 0.2; }
  11%, 25% { opacity: 1; }
  52%      { opacity: 0.55; }
  54%      { opacity: 1; }
  78%      { opacity: 0.3; }
  80%      { opacity: 1; }
  92%      { opacity: 0.4; }
  94%,100% { opacity: 1; }
}
.subtitle {
  font-size: 1.3rem;
  color: #a3eaff;
  margin-top: var(--hero-subtitle-offset);
  animation: fadeInUp 1.2s;
  line-height: 1.1;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
.about-content {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.2s;
}
.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  box-shadow: 0 0 24px #00ffe7;
  border: 4px solid #00ffe7;
}
.projects-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
  width: min(1100px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}
.project-card {
  position: relative;
  flex: 1 1 240px;
  flex-grow: 1;
  min-width: 240px;
  min-height: 340px;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: rgba(11, 47, 95, 0.35);
  border: 1px solid rgba(0, 255, 231, 0.22);
  box-shadow: 0 10px 38px rgba(0, 255, 231, 0.10);
  cursor: pointer;
  touch-action: pan-y;
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
  transition:
    flex-grow 700ms cubic-bezier(0.2, 0.9, 0.1, 1),
    transform 520ms cubic-bezier(.2,.9,.1,1),
    opacity 420ms ease,
    box-shadow 320ms ease,
    border-color 320ms ease;
  will-change: transform, opacity;
}

.project-card.project-visible {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

.projects-grid:hover .project-card {
  flex-grow: 1;
}

.project-card:hover,
.project-card:focus-visible {
  flex-grow: 3.2;
  transform: translateY(-6px);
  border-color: rgba(0, 255, 231, 0.48);
  box-shadow: 0 18px 70px rgba(0, 255, 231, 0.22);
  outline: none;
}

.project-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: 1;
  filter: saturate(1.08) contrast(1.04);
  transition:
    transform 900ms cubic-bezier(0.2, 0.9, 0.1, 1),
    opacity 240ms ease;
}

.project-media {
  position: absolute;
  inset: 0;
}

.project-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.project-card.is-previewing .project-thumb {
  opacity: 1;
}

.project-card.video-ready.is-previewing .project-thumb {
  opacity: 0;
}

.project-card.video-ready.is-previewing .project-video {
  opacity: 1;
}

.project-card:hover .project-thumb,
.project-card:focus-visible .project-thumb {
  transform: scale(1.08);
}

.project-card:hover .project-video,
.project-card:focus-visible .project-video {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px 6px;
  background:
    linear-gradient(180deg, rgba(11,27,58,0.05) 28%, rgba(11,27,58,0.78) 80%, rgba(11,27,58,0.92) 100%);
}

.project-title {
  margin: 0;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1;
  font-size: clamp(1.15rem, 1.1vw + 1rem, 1.8rem);
  letter-spacing: clamp(0.14em, 1.05vw, 0.42em);
  color: #f7f9fc;
  text-shadow: 0 8px 22px rgba(0,0,0,0.55);
  transform: translateY(16px);
  transition: font-size 260ms ease, letter-spacing 260ms ease, transform 360ms ease;
}

.project-card:hover .project-title,
.project-card:focus-visible .project-title {
  font-size: 1.18rem;
  letter-spacing: 0.08em;
  transform: translateY(-14px);
}

.project-desc {
  margin: 8px 0 0;
  max-width: 56ch;
  color: #a3eaff;
  font-size: 0.98rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 280ms ease, transform 280ms ease;
  transition-delay: 0ms;
}

.project-card:hover .project-desc,
.project-card:focus-visible .project-desc {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-thumb,
  .project-desc {
    transition: none !important;
  }

  .project-card {
    opacity: 1;
    transform: none;
  }

  .project-video {
    display: none !important;
  }
}
.skills-list {
  width: min(1100px, calc(100% - 40px));
  max-width: 640px;
  margin-top: 32px;
  margin-left: auto;
  margin-right: auto;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 22px;
  align-items: start;
}

@property --p {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

.skill-card {
  --p: 0;
  display: grid;
  place-items: center;
  padding: 4px;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  transition:
    opacity 520ms ease,
    transform 720ms cubic-bezier(.2,.9,.1,1);
}

#skills.skills-visible .skill-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-ring {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  filter:
    drop-shadow(0 0 14px rgba(0, 255, 231, 0.22))
    drop-shadow(0 0 28px rgba(0, 255, 231, 0.10));
  transition: --p 1.15s cubic-bezier(.77,0,.18,1);
}

.skill-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 0;
  background:
    conic-gradient(
      rgba(0,255,231,0.95) calc(var(--p) * 1%),
      rgba(163,234,255,0.20) 0
    );
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 13px), #000 calc(100% - 12px));
  mask: radial-gradient(farthest-side, #0000 calc(100% - 13px), #000 calc(100% - 12px));
}

.skill-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  z-index: 1;
  background: transparent;
  border: 1px solid rgba(0,255,231,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,255,231,0.08);
}

.skill-logo-img {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.34));
}

.skill-meta {
  grid-area: meta;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.skill-name {
  font-weight: 700;
  color: #f7f9fc;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.skill-level {
  font-weight: 800;
  color: #00ffe7;
  text-shadow: 0 0 14px rgba(0,255,231,0.35);
}
@keyframes skillFadeIn {
  from { opacity: 0; transform: translateY(32px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.skills-note {
  color: #a3eaff;
  font-size: 1rem;
  margin-bottom: 18px;
  margin-top: 0;
  text-align: left;
  grid-column: 1 / -1;
}
@media (prefers-reduced-motion: reduce) {
  .skill-ring {
    transition: none !important;
  }

  .skill-card {
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 768px) {
  .skill-ring {
    width: 92px;
    height: 92px;
  }

  .skill-logo-img {
    width: 44px;
    height: 44px;
  }
}
.timeline {
  margin-top: 32px;
  border-left: 3px solid #00ffe7;
  padding-left: 32px;
  width: min(1100px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}
.timeline-item {
  margin-bottom: 32px;
  position: relative;
}
.timeline-date {
  font-size: 1.1rem;
  color: #a3eaff;
  font-weight: 700;
}
.timeline-content {
  background: rgba(11, 47, 95, 0.7);
  padding: 18px 24px;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 2px 24px #00ffe744;
}
.timeline-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

.education-list {
  display: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
  width: 100%;
  max-width: 400px;
}
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: #1a1f3b;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 2px 12px #00ffe744;
  transition: box-shadow 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 4px 24px #00ffe7cc;
}
.contact-form button {
  background: linear-gradient(90deg, #00ffe7 0%, #a3eaff 100%);
  color: #0b1b3a;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 2px 12px #00ffe744;
  transition: background 0.3s, box-shadow 0.3s;
}
.contact-form button:hover {
  background: linear-gradient(90deg, #a3eaff 0%, #00ffe7 100%);
  box-shadow: 0 4px 24px #00ffe7cc;
}

.contact h2 {
  margin: 0;
  font-size: clamp(2.4rem, 2.2vw + 1.7rem, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-shadow: 0 0 26px rgba(0,255,231,0.32), 0 0 2px rgba(11,47,95,0.9);
}

.contact-badge {
  width: 74px;
  height: 74px;
  margin-bottom: 12px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(11,27,58,0.62), rgba(11,47,95,0.42));
  border: 1px solid rgba(0,255,231,0.26);
  box-shadow:
    0 18px 70px rgba(0,255,231,0.12),
    0 0 26px rgba(0,255,231,0.10);
  backdrop-filter: blur(8px);
}

.contact-badge-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 14px rgba(0,255,231,0.24))
    drop-shadow(0 10px 24px rgba(0,0,0,0.32));
}

@media (max-width: 480px) {
  .contact-badge {
    width: 66px;
    height: 66px;
    border-radius: 20px;
  }

  .contact-badge-icon {
    width: 36px;
    height: 36px;
  }
}

.contact-subtitle {
  margin: 14px 0 0;
  width: min(900px, calc(100% - 40px));
  color: #a3eaff;
  text-align: center;
  line-height: 1.45;
  font-size: 1.08rem;
}

.contact-links {
  margin-top: 28px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.contact-link {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(11,27,58,0.70), rgba(11,47,95,0.58));
  border: 1px solid rgba(0,255,231,0.26);
  box-shadow: 0 14px 52px rgba(0,255,231,0.10);
  backdrop-filter: blur(8px);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(0,255,231,0.48);
  box-shadow: 0 20px 72px rgba(0,255,231,0.18);
  outline: none;
}

.contact-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 14px rgba(0,255,231,0.22))
    drop-shadow(0 10px 24px rgba(0,0,0,0.32));
}

.footer {
  padding: 26px 16px 34px;
  text-align: center;
  color: rgba(163,234,255,0.88);
  font-weight: 600;
  letter-spacing: 0.08em;
  background-image:
    linear-gradient(to top, rgba(11,27,58,0.95) 0%, rgba(11,27,58,0) 70%);
}

.footer p {
  margin: 0;
}

@media (max-width: 480px) {
  .contact-link {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .contact-icon {
    width: 32px;
    height: 32px;
  }
}
main {
  scroll-snap-type: y mandatory;
}

@media (max-width: 768px) {
  main {
    scroll-snap-type: none;
  }

  .section {
    scroll-snap-align: none;
  }
}

/* Evita bugs de rotación (landscape) en móviles: altura corta + scroll-snap/92vh */
@media (max-height: 520px) {
  main {
    scroll-snap-type: none;
  }

  .section {
    scroll-snap-align: none;
    min-height: auto;
    justify-content: flex-start;
    padding-bottom: 48px;
  }

  .hero {
    min-height: auto;
  }

  .projects-grid {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    min-height: 210px;
    min-width: 0;
    width: 100%;
    max-width: 520px;
  }
}
@media (max-width: 900px) {
  :root {
    --about-bg-height: calc(100% - 160px);
    --about-bg-x: calc(50% - 120px);
    --about-bg-y: 110px;
  }

  .about-content,
  .projects-grid,
  .education-list {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .about-content,
  .projects-grid,
  .skills-list,
  .timeline {
    width: calc(100% - 32px);
  }

  .header nav ul {
    gap: 18px;
  }

  /* Ajustes clave para evitar huecos grandes en rotación/tablets pequeñas */
  .hero-profile-bg {
    min-width: 240px;
    max-width: 78vw;
  }

  .about-text {
    margin-top: 18px;
    min-height: auto;
    padding: 22px 18px 26px;
  }
}

/* Mobile-first ajustes sin alterar desktop */
@media (max-width: 768px) {
  :root {
    --about-bg-height: 120%;
    --about-bg-x: 50%;
    --about-bg-y: 48px;
    --about-bg-opacity: 0.9;
  }

  :root {
    --hero-content-top: 72px;
    --hero-subtitle-offset: 6px;
  }

  body {
    font-size: 15px;
  }

  .header {
    padding: 0 12px;
  }

  .header nav {
    padding: 12px 0;
    width: 100%;
    min-height: 56px;
    justify-content: flex-end;
  }

  .header nav a {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
  }

  .nav-toggle-label {
    display: block;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav-menu ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: min(92vw, 320px);
    background: rgba(11, 27, 58, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 4px 24px rgba(0, 255, 231, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .nav-toggle:checked ~ .nav-menu ul {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .nav-menu ul li a {
    display: block;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .section {
    min-height: auto;
    padding: 96px 18px 72px;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero {
    min-height: 92vh;
    padding-top: 88px;
  }

  .hero-image-bg {
    align-items: flex-start;
    padding-top: 32px;
  }

  .hero-profile-bg {
    max-width: 86vw;
    min-width: 0;
  }

  .hero-fade {
    height: 64%;
  }

  .hero-content {
    padding: 0 12px;
  }

  .futuristic-title {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1.08rem;
  }

  .about h2,
  .projects h2,
  .skills h2,
  .experience h2,
  .contact h2 {
    font-size: 2rem;
    text-align: center;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .about-content,
  .projects-grid,
  .skills-list,
  .timeline {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-text {
    text-align: center;
  }

  .about-text h3,
  .about-text .subtitle,
  .about-text .location {
    text-align: center;
  }

  .about-text p {
    text-align: justify;
  }

  .focus-list {
    padding-left: 0;
    list-style-position: inside;
    text-align: center;
  }

  .about-photo {
    margin-bottom: 0;
    max-width: 86vw;
  }

  .about-text {
    margin-top: 12px;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: 22px 18px 26px;
    margin-left: auto;
    margin-right: auto;
  }

  .projects-grid {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    align-items: center;
  }

  .project-card {
    width: 100%;
    max-width: 420px;
    min-height: 240px;
    flex: 0 1 auto;
  }

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

  .skills-list {
    max-width: 100%;
    align-items: center;
  }

  .timeline {
    border-left-width: 2px;
    padding-left: 22px;
  }

  .timeline-content {
    text-align: center;
  }

  .contact-form {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  :root {
    --hero-content-top: 64px;
    --about-bg-height: 110%;
    --about-bg-x: 50%;
    --about-bg-y: 28px;
    --about-bg-y-shift: 0px;
    --about-bg-opacity: 0.85;
  }

  .hero {
    padding-top: 76px;
  }

  .section {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-profile-bg {
    max-width: 92vw;
  }

  .header nav {
    padding: 12px 16px;
    justify-content: space-between;
  }

  .futuristic-title {
    font-size: 2rem;
  }

  .about-text {
    padding: 20px 16px 24px;
    text-align: center;
  }

  .about-content,
  .projects-grid,
  .skills-list,
  .timeline {
    width: 100%;
  }

  .about-text h3,
  .about-text .subtitle,
  .about-text .location {
    text-align: center;
  }

  .focus-list {
    padding-left: 0;
    list-style-position: inside;
    text-align: center;
  }

  .timeline-content {
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --about-bg-height: 104%;
    --about-bg-x: 50%;
    --about-bg-y: 12px;
    --about-bg-y-shift: 0px;
    --about-bg-opacity: 0.82;
  }

  .section {
    padding: 82px 14px 64px;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero {
    padding-top: 72px;
  }

  .header nav {
    padding: 10px 14px;
    justify-content: space-between;
  }

  .about-content,
  .projects-grid,
  .skills-list,
  .timeline {
    width: 100%;
  }

  .project-card {
    max-width: 360px;
  }

  .timeline-content {
    text-align: center;
  }
}
