:root {
  --primary: #00f0ff;
  --primary-dark: #00a8ff;
  --secondary: #ff2d75;
  --accent: #9c27b0;
  --dark: #0a0e17;
  --dark-card: #141825;
  --light: #ffffff;
  --gray: #8a8f98;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --section-spacing: 120px;
  --blur-strength: 12px;
}

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

body {
  background: var(--dark);
  color: var(--light);
  font-family: "Montserrat", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
  cursor: none;
}

/* Cursor personalizado */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
}

.cursor-hover .cursor-follower {
  width: 48px;
  height: 48px;
  background: rgba(0, 240, 255, 0.1);
}

h1,
h2,
h3,
h4 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Nebula Background */
.nebula-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(
      circle at 25% 25%,
      rgba(0, 240, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(255, 45, 117, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(156, 39, 176, 0.08) 0%,
      transparent 50%
    );
  animation: nebulaPulse 20s infinite alternate;
}

/* Header */
header {
  position: fixed;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(var(--blur-strength));
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo span {
  color: var(--primary);
}

.nav-back {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  padding: 10px 20px;
  border: 2px solid var(--primary);
  border-radius: 50px;
  position: relative;
  overflow: hidden;
}

.nav-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-back:hover::before {
  left: 0;
}

.nav-back:hover {
  color: var(--dark);
}

/* Hero Section */
.portfolio-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
}

.portfolio-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(0, 240, 255, 0.1) 0%,
    rgba(10, 14, 23, 0) 70%
  );
  z-index: -1;
  animation: heroPulse 8s infinite alternate;
}

.hero-content {
  max-width: 900px;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 30px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--light),
    var(--secondary)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleGlow 3s ease-in-out infinite alternate;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--gray);
  margin-bottom: 50px;
  opacity: 0;
  animation: fadeInUp 1s forwards 0.5s;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s forwards 0.8s;
}

.cta-button,
.secondary-button {
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta-button {
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  color: var(--dark);
  border: none;
}

.secondary-button {
  background: transparent;
  color: var(--light);
  border: 2px solid var(--light);
}

.cta-button:hover,
.secondary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
}

/* Portfolio Stats */
.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 80px 0;
  padding: 0 30px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 240, 255, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.stat-box:hover::before {
  left: 100%;
}

.stat-box:hover {
  transform: translateY(-10px);
  background: rgba(0, 240, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(0, 240, 255, 0.2);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  font-family: "Orbitron", sans-serif;
}

.stat-label {
  color: var(--gray);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Filtros y Búsqueda */
.portfolio-controls {
  padding: 60px 0;
  position: relative;
  z-index: 10;
}

.controls-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--light);
  font-size: 16px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.05);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 18px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.filter-tab {
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
}

.filter-tab.active {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.4);
}

.filter-tab:hover:not(.active) {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 40px;
  padding: 40px 0;
  min-height: 50vh;
}

.portfolio-item {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  transform: translateY(50px) scale(0.9);
  opacity: 0;
}

.portfolio-item.reveal {
  animation: itemReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes itemReveal {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9) rotateX(10deg);
    filter: blur(5px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.05) rotateX(0deg);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0px);
  }
}

.portfolio-item:nth-child(1) {
  animation-delay: 0.1s;
}
.portfolio-item:nth-child(2) {
  animation-delay: 0.2s;
}
.portfolio-item:nth-child(3) {
  animation-delay: 0.3s;
}
.portfolio-item:nth-child(4) {
  animation-delay: 0.4s;
}
.portfolio-item:nth-child(5) {
  animation-delay: 0.5s;
}
.portfolio-item:nth-child(6) {
  animation-delay: 0.6s;
}

.portfolio-item:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 25px 50px rgba(0, 240, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.project-image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.project-image {
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 20px 20px 0 0;
  will-change: transform;
}

.portfolio-item:hover .project-image {
  transform: scale(1.15);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 240, 255, 0.9) 0%,
    rgba(255, 45, 117, 0.8) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  transition: var(--transition);
  border-radius: 20px 20px 0 0;
}

.portfolio-item:hover .project-overlay {
  opacity: 1;
}

.overlay-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.overlay-btn:hover {
  background: white;
  color: var(--dark);
  transform: scale(1.1) rotate(10deg);
  cursor: pointer;
}

.project-info {
  padding: 30px;
}

.project-category {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.project-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--light);
}

.project-description {
  color: var(--gray);
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  padding: 4px 12px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.project-link {
  color: var(--light);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  transition: var(--transition);
  font-size: 14px;
}

.project-link.primary {
  background: var(--primary);
  color: var(--dark);
  border-color: var(--primary);
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 240, 255, 0.3);
  cursor: pointer;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background: linear-gradient(
    135deg,
    rgba(20, 25, 40, 0.95),
    rgba(10, 14, 23, 0.95)
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  margin: 20px;
  padding: 0;
  border-radius: 20px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.4);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--primary);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: var(--dark);
  transform: scale(1.1) rotate(90deg);
}

.modal-body {
  padding: 40px;
}

.modal-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--light);
  text-align: center;
}

.modal-category {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.modal-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.modal-tag {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.modal-description {
  color: var(--gray);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
  text-align: center;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
  grid-template-columns: 1fr;
}

.modal-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.modal-gallery img {
  width: 100%;
  border-radius: 15px;
  transition: var(--transition);
  cursor: pointer;
}

.modal-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

.modal-gallery img:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.modal-details h3 {
  font-size: 1.8rem;
  color: var(--light);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.modal-details h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.tech-item {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.tech-item:hover {
  background: rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}

.project-links-modal {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.project-link-modal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.project-link-modal.demo {
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  color: var(--dark);
}

.project-link-modal.github {
  background: transparent;
  color: var(--light);
  border: 2px solid var(--light);
}

.project-link-modal:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#projectModal .modal-image { transition: filter .2s ease; }

.features-list,
.modal-details ul,
ul {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.features-list li,
.modal-details ul li,
.modal-details li {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--gray);
  font-size: 16px;
  line-height: 1.6;
}

.features-list li i,
.modal-details ul li i,
.modal-details li i {
  color: var(--primary);
  font-size: 16px;
  margin-right: 5px;
  flex-shrink: 0;
  margin-top: 4px;
}
.load-more-container {
  text-align: -webkit-center;
  padding: 60px 0;
}

.load-more-btn {
  padding: 15px 40px;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  color: var(--dark);
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.6);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  opacity: 0;
  transform: translateY(30px);
  display: none;
}

.empty-state.show {
  animation: fadeInUp 0.8s forwards;
}

.empty-icon {
  font-size: 80px;
  color: var(--primary);
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-size: 28px;
  color: var(--light);
  margin-bottom: 15px;
}

.empty-message {
  color: var(--gray);
  font-size: 16px;
}

/* Animaciones */
@keyframes nebulaPulse {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes heroPulse {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes titleGlow {
  0% {
    text-shadow: 0 0 20px var(--primary);
  }
  100% {
    text-shadow: 0 0 40px var(--primary), 0 0 60px var(--secondary);
  }
}

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

@keyframes itemAppear {
  from {
    opacity: 0;
    transform: translateY(50px) rotateX(20deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* ================================== */
/*    RESPONSIVE FIXES OPTIMIZADOS    */
/* ================================== */

/* Large Desktop ajustes menores */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }

  .modal-content-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet y Desktop pequeño */
@media (max-width: 992px) {
  .portfolio-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-box {
    padding: 30px 20px;
  }

  .stat-number {
    font-size: 2.8rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .controls-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

/* Tablet */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none;
  }

  .container {
    padding: 0 20px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-image-container {
    height: 220px;
  }
  .project-image {
    object-fit: cover;
  }
  .filter-tabs {
    gap: 10px;
    justify-content: center;
  }

  .filter-tab {
    padding: 10px 18px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .modal-content {
    margin: 15px;
    max-height: 90vh;
  }

  .modal-body {
    padding: 30px 20px;
  }

  .project-links,
  .project-links-modal {
    flex-direction: column;
    gap: 12px;
  }

  .project-link,
  .project-link-modal {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .cta-button,
  .secondary-button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .portfolio-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Mobile grande */
@media (max-width: 600px) {
  .logo {
    margin-left: 0;
  }
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.3rem);
    margin-bottom: 30px;
  }

  .filter-tabs {
    gap: 8px;
    flex-wrap: wrap;
  }

  .filter-tab {
    padding: 9px 15px;
    font-size: 13px;
    min-width: auto;
    white-space: nowrap;
  }

  .search-input {
    font-size: 16px;
  }

  .portfolio-stats {
    grid-template-columns: 1fr 1fr;
    margin: 50px 0;
  }

  .stat-box {
    padding: 25px 15px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .modal-header {
    height: 200px;
  }

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

  .modal-gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .modal-gallery img:first-child {
    grid-column: span 1;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  header {
    padding: 15px 0;
  }

  .logo {
    font-size: 24px;
  }

  .nav-back {
    font-size: 14px;
    padding: 8px 16px;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3rem);
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 4.5vw, 1.2rem);
    margin-bottom: 25px;
  }

  .project-info {
    padding: 20px;
  }

  .project-title {
    font-size: 20px;
  }

  .project-description {
    font-size: 14px;
    line-height: 1.5;
  }

  .project-tech {
    gap: 6px;
    margin-bottom: 15px;
  }

  .project-image {
    object-fit: fill;
  }

  .tech-tag {
    padding: 4px 10px;
    font-size: 11px;
  }

  .filter-tabs {
    gap: 6px;
  }

  .filter-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .portfolio-stats {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 40px 0;
  }

  .modal-content {
    margin: 10px;
  }

  .modal-body {
    padding: 25px 15px;
  }

  .modal-title {
    font-size: 1.8rem;
  }

  .modal-close {
    width: 40px;
    height: 40px;
    top: 15px;
    right: 15px;
  }
}

/* Mobile pequeño */
@media (max-width: 360px) {
  .logo {
    font-size: 20px;
  }
  .container {
    padding: 0 10px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: clamp(0.85rem, 5vw, 1rem);
  }

  .project-info {
    padding: 15px;
  }

  .project-title {
    font-size: 18px;
  }

  .project-description {
    font-size: 13px;
  }

  .filter-tab {
    padding: 7px 10px;
    font-size: 11px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .modal-body {
    padding: 20px 12px;
  }

  .modal-title {
    font-size: 1.6rem;
  }
}

/* Landscape mobile fix */
@media (max-height: 500px) and (orientation: landscape) {
  .portfolio-hero {
    min-height: 80vh;
    padding-top: 80px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
    margin-bottom: 15px;
  }

  .hero-subtitle {
    margin-bottom: 20px;
  }

  .portfolio-stats {
    margin: 30px 0;
  }
}

* {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.portfolio-grid,
.filter-tabs,
.hero-buttons,
.project-links,
.project-links-modal {
  width: 100%;
}

.filter-tab,
.project-link,
.project-link-modal,
.cta-button,
.secondary-button {
  box-sizing: border-box;
}

/* Botón Principal */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* Efecto Hover */
.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.whatsapp-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  max-width: none;
  pointer-events: none;
  z-index: 1001;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(-50%);
}

@media (min-width: 1024px) and (max-width: 1440px) {
.container {
    max-width: 1200px !important;
}
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 46px;
    height: 46px;
    font-size: 26px;
    bottom: 16px;
    right: 12px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}
