/* =========================
   Lucía Portfolio — Clean CSS (FIXED)
   ========================= */

/* ===== Base / Tokens ===== */
:root{
  --bg: #f6f4f1;
  --ink: #1e1e1e;
  --muted: rgba(30,30,30,.62);
  --line: rgba(30,30,30,.18);
  --soft: rgba(30,30,30,.08);

  --container: 1120px;
  --header-h: 72px;

  --font-title: "Sora", ui-sans-serif;
  --font-body: "Sofia Sans", ui-sans-serif;

  --hero-name: clamp(64px, 7vw, 104px);
  --hero-role: clamp(30px, 3vw, 44px);

  --radius: 16px;
  --radius-lg: 18px;

  --ease: cubic-bezier(.2,.8,.2,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);

  /* ✅ única animación permitida */
  animation: pageFadeIn 0.4s var(--ease) both;
}

/* ❌ NUNCA animar main (esto rompía el menú) */
/* main { animation: ... } ← eliminado */

/* ===== Animación ===== */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

img{ max-width: 100%; display:block; }

.container{
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* ===== Header ===== */
.header{
  position: sticky;
  top: 0;
  z-index: 1000; /* 🔥 FIX */
  background: rgba(246,244,241,.92);
  backdrop-filter: blur(8px);
}

.header__inner{
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.header__rule{
  height: 1px;
  background: var(--line);
}

/* ===== Nav ===== */
.nav{
  justify-self: center;
  display:flex;
  gap: 34px;
}

.nav__link{
  position: relative;
  text-decoration: none;
  color: rgba(30,30,30,.45);
  padding: 6px 0;
  transition: color .25s ease;
}

.nav__link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.nav__link:hover{
  color: rgba(30,30,30,.95);
}
.nav__link:hover::after{
  transform: scaleX(1);
}

/* ===== Burger ===== */
.burger{
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
}

.burger__line{
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* ===== Mobile Menu ===== */
.mobileMenu{
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999; /* debajo del header */
}

.mobileMenu__nav{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobileMenu__link{
  font-size: 24px;
  text-decoration: none;
  color: var(--ink);
}

/* ===== FIX CLAVE ===== */
body.menu-open{
  overflow: hidden; /* ✅ NO usamos position fixed */
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .nav{
    display: none;
  }

  .burger{
    display: flex;
  }
}
