/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
  --color-crema: #F5F3EE;
  --color-blanco: #FFFFFF;
  --color-negro: #1A1A1A;
  --color-gris-suave: #F0EEED;
  --color-gris-texto: #6B6B6B;

  --font-titulo: 'Playfair Display', serif;
  --font-cuerpo: 'DM Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  background-color: var(--color-crema);
  color: var(--color-negro);
  font-family: var(--font-cuerpo);
  cursor: none; /* Ocultamos cursor nativo — usaremos el nuestro */
}

/* ============================================
   CURSOR PERSONALIZADO
   ============================================ */
.cursor-ring {
  position: fixed;        /* Flota sobre toda la página */
  top: -16px;        /* la mitad de 32px — para centrarlo */
  left: -16px;       /* la mitad de 32px — para centrarlo */
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--color-negro);
  border-radius: 50%;     /* Lo hace círculo */
  pointer-events: none;   /* El anillo no "bloquea" los clics */
  z-index: 9999;          /* Encima de absolutamente todo */
  transition: border-color 0.4s ease;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.nav {
  position: fixed;        /* Se queda arriba aunque hagas scroll */
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  z-index: 100;
  mix-blend-mode: multiply; /* Se mezcla con el fondo — efecto sutil */
}

.nav-logo {
  font-family: var(--font-titulo);   /* Playfair para que se vea elegante grande */
  font-weight: 700;
  font-size: 4rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--color-negro);
  transition: font-size 0.4s ease,
              font-weight 0.4s ease;
}

.nav.scrolled .nav-logo {
  font-family: var(--font-cuerpo);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 3rem;  
}

.nav-links a {
  text-decoration: none;
  color: var(--color-negro);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   HERO
   ============================================ */
.section-hero {
  position: relative;     /* Punto de referencia para hijos absolutos */
  height: 100vh;
  overflow: hidden;       /* Evita que el doodle se salga en los bordes */  
  scroll-snap-align: start;
}

.section-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;  /* qué tan largo es el fade — ajusta */
  background: linear-gradient(to bottom, transparent, var(--color-blanco));
  z-index: 3;
  pointer-events: none
}

/* Fondo con parallax */
.hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-color: var(--color-crema);
  background-image:
    linear-gradient(rgba(26, 26, 26, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  will-change: transform;
}

/* Doodle decorativo */
.hero-doodle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  pointer-events: none;
  z-index: 10;
}

.hero-doodle img {
  width: 100%;
}



/* Contenido principal */
.hero-content {
  position: relative;    /* z-index funciona porque tiene position */
  z-index: 2;            /* Encima del fondo y el doodle */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4rem;
  will-change: transform;
}

.hero-counter {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-gris-texto);
  margin-bottom: 3rem;
}

.hero-title {
  font-family: var(--font-titulo);
  font-size: clamp(5rem, 12vw, 11rem); /* Se adapta al ancho del viewport */
  font-weight: 700;
  line-height: 0.9;       /* Líneas muy juntas — efecto editorial */
  margin-bottom: 2rem;
}

.hero-title-line1 {
  display: block;
  padding-left: 0;        /* MIGUEL — pegado a la izquierda */
}

.hero-title-line2 {
  display: block;
  padding-left: 8rem;     /* TORRES — desplazada a la derecha */
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--color-gris-texto);
  text-transform: uppercase;
  padding-left: 0.25rem;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  letter-spacing: 0.2em;
  color: var(--color-negro);
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 5;
}

/* ============================================
   ABOUT
   ============================================ */
.section-about {
  position: relative;
  min-height: auto;
  background-color: var(--color-blanco);
  padding: 8rem 4rem; 
  scroll-snap-align: start; 
}


.about-counter {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-gris-texto);
  margin-bottom: 5rem;
  text-align: right;
}

.about-inner {
  display: flex;
  align-items: flex-start;
  gap: 8rem;
  max-width: 1200px;
}

.about-photo-col {
  flex-shrink: 0;
  width: 380px;
}

.about-photo-wrapper::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--color-negro);
  z-index: 0;
  transition: border-color 0.6s ease;
}

.about-photo-ghost {
  width: 380px;
  height: 480px;
}

.about-photo-wrapper {
  position: absolute;
  top: 13rem;      /* misma posición visual que tendría en el flujo */
  left: 4rem;      /* mismo padding que la sección */
  width: 380px;
  height: 480px;
  z-index: 10;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(8%);
}

.about-text-col {
  flex: 1;
  padding-top: 1rem;
}

.about-title {
  font-family: var(--font-titulo);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
}

.about-meta span {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gris-texto);
}

.about-bio {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-negro);
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.about-tags span {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-negro);
}


/* ============================================
   PROYECTOS — SCROLL HORIZONTAL
   ============================================ */

.section-projects {
  height: auto; /* Alta para "atrapar" el scroll vertical */
  background-color: var(--color-crema);
  position: relative;
}

.section-projects::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, var(--color-blanco), transparent);
  z-index: 2;
  pointer-events: none;
}


.projects-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden; /* El track se mueve pero no desborda */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4rem;
}

.projects-header {
  margin-bottom: 3rem;
}

.projects-counter {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-gris-texto);
  margin-bottom: 0.75rem;
  text-align: center;
}

.projects-title {
  font-family: var(--font-titulo);
  font-size: clamp(2rem, 6vw, 8rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.projects-track {
  display: flex;
  gap: 2.5rem;
  will-change: transform; /* El JS va a mover esto */
}

/* ---- TARJETA ---- */
.project-card {
  flex-shrink: 0;
  width: 750px;          /* Ancha como ficha */
  height: 340px;         /* Altura fija — proporción horizontal */
  background-color: var(--color-blanco);
  position: relative;
  display: flex;         /* Imagen izquierda, texto derecha */
  flex-direction: row;
}

/* Peso físico — borde desplazado igual que la foto del About */
.project-card::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--color-negro);
  z-index: 0;
  transition: bottom 0.3s ease, right 0.3s ease;
}

.project-card:hover::after {
  bottom: -6px;
  right: -6px;
}

/* ---- IMAGEN ---- */
.project-img-wrapper {
  width: 320px;          /* Mitad izquierda */
  height: 100%;          /* Ocupa toda la altura de la tarjeta */
  flex-shrink: 0;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.project-card:hover .project-img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

/* ---- CUERPO ---- */
.project-body {
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  background-color: var(--color-blanco);
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra el texto verticalmente */
}

.project-num {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-gris-texto);
  display: block;
  margin-bottom: 0.75rem;
}

.project-name {
  font-family: var(--font-titulo);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-gris-texto);
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-negro);
}

.project-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-negro);
  text-decoration: none;
  border-bottom: 1px solid var(--color-negro);
  padding-bottom: 0.15rem;
  transition: opacity 0.3s ease;
}

.project-link:hover {
  opacity: 0.4;
}

/* ============================================
   SKILLS
   ============================================ */
.section-skills {
  display: flex;
  align-items: flex-start;
  gap: 0;
  background-color: var(--color-crema);
  padding: 0;
  min-height: 100vh;
  }

/* — Columna izquierda — sticky — */
.skills-left {
  position: sticky;
  top: 0;
  width: 40%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 4rem;
  flex-shrink: 0;
}

.skills-counter {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--color-gris-texto);
  margin-bottom: 2rem;
}

.skills-title {
  font-family: var(--font-titulo);
  font-size: clamp(3.5rem, 6vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 2rem;
}

.skills-tagline {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-gris-texto);
  letter-spacing: 0.03em;
}

/* — Columna derecha — lista — */
.skills-right {
  flex: 1;
  padding: 40rem 4rem 15rem 0;
  margin-left: 0%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* — Cada fila de skill — */
.skill-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-row:first-child {
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}

/* Estado visible — JS lo agrega */
.skill-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-index {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--color-gris-texto);
}

.skill-name {
  font-family: var(--font-titulo);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
}

.skill-category {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gris-texto);
}




/* ============================================
   CONTACTO
   ============================================ */
.section-contact {
  position: relative;
  min-height: 100vh;
  background-color: #2A2A2A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 4rem;
}

.contact-counter {
  position: absolute;
  top: 4rem;
  left: 4rem;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.3);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3rem;
}

.contact-label {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.contact-email {
  font-family: var(--font-titulo);
  font-size: clamp(2rem, 5vw, 5.5rem);
  font-weight: 700;
  color: var(--color-blanco);
  text-decoration: none;
  line-height: 1;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-email:hover {
  border-color: var(--color-blanco);
  color: rgba(255, 255, 255, 0.7);
}

.contact-links {
  display: flex;
  gap: 3rem;
}

.contact-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--color-blanco);
}

.contact-footer {
  position: absolute;
  bottom: 3rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 4rem;
}

.contact-footer span {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}


@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}