/* =====================
   RESET & BASE
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-main: #0f172a;
  --bg-alt: #020617;
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --text-light: #f1f5f9;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #06b6d4;
  --card-bg: rgba(15, 23, 42, 0.7);
  --card-bg-solid: #1e293b;
  --border: #334155;
  --border-light: #475569;
  --gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-alt: linear-gradient(135deg, #8b5cf6, #3b82f6);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.2);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: var(--text-light);
}

/* =====================
   TYPOGRAPHY
===================== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =====================
   LAYOUT & CONTAINERS
===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.title-number {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* =====================
   NAVBAR
===================== */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.header.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-highlight {
  color: var(--primary);
}

.nav-menu {
  display: flex;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* =====================
   HERO - TOTALMENTE RESPONSIVE
===================== */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* Usa svh para móviles modernos */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 1rem 2rem;
  position: relative;
  overflow-x: hidden;
}

/* Grid adaptable */
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

/* Contenedor de texto */
.hero-text {
  animation: fadeUp 1s ease;
  width: 100%;
  text-align: center;
}

/* Títulos optimizados para todos los dispositivos */
.hero-greeting {
  display: block;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.hero-name {
  display: block;
  font-size: clamp(2.2rem, 10vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 6vw, 2rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  min-height: 2.5rem;
}

/* Texto typing */
.typing-text {
  border-right: 3px solid var(--primary);
  padding-right: 5px;
  animation: blink 1s infinite;
  display: inline-block;
}

.hero-description {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  max-width: 100%;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  color: var(--text-light);
  text-align: center;
}

/* =====================
   BOTONES - OPTIMIZADOS PARA TACTO
===================== */
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  padding: 1rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  width: 100%;
  max-width: 280px;
  min-height: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  touch-action: manipulation;
}

/* Tamaño mínimo para toque en móviles */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    padding: 1rem;
  }
}

/* Estados activos para móviles */
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Efecto ripple */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border: 2px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  background: rgba(59, 130, 246, 0.05);
}

/* Iconos */
.btn-primary i,
.btn-secondary i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-primary:hover i,
.btn-secondary:hover i {
  transform: translateX(3px);
}

/* =====================
   SEGMENTO DE CÓDIGO RESPONSIVE
===================== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1s ease 0.5s both;
  margin-top: 2rem;
  width: 100%;
  padding: 0 0.5rem;
}

.code-snippet {
  background: var(--card-bg-solid);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 100%;
  width: 100%;
  transition: transform 0.3s ease;
}

.code-snippet:hover {
  transform: translateY(-5px);
}

.code-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.dot:hover {
  transform: scale(1.2);
}

.code-content {
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace, monospace;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.05);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  word-break: break-all;
  white-space: pre-wrap;
}

.code-content code {
  color: var(--text-main);
  display: block;
  min-width: min-content;
}

/* Scrollbar */
.code-content::-webkit-scrollbar {
  height: 6px;
}

.code-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.code-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.code-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* =====================
   SCROLL INDICATOR
===================== */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 10;
}

.scroll-indicator a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  touch-action: manipulation;
}

.scroll-indicator a:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

/* =====================
   MEDIA QUERIES ESPECÍFICAS
===================== */

/* Dispositivos muy pequeños (iPhone SE, Galaxy S8) */
@media screen and (max-width: 360px) {
  .hero {
    padding: 70px 0.75rem 1.5rem;
    min-height: calc(100svh - 70px);
  }
  
  .hero-name {
    font-size: 1.8rem;
    line-height: 1;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    min-height: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
  
  .scroll-indicator a {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* Móviles medianos (Samsung S21, iPhone 12) */
@media screen and (min-width: 361px) and (max-width: 480px) {
  .hero {
    padding: 80px 1rem 2rem;
  }
  
  .hero-name {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
    max-width: 90%;
  }
  
  .btn-primary,
  .btn-secondary {
    max-width: 250px;
  }
}

/* Tablets verticales */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .hero {
    padding: 90px 1.5rem 2rem;
  }
  
  .hero-content {
    gap: 2.5rem;
  }
  
  .hero-name {
    font-size: 2.8rem;
  }
  
  .hero-subtitle {
    font-size: 1.6rem;
  }
  
  .hero-description {
    max-width: 80%;
  }
  
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .btn-primary,
  .btn-secondary {
    width: auto;
    min-width: 200px;
    max-width: none;
  }
  
  .code-snippet {
    max-width: 450px;
    margin: 0 auto;
  }
}

/* Tablets horizontales y pantallas pequeñas */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero {
    padding: 100px 2rem 3rem;
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
    align-items: center;
  }
  
  .hero-text {
    text-align: left;
  }
  
  .hero-description {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }
  
  .hero-actions {
    justify-content: flex-start;
  }
  
  .btn-primary,
  .btn-secondary {
    width: auto;
  }
  
  .hero-visual {
    margin-top: 0;
  }
  
  .code-snippet {
    max-width: 100%;
  }
}

/* Desktop */
@media screen and (min-width: 1025px) {
  .hero {
    padding: 120px 2rem 4rem;
  }
  
  .hero-content {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    text-align: left;
  }
  
  .hero-text {
    text-align: left;
  }
  
  .hero-description {
    text-align: left;
    max-width: 90%;
    margin-left: 0;
    margin-right: 0;
  }
  
  .hero-actions {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .hero-visual {
    margin-top: 0;
  }
  
  .code-snippet {
    max-width: 420px;
  }
}

/* Pantallas muy grandes */
@media screen and (min-width: 1440px) {
  .hero {
    padding: 140px 2rem 5rem;
  }
  
  .hero-content {
    max-width: 1400px;
    gap: 5rem;
  }
  
  .code-snippet {
    max-width: 450px;
  }
}

/* Landscape en móviles */
@media screen and (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 70px 1rem 1.5rem;
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
  }
  
  .hero-name {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    min-height: auto;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  .hero-actions {
    margin-top: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .btn-primary,
  .btn-secondary {
    min-height: 42px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .scroll-indicator {
    display: none;
  }
}

/* Landscape en tablets */
@media screen and (min-width: 768px) and (max-height: 800px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 90px 2rem 2rem;
  }
  
  .hero-name {
    font-size: 2.5rem;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
}

/* Safe areas para dispositivos con notch */
@supports (padding: max(0px)) {
  .hero {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-top: max(80px, calc(80px + env(safe-area-inset-top)));
  }
}

/* Prevenir zoom en inputs iOS */
@media screen and (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* Optimización para pantallas táctiles */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .contact-item,
  .social-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .nav-links a {
    padding: 0.75rem 1rem;
  }
  
  .code-snippet:hover {
    transform: none;
  }
  
  .skill-category:hover,
  .project-card:hover,
  .education-card:hover,
  .stat-card:hover {
    transform: none;
  }
}

/* =====================
   ANIMACIONES
===================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(50, 50);
    opacity: 0;
  }
}

/* =====================
   ABOUT
===================== */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-intro {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  gap: 1.5rem;
}

.stat-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* =====================
   SKILLS
===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.skill-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.skill-list {
  list-style: none;
}

.skill-list li {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* =====================
   PROJECTS
===================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.project-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary);
}

/* =====================
   EXPERIENCE
===================== */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-date {
  text-align: right;
  font-weight: 600;
  color: var(--primary);
  position: relative;
}

.timeline-date::before {
  content: '';
  position: absolute;
  right: -36px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-alt);
  z-index: 1;
}

.timeline-content {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.timeline-list {
  list-style: none;
}

.timeline-list li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.timeline-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* =====================
   EDUCATION
===================== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.education-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: var(--transition);
}

.education-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.education-icon {
  font-size: 2rem;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.education-content {
  flex: 1;
}

.education-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.education-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: block;
}

.education-description {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =====================
   CONTACT
===================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-intro {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-links {
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.contact-item i {
  font-size: 1.25rem;
  color: var(--primary);
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text-light);
}

.contact-form {
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* =====================
   FOOTER
===================== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-text {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--card-bg-solid);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =====================
   RESPONSIVE DESIGN PARA OTRAS SECCIONES
===================== */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--bg-alt);
    padding: 2rem;
    transition: var(--transition);
    border-top: 1px solid var(--border);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .timeline-date {
    text-align: left;
    padding-left: 2.5rem;
  }
  
  .timeline-date::before {
    left: 0;
    right: auto;
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .education-grid {
    grid-template-columns: 1fr;
  }
}

/* Mejorar accesibilidad en focus */
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Soporte para dark mode */
@media (prefers-color-scheme: dark) {
  .code-snippet {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
  }
}/* =====================
   LANGUAGE TOGGLE
===================== */
.language-toggle {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.05);
}

.language-toggle:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}