/* ==============================
   VARIABLES Y FUENTES
============================== */
:root {
  /* Paleta de colores */
  --primary-color: #016A70;
  --secondary-color: #91C76D;
  --accent-color: #C7481A;
  --dark-bg: #200801;
  --light-bg: #FFFFDD;
  
  /* Textos */
  --text-color: #FFFFDD;
  --text-dark: #200801;
  --text-light: #FFFFDD;
  --heading-color: #C7481A;
  --text-muted: #200801;
  
  /* Estados */
  --error-color: #C7481A;
  --success-color: #016A70;
  --warning-color: #91C76D;

  /* UI */
  --header-bg: rgba(1, 106, 112, 0.95);
  --header-bg-scrolled: rgba(1, 106, 112, 0.98);
  --menu-bg: rgba(1, 106, 112, 0.98);
  --lang-bg: rgba(255, 255, 221, 0.15);
  --lang-bg-hover: rgba(255, 255, 221, 0.25);
  --lang-border: rgba(199, 72, 26, 0.45);
  
  /* Sombras */
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);
  
  /* Transiciones */
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.6s ease;
  
  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  
  /* Otros */
  --max-width: 1200px;
  --border-radius: 1rem;
  --z-header: 999;
  --z-mobile-menu: 998;
  --z-notification: 1000;
  --z-modal: 1001;
}

body[data-theme="dark"] {
  --primary-color: #016A70;
  --secondary-color: #91C76D;
  --accent-color: #C7481A;
  --dark-bg: #200801;
  --light-bg: #200801;

  --text-color: #FFFFDD;
  --text-dark: #FFFFDD;
  --text-light: #FFFFDD;
  --heading-color: #91C76D;
  --text-muted: #E4D7B2;

  --error-color: #C7481A;
  --success-color: #91C76D;
  --warning-color: #016A70;

  --header-bg: rgba(18, 4, 0, 0.95);
  --header-bg-scrolled: rgba(18, 4, 0, 0.98);
  --menu-bg: rgba(18, 4, 0, 0.98);
  --lang-bg: rgba(255, 255, 221, 0.12);
  --lang-bg-hover: rgba(255, 255, 221, 0.2);
  --lang-border: rgba(145, 199, 109, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: none;
    --transition-slow: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==============================
   BASE
============================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--light-bg);
  margin: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-preload * {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

body.mobile-device {
  touch-action: manipulation;
}

html {
  scroll-padding-top: 80px;
}

/* ==============================
   TIPOGRAFÍA
============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', sans-serif;
  color: var(--heading-color);
  margin: 0 0 1rem 0;
  font-weight: 700;
  line-height: 1.2;
}

h2.major {
  font-size: clamp(2rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  color: var(--accent-color);
}

h2.major::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 1rem auto;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

/* ==============================
   LAYOUT
============================== */
#page-wrapper {
  width: 100%;
  margin: auto;
  background: var(--text-color);
  box-shadow: var(--shadow-light);
}

section {
  padding: var(--spacing-xl) var(--spacing-md);
}

.wrapper {
  position: relative;
}

.wrapper.style1 {
  background: var(--primary-color);
  color: var(--text-light);
}

.wrapper.style1 h2.major,
.wrapper.style1 h3,
.wrapper.style1 h4 {
  color: var(--text-light);
}

.wrapper.style2 {
  background: var(--primary-color);
  color: var(--text-light);
}

.wrapper.style2 h2.major,
.wrapper.style2 h3,
.wrapper.style2 h4,
.wrapper.style2 h2, 
.wrapper.style2 p, 
.wrapper.style2 .section-subtitle {
  color: var(--text-light);
}

.wrapper.style3 {
  background: var(--secondary-color);
  color: var(--text-light);
}

.wrapper.style3 h2.major,
.wrapper.style3 h3,
.wrapper.style3 h4,
.wrapper.style3 h2,
.wrapper.style3 p,
.wrapper.style3 .section-subtitle {
  color: var(--text-light);
}

.wrapper.style4 {
  background: #016A70;
  color: var(--text-light);
}

.wrapper.style4 h2.major,
.wrapper.style4 h3,
.wrapper.style4 h4,
.wrapper.style4 h2, 
.wrapper.style4 p {
  color: var(--text-light);
}

.inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 var(--spacing-sm);
}

/* ==============================
   HEADER
============================== */
#header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: var(--shadow-light);
  transition: all var(--transition);
  min-height: 70px;
}

#header.scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: var(--shadow-medium);
}

#header h1 {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

#header h1 a {
  text-decoration: none;
  color: var(--text-color);
  transition: color var(--transition);
}

#header h1 a:hover,
#header h1 a:focus {
  color: var(--accent-color);
}

#header nav {
  display: flex;
  gap: var(--spacing-md);
}

#header nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  position: relative;
  transition: color var(--transition);
  padding: 0.5rem 0;
}

#header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition);
}

#header nav a:hover::after,
#header nav a:focus::after,
#header nav a.active::after {
  width: 100%;
}

#header nav a:hover,
#header nav a:focus,
#header nav a.active {
  color: var(--accent-color);
  outline: none;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: color var(--transition);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--menu-bg);
  backdrop-filter: blur(10px);
  z-index: var(--z-mobile-menu);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-medium);
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 221, 0.2);
  transition: color var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a:focus,
.mobile-menu a.active {
  color: var(--accent-color);
}

/* Header Controls */
.header-controls {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: var(--lang-bg);
  border: 2px solid var(--lang-border);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}

.lang-btn:hover {
  background: var(--lang-bg-hover);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(199, 72, 26, 0.2);
}

.lang-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(199, 72, 26, 0.3);
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--lang-border);
  background: var(--lang-bg);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--lang-bg-hover);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  outline: none;
}

.theme-toggle i {
  font-size: 0.95rem;
}

/* ==============================
   HERO/BANNER
============================== */
#banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #016A70;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

#banner::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.2;
}

.banner-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: subtle-zoom 20s ease-in-out infinite alternate;
}

@keyframes subtle-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.banner-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #016A70;
}

#banner .inner {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-glass-card {
  background: rgba(255, 255, 221, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 221, 0.2);
  box-shadow: 
    0 8px 32px 0 rgba(32, 8, 1, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 221, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  transition: all var(--transition-slow);
}

.hero-glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 40px 0 rgba(32, 8, 1, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 221, 0.15);
}

.hero-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  padding: 0 var(--spacing-md);
}

.profile-container {
  position: relative;
}

.profile-pic,
.about-profile-pic {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  object-fit: cover;
  transition: transform var(--transition-slow);
  box-shadow: 0 10px 30px rgba(199, 72, 26, 0.3);
}

.profile-pic:hover {
  transform: scale(1.05);
}

.hero-text {
  text-align: center;
  max-width: 500px;
}

.hero-text h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-text p.description {
  margin-bottom: 2rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  opacity: 0.95;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background var(--transition);
}

.scroll-indicator:hover,
.scroll-indicator:focus {
  background: rgba(255, 255, 221, 0.1);
  outline: none;
}

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

/* ==============================
   BOTONES
============================== */
.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  color: var(--accent-color);
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.8em 2em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: all var(--transition);
  gap: 0.5em;
  min-height: 44px;
  touch-action: manipulation;
}

.button:hover,
.button:focus {
  background-color: var(--accent-color);
  color: var(--text-light);
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 10px 25px rgba(145, 199, 109, 0.3);
  outline: none;
}

.button:active {
  transform: translate3d(0, 1px, 0);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button.primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-light);
}

.button.primary:hover,
.button.primary:focus {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(1, 106, 112, 0.3);
}

.button.with-icon i {
  transition: transform var(--transition);
}

.button.with-icon:hover i {
  transform: translateX(2px);
}

.button.small {
  padding: 0.5em 1.5em;
  font-size: 0.8em;
  min-height: 36px;
}

.button.large {
  padding: 1em 2.5em;
  font-size: 1.1em;
}

.button .button-text {
  transition: opacity var(--transition);
}

.button .button-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: button-spin 1s linear infinite;
}

.button.loading .button-text {
  opacity: 0;
}

.button.loading .button-loader {
  display: inline-block;
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

.button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(145, 199, 109, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==============================
   PROYECTOS (Compartido)
============================== */
.project-card,
.project-card-detailed,
.improved-project {
  background: var(--dark-bg);
  color: var(--text-light);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Permitir que las imágenes apiladas se vean detrás de la tarjeta */
.postmortalis-card {
  overflow: visible;
  position: relative;
  background: transparent;
}

.postmortalis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark-bg);
  border-radius: var(--border-radius);
  z-index: 0;
}


.project-card:hover,
.project-card-detailed:hover,
.improved-project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.project-media {
  flex: 0 0 300px;
  position: relative;
  overflow: hidden;
}

/* Estilos para imágenes apiladas en Postmortalis */
.postmortalis-card {
  position: relative;
  overflow: visible;
}

.stacked-image {
  position: absolute;
  width: 200px;
  height: 280px;
  object-fit: contain;
  z-index: -1;
  transition: transform var(--transition-slow);
  border-radius: 8px;
}

.stacked-left {
  top: 10px;
  left: -80px;  /* Era -60px, ahora -80px (más a la izquierda) */
  width: 240px;
  height: 320px;
  transform: rotate(-20deg);
}

.stacked-right {
  bottom: 80px;  /* Era bottom: 10px, ahora bottom: 80px (70px más arriba) */
  right: -80px;  /* Era -60px, ahora -80px (más a la derecha) */
  transform: rotate(20deg);
}

.postmortalis-card .project-header,
.postmortalis-card .project-content {
  position: relative;
  z-index: 1;
}

.postmortalis-card:hover .stacked-left {
  transform: rotate(-25deg) translateX(-10px) translateY(-8px);
}

.postmortalis-card:hover .stacked-right {
  transform: rotate(25deg) translateX(10px) translateY(8px);
}

/* Estilos para Overhaul */
.overhaul-card {
  overflow: visible;
  position: relative;
  background: transparent;
}

.overhaul-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark-bg);
  border-radius: var(--border-radius);
  z-index: 0;
}

.overhaul-card .project-media {
  overflow: hidden;
  position: relative;
}

.overhaul-card .project-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--dark-bg);
}

.overhaul-card .project-header,
.overhaul-card .project-content {
  position: relative;
  z-index: 1;
}

/* Imagen de elfo (izquierda, similar a ilian) */
.overhaul-elfo {
  top: 10px;
  left: -120px;  /* Era -80px, ahora -120px (40px más a la izquierda) */
  width: 240px;
  height: 320px;
  transform: rotate(-20deg);
}

/* Imágenes de downgrade apiladas como baraja (derecha) */
.overhaul-downgrade {
  width: 200px;
  height: 280px;
  right: -80px;
  bottom: 80px;
}

.downgrade-1 {
  transform: rotate(10deg) translateY(-30px) translateX(-20px);  /* Rotación 10deg, movida a la izquierda */
  transform-origin: 50% 90%;  /* Ancla de rotación casi en la base */
  z-index: -1;
}

.downgrade-2 {
  transform: rotate(5deg) translateY(-15px) translateX(-30px);  /* Rotación 5deg, movida a la izquierda */
  transform-origin: 50% 90%;  /* Ancla de rotación casi en la base */
  z-index: -2;
}

.downgrade-3 {
  transform: rotate(0deg) translateX(-40px);  /* Rotación 0deg (recta), movida a la izquierda */
  transform-origin: 50% 90%;  /* Ancla de rotación casi en la base */
  z-index: -3;
}

/* Hover effects para Overhaul */
.overhaul-card:hover .overhaul-elfo {
  transform: rotate(-25deg) translateX(-10px) translateY(-8px);
}

.overhaul-card:hover .downgrade-1 {
  transform: rotate(15deg) translateY(-28px) translateX(20px);  /* Carta 1 rota a 15 grados */
}

.overhaul-card:hover .downgrade-2 {
  transform: rotate(25deg) translateY(-13px) translateX(12px);  /* Carta 2 rota a 25 grados */
}

.overhaul-card:hover .downgrade-3 {
  transform: rotate(35deg) translateX(5px);  /* Carta 3 rota a 35 grados */
}

/* Badge de Chile Diseña en esquina superior derecha de la tarjeta completa */
.corner-badge-overhaul {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 60px;
  height: auto;
  z-index: 2;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Badge viejo (por si queda en algún lado) */
.corner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 60px;
  height: auto;
  z-index: 2;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para hacer la imagen de PlayMe más pequeña */
.playme-media {
  flex: 0 0 250px;
}

.playme-media img {
  object-fit: contain;
  background-color: rgba(1, 106, 112, 0.3);
}



.project-media img,
.project-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-media img,
.improved-project:hover .project-image-container img {
  transform: scale(1.05);
}

.project-basic-info {
  flex: 1;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: var(--spacing-xs);
}

.project-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.project-basic-info h3,
.improved-project h3 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  margin-bottom: var(--spacing-xs);
  color: var(--text-light);
}

.project-summary,
.improved-project p {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: var(--spacing-sm);
  opacity: 0.9;
  line-height: 1.5;
}

.project-roles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.role-tag {
  background: #016A70;
  color: var(--text-light);
  padding: 0.4rem 1rem;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.project-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.project-description h4,
.project-tools h4,
.project-highlights h4 {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.project-description ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-description li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 221, 0.2);
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-light);
  line-height: 1.5;
}

.project-description li:last-child {
  border-bottom: none;
}

.project-description li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 0.8rem;
}

.project-tools {
  margin-top: var(--spacing-md);
}

.tool-tags,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tool-tag {
  background: var(--secondary-color);
  color: var(--text-light);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--accent-color);
  transition: all var(--transition);
  white-space: nowrap;
}

.tool-tag:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.tag {
  background: var(--accent-color);
  color: var(--text-light);
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.project-actions {
  margin-top: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.project-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-color);
  color: var(--text-light);
}

.project-status.completed {
  background: var(--primary-color);
}

/* Expandible content */
.development-process {
  display: none;
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 2px solid rgba(255, 255, 221, 0.2);
}

.development-process.show {
  display: block;
  animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.process-step {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm);
  background: var(--secondary-color);
  border-radius: 0.5rem;
  border-left: 4px solid var(--accent-color);
}

.process-step h4,
.process-step p,
.process-step li {
  color: var(--text-light);
}

.process-step h4 {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.process-step i {
  color: var(--accent-color);
}

.process-step ul {
  margin-left: 1.5rem;
}

.process-step li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.gif-container {
  text-align: center;
}

.project-gif {
  width: 100%;
  max-width: 400px;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-medium);
  transition: transform var(--transition);
}

.project-gif:hover {
  transform: scale(1.02);
}

.gif-container p {
  margin-top: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-light);
}

/* Highlights */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
}

.highlight-item {
  text-align: center;
  padding: var(--spacing-md);
  border-radius: 0.75rem;
  border: 2px solid var(--accent-color);
  background: var(--secondary-color);
  transition: all var(--transition);
}

.highlight-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.highlight-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.highlight-item span {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Improved Projects Grid */
.improved-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.project-image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 8, 1, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-image-container:hover .project-overlay {
  opacity: 1;
}

.project-overlay .overlay-text {
  background: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-light);
}

.project-info {
  padding: var(--spacing-md);
}

/* ==============================
   HABILIDADES
============================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.skill-category {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

.skill-category h3 i {
  color: var(--accent-color);
}

.skill-progress-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-name {
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-years {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: normal;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 221, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  background: #016A70;
  border-radius: 4px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.skill-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.skills-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.skill-highlight {
  background: var(--dark-bg);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: all var(--transition);
}

.skill-highlight:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.skill-highlight i {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--accent-color);
}

.skill-highlight h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.3rem;
  color: var(--text-light);
}

.skill-highlight p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: var(--text-light);
}

/* ==============================
   TESTIMONIOS
============================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.testimonial {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.3;
  font-family: 'Raleway', sans-serif;
  line-height: 1;
}

.testimonial-content blockquote {
  margin: 0 0 var(--spacing-sm) 0;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-light);
  position: relative;
  z-index: 2;
}

.testimonial-author {
  display: block;
  text-align: right;
  font-style: normal;
}

.testimonial-author strong {
  display: block;
  color: var(--accent-color);
  font-weight: 700;
}

.testimonial-author span {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

/* ==============================
   ESTADÍSTICAS
============================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.stat-item {
  text-align: center;
  padding: var(--spacing-md);
  border-radius: 0.75rem;
  background: var(--dark-bg);
  transition: all var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.stat-item i {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
  color: var(--accent-color);
}

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--accent-color);
}

.stat-item span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ==============================
   FORMULARIO DE CONTACTO
============================== */
.contact-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

form,
.contact-info {
  background: rgba(32, 8, 1, 0.6);
  backdrop-filter: blur(10px);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 221, 0.2);
}

.fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.field {
  flex: 1 1 100%;
}

.field.half {
  flex: 1 1 calc(50% - 0.5rem);
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-light);
}

input, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 221, 0.3);
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 221, 0.1);
  color: var(--text-light);
  transition: all var(--transition);
}

input::placeholder, 
textarea::placeholder {
  color: rgba(255, 255, 221, 0.6);
}

input:focus, 
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 221, 0.15);
  box-shadow: 0 0 0 3px rgba(145, 199, 109, 0.3);
}

input:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(199, 72, 26, 0.2);
}

input:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--success-color);
}

.field-error {
  color: var(--error-color);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.field-error::before {
  content: '⚠';
  font-size: 0.9rem;
}

.contact-info h3 {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
  padding: 0.5rem 0;
}

.contact-item i {
  color: var(--accent-color);
  width: 20px;
  flex-shrink: 0;
}

.contact-detail {
  display: flex;
  flex-direction: column;
}

.contact-detail strong {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--accent-color);
}

.contact-detail a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-detail a:hover {
  color: var(--accent-color);
}

.social-links {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 221, 0.2);
}

.social-links h4 {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
  font-size: 1rem;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 221, 0.1);
  border: 1px solid rgba(255, 255, 221, 0.2);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-light);
  transition: all var(--transition);
  font-weight: 600;
}

.social-btn:hover,
.social-btn:focus {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateX(5px);
  outline: none;
}

.social-btn i {
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
}

.actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-start;
}

/* ==============================
   FOOTER
============================== */
#footer {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-sm);
  background: var(--dark-bg);
  color: var(--text-light);
}

#footer .icons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  list-style: none;
  padding: 0;
  margin-left: 0;
}

#footer .icons li {
  margin: 0;
}

#footer .icons a {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: all var(--transition);
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 221, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  text-decoration: none;
}

#footer .icons a:hover,
#footer .icons a:focus {
  color: var(--accent-color);
  background: rgba(255, 255, 221, 0.2);
  transform: translateY(-3px);
  outline: none;
}

#footer p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ==============================
   NOTIFICACIONES
============================== */
.notification {
  position: fixed;
  top: 100px;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(400px);
  transition: transform var(--transition);
  z-index: var(--z-notification);
  max-width: 350px;
  color: var(--text-light);
}

.notification.show {
  transform: translateX(0);
}

.notification i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ==============================
   ANIMACIONES DE SCROLL
============================== */
.fade-in, .slide-up, .slide-left, .slide-right {
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.slide-up {
  transform: translateY(30px);
}

.slide-left {
  transform: translateX(-30px);
}

.slide-right {
  transform: translateX(30px);
}

.project-card.slide-up,
.project-card-detailed.slide-up,
.improved-project.slide-up,
.project-card.slide-left,
.project-card-detailed.slide-left,
.improved-project.slide-left,
.project-card.slide-right,
.project-card-detailed.slide-right,
.improved-project.slide-right {
  opacity: 0;
  transform: translateY(55px) scale(0.95);
  filter: blur(6px);
  transition:
    opacity 0.75s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s ease,
    box-shadow 0.9s ease;
  will-change: transform, opacity, filter;
}

.fade-in.in-view,
.slide-up.in-view,
.slide-left.in-view,
.slide-right.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

.project-card.in-view,
.project-card-detailed.in-view,
.improved-project.in-view {
  filter: blur(0);
  transform: translate(0, 0) scale(1);
  animation: card-reveal 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes card-reveal {
  0% {
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: var(--shadow-light);
  }
}

/* ==============================
   COMPONENTES ADICIONALES
============================== */
.center-actions {
  text-align: center;
  margin-top: var(--spacing-lg);
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-sm);
}

.cta-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
}

.personal-projects-note {
  background: var(--dark-bg);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.personal-projects-note i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.personal-projects-note p {
  color: var(--text-light);
  margin: 0;
}

/* ==============================
   UTILIDADES
============================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* ==============================
   FOCUS VISIBLE
============================== */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
  }

  #header {
    padding: 1rem;
  }

  #header nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .language-switcher {
    gap: 0.3rem;
  }

  .header-controls {
    right: 4rem;
    gap: 0.3rem;
  }

  .lang-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .theme-toggle {
    width: 2.1rem;
    height: 2.1rem;
  }

  .hero-content,
  .hero-glass-card {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }

  .hero-glass-card:hover {
    transform: none;
  }

  .hero-text h2 {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
    max-width: 280px;
  }

  .project-header {
    flex-direction: column;
  }

  .project-media {
    flex: none;
    height: 200px;
  }

  .project-actions,
  .cta-actions {
    flex-direction: column;
  }

  .project-actions .button,
  .cta-actions .button {
    width: 100%;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .skills-grid,
  .improved-project-grid,
  .testimonials-grid,
  .skills-preview {
    grid-template-columns: 1fr;
  }

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

  .notification {
    right: 1rem;
    left: 1rem;
    transform: translateY(-100px);
  }

  .notification.show {
    transform: translateY(0);
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  section {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .inner {
    padding: 0;
  }

  .hero-text h2 {
    font-size: clamp(1.5rem, 8vw, 1.8rem);
  }

  h2.major {
    font-size: clamp(1.8rem, 6vw, 2rem);
  }

  .button {
    padding: 0.7em 1.5em;
    font-size: 0.8em;
    width: 100%;
    justify-content: center;
  }

  .fields {
    flex-direction: column;
  }

  .field.half {
    flex: 1 1 100%;
  }

  .profile-pic,
  .about-profile-pic {
    width: 180px;
    height: 180px;
  }

  #header {
    padding: 0.8rem 1rem;
  }

  #header h1 {
    font-size: 1rem;
  }

  .scroll-indicator {
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1rem;
    --spacing-sm: 0.5rem;
  }

  .hero-actions .button {
    font-size: 0.75em;
    padding: 0.6em 1.2em;
  }

  .notification {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}

@media (hover: none) {
  .improved-project:hover,
  .project-card:hover,
  .project-card-detailed:hover,
  .skill-category:hover,
  .testimonial:hover,
  .stat-item:hover,
  .skill-highlight:hover {
    transform: none;
  }
}

/* ==============================
   PRINT
============================== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  #header,
  .mobile-menu,
  .scroll-indicator,
  .notification,
  .hero-actions,
  .project-actions {
    display: none !important;
  }
  
  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* ==============================
   FIXES PARA TARJETAS DE PROYECTOS
   Agregar al final de main.css
============================== */

/* FIX 1: Imágenes cortadas - Ajustar altura de la imagen */
.project-media {
  flex: 0 0 300px;
  position: relative;
  overflow: hidden;
  min-height: 250px; /* Altura mínima para mostrar más imagen */
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Cambiado de 'cover' a 'contain' para mostrar imagen completa */
  object-position: center;
  background: var(--dark-bg); /* Fondo para espacios vacíos */
  transition: transform var(--transition-slow);
}

/* Alternativa si prefieres mantener 'cover' pero con mejor posición */
.project-media img.cover-mode {
  object-fit: cover;
  object-position: center top; /* Prioriza la parte superior */
}

/* FIX 2: Botón centrado en la parte inferior */
.project-actions {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center; /* Centrado horizontal */
  align-items: center;
  width: 100%;
}

.project-actions .button {
  /* Asegurar que el botón se vea bien centrado */
  margin: 0 auto;
}

/* FIX 3: Más espacio arriba de "Contribuciones Clave" */
.project-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.project-description {
  margin-top: var(--spacing-lg); /* Más espacio arriba (antes era spacing-md o menos) */
}

.project-description h4 {
  color: var(--text-light);
  margin-top: var(--spacing-md); /* Espacio adicional arriba del título */
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* Asegurar espaciado consistente en todas las secciones */
.project-tools {
  margin-top: var(--spacing-lg); /* Espacio consistente */
}

/* ==============================
   RESPONSIVE - Ajustes para móvil
============================== */
@media (max-width: 900px) {
  .project-media {
    flex: none;
    height: 250px; /* Altura fija en móvil */
    min-height: 250px;
  }
  
  .project-actions {
    flex-direction: column;
  }
  
  .project-actions .button {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .project-media {
    height: 200px;
    min-height: 200px;
  }
}

/* ==============================
   FIXES GENERALES - Agregar al final de main.css
============================== */

/* ====== HEADER CENTRADO ====== */
.header-centered {
  justify-content: center !important;
  flex-direction: column;
  padding: 1.5rem 2rem !important;
  gap: 1rem;
}

.header-centered h1 {
  margin: 0;
  text-align: center;
}

.nav-centered {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  width: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .header-centered {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .nav-centered {
    display: none;
    position: static;
    transform: none;
  }
}

/* ====== BANNER SIN TARJETA ====== */
#banner {
  background: #016A70;
}

.page-hero {
  background: #016A70;
}

/* Eliminar glassmorphism card */
.hero-glass-card {
  background: none !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.hero-content-clean {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-content-clean .profile-container {
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
}

.hero-content-clean .profile-pic {
  width: 250px;
  height: 250px;
  border: 6px solid var(--accent-color);
  box-shadow: 0 15px 40px rgba(199, 72, 26, 0.4);
}

.hero-content-clean h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
  color: var(--text-light);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-content-clean .subtitle {
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content-clean .description {
  margin-bottom: 2.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  opacity: 0.95;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-content-clean .hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ====== SCROLL INDICATOR ARREGLADO ====== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  font-size: 2rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  background: rgba(199, 72, 26, 0.3);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  transition: all var(--transition);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.scroll-indicator:hover,
.scroll-indicator:focus {
  background: var(--accent-color);
  transform: translateX(-50%) scale(1.1);
  outline: none;
}

/* ====== FIXES TARJETAS PROYECTOS ====== */

/* Imágenes no cortadas */
.project-media {
  flex: 0 0 300px;
  position: relative;
  overflow: hidden;
  min-height: 250px;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--dark-bg);
  transition: transform var(--transition-slow);
}

/* Botón centrado */
.project-actions {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.project-actions .button {
  margin: 0 auto;
}

/* Más espacio arriba de "Contribuciones Clave" */
.project-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.project-description {
  margin-top: var(--spacing-lg);
}

.project-description h4 {
  color: var(--text-light);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.project-tools {
  margin-top: var(--spacing-lg);
}

/* ====== BOTÓN "PROCESO DE DESARROLLO" VISIBLE ====== */
.toggle-process {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: var(--text-light) !important;
}

.toggle-process:hover,
.toggle-process:focus {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.toggle-process.active {
  background: var(--primary-color) !important;
}

/* ====== ABOUT PAGE - IMAGEN CUADRADA ====== */
.about-profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 0.75rem !important; /* Cuadrada con bordes redondeados */
  object-fit: cover;
  border: 4px solid var(--accent-color);
  box-shadow: var(--shadow-medium);
}

.profile-pic {
  border-radius: 50%; /* La del hero sigue circular */
}

/* ====== HABILIDADES SIN BARRAS - OPCIÓN 1: BADGES ====== */
.skill-category-clean {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.skill-category-clean:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.skill-category-clean h3 {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

.skill-category-clean h3 i {
  color: var(--accent-color);
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-badge {
  background: #016A70;
  color: var(--text-light);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.skill-badge:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(199, 72, 26, 0.3);
}

.skill-badge i {
  font-size: 1.1rem;
}

.skill-level {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 400;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .hero-content-clean .profile-pic {
    width: 200px;
    height: 200px;
  }
  
  .project-media {
    flex: none;
    height: 250px;
    min-height: 250px;
  }
  
  .project-actions {
    flex-direction: column;
  }
  
  .project-actions .button {
    width: 100%;
    max-width: 100%;
  }
  
  .hero-content-clean .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-content-clean .hero-actions .button {
    width: 100%;
    max-width: 350px;
  }
}

@media (max-width: 600px) {
  .hero-content-clean .profile-pic {
    width: 180px;
    height: 180px;
  }
  
  .project-media {
    height: 200px;
    min-height: 200px;
  }
  
  .scroll-indicator {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .about-profile-pic {
    width: 150px;
    height: 150px;
  }
}

/* ==============================
   ABOUT PAGE - MODERN REDESIGN
============================== */

/* Profile Hero Section */
.profile-hero {
  margin-bottom: 4rem;
}

.profile-card-main {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: var(--light-bg);
  border: 2px solid rgba(199, 72, 26, 0.3);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 2rem;
}

.profile-image-container {
  flex-shrink: 0;
}

.profile-pic-large {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-info-main {
  flex: 1;
}

.profile-info-main h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.profile-role {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.profile-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
}

.meta-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.profile-stats-inline {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(199, 72, 26, 0.3);
}

.stat-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-inline strong {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 0.3rem;
}

.stat-inline span {
  font-size: 0.9rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-description {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 1rem;
  border-left: 4px solid var(--accent-color);
}

.profile-description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin: 0;
}

/* Philosophy Section */
.philosophy-section {
  margin-top: 4rem;
}

.philosophy-section h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: center;
  justify-content: center;
}

.philosophy-section h3 i {
  font-size: 1.5rem;
}

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

.philosophy-card {
  background: var(--light-bg);
  border: 2px solid rgba(199, 72, 26, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.philosophy-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(199, 72, 26, 0.2);
}

.philosophy-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #016A70;
  border-radius: 50%;
  font-size: 2rem;
  color: var(--text-light);
}

.philosophy-card h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.philosophy-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0;
}

/* Skills Modern Grid */
.skills-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category-modern {
  background: var(--light-bg);
  border: 2px solid rgba(199, 72, 26, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  transition: all var(--transition);
}

.skill-category-modern:hover {
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(199, 72, 26, 0.2);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(199, 72, 26, 0.3);
}

.skill-header i {
  font-size: 2rem;
  color: var(--accent-color);
}

.skill-header h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--accent-color);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background: rgba(199, 72, 26, 0.2);
  color: var(--text-dark);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid rgba(199, 72, 26, 0.3);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.skill-tag:hover {
  background: rgba(199, 72, 26, 0.4);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.skill-tag small {
  opacity: 0.7;
  font-size: 0.85em;
}

/* Testimonials Modern */
.testimonials-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-modern {
  background: var(--light-bg);
  border: 2px solid rgba(199, 72, 26, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  transition: all var(--transition);
}

.testimonial-modern:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(199, 72, 26, 0.2);
}

.quote-icon {
  position: absolute;
  top: -15px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.5rem;
}

.testimonial-modern blockquote {
  margin: 2rem 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dark);
  font-style: italic;
  border: none;
  padding: 0;
}

.testimonial-modern .testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(199, 72, 26, 0.3);
}

.testimonial-modern .testimonial-author strong {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.testimonial-modern .testimonial-author span {
  color: var(--text-dark);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .profile-card-main {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
  }
  
  .profile-meta {
    justify-content: center;
  }
  
  .profile-stats-inline {
    justify-content: center;
  }
  
  .philosophy-cards {
    grid-template-columns: 1fr;
  }
  
  .skills-modern-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .profile-pic-large {
    width: 150px;
    height: 150px;
  }
  
  .profile-info-main h2 {
    font-size: 2rem;
  }
  
  .profile-role {
    font-size: 1.1rem;
  }
  
  .profile-stats-inline {
    flex-direction: column;
    gap: 1rem;
  }
  
  .profile-card-main {
    padding: 1.5rem;
  }
  
  .profile-description {
    padding: 1.5rem;
  }
}

/* ==============================
   HOME - PROYECTOS DESTACADOS SIMPLE
============================== */
#proyectos-destacados .project-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-md);
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

#proyectos-destacados .project-featured-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

#proyectos-destacados .project-featured-info h3 {
  margin: 0;
}

#proyectos-destacados .project-featured-meta {
  list-style: none;
  margin: 0;
  padding: 0;
}

#proyectos-destacados .project-featured-meta li {
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--secondary-color);
  line-height: 1.4;
}

#proyectos-destacados .project-featured-meta li:last-child {
  margin-bottom: 0;
}

#proyectos-destacados .project-featured-image {
  min-height: 260px;
  border-radius: calc(var(--border-radius) - 4px);
  overflow: visible;
  perspective: 900px;
  perspective-origin: center center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#proyectos-destacados .project-featured-image .project-thumb {
  width: 92%;
  height: 92%;
  object-fit: contain;
  object-position: center;
  background: var(--dark-bg);
  border-radius: calc(var(--border-radius) - 4px);
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

#proyectos-destacados .project-featured .project-actions {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  #proyectos-destacados .project-featured {
    grid-template-columns: 1fr;
  }

  #proyectos-destacados .project-featured-image {
    min-height: 220px;
  }

  #proyectos-destacados .project-featured .project-actions {
    justify-content: center;
  }

}