:root {
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Poppins", var(--font-sans);
  --color-bg: #0b0d0f;
  --color-surface: #151a1f;
  --color-text: rgba(255, 255, 255, 0.92);
  --color-text-dim: rgba(255, 255, 255, 0.7);
  --color-primary: #7c5cff;
  --color-primary-600: #6b46ff;
  --color-accent: #4caf50;
  --radius-md: 12px;
  --radius-lg: 16px;
  --elev-1: 0 10px 30px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --elev-2: 0 20px 50px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: radial-gradient(
      1200px 800px at 10% -10%,
      rgba(124, 92, 255, 0.15),
      transparent
    ),
    radial-gradient(
      1000px 600px at 90% 10%,
      rgba(76, 175, 80, 0.12),
      transparent
    ),
    var(--color-bg);
}

/* Page loader */
#app-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 15, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#app-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-wrap {
  display: grid;
  place-items: center;
  gap: 0.75rem;
}
.loader-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #00ffd5;
  border-right-color: #7c5cff;
  animation: spin 1.1s linear infinite;
  filter: drop-shadow(0 0 12px rgba(0, 255, 213, 0.45));
}
.loader-text {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  letter-spacing: 0.4px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Blur-on-scroll utility */
[data-blur] {
  will-change: transform, filter, opacity;
}

/* Animated background layer */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-animated::before {
  content: "";
  position: absolute;
  inset: -10% -10% -10% -10%;
  background: radial-gradient(
      900px 600px at -10% -10%,
      rgba(124, 92, 255, 0.12),
      transparent
    ),
    radial-gradient(
      900px 600px at 110% -10%,
      rgba(0, 255, 213, 0.1),
      transparent
    );
  filter: blur(2px);
}
.bg-animated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      1200px 800px at 10% -10%,
      rgba(124, 92, 255, 0.1),
      transparent
    ),
    radial-gradient(900px 600px at 90% 0%, rgba(0, 255, 213, 0.08), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 80px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0 1px,
      transparent 1px 80px
    );
  opacity: 0.3;
}
.blob {
  position: absolute;
  width: 42vw;
  height: 42vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
  opacity: 0.28;
}
.blob.b1 {
  left: -10vw;
  top: -6vw;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(124, 92, 255, 0.75),
    rgba(124, 92, 255, 0) 60%
  );
  animation: blobFloat 16s ease-in-out infinite;
}
.blob.b2 {
  right: -8vw;
  bottom: -10vw;
  background: radial-gradient(
    circle at 70% 60%,
    rgba(0, 255, 213, 0.7),
    rgba(0, 255, 213, 0) 60%
  );
  animation: blobFloat 20s ease-in-out infinite reverse;
}
@keyframes blobFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, -1vw, 0) scale(1.06);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
}

.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 2000;
  backdrop-filter: saturate(120%) blur(4px);
  background: transparent;
  border-bottom: none;
}
.navbar {
  padding: 0.75rem 0;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s ease, text-shadow 0.25s ease;
}
.nav-menu a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px #7c5cff, 0 0 16px #00ffd5,
    0 0 24px rgba(124, 92, 255, 0.5);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  border-radius: 2px;
}
/* Animated hamburger transform */
.nav-toggle {
  position: relative;
}
.nav-toggle span {
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-menu {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(21, 26, 31, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.main-content {
  color: white;
  margin-top: 64px;
}
.hero-section {
  padding: 0.75rem 0 0;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 2rem;
}
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
    margin: 0 auto 1rem;
  }
  .hex-avatar {
    width: 260px;
  }
}
@media (max-width: 520px) {
  .hex-avatar {
    width: 206px;
  }
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
    line-height: 1.15;
  }
  .hero-title .line {
    word-break: keep-all;
    hyphens: none;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .hero-description {
    font-size: 1rem;
  }
}

.hero-title,
.hero-subtitle,
.hero-description {
  text-align: left;
  max-width: 68ch;
}
.hero-title {
  font-size: clamp(2.2rem, 6.5vw, 3.4rem);
  margin: 0 0 0.75rem;
  font-weight: 800;
  line-height: 1.08;
  word-break: keep-all;
  hyphens: manual;
}

.hero-title .line {
  display: block;
}
.hero-name {
  letter-spacing: 0.3px;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  margin: 0 0 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
  word-break: keep-all;
}
.hero-subtitle .accent {
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 0.5ch;
}
.hero-subtitle .word {
  display: inline-block;
}
.hero-description {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  margin: 0.25rem 0 1.6rem;
  color: var(--color-text-dim);
  text-align: left;
  max-width: 60ch;
  padding-left: 0;
}
.hero-description.left-tight {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.hero-description.left-tight {
  position: relative;
  left: -36px;
}
.hero-description.left-tight .split-char,
.hero-description.left-tight .split-word {
  transform: translateX(-36px);
  display: inline-block;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Hex avatar style */
.hero-media {
  display: grid;
  place-items: center;
}
.hex-avatar {
  position: relative;
  width: 320px;
  aspect-ratio: 1/1;
  filter: drop-shadow(0 0 30px rgba(0, 255, 213, 0.35));
}
.hex-avatar.tech {
  isolation: isolate;
}
.hex-avatar::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(
      60% 60% at 50% 40%,
      rgba(0, 255, 213, 0.35),
      transparent
    ),
    linear-gradient(180deg, rgba(0, 255, 213, 0.45), rgba(0, 255, 213, 0.08));
  -webkit-clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
  clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
  border-radius: 16px;
  z-index: 0;
}
.hex-avatar img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
  clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
}

/* Tech rings and orbits */
.hex-avatar .ring {
  position: absolute;
  z-index: 2;
  inset: -18px;
  border-radius: 22px;
  -webkit-clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
  clip-path: polygon(
    25% 6.7%,
    75% 6.7%,
    100% 50%,
    75% 93.3%,
    25% 93.3%,
    0% 50%
  );
  background: conic-gradient(
    from 0deg,
    rgba(0, 255, 213, 0) 0 20%,
    rgba(0, 255, 213, 0.35) 40%,
    rgba(124, 92, 255, 0.35) 60%,
    rgba(0, 255, 213, 0) 80% 100%
  );
  filter: blur(6px) saturate(120%);
  mix-blend-mode: screen;
  animation: sweep 6s linear infinite;
}
.hex-avatar .ring2 {
  inset: -28px;
  opacity: 0.6;
  animation-duration: 10s;
}

.hex-avatar .orbit {
  position: absolute;
  inset: -36px;
  z-index: 3;
  display: none;
  place-items: center;
}
.hex-avatar .orbit i {
  width: 10px;
  height: 10px;
  background: #00ffd5;
  border-radius: 50%;
  box-shadow: 0 0 12px #00ffd5;
}
.hex-avatar .orbit.o1 {
  animation: orbit 7s linear infinite;
}
.hex-avatar .orbit.o2 {
  inset: -48px;
  animation: orbit 12s linear infinite reverse;
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.btn {
  display: inline-block;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 10px;
  box-shadow: var(--elev-1);
}
.btn-secondary {
  border: 2px solid var(--color-primary);
  color: white;
  padding: 0.7rem 1.7rem;
  border-radius: 10px;
}
.btn-link {
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.open {
  display: grid;
  opacity: 1;
}
.lightbox img {
  max-width: min(95vw, 1200px);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transform: scale(0.94);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.lightbox.open img {
  transform: scale(1);
  opacity: 1;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}
.about-section,
.skills-section,
.projects-section,
.contact-section {
  padding: 6rem 2rem 7rem;
}

/* Encabezado de sección */
.section-heading {
  margin-bottom: 4rem;
}
.section-heading h2 {
  margin: 0 0 0.25rem;
}
.section-heading p {
  color: var(--color-text-dim);
  margin: 0;
}

/* Carrusel tipo coverflow (estilos base, responsivo) */
.coverflow {
  margin: 4rem 0 10rem;
}
.coverflow + .coverflow {
  margin-top: 10rem;
}
.coverflow h3 {
  margin: 0 0 1.5rem;
  color: #fff;
  text-align: center;
}
.cf-desc {
  text-align: center;
  color: var(--color-text-dim);
  margin-top: 2rem;
  margin-bottom: 12rem;
  line-height: 1.75;
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

/* Estilos específicos para las descripciones de ERP */
.tech-section .cf-desc {
  margin-bottom: 8rem;
}

.tech-section .cf-desc strong {
  color: #00ffd5;
  font-weight: 600;
}
.cf-viewport {
  position: relative;
  height: clamp(420px, 65vh, 900px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  margin: 2rem 0 3rem;
  cursor: grab;
  touch-action: pan-y;
}
.cf-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}
.cf-track {
  position: relative;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cf-item {
  --cf-offset: clamp(140px, 24vw, 260px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(340px, 70vw);
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(
      60% 60% at 50% 40%,
      rgba(124, 92, 255, 0.12),
      transparent
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    );
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.45s ease;
  opacity: 0.75;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.cf-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cf-item.current {
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 1;
  z-index: 3;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 35px rgba(124, 92, 255, 0.35),
    0 0 55px rgba(0, 255, 213, 0.25);
}
.cf-item.prev {
  transform: translate(calc(-50% - var(--cf-offset)), -50%) scale(0.94);
  z-index: 2;
}
.cf-item.next {
  transform: translate(calc(-50% + var(--cf-offset)), -50%) scale(0.94);
  z-index: 2;
}

@media (max-width: 700px) {
  .cf-viewport {
    height: clamp(380px, 72vh, 760px);
    margin: 1rem 0;
  }
  .cf-item {
    width: min(82vw, 460px);
  }
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.skill-category {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-md);
}
.skill-category h3 {
  color: var(--color-primary);
}
.skill-category li {
  list-style: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.projects-two {
  grid-template-columns: 1.2fr 1fr;
}
.project-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 255, 213, 0.08);
  transform: translateZ(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  position: relative;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-info {
  padding: 1.5rem;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 255, 213, 0.12) inset;
  border-color: rgba(0, 255, 213, 0.18);
}
.project-card:hover::before {
  transform: translateX(120%);
}

/* Contact links */
.contact-link {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}
.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.social-link {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  color: #0b0d0f;
  font-weight: 700;
}
.social-link.insta {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
  color: #fff;
}
.social-link.whats {
  background: #25d366;
}

/* Featured project */
.project-featured .project-image img {
  height: 320px;
}
.project-featured {
  position: relative;
}
.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  color: #0b0d0f;
  font-weight: 700;
}

/* Showcase styles */
.showcase-list {
  display: grid;
  gap: 2rem;
}
.showcase {
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.showcase-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.showcase-head .badge {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(124, 92, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}
.showcase-media {
  display: grid;
  gap: 0.75rem;
}
.showcase-center {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 12px;
}
.showcase-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.showcase-thumbs img {
  width: 180px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.showcase-actions {
  margin-top: 0.5rem;
}

@media (max-width: 800px) {
  .showcase-center {
    max-height: 360px;
  }
  .showcase-thumbs img {
    width: 46%;
    max-height: 110px;
  }
}

/* Carousel styles */
.carousel-block {
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}
.carousel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.95rem;
}
.carousel-head .badge {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(124, 92, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}
.carousel-controls {
  display: flex;
  gap: 0.35rem;
}
.carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.carousel-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
}
.carousel-track .slide {
  flex: 0 0 auto;
  width: min(560px, 86vw);
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b0d0f;
}
.carousel-track img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}
@media (max-width: 800px) {
  .carousel-track img {
    height: 260px;
  }
}

@media (max-width: 1100px) {
  .projects-two {
    grid-template-columns: 1fr;
  }
  .project-featured .project-image img {
    height: 260px;
  }
}

/* removed experience section for now */

.contact-content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  overflow: hidden; /* evita desbordes horizontales */
}
.contact-details {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}
.contact-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--color-text);
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
  box-sizing: border-box; /* incluye padding/borde en el ancho */
  max-width: 100%;
}

/* Mejoras de formulario de contacto */
.contact-form {
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.25rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
}
.contact-content > * {
  min-width: 0; /* permite que las tarjetas se encojan dentro del grid */
}
.form-group {
  margin-bottom: 1rem;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(0, 255, 213, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.12);
}
.btn-submit {
  display: inline-block;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  color: #0b0d0f;
  font-weight: 800;
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}
.btn-submit:active {
  transform: translateY(0);
}

.card {
  box-shadow: var(--elev-1);
}
.footer {
  background: var(--color-surface);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* Services section */
.services-section {
  padding: 4rem 2rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(0, 255, 213, 0.18);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120px 80px at 10% 0%,
    rgba(0, 255, 213, 0.18),
    transparent
  );
  pointer-events: none;
}
.service-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.service-card h3 {
  margin: 0.25rem 0 0.5rem;
}
.service-card p {
  color: var(--color-text-dim);
  margin-bottom: 0.75rem;
}

/* Split basics */
.split-parent {
  overflow: visible !important;
}
.split-char,
.split-word {
  display: inline-block;
  will-change: transform, opacity;
  transform-origin: center bottom;
}

/* Reveal utility */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

@media (max-width: 900px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .contact-section {
    padding: 4rem 1rem 5rem; /* reduce padding lateral para móviles */
  }
  .contact-form {
    padding: 1rem; /* reduce padding interno para evitar desbordes */
  }
  .form-input,
  .form-textarea {
    font-size: 0.95rem;
  }
}

/* About prettier card */
.about-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(0, 255, 213, 0.12);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.about-avatar {
  width: clamp(220px, 40vw, 320px);
  max-width: 100%;
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 255, 213, 0.14) inset;
}
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-text h3 {
  margin: 0 0 0.5rem;
}
.about-text p {
  color: var(--color-text-dim);
  margin: 0 0 1rem;
}
.about-highlights {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.about-highlights li::before {
  content: "▹";
  color: #00ffd5;
  margin-right: 0.5rem;
}

@media (max-width: 900px) {
  .about-card {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
  .about-image {
    display: grid;
  }
  .about-avatar {
    margin: 0 auto;
    width: clamp(200px, 60vw, 300px);
  }
}

@media (max-width: 520px) {
  .about-avatar {
    width: clamp(180px, 70vw, 260px);
  }
}

/* Tech Section Styles */
.tech-section {
  padding: 6rem 2rem 7rem;
  background: linear-gradient(
    180deg,
    rgba(124, 92, 255, 0.02) 0%,
    transparent 50%,
    rgba(0, 255, 213, 0.02) 100%
  );
}

/* ERP Project Styles */
.erp-project {
  margin: 6rem 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(0, 255, 213, 0.12);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.erp-project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
}

.project-header {
  text-align: center;
  margin-bottom: 3rem;
}

.project-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  color: #0b0d0f;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-header h3 {
  margin: 0 0 1rem;
  font-size: 2rem;
  color: #fff;
}

.project-description {
  color: var(--color-text-dim);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 70ch;
  margin: 0 auto;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem 1.5rem 1.5rem;
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-main:hover .image-overlay {
  transform: translateY(0);
}

.overlay-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-features {
  margin-top: 3rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--color-text);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.feature-item:hover {
  background: rgba(0, 255, 213, 0.05);
  border-color: rgba(0, 255, 213, 0.2);
}

.feature-icon {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .erp-project {
    padding: 2rem 1.5rem;
    margin: 4rem 0;
  }
  
  .project-header h3 {
    font-size: 1.5rem;
  }
  
  .main-image {
    height: 300px;
  }
  
  .gallery-item img {
    height: 140px;
  }
  
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .project-description {
    font-size: 1rem;
  }
}

.tech-section .section-subtitle {
  color: var(--color-text-dim);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 70ch;
  margin: 0.5rem auto 0;
  text-align: center;
}

.tech-stack {
  margin: 6rem 0 4rem;
  padding: 2rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(0, 255, 213, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.tech-stack h3 {
  text-align: center;
  margin: 0 0 2rem;
  color: #fff;
  font-size: 1.5rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.tech-item {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tech-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
}

.tech-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.tech-item h4 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.2rem;
}

.tech-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.tech-item li {
  padding: 0.4rem 0;
  color: var(--color-text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  padding-left: 1.2rem;
}

.tech-item li:last-child {
  border-bottom: none;
}

.tech-item li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #00ffd5;
  font-weight: bold;
}

/* ERP Project Styles */
.erp-project {
  margin: 6rem 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(0, 255, 213, 0.12);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.erp-project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
}

.project-header {
  text-align: center;
  margin-bottom: 3rem;
}

.project-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #7c5cff, #00ffd5);
  color: #0b0d0f;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-header h3 {
  margin: 0 0 1rem;
  font-size: 2rem;
  color: #fff;
}

.project-description {
  color: var(--color-text-dim);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 70ch;
  margin: 0 auto;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem 1.5rem 1.5rem;
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-main:hover .image-overlay {
  transform: translateY(0);
}

.overlay-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-features {
  margin-top: 3rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--color-text);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.feature-item:hover {
  background: rgba(0, 255, 213, 0.05);
  border-color: rgba(0, 255, 213, 0.2);
}

.feature-icon {
  font-size: 1.2rem;
}



/* Responsive adjustments for tech section */
@media (max-width: 1024px) {
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .tech-section {
    padding: 4rem 1rem 5rem;
  }
  
  .tech-stack {
    margin: 4rem 0 3rem;
    padding: 1.5rem;
  }
  
  .erp-project {
    padding: 2rem 1.5rem;
    margin: 4rem 0;
  }
  
  .project-header h3 {
    font-size: 1.5rem;
  }
  
  .main-image {
    height: 300px;
  }
  
  .gallery-item img {
    height: 140px;
  }
  
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tech-section .section-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .tech-item {
    padding: 1.25rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .project-description {
    font-size: 1rem;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 5px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Practice simple section */
.practice-section {
  padding: 6rem 2rem 7rem;
}
.practice-wrap {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.practice-wrap h2 {
  margin: 0 0 1.5rem;
}
.practice-media {
  display: grid;
  place-items: center;
  margin: 1rem 0 1.5rem;
}
.practice-media img {
  width: clamp(360px, 70vw, 860px);
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.practice-btn {
  margin-top: 0.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, filter 0.25s ease;
  will-change: transform, filter;
}
.practice-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  filter: saturate(115%);
}
.practice-btn:active {
  transform: translateY(0) scale(0.99);
}

.practice-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Responsive rules for practice section */
@media (max-width: 900px) {
  .practice-section {
    padding: 4rem 1.25rem 5rem;
  }
  .practice-media img {
    width: clamp(300px, 82vw, 720px);
    max-height: 460px;
  }
}
@media (max-width: 600px) {
  .practice-section {
    padding: 3rem 1rem 4rem;
  }
  .practice-wrap h2 {
    font-size: 1.4rem;
  }
  .practice-media img {
    width: clamp(240px, 92vw, 520px);
    max-height: 340px;
  }
}