/* ---------- Fuente (alojada en el propio servidor, sin llamadas a Google) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
}

/* ---------- Tokens: paleta natural ---------- */
:root {
  --bg: #f7f5f0;          /* blanco natural */
  --stone: #eeebe3;       /* piedra clara */
  --sage-light: #e2e8de;  /* salvia muy suave */
  --sand: #d8cfbf;        /* arena */
  --line: rgba(43, 47, 42, 0.12);

  --text: #2b2f2a;        /* grafito verdoso */
  --muted: #676c65;
  --sage: #5d7a64;        /* verde salvia (acento) */
  --sage-deep: #465e4c;

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--sans); margin: 0; line-height: 1.12; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 300; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: normal; color: var(--sage); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 4px; }

.kicker {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1rem;
}
.section { padding-block: clamp(80px, 11vw, 140px); }
.section-alt { background: var(--stone); }
.section-sage { background: var(--sage-light); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- Botones ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); }
.btn-outline { border: 1px solid rgba(43, 47, 42, 0.3); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.cv-btn { margin-top: 2.2rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sage); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: #fff; background: var(--sage); padding: 8px 18px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--sage-deep); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 1.5px; background: var(--text); margin: 6px 0; transition: transform .3s; }
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage); margin-bottom: 1.6rem; }
.hero h1 { font-size: clamp(3.4rem, 9vw, 7.2rem); font-weight: 300; line-height: 0.95; letter-spacing: -0.05em; margin-bottom: 2rem; }
.lead { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 300; line-height: 1.4; letter-spacing: -0.01em; max-width: 30ch; margin-bottom: 1.2rem; }
.roles { color: var(--muted); font-size: 0.93rem; max-width: 48ch; margin-bottom: 2.2rem; }
.roles span { color: var(--sand); padding-inline: 4px; }

/* Fotos: si la imagen no existe se ve un monograma */
.photo {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--radius);
  background: var(--sage-light); max-width: 100%;
}
.photo::before {
  content: attr(data-initials);
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 200 clamp(4rem, 10vw, 7rem)/1 var(--sans); color: rgba(93, 122, 100, 0.3);
}
.photo img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.photo-hero { aspect-ratio: 4 / 5; }
.photo-hero img { object-position: 53% 50%; }

.stats {
  list-style: none; padding: 0; margin: clamp(48px, 7vw, 88px) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.stats li { padding: 28px 24px 0 0; display: flex; flex-direction: column; gap: 6px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats strong { font-size: clamp(2.4rem, 4.6vw, 3.4rem); font-weight: 200; line-height: 1; letter-spacing: -0.04em; color: var(--sage); }
.stats span { color: var(--muted); font-size: 0.9rem; max-width: 24ch; }

/* ---------- Logos ---------- */
.logos-band { padding-block: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos-title { text-align: center; color: var(--muted); margin-bottom: clamp(28px, 4vw, 48px); }
.logos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 36px 28px;
}
.logos li { display: flex; align-items: center; justify-content: center; height: 60px; }
/* Todos en un mismo tono gris para que el conjunto se vea sobrio y uniforme */
.logos img {
  height: 26px; width: auto; max-width: 120px; object-fit: contain;
  filter: brightness(0); opacity: 0.55; transition: opacity .3s;
}
.logos img.logo-sm { height: 18px; }
.logos img.logo-lg { height: 40px; }
.logos li:hover img { opacity: 0.9; }

/* ---------- Sobre mí ---------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.photo-portrait { aspect-ratio: 4 / 5; }
.photo-portrait img { object-position: 46% 50%; }
.about-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 1.6rem; }
.about-text p { color: var(--muted); max-width: 58ch; }

/* ---------- Áreas ---------- */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area { background: var(--bg); border-radius: var(--radius); padding: 34px 30px 30px; }
.area:first-child { background: var(--sage); color: #fff; }
.area:first-child p { color: rgba(255, 255, 255, 0.82); }
.area:first-child .area-tag, .area:first-child .area-num { color: rgba(255, 255, 255, 0.7); }
.area-num { display: block; font-size: 0.85rem; font-weight: 500; color: var(--sage); margin-bottom: 40px; letter-spacing: 0.04em; }
.area-tag { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.5rem; }
.area h3 { font-size: 1.55rem; font-weight: 500; margin-bottom: 1rem; }
.area p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- Galería ---------- */
.section-gallery { padding-block: clamp(20px, 3vw, 40px); }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.g-item { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--stone); }
.g-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.g-item:hover img { transform: scale(1.03); }
.g1 { grid-column: span 7; aspect-ratio: 3 / 2; }
.g2 { grid-column: span 5; grid-row: span 2; }
.g2 img { object-position: 50% 20%; }
.g3 { grid-column: span 7; aspect-ratio: 3 / 2; }
.g4 { grid-column: span 4; aspect-ratio: 1; }
.g4 img { object-position: 72% 50%; }
.g5 { grid-column: span 4; aspect-ratio: 1; }
.g5 img { object-position: 55% 50%; }
.g6 { grid-column: span 4; aspect-ratio: 1; }

/* ---------- Cine y series ---------- */
.films { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.film {
  display: grid; grid-template-columns: 90px 1fr 1fr; gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .3s;
}
.film:hover { padding-left: 10px; }
.film-year { font-size: 0.9rem; font-weight: 500; color: var(--sage); font-variant-numeric: tabular-nums; }
.film h3 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 400; letter-spacing: -0.02em; }
.film h3 .amp { color: var(--sage); }
.film-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Trayectoria ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  display: grid; grid-template-columns: 180px 1fr; gap: 32px;
  padding: 34px 0; border-top: 1px solid var(--line);
}
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.tl-date { font-size: 0.9rem; font-weight: 500; color: var(--sage); margin: 0; padding-top: 0.2em; font-variant-numeric: tabular-nums; }
.tl-body h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 500; margin-bottom: 0.4rem; }
.tl-org { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.tl-body > p:not(.tl-org) { color: var(--muted); max-width: 70ch; }
.tl-list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 72ch; }
.tl-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.96rem; }
.tl-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--sage); }
.tl-list strong { color: var(--text); font-weight: 600; }

/* ---------- Formación ---------- */
.formacion-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(48px, 8vw, 110px); }
.formacion-grid h2 { margin-bottom: 2rem; }
.edu { display: grid; gap: 12px; }
.edu article { background: var(--bg); border-radius: var(--radius); padding: 24px 28px; }
.edu-date { font-size: 0.85rem; font-weight: 500; color: var(--sage); margin-bottom: 0.4rem; }
.edu h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.edu article p:last-child { color: var(--muted); margin: 0; font-size: 0.95rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border-radius: 999px; padding: 8px 16px; font-size: 0.9rem; background: var(--bg); color: var(--text); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.contact-intro { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 300; line-height: 1.45; max-width: 36ch; margin-bottom: 1.2rem; color: var(--muted); }
.contact-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 300; letter-spacing: -0.05em; line-height: 1; margin-bottom: 2.4rem; color: var(--sage-deep); }
.contact-place { margin: 2rem 0 0; color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.photo-contact { aspect-ratio: 4 / 5; }
.photo-contact img { object-position: 72% 40%; }

/* ---------- Footer ---------- */
.site-footer { color: var(--muted); border-top: 1px solid var(--line); font-size: 0.88rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 28px; }
.footer-inner p { margin: 0; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* ---------- Animación de aparición (solo con JS y sin "reducir movimiento") ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
  .js .reveal.visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .film, .g-item img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; width: 100%; font-size: 1.05rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav .nav-cta { background: none; color: var(--sage); border-radius: 0; padding: 14px 0; }
  .nav .nav-cta:hover { background: none; color: var(--sage-deep); }

  .hero-grid, .about-grid, .formacion-grid, .contact-grid { grid-template-columns: 1fr; }
  .photo-hero { max-width: 460px; }
  .photo-portrait, .photo-contact { max-width: 420px; }
  .areas { grid-template-columns: 1fr; }
  .film { grid-template-columns: 70px 1fr; }
  .film-meta { grid-column: 2; }
  .timeline > li { grid-template-columns: 1fr; gap: 6px; }
  .logos { grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g1, .g3 { grid-column: span 2; aspect-ratio: 3 / 2; }
  .g2 { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 5; }
  .g4, .g5 { grid-column: span 1; aspect-ratio: 1; }
  .g6 { grid-column: span 2; aspect-ratio: 3 / 2; }
}
@media (max-width: 600px) {
  .brand-name { display: none; }
  .logos { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
  .logos li { height: 48px; }
  .logos img { height: 20px; max-width: 92px; }
  .logos img.logo-sm { height: 14px; }
  .logos img.logo-lg { height: 32px; }
  .stats { grid-template-columns: 1fr; }
  .stats li, .stats li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: baseline; gap: 16px; }
  .stats strong { min-width: 2.6ch; }
  .film { grid-template-columns: 1fr; gap: 4px; }
  .film-meta { grid-column: auto; }
  .area { padding: 28px 22px; }
  .edu article { padding: 20px 22px; }
}
