/* Variables y estilos base */
:root {
  --primary-color: #0a0a0a;
  --secondary-color: #1a1a1a;
  --accent-color: #4a9eff;
  --text-color: #ffffff;
  --card-bg: rgba(20, 20, 20, 0.8);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shine: rgba(74, 158, 255, 0.08);
  --card-shadow: rgba(0, 0, 0, 0.8);
  --card-scale: 1;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Fondo animado */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(74, 158, 255, 0.15) 0%,
      transparent 70%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(74, 158, 255, 0.15) 0%,
      transparent 70%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(74, 158, 255, 0.03) 0%,
      rgba(74, 158, 255, 0.03) 1px,
      transparent 1px,
      transparent 15px
    );
  pointer-events: none;
  animation: backgroundMove 15s ease infinite alternate;
  z-index: -1;
}

@keyframes backgroundMove {
  0% {
    background-position: 0% 0%, 100% 100%, 0 0;
  }
  100% {
    background-position: 100% 100%, 0% 0%, 50px 50px;
  }
}

/* Estructura principal */
.content-wrapper {
  position: relative;
  overflow: hidden;
}

.content-wrapper section {
  position: relative;
  padding: 4rem 0;
  margin: 0;
  width: 100%;
  transform: translateZ(0);
  will-change: transform;
}

/* Header */
.site-header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 50%,
      var(--accent-color) 0%,
      transparent 50%
    ),
    radial-gradient(circle at 70% 50%, var(--accent-color) 0%, transparent 50%);
  opacity: 0.03;
  pointer-events: none;
  filter: blur(60px);
}

.header-content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8rem;
  position: relative;
  z-index: 1;
  padding: 0 2rem;
}

/* Botón Ver Proyectos */
.scroll-down {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.9;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
  z-index: 10;
  background: rgba(74, 158, 255, 0.1);
  padding: 1rem 2rem;
  border-radius: 30px;
  border: 1px solid rgba(74, 158, 255, 0.2);
  backdrop-filter: blur(5px);
}

.scroll-down span {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scroll-down svg {
  width: 24px;
  height: 24px;
}

.scroll-down:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

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

/* Contenido del header */
.site-title {
  flex: 1;
  max-width: 600px;
}

.main-title {
  font-size: 5rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--accent-color), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: none;
  letter-spacing: -2px;
  line-height: 1;
  position: relative;
}

.main-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.subtitle {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 400;
  margin-top: 2rem;
  opacity: 0.8;
  max-width: 500px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Tarjeta 3D */
.card-container {
  width: min(420px, 100%);
  aspect-ratio: 420/240;
  perspective: 1500px;
  position: relative;
  flex-shrink: 0;
}

.card-container::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: linear-gradient(
    45deg,
    var(--accent-color) 0%,
    transparent 20%,
    transparent 80%,
    var(--accent-color) 100%
  );
  opacity: 0.1;
  filter: blur(20px);
  border-radius: 20px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  background: var(--card-bg);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  overflow: hidden;
  will-change: transform;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 10px
  );
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from calc(var(--rotation, 0deg)),
    transparent,
    rgba(255, 255, 255, 0.2) 45deg,
    rgba(255, 255, 255, 0.4) 90deg,
    rgba(255, 255, 255, 0.2) 135deg,
    transparent 180deg
  );
  opacity: 0.6;
  transition: opacity 0.3s;
  transform-origin: center;
  mix-blend-mode: soft-light;
  pointer-events: none;
  filter: blur(3px);
}

.card-content {
  padding: 1rem;
  transform: translateZ(80px);
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 480px) {
  .card-content {
    grid-template-columns: 70px 1fr;
    padding: 0.75rem;
    gap: 0.75rem;
  }
}

.profile-section {
  position: relative;
}

.profile-section::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
      90deg,
      transparent 40%,
      rgba(74, 158, 255, 0.08),
      transparent 60%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(74, 158, 255, 0.05) 0%,
      rgba(74, 158, 255, 0.05) 5%,
      transparent 5%,
      transparent 10%
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(74, 158, 255, 0.05) 0%,
      rgba(74, 158, 255, 0.05) 5%,
      transparent 5%,
      transparent 10%
    );
  border: 1px solid rgba(74, 158, 255, 0.15);
  border-radius: 12px;
  animation: hologram 4s linear infinite;
  opacity: 0.1;
  transition: opacity 0.3s;
}

.card:hover .profile-section::after {
  opacity: 0.2;
}

@keyframes hologram {
  0% {
    background-position: 0% 0%, 0 0, 0 0;
  }
  100% {
    background-position: 200% 0%, 10px 10px, -10px -10px;
  }
}

.profile-section .hologram-container {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: linear-gradient(
    45deg,
    transparent,
    var(--card-shine) 50%,
    transparent
  );
  opacity: 0.5;
  box-shadow: inset 0 0 15px var(--card-shine);
  overflow: hidden;
}

.profile-section::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent-color);
  border-right: none;
  border-bottom: none;
  opacity: 0.5;
}

.profile-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  margin: 0;
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.card-info {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

h1 {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  margin-bottom: 0.3rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.title {
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  color: #888;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-details {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  color: #888;
  position: relative;
  padding-top: 0.5rem;
  border-top: 1px solid var(--card-border);
}

.detail {
  position: relative;
  padding-left: 1rem;
  display: flex;
  gap: 0.5rem;
}

.detail span {
  color: var(--accent-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: clamp(0.65rem, 1.8vw, 0.75rem);
  letter-spacing: 1px;
}

.detail::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  opacity: 0.5;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.2);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(74, 158, 255, 0.2);
  transform: translateY(-2px);
}

.social-link img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* Proyectos */
.projects {
  margin-bottom: 2rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--accent-color);
}

.projects > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

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

.project-card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  border: 1px solid rgba(100, 255, 218, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(100, 255, 218, 0.05);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3),
    inset 0 0 30px rgba(100, 255, 218, 0.1);
  border-color: rgba(100, 255, 218, 0.2);
}

.project-content h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.project-content p {
  color: #999;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.project-tags .tag-with-icon {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-with-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.location {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-style: italic;
  opacity: 0.8;
}

/* Experiencia */
.experience .timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.experience .timeline::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-color), transparent);
  border-radius: 4px;
}

.experience .timeline-item {
  margin-bottom: 3rem;
  position: relative;
  opacity: 0;
  animation: slideIn 0.5s ease forwards;
}

.experience .timeline-content {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  position: relative;
  border: 1px solid rgba(100, 255, 218, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.experience .timeline-content::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-color);
}

.experience .timeline-content::after {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 1.85rem;
  width: 1rem;
  height: 2px;
  background: var(--accent-color);
}

/* Educación */
.education .timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-right: 2rem;
}

.education .timeline::before {
  content: "";
  position: absolute;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to top, var(--accent-color), transparent);
  border-radius: 4px;
}

.education .timeline-item {
  margin-bottom: 3rem;
  position: relative;
  opacity: 0;
  animation: slideIn 0.5s ease forwards;
  text-align: right;
}

.education .timeline-content {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  position: relative;
  border: 1px solid rgba(100, 255, 218, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.education .timeline-content::before {
  content: "";
  position: absolute;
  right: -2.5rem;
  top: 1.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-color);
}

.education .timeline-content::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  top: 1.85rem;
  width: 1rem;
  height: 2px;
  background: var(--accent-color);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

.timeline-content p {
  color: #999;
  line-height: 1.6;
}

.date {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .header-content {
    flex-direction: column;
    gap: 4rem;
    text-align: center;
    margin-top: 0;
    align-items: center;
  }

  .site-title {
    max-width: 100%;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }

  .main-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .subtitle {
    margin: 2rem auto;
    text-align: center;
  }

  .scroll-down {
    display: none;
  }
}

@media (max-width: 768px) {
  .experience .timeline,
  .education .timeline {
    padding: 0 0 0 2rem;
  }

  .education .timeline::before {
    left: 0;
    right: auto;
  }

  .education .timeline-item {
    text-align: left;
  }

  .education .timeline-content::before {
    left: -2.5rem;
    right: auto;
  }

  .education .timeline-content::after {
    left: -1.5rem;
    right: auto;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 4rem 1rem 6rem 1rem;
  }

  .scroll-down {
    bottom: 3rem;
    padding: 0.75rem 1.5rem;
  }

  .main-title {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .header-content {
    gap: 3rem;
    padding: 0 1rem;
  }
}
