@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comforter Brush';
  src: url('assets/fonts/ComforterBrush-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --lila: #BEA1EA;
  --celeste: #A1CFEA;
  --gris: #252525;
  --blanco: #FFFFFF;

  --navbar-h: 84px;
  --footer-h: 76px;
  --section-pad-x: clamp(24px, 5vw, 96px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: var(--blanco);
  background-color: var(--gris);
  background-image: url('assets/wall.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
}

.font-script {
  font-family: 'Comforter Brush', cursive;
  font-weight: 400;
}

a {
  color: inherit;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  background: rgba(37, 37, 37, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(190, 161, 234, 0.2);
}

.logo {
  display: flex;
  align-items: center;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  text-decoration: none;
  color: var(--blanco);
}

.logo-x {
  font-size: 1.5em;
  line-height: 1;
  margin: 0 -0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.nav-link {
  font-size: 1rem;
  text-decoration: none;
  color: var(--blanco);
  opacity: 0.85;
  position: relative;
  padding-bottom: 4px;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link.active {
  opacity: 1;
  color: var(--lila);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lila);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--blanco);
}

/* ---------- Footer ---------- */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 96px);
  background: rgba(37, 37, 37, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(190, 161, 234, 0.2);
}

.footer-link {
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--blanco);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
  color: var(--celeste);
}

/* ---------- Section paging ---------- */
/* Cada sección es un panel independiente entre navbar y footer.
   El scroll de rueda solo mueve el contenido interno de la sección activa;
   cambiar de sección ocurre exclusivamente por click en el navbar (main.js). */

.scroll-container {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  bottom: var(--footer-h);
  overflow: hidden;
}

.section {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.section.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.section-heading {
  font-weight: 900;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  text-transform: uppercase;
  color: var(--blanco);
  margin-bottom: 1.25rem;
}

.section-heading .font-script {
  font-size: 1.4em;
  text-transform: none;
  color: var(--lila);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  width: 100%;
  padding: 0 var(--section-pad-x);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-signature {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  margin-bottom: 0.5rem;
}

.hero-signature .logo-x {
  font-size: 1.4em;
}

.hero-title {
  font-weight: 900;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  margin-top: 1rem;
}

/* ---------- Sobre mi ---------- */

.sobre-mi-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  padding: 56px var(--section-pad-x) 64px;
}

.sobre-mi-photo {
  position: sticky;
  top: 0;
}

.polaroid-collage {
  width: 100%;
  height: auto;
  transform: rotate(-5deg);
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.5));
}

.sobre-mi-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1rem;
}

.offscreen-note {
  margin-bottom: 1.5rem;
}

.label-heading {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lila);
  margin: 1.75rem 0 0.85rem;
}

.info-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.6rem;
  padding-left: 1rem;
  position: relative;
}

.info-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--lila);
}

.info-list strong {
  color: var(--blanco);
  font-weight: 700;
}

/* ---------- Proyectos ---------- */

.proyectos {
  padding: 56px var(--section-pad-x) 64px;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 32px);
  margin-top: 2rem;
}

.project-image.placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(190, 161, 234, 0.15), rgba(161, 207, 234, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: transform 0.25s ease;
}

.project-card:hover .project-image {
  transform: scale(1.02);
}

.project-title {
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 400;
}

/* ---------- Servicios ---------- */

.servicios {
  padding: 56px var(--section-pad-x) 64px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 32px);
  margin-top: 2rem;
}

.servicio-card {
  padding: 1.5rem;
  border: 1px solid rgba(190, 161, 234, 0.2);
  border-radius: 4px;
}

.servicio-card h3 {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--lila);
  margin-bottom: 0.6rem;
}

.servicio-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Contacto ---------- */

.contacto {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px var(--section-pad-x);
}

.contacto-invite {
  font-size: 1.25rem;
  margin: 1rem 0 2rem;
}

.cta-button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  border: 2px solid var(--lila);
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta-button:hover {
  background: var(--lila);
  color: var(--gris);
}

.contact-socials {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}

.contact-socials a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.contact-socials a:hover {
  opacity: 1;
  color: var(--celeste);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .sobre-mi-grid {
    grid-template-columns: 1fr;
  }

  .sobre-mi-photo {
    position: static;
    max-width: 320px;
    margin: 0 auto 2rem;
  }

  .proyectos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --navbar-h: 64px;
    --footer-h: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--navbar-h) - var(--footer-h));
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(37, 37, 37, 0.96);
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  body.nav-open .nav-links {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .footer {
    gap: clamp(16px, 6vw, 32px);
  }

  .footer-link {
    font-size: 0.8rem;
  }

  .proyectos-grid {
    grid-template-columns: 1fr;
  }
}
