
/*================= VARIABLES DE DISEÑO =================*/

:root {
  --bg: #0f0f0f;
  --text: #ffffff;
  --primary: #4f46e5;
  --secondary: #22c55e;
  --font-sans: 'DM Sans', system-ui, sans-serif;

  /* HERO SYSTEM */
  
  --surface: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(79,70,229,0.4);
  --text-muted: rgba(255,255,255,0.7);
}

/*================= BASE GLOBAL =================*/

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  padding-top: 70px;
  overflow-x: hidden;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform;
  filter: blur(6px);
  transition: all 0.8s ease;
  z-index: 1;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/*================= ESTRUCTURA GENERAL (HEADER, SECTION, CONTAINER) =================*/

section {
  padding: 80px 10%;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ================= NAVBAR ================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
}

/* LOGO */

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* LINKS */

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* CONTROLES DERECHA */

.right-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* IDIOMA */

.idioma {
  display: flex;
  align-items: center;
  gap: 10px;
}

.idioma button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.idioma button:hover {
  transform: scale(1.1);
}

.idioma img {
  width: 22px;
  height: 22px;
  object-fit: cover;
}

/* MENU TOGGLE */

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}

/* ================= HERO ================= */

#inicio {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 75px 10% 80px;
}

/* Fondo glow moderno */

.hero-bg {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(79,70,229,0.18),
      transparent 40%
    ),

    radial-gradient(
      circle at 80% 60%,
      rgba(34,197,94,0.08),
      transparent 45%
    );
}

/* CONTENIDO */

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* BADGE */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  margin-bottom: 25px;
  animation: fadeSlideUp 0.6s ease both;
}

/* punto animado */

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

/* TITULO */

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero-title em {
  color: var(--primary);
  font-style: italic;
}

/* SUBTEXTO */

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 35px;
  line-height: 1.6;
}

/* BOTONES */

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* PRIMARY */

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* SECONDARY */

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/*ANIMACIONES*/

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.7);
    opacity: 0.5;
  }
}

/*================= ABOUT =================*/



#sobre-mi {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/*Fondo glow*/

.about-bg {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(79,70,229,0.10),
      transparent 35%
    ),

    radial-gradient(
      circle at 15% 80%,
      rgba(34,197,94,0.06),
      transparent 40%
    );

  opacity: 0.9;
}

.sobremi-content {
  position: relative;
  z-index: 2;
}

#sobre-mi h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 80px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/*PHONE*/

.phone {
  width: 290px;  
  height: 530px;
  margin: 0px auto;
  border-radius: 40px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* TOP */

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
}

.phone-logo {
  font-size: 0.8rem;
  color: white;
}

.phone-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* SCREEN */

.phone-screen {
  flex: 1;
  padding: 16px;
  color: white;
  overflow-y: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* MENU */

.phone-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
}

.phone-menu button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: 0.25s ease;
}

.phone-menu button:hover {
  background: rgba(79,70,229,0.2);
  transform: translateY(-2px);
}

/*HOME*/

.home-logo {
  display: block;
  margin: 40px auto 0;
  width: 120px;   
  height: auto;
}

/*CURRICULUM*/

.cv-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-bottom: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

/* bloque icono + link */
.cv-download {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* icono */
.cv-download img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* link estilo botón */
.cv-download a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.3s;
}

.cv-download a:hover {
  background: rgba(79,70,229,0.2);
  color: var(--primary);
}

/*VIDEOCURRICULUM*/

.video-cv {
  width: 100%;
  max-width: 170px;
  border-radius: 12px;
  margin: 1px auto 0;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.video-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.video-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
  transition: 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-btn img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 50%;
}

.video-btn:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/*================= SKILLS =================*/

/*================= SKILLS =================*/

#skills {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Glow background */

.skills-bg {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(79,70,229,0.12),
      transparent 35%
    ),

    radial-gradient(
      circle at 80% 70%,
      rgba(34,197,94,0.07),
      transparent 40%
    );
}

/* CONTENT */

.skills-content {
  position: relative;
  z-index: 2;
}

/* TITLE */

#skills h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 15px;

  background: linear-gradient(
    90deg,
    #fff,
    rgba(255,255,255,0.65)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skills-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 70px;
}

/* GRID */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

/* CARD */

.skill-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);

  border-radius: 24px;

  padding: 35px 25px;

  text-align: center;

  backdrop-filter: blur(10px);

  transition: 0.35s ease;

  position: relative;

  overflow: hidden;
}

/* Glow hover */

.skill-card::before {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      135deg,
      rgba(79,70,229,0.15),
      transparent
    );

  opacity: 0;

  transition: 0.35s ease;
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card:hover {
  transform:
    translateY(-8px)
    scale(1.02);

  border-color: rgba(79,70,229,0.4);

  box-shadow:
    0 20px 50px rgba(0,0,0,0.35);
}

/* ICON */

.skill-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;

  margin-bottom: 20px;
}

/* TITLE */

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

/* CATEGORY */

.skill-card span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/*================= PROYECTOS =================*/

#proyectos {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

#proyectos h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 15px;
  background: linear-gradient(
    90deg,
    #fff,
    rgba(255,255,255,0.65)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* BACKGROUND */

.projects-bg {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(79,70,229,0.10),
      transparent 35%
    ),

    radial-gradient(
      circle at 80% 70%,
      rgba(34,197,94,0.06),
      transparent 40%
    );
}

/* CONTENT */

.projects-content {
  position: relative;
  z-index: 2;
}

.project-header {
  text-align: center;
  margin-bottom: 20px;
}

.project-header h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.project-media {
  display: flex;
  justify-content: center;
  margin: 25px 0;
}

.project-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  transition: transform 0.4s ease;
}

.project-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.project-links a {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;

  transition: 0.3s ease;
}

.project-links a:hover {
  transform: translateY(-3px);
  background: rgba(79,70,229,0.15);
  border-color: rgba(79,70,229,0.4);
}

/* TV WRAPPER */

.tv-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;

  margin-top: 80px;
}

/* SCREEN */

.tv-screen {
  width: 100%;
  max-width: 1000px;
  min-height: 550px;

  border-radius: 35px;

  background:
    rgba(255,255,255,0.03);

  border:
    1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(12px);

  overflow: hidden;

  position: relative;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.45);
}

.tv-screen:hover .project-media img {
  transform: scale(1.03);
}

/* INNER */

.tv-content {
  padding: 60px;

  animation: fadeTV 0.4s ease;
}

/* ARROWS */

.tv-arrow {
  width: 60px;
  height: 60px;

  border-radius: 50%;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.03);

  color: white;

  font-size: 1.5rem;

  cursor: pointer;

  transition: 0.3s ease;
}

.tv-arrow:hover {
  transform: scale(1.08);

  background:
    rgba(79,70,229,0.2);
}

/* TITLE */

.tv-content h3 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* IMAGE */

.tv-content img {
  width: 100%;
  border-radius: 24px;
  margin: 30px 0;
}

/* STACK */

.project-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-stack span {
  padding: 8px 14px;
  border-radius: 999px;

  background:
    rgba(255,255,255,0.05);

  border:
    1px solid rgba(255,255,255,0.08);

  font-size: 0.9rem;
}

/* ANIMATION */

@keyframes fadeTV {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/*================= FORMACION =================*/

#formacion {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

/* fondo glow coherente */
.education-bg {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(79,70,229,0.10),
      transparent 40%
    ),

    radial-gradient(
      circle at 70% 80%,
      rgba(34,197,94,0.06),
      transparent 45%
    );
}

.education-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* TITULO */
#formacion h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 60px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* CARD */
.education-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 30px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  text-align: left;
  transition: 0.3s ease;
}

.education-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79,70,229,0.4);
}

/* STATUS */
.education-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;

  font-size: 0.8rem;

  background: rgba(79,70,229,0.15);
  color: var(--primary);

  margin-bottom: 15px;
}

/* TITLE */
.education-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* TEXT */
.education-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* TAGS */
.education-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.education-tags span {
  padding: 6px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  font-size: 0.85rem;
}

/* FOOTER */
.education-footer {
  display: flex;
  justify-content: space-between;

  color: var(--text-muted);
  font-size: 0.9rem;
}

/*================= CONTACTO =================*/

.contact-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 20px;
}

#contacto h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 60px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* redes */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.social-links a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: 0.3s;
}

.social-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* formulario */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
  color: white;
  outline: none;
  transition: 0.3s;
  font-family: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.contact-form button {
  background: var(--primary);
  color: white;
  padding: 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.contact-form button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/*================= FOOTER ================= */

.footer {
  padding: 60px 10%;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* brand */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-brand span {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* texto */
.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* links */
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/*================= TOAST ================= */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 9999;
}

/* estado visible */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/*================= BOTON SUBIR =================*/

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;

  width: 48px;
  height: 48px;

  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);

  color: white;
  font-size: 1.2rem;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;

  transform: translateY(20px);

  transition: all 0.3s ease;

  z-index: 999;
}

/* visible */

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* hover */

#scrollTopBtn:hover {
  background: rgba(79,70,229,0.25);
  border-color: rgba(79,70,229,0.5);

  transform: translateY(-3px);
}

/*================= RESPONSIVE ================= */

/*NAVBAR*/

@media (max-width: 768px) {

  nav {
    padding: 15px 20px;
  }

  /* ocultar links desktop */
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: #111;
    flex-direction: column;
    padding: 40px;
    transition: 0.3s;
  }

  .nav-links.active {
    right: 0;
  }

  /* mostrar hamburguesa */
  .menu-toggle {
    display: block;
  }

  /*El idioma no se mueve raro*/

  .right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

/*TV MOVMIENTO*/

@media (max-width: 768px) {

  .tv-wrapper {
    gap: 10px;
  }

  .tv-screen {
    min-height: 500px;
    border-radius: 24px;
  }

  .tv-content {
    padding: 25px;
  }

  .tv-content h3 {
    font-size: 1.8rem;
  }

  .tv-arrow {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

}