/* ==========================================
   PROJECTS PAGE - FELIPE HEIDE PORTFOLIO
   ========================================== */

/* === VARIABLES === */
:root {
  --bg-a: #03020a;
  --bg-b: #060617;
  --bg-c: #0b0b12;
  --accent1: #6dd3ff;
  --accent2: #b792ff;
  --accent3: #ff91d9;
}

/* === SCROLLBAR ESPACIAL === */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(140,200,255,0.95) rgba(12,14,20,0.6);
}

*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background:
    radial-gradient(closest-side, rgba(255,255,255,0.02), transparent 40%),
    linear-gradient(180deg, rgba(6,8,15,0.9), rgba(18,20,30,0.85));
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.6);
  margin: 4px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,0.95) 1px, transparent 2px),
    radial-gradient(circle at 65% 60%, rgba(255,255,255,0.75) 1px, transparent 3px),
    linear-gradient(120deg, rgba(80,60,200,0.95), rgba(0,180,220,0.92));
  border: 3px solid rgba(8,10,16,0.65);
  box-shadow:
    0 0 12px rgba(0,150,220,0.18),
    inset 0 1px 6px rgba(255,255,255,0.06);
  animation: space-pulse 3.6s ease-in-out infinite;
}

@keyframes space-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0,150,220,0.12);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(0,150,220,0.22);
  }
}

/* === BASE STYLES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 50%, var(--bg-c) 100%);
  color: #e8e8f0;
  position: relative;
}

/* Overlay de profundidad */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  background:
    radial-gradient(800px 500px at 10% 20%, rgba(109,211,255,0.03), transparent 10%),
    radial-gradient(700px 500px at 90% 80%, rgba(183,146,255,0.02), transparent 12%);
  animation: bgShift 20s linear infinite;
}

@keyframes bgShift {
  0%, 100% {
    transform: translate3d(0,0,0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate3d(-2%,2%,0) scale(1.01);
    opacity: 0.96;
  }
}

/* === STARS STAGE === */
.stage {
  position: fixed;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  perspective: 900px;
  z-index: 1;
  will-change: transform;
}

.star {
  position: absolute;
  left: var(--left, 50%);
  top: var(--top, 50%);
  transform-style: preserve-3d;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 calc(var(--size,4px) * 0.6) rgba(255,255,255,0.12));
  animation: drift var(--duration, 12s) linear var(--delay, 0s) infinite alternate;
}

.star .glow {
  width: var(--size, 2.0px);
  height: var(--size, 2.0px);
  margin-left: calc(-1 * var(--size, 2.0px) / 2);
  margin-top: calc(-1 * var(--size, 2.0px) / 2);
  background: radial-gradient(circle at 40% 30%, #ffffff 0%, rgba(255,255,255,0.95) 12%, rgba(255,255,255,0.12) 40%, transparent 60%);
  border-radius: 50%;
  opacity: var(--opacity, 0.9);
  animation: pulse var(--pulse, 3.0s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes drift {
  from {
    transform: translate3d(0px, 0px, 0px) rotateZ(var(--rot, 0deg));
    opacity: var(--min-opacity, 0.6);
  }
  to {
    transform: translate3d(var(--moveX, 6px), var(--moveY, -8px), var(--z, 0px)) rotateZ(calc(var(--rot, 0deg) + 12deg));
    opacity: var(--max-opacity, 1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(0.85);
    filter: brightness(0.95);
  }
  50% {
    transform: scale(1.35);
    filter: brightness(1.12);
  }
}

/* === HEADER NAVIGATION === */
.projects-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 11, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(109, 211, 255, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}

.logo:hover .logo-text {
  transform: scale(1.1);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent1);
}

.nav-link:hover::after {
  width: 100%;
}

/* === HERO SECTION === */
.hero-projects {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 2rem 0;
  background: linear-gradient(135deg, #6dd3ff 0%, #b792ff 35%, #ff91d9 70%, #6dd3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 300% 300%;
  animation: gradientFlow 8s ease infinite;
}

.hero-title span {
  display: inline-block;
  animation: letterFloat 3s ease-in-out infinite;
}

.hero-title span:nth-child(1) { animation-delay: 0.1s; }
.hero-title span:nth-child(2) { animation-delay: 0.2s; }
.hero-title span:nth-child(3) { animation-delay: 0.3s; }
.hero-title span:nth-child(5) { animation-delay: 0.4s; }
.hero-title span:nth-child(6) { animation-delay: 0.5s; }
.hero-title span:nth-child(7) { animation-delay: 0.6s; }
.hero-title span:nth-child(8) { animation-delay: 0.7s; }
.hero-title span:nth-child(9) { animation-delay: 0.8s; }
.hero-title span:nth-child(10) { animation-delay: 0.9s; }
.hero-title span:nth-child(11) { animation-delay: 1.0s; }
.hero-title span:nth-child(12) { animation-delay: 1.1s; }
.hero-title span:nth-child(13) { animation-delay: 1.2s; }

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes letterFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(109, 211, 255, 0.5);
  border-radius: 15px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent1);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-15px); }
}

@keyframes scroll {
  0% { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 24px; }
}

/* === PROJECTS SHOWCASE === */
.projects-showcase {
  position: relative;
  z-index: 10;
  padding: 6rem 2rem;
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* === PROJECT ITEM === */
.project-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 10rem;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 0.8s ease forwards;
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Alternar dirección */
.project-item.reverse {
  direction: rtl;
}

.project-item.reverse > * {
  direction: ltr;
}

/* === PROJECT VISUAL === */
.project-visual {
  position: relative;
  height: 600px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-item:hover .project-visual {
  transform: scale(1.05) rotate(2deg);
}

.project-image {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  object-fit: contain;
  overflow: hidden;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(109, 211, 255, 0.03) 0px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(183, 146, 255, 0.03) 0px, transparent 2px, transparent 4px);
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}

/* Variaciones de fondo por proyecto */
.project-bg-1 {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.project-bg-2 {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
}

.project-bg-3 {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.project-bg-4 {
  background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
}

.project-bg-5 {
  background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
}

.project-bg-6 {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.project-item:hover .image-overlay {
  opacity: 0.3;
}

/* Elementos flotantes */
.floating-elements {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.project-item:hover .floating-elements {
  opacity: 0.6;
}

.float-icon {
  font-size: 4rem;
  animation: floatIcon 4s ease-in-out infinite;
}

.float-icon:nth-child(1) { animation-delay: 0s; }
.float-icon:nth-child(2) { animation-delay: 0.5s; }
.float-icon:nth-child(3) { animation-delay: 1s; }

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* === PROJECT INFO === */
.project-info {
  padding: 2rem;
  position: relative;
}

.project-number {
  font-size: 6rem;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 2px rgba(109, 211, 255, 0.2);
  position: absolute;
  top: -2rem;
  left: 0;
  z-index: -1;
  line-height: 1;
}

.project-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.project-description {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 2rem 0;
}

/* === PROJECT FEATURES === */
.project-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  padding: 0.5rem 0;
  transition: transform 0.3s ease, color 0.3s ease;
}

.feature-item:hover {
  transform: translateX(10px);
  color: var(--accent1);
}

.feature-item svg {
  flex-shrink: 0;
  color: var(--accent1);
  filter: drop-shadow(0 0 8px rgba(109, 211, 255, 0.5));
}

/* === PROJECT TECH === */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.tech-tag {
  padding: 0.6rem 1.2rem;
  background: rgba(183, 146, 255, 0.1);
  border: 1px solid rgba(183, 146, 255, 0.3);
  border-radius: 20px;
  color: var(--accent2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-tag:hover {
  background: rgba(183, 146, 255, 0.25);
  border-color: rgba(183, 146, 255, 0.8);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(183, 146, 255, 0.3);
}

/* === PROJECT LINKS === */
.project-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.project-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-btn.primary {
  background: linear-gradient(135deg, rgba(109, 211, 255, 0.15), rgba(183, 146, 255, 0.15));
  border: 2px solid rgba(109, 211, 255, 0.5);
  color: var(--accent1);
}

.project-btn.primary::before {
  background: linear-gradient(135deg, rgba(109, 211, 255, 0.3), rgba(183, 146, 255, 0.3));
}

.project-btn.primary:hover {
  border-color: var(--accent1);
  box-shadow:
    0 15px 40px rgba(109, 211, 255, 0.4),
    0 0 40px rgba(109, 211, 255, 0.3);
  transform: translateY(-5px) scale(1.05);
}

.project-btn.secondary {
  background: transparent;
  border: 2px solid rgba(183, 146, 255, 0.4);
  color: var(--accent2);
}

.project-btn.secondary::before {
  background: linear-gradient(135deg, rgba(183, 146, 255, 0.2), rgba(255, 145, 217, 0.2));
}

.project-btn.secondary:hover {
  border-color: var(--accent2);
  box-shadow:
    0 15px 40px rgba(183, 146, 255, 0.4),
    0 0 40px rgba(183, 146, 255, 0.3);
  transform: translateY(-5px) scale(1.05);
}

.project-btn:hover::before {
  opacity: 1;
}

.project-btn svg {
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.project-btn:hover svg {
  transform: scale(1.2) rotate(5deg);
}

/* === CTA SECTION === */
.cta-section {
  position: relative;
  z-index: 10;
  padding: 8rem 2rem;
  text-align: center;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 3rem;
  background: rgba(11, 11, 18, 0.6);
  border: 2px solid rgba(109, 211, 255, 0.3);
  border-radius: 32px;
  backdrop-filter: blur(25px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
}

.cta-content:hover {
  transform: translateY(-15px);
  border-color: rgba(109, 211, 255, 0.6);
  box-shadow:
    0 40px 100px rgba(109, 211, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.cta-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-text {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 3rem 0;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.5rem;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cta-btn.primary {
  background: linear-gradient(135deg, rgba(109, 211, 255, 0.2), rgba(183, 146, 255, 0.2));
  border: 2px solid rgba(109, 211, 255, 0.6);
  color: var(--accent1);
}

.cta-btn.primary::before {
  background: linear-gradient(135deg, rgba(109, 211, 255, 0.4), rgba(183, 146, 255, 0.4));
}

.cta-btn.secondary {
  background: transparent;
  border: 2px solid rgba(183, 146, 255, 0.5);
  color: var(--accent2);
}

.cta-btn.secondary::before {
  background: linear-gradient(135deg, rgba(183, 146, 255, 0.3), rgba(255, 145, 217, 0.3));
}

.cta-btn:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow:
    0 20px 50px rgba(109, 211, 255, 0.5),
    0 0 50px rgba(109, 211, 255, 0.4);
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.cta-btn:hover svg {
  transform: scale(1.2) rotate(10deg);
}

/* === FOOTER === */
.projects-footer {
  position: relative;
  z-index: 10;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(109, 211, 255, 0.1);
  background: rgba(11, 11, 18, 0.8);
  backdrop-filter: blur(20px);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(109, 211, 255, 0.08);
  border: 2px solid rgba(109, 211, 255, 0.3);
  border-radius: 50%;
  color: var(--accent1);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-links a:hover {
  background: rgba(109, 211, 255, 0.2);
  border-color: rgba(109, 211, 255, 0.8);
  transform: translateY(-5px) scale(1.15);
  box-shadow: 0 10px 25px rgba(109, 211, 255, 0.4);
}

.footer-links a svg {
  transition: transform 0.3s ease;
}

.footer-links a:hover svg {
  transform: rotate(360deg);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .project-item,
  .project-item.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 3rem;
  }

  .project-visual {
    height: 450px;
  }

  .project-number {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .hero-projects {
    padding: 6rem 1.5rem 3rem;
  }

  .projects-showcase {
    padding: 4rem 1.5rem;
  }

  .project-item {
    margin-bottom: 6rem;
  }

  .project-visual {
    height: 350px;
  }

  .project-info {
    padding: 1rem;
  }

  .project-number {
    font-size: 3rem;
    top: -1rem;
  }

  .project-features {
    gap: 0.8rem;
  }

  .feature-item {
    font-size: 0.95rem;
  }

  .project-links {
    gap: 1rem;
  }

  .project-btn {
    padding: 0.9rem 1.6rem;
    font-size: 0.95rem;
  }

  .cta-section {
    padding: 5rem 1.5rem;
  }

  .cta-content {
    padding: 3rem 2rem;
  }

  .footer-content {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .logo-text {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .hero-projects {
    padding: 5rem 1rem 2rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .projects-showcase {
    padding: 3rem 1rem;
  }

  .project-item {
    margin-bottom: 4rem;
    gap: 2rem;
  }

  .project-visual {
    height: 280px;
  }

  .floating-elements {
    gap: 1.5rem;
  }

  .float-icon {
    font-size: 2.5rem;
  }

  .project-info {
    padding: 0.5rem;
  }

  .project-number {
    font-size: 2.5rem;
    top: -0.5rem;
  }

  .project-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .project-description {
    font-size: 1rem;
  }

  .project-features {
    gap: 0.6rem;
  }

  .feature-item {
    font-size: 0.9rem;
  }

  .project-tech {
    gap: 0.6rem;
  }

  .tech-tag {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .project-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  .project-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  .cta-section {
    padding: 4rem 1rem;
  }

  .cta-content {
    padding: 2.5rem 1.5rem;
  }

  .cta-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .cta-text {
    font-size: 1.05rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-btn {
    width: 100%;
    justify-content: center;
    padding: 1.1rem 2rem;
    font-size: 1rem;
  }

  .projects-footer {
    padding: 2rem 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .star,
  .star .glow,
  body::before,
  .wheel,
  .scroll-indicator {
    animation: none !important;
  }

  .hero-title {
    animation: none !important;
  }

  .hero-title span {
    animation: none !important;
  }

  .float-icon {
    animation: none !important;
  }
}

/* Focus visible para navegación por teclado */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === EFECTOS ADICIONALES === */

/* Efecto de partículas en hover */
.project-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(109, 211, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(183, 146, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.project-item:hover .project-visual::after {
  opacity: 1;
}

/* Efecto de brillo en los números */
@keyframes numberGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(109, 211, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 40px rgba(109, 211, 255, 0.6);
  }
}

.project-item:hover .project-number {
  animation: numberGlow 2s ease-in-out infinite;
}

/* Efecto de línea animada en el título */
.project-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width 0.5s ease;
}

.project-item:hover .project-title::after {
  width: 100px;
}

/* Efecto de destello en las tarjetas */
@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.project-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  transition: left 0.8s ease;
  z-index: 2;
}

.project-item:hover .project-visual::before {
  animation: shine 1.5s ease;
}

/* Efecto de pulsación en los botones */
@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(109, 211, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(109, 211, 255, 0);
  }
}

.project-btn:active {
  animation: buttonPulse 0.6s ease;
}

/* Efecto de ondulación en hover */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.cta-content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(109, 211, 255, 0.2) 0%, transparent 70%);
  border-radius: 32px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cta-content:hover::before {
  opacity: 1;
  animation: ripple 2s ease infinite;
}

/* Efecto de neón pulsante */
@keyframes neonPulse {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(109, 211, 255, 0.5));
  }
  50% {
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(109, 211, 255, 0.8));
  }
}

.tech-tag:hover {
  animation: neonPulse 1.5s ease-in-out infinite;
}

/* Parallax suave en scroll */
@media (prefers-reduced-motion: no-preference) {
  .project-visual {
    transition: transform 0.3s ease-out;
  }

  .project-item:nth-child(odd) .project-visual {
    transform: translateY(var(--scroll-offset, 0));
  }

  .project-item:nth-child(even) .project-visual {
    transform: translateY(calc(var(--scroll-offset, 0) * -1));
  }
}

/* Efecto de cristal esmerilado mejorado */
.project-info {
  background: rgba(11, 11, 18, 0.4);
  backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(109, 211, 255, 0.1);
  border-radius: 20px;
  transition: all 0.5s ease;
}

.project-item:hover .project-info {
  background: rgba(11, 11, 18, 0.6);
  border-color: rgba(109, 211, 255, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Efecto de escritura para el hero */
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Loading spinner para lazy loading de imágenes */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.project-visual[data-loading="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(109, 211, 255, 0.2);
  border-top-color: var(--accent1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Mejora visual para estado de carga */
.project-item[data-loaded="false"] {
  opacity: 0.3;
  pointer-events: none;
}

/* Efecto de hover en cascada para features */
.feature-item:nth-child(1) { transition-delay: 0s; }
.feature-item:nth-child(2) { transition-delay: 0.05s; }
.feature-item:nth-child(3) { transition-delay: 0.1s; }

/* Print styles */
@media print {
  .stage,
  body::before,
  .projects-header,
  .scroll-indicator,
  .floating-elements,
  .cta-section,
  .projects-footer {
    display: none !important;
  }

  .project-item {
    page-break-inside: avoid;
    margin-bottom: 3rem;
  }

  .project-visual {
    height: 300px;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .project-title,
  .hero-title {
    color: black !important;
    -webkit-text-fill-color: black !important;
  }
}

/* Soporte para modo oscuro del sistema */
@media (prefers-color-scheme: light) {
  :root {
    --bg-a: #f0f2f5;
    --bg-b: #ffffff;
    --bg-c: #e8eaf0;
  }

  body {
    color: #1a1a2e;
  }

  /* Ajustes adicionales para modo claro si es necesario */
}

/* Mejoras de contraste para accesibilidad */
@media (prefers-contrast: high) {
  .nav-link {
    color: rgba(255, 255, 255, 0.95);
  }

  .project-description {
    color: rgba(255, 255, 255, 0.9);
  }

  .feature-item {
    color: rgba(255, 255, 255, 0.95);
  }

  .tech-tag {
    border-width: 2px;
  }

  .project-btn {
    border-width: 3px;
  }
}

/* Optimización para pantallas táctiles */
@media (hover: none) and (pointer: coarse) {
  .project-btn,
  .cta-btn,
  .nav-link {
    min-height: 44px;
    min-width: 44px;
  }

  .tech-tag {
    min-height: 36px;
  }

  .footer-links a {
    width: 48px;
    height: 48px;
  }
}

/* Mejora de rendimiento */
.project-visual,
.project-info,
.float-icon {
  will-change: transform;
}

/* Desactivar will-change después de la animación */
.project-item:not(:hover) .project-visual,
.project-item:not(:hover) .project-info {
  will-change: auto;
}

/* === FIN DEL STYLESHEET === */
