@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');

body {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e0e7ff;
  font-family: 'Fira Code', monospace;
  margin: 0;
  text-align: center;
}

header {
  padding: 2rem 1rem;
}

img#profile {
  width: 220px;
  border-radius: 15px;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 13px #6366f1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

img#profile:hover {
  transform: scale(1.1);
  box-shadow: 0 0 28px #4f46e5;
}

h1 {
  font-size: 2.4rem;
  margin: 0.4em 0 0.1em;
}

h2 {
  color: #a5b4fc;
  font-size: 1.2rem;
  border-right: 2px solid #a5b4fc;
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  height: 1.5em;
}

p {
  max-width: 600px;
  margin: 1rem auto;
  color: #cbd5e1;
  line-height: 1.6em;
}

.skills {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.skills li {
  background: #4f46e5;
  padding: 0.5em 1em;
  border-radius: 20px;
  box-shadow: 0 0 8px #3b82f6;
  transition: background 0.3s ease;
  cursor: help;
}

.skills li:hover {
  background: #6366f1;
}

section#projects {
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem 1rem;
  border-top: 1px solid #334155;
  border-bottom: 1px solid #334155;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.project-card {
  background: #273549;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  padding: 1.8rem 1.5rem;
  width: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.project-card h3 {
  color: #7f9cf5;
  margin-bottom: 10px;
}

.project-card p {
  color: #cbd5e1;
  flex-grow: 1;
  text-align: center;
  margin-bottom: 1.2rem;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0.5em 1em;
  margin-top: 0.5em;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  background: #4f46e5;
  box-shadow: 0 0 8px #3b82f6;
  transition: background 0.3s ease, transform 0.3s ease;
  font-family: 'Fira Code', monospace;
  cursor: pointer;
}

.btn-social:hover {
  background: #6366f1;
  transform: translateY(-2px);
}

.social-buttons {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.btn-github {
  background: #111827;
}

.btn-github:hover {
  background: #24292e;
  transform: translateY(-2px);
}

.btn-linkedin {
  background: #0a66c2;
}

.btn-linkedin:hover {
  background: #0c74d4;
  transform: translateY(-2px);
}

.timeline-line-middle {
  max-width: 950px;
  margin: 3rem auto;
  font-family: 'Fira Code', monospace;
  color: #cbd5e1;
  padding: 0 1rem;
}

.timeline-line-middle h2 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  margin-bottom: 2.5rem;
  color: #a5b4fc;
}

.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #6366f1 0%, #7c3aed 100%);
  border-radius: 3px;
  z-index: 0;
}

.timeline-item {
  position: relative;
  width: 43%;
  min-width: 260px;
  max-width: 420px;
  padding: 1.2rem 1.1rem;
  background: rgba(79, 70, 229, 0.22);
  border-radius: 18px;
  margin-bottom: 4rem;
  box-shadow: 0 4px 22px rgba(34, 36, 62, 0.12);
  opacity: 0;
  transition: opacity 0.8s, transform 0.8s;
  z-index: 2;
  text-align: center;
  left: 0;
}

.timeline-item.left {
  left: calc(46% - 435px);
  /* Alinea la caja a la izquierda de la línea */
  transform: translateX(-60px);
}

.timeline-item.right {
  left: 53%;
  /* Alinea la caja a la derecha de la línea */
  transform: translateX(60px);
}

.timeline-item.visible.left,
.timeline-item.visible.right {
  opacity: 1;
  transform: translateX(0);
}

/* Punto circular */
.timeline-item::after {
  content: '';
  position: absolute;
  top: 30px;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at center, #a5b4fc 65%, #6366f1 100%);
  border-radius: 50%;
  box-shadow: 0 0 14px #7c3aed, 0 0 8px #6366f1;
}

.timeline-item.left::after {
  right: -40px;
}

.timeline-item.right::after {
  left: -40px;
}

.timeline-item h3 {
  color: #a5b4fc;
  margin-bottom: 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.timeline-item h4 {
  color: #e0e7ff;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
}

.timeline-item p {
  color: #f1f5f9;
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 980px) {

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 90vw !important;
    min-width: 0;
    left: 5vw !important;
    margin-bottom: 2.2rem;
    text-align: left;
    transform: translateX(0) !important;
    box-sizing: border-box;
  }

  .timeline-item::after {
    display: none;
  }

  .timeline-container::before {
    left: 28px;
    width: 5px;
  }
}

@media (max-width: 600px) {
  .timeline-line-middle {
    padding: 0;
  }

  .timeline-item {
    font-size: 0.97rem;
    padding: 1rem 0.7rem;
  }
}

.alerta-construccion {
  background: rgba(79, 70, 229, 0.15);
  /* azul transparente */
  color: #cbd5e1;
  /* color claro para texto */
  font-weight: 600;
  border-radius: 16px;
  padding: 1.5em 2em;
  margin: 2em auto;
  max-width: 700px;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  backdrop-filter: blur(8px);
  /* desenfoque ligero */
  border: 1px solid rgba(79, 70, 229, 0.4);
}

.alerta-construccion i {
  font-size: 2.2rem;
  color: #7f9cf5;
  /* tono más claro de azul */
}

.proximamente-msg {
  font-family: 'Montserrat', 'Fira Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(90deg, #13c2fd 0%, #9279f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-top: 1em;
  margin-bottom: 1em;
  letter-spacing: 0.01em;
  font-style: normal;
}

footer {
  background-color: #1e293b;
  color: #cbd5e1;
  padding: 2rem 1rem 2.5rem;
  font-family: 'Fira Code', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

.footer-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  text-align: left;
}

.footer-column {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
}

.footer-message h3 {
  margin-bottom: 0.8rem;
  color: #818cf8;
  font-size: 15px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #a5b4fc;
}

.footer-links i {
  font-size: 1.2rem;
}

.footer-subscribe form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-subscribe label {
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.footer-subscribe button {
  background-color: #6366f1;
  border: none;
  border-radius: 6px;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
  font-family: 'Fira Code', monospace;
  font-weight: bold;
}

.footer-subscribe button:hover {
  background-color: #4f46e5;
}

#interestMsg {
  font-style: italic;
  color: #a5b4fc;
  font-size: 0.9rem;
  margin-top: 10px;
  display: none;
}

.footer-bottom {
  margin-top: 1.8rem;
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 640px) {
  .project-card {
    width: 90vw;
    padding: 1rem;
  }

  .skills li {
    padding: 0.4em 1em;
    font-size: 0.9rem;
  }

  header p {
    font-size: 0.9rem;
    padding: 0 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .project-card {
    width: 45vw;
  }

  header p {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

@media (min-width: 1025px) and (max-width: 1366px) {
  .project-card {
    width: 30vw;
  }
}
.learning-now {
  max-width: 830px;
  margin: 3rem auto;
  padding: 2rem 1rem 1.5rem 1rem;
  background: rgba(51, 65, 85, 0.55);
  border-radius: 14px;
  box-shadow: 0 2px 18px #4f46e57b;
  color: #e0e7ff;
  text-align: center;
  font-family: 'Fira Code', monospace;
}
.learning-now h2 {
  font-family: 'Montserrat', sans-serif;
  color: #a5b4fc;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
}
.skills-list {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}
.skill-chip {
  background: linear-gradient(90deg,#6366f1 60%, #a5b4fc);
  color: white;
  border-radius: 22px;
  padding: 0.5rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 0 10px #6366f188;
  transition: transform 0.18s;
  cursor: default;
}
.skill-chip:hover {
  transform: scale(1.09);
}
.progress-section {
  margin: 1.1rem auto auto auto;
  max-width: 420px;
  text-align: left;
}
.progress-title {
  color: #e0e7ff;
  font-weight: 600;
  margin: 0.75rem 0 0.2rem 0.1rem;
}
.progress-bar {
  height: 11px;
  width: 100%;
  background: #334155;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.progress-value {
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #6366f1);
  border-radius: 6px;
  transition: width 1.2s cubic-bezier(.19,.91,.42,1.09);
}
.resources-section {
  max-width: 830px;
  margin: 3rem auto 2rem auto;
  padding: 2rem 1rem 1.5rem 1rem;
  background: rgba(39, 43, 66, 0.44);
  border-radius: 22px;
  color: #e0e7ff;
  font-family: 'Fira Code', monospace;
  box-shadow: 0 2px 18px #6366f144;
  text-align: center;
}
.resources-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  color: #a5b4fc;
  font-weight: 700;
  margin-bottom: 1.8rem;
}
.resources-flip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.resource-flip {
  width: 220px;
  height: 270px;
  perspective: 700px;
  cursor: pointer;
}
.flip-front, .flip-back {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.17);
  box-shadow: 0 4px 25px #6366f133;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  backface-visibility: hidden;
  transition: box-shadow 0.10s;
  font-size: 1rem;
}
.flip-front {
  z-index: 2;
}
.flip-back {
  transform: rotateY(180deg);
  background: rgba(39, 43, 66, 0.75);
  color: #cbd5e1;
  padding: 1rem;
  text-align: center;
}
.resource-flip:hover .flip-front {
  box-shadow: 0 0 35px #818cf8;
}
.resource-flip:hover .flip-back {
  box-shadow: 0 0 35px #818cf8;
}
.resource-flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s;
}
.resource-flip:hover {
  transform: rotateY(180deg);
}
.resource-img {
  width: 56px;
  height: 56px;
  border-radius: 28px;
  margin-bottom: 1rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.resource-title {
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #e0e7ff;
  font-size: 1.16rem;
  margin-bottom: 0.28rem;
}
.resource-meta {
  font-size: 0.96rem;
  color: #a5b4fc;
}
.resource-desc a {
  color: #a5b4fc;
  text-decoration: underline;
  font-weight: 600;
}
@media (max-width: 720px) {
  .resources-flip-list { flex-direction: column; gap: 2rem; align-items: center;}
  .resource-flip { margin-bottom: 1.2rem; }
}
.font-line-middle h2 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 650;
  font-size: 2.1rem;
  margin-bottom: 2.5rem;
  color: #a5b4fc;
}

.creative-personality-animated {
  max-width: 800px;
  margin: 3rem auto 3rem;
  background: rgba(54, 57, 92, 0.5);
  padding: 2.2rem 2rem;
  color: #d1d8ffcc;
  font-family: 'Fira Code', monospace;
  border-radius: 22px;
  box-shadow: 0 0 26px #7c3aed80;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.creative-personality-animated.visible {
  opacity: 1;
}

.creative-personality-animated h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #b3a2f8;
  font-size: 2.3rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.personal-bio-animated {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  flex-wrap: wrap;
  justify-content: center;
}

.personal-photo-animated {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  box-shadow: 0 0 20px #a186ff80;
  object-fit: cover;
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.7s ease, transform 0.4s ease;
  animation: pulseGlow 3.5s infinite ease-in-out;
}

.personal-photo-animated:hover {
  transform: scale(1.15) translateX(0);
  box-shadow: 0 0 35px #8a7cffcc, 0 0 50px #b3a2f8dd;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px #9a8fff99;
  }
  50% {
    box-shadow: 0 0 35px #ad9bffcc;
  }
}

.personal-text-animated {
  max-width: 560px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  font-size: 1rem;
  line-height: 1.55;
  color: #dfe1ffcc;
}

.slideInLeft {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.fadeInUp {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.personal-text-animated p {
  margin-bottom: 1rem;
  font-family: 'Fira Code', monospace;
  font-weight: 500;
}

/* Música animada */
.music-highlight {
  font-weight: 700;
  color: #a883ff;
  position: relative;
  display: inline-block;
  cursor: default;
}

.music-waves {
  display: inline-block;
  margin-left: 6px;
  animation: waveAnim 1.8s infinite;
  user-select: none;
  font-size: 1.3rem;
  animation-play-state: paused;
}

@keyframes waveAnim {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .personal-bio-animated {
    flex-direction: column;
    text-align: center;
  }
  .personal-text-animated {
    max-width: 90%;
  }
}
@supports (-webkit-touch-callout: none) {
  .creative-personality-animated {
    -webkit-transform: translateZ(0);
    will-change: opacity, transform;
  }
}
.music-waves {
  animation: waveAnim 1.8s infinite;
  -webkit-animation: waveAnim 1.8s infinite;
  animation-play-state: running; /* Cambiar de paused a running */
}
@-webkit-keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px #9a8fff99; }
  50% { box-shadow: 0 0 35px #ad9bffcc; }
}

@-webkit-keyframes waveAnim {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-6px); opacity: 1; }
}

/* ===================== Safari y Firefox Compatibility Enhancements ===================== */

/* Animations and Transforms */
.project-card, .img-profile, .personal-photo-animated, .resource-flip {
  -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

@-webkit-keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px #9a8fff99; }
  50% { box-shadow: 0 0 35px #ad9bffcc; }
}

@-webkit-keyframes waveAnim {
  0%, 100% { -webkit-transform: translateY(0); opacity: 0.7; }
  50% { -webkit-transform: translateY(-6px); opacity: 1; }
}

/* Backdrop filter compatibility fix */
.alerta-construccion {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Gradient text compatibility */
.proximamente-msg {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* 3D Transformations */
.resource-flip {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transition: -webkit-transform 0.4s;
  transition: transform 0.4s;
}
.resource-flip:hover {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* General compatibility adjustments */
*, *::before, *::after {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .alerta-construccion {
    background-color: rgba(79,70,229,0.3);
  }
}

/* Gradient strict format */
body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
