/* ============================================================
   MARCOS MAIZÓN — Actor · hoja de estilos
   Paleta: fondo carbón + blanco cálido + dorado
   ============================================================ */

:root {
  --bg:        #131110;   /* carbón cálido */
  --bg-2:      #1a1715;   /* superficie */
  --bg-3:      #221e1a;   /* superficie elevada */
  --text:      #F3EEE6;   /* blanco cálido */
  --muted:     #9d948a;   /* texto secundario */
  --gold:      #C9A24B;   /* dorado (acento) */
  --gold-soft: #E2C578;   /* dorado claro (hover) */
  --line:      rgba(201, 162, 75, 0.28);
  --line-soft: rgba(243, 238, 230, 0.10);

  --nav-w: 300px;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #14110c; }

/* Grano/textura de fondo ------------------------------------ */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LAYOUT: contenido izq. + nav vertical der.
   ============================================================ */
.layout { position: relative; z-index: 1; padding-right: var(--nav-w); }

.content {
  max-width: 1700px;
  margin: 0 auto;               /* centrado en el espacio libre del menú */
  padding: 0 clamp(1.5rem, 5vw, 5.5rem);
}

/* ============================================================
   NAV VERTICAL (derecha)
   ============================================================ */
.sidenav {
  position: fixed; top: 0; right: 0; z-index: 30;
  width: var(--nav-w); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 2.4rem 2rem;
  background: linear-gradient(180deg, var(--bg-2), #141110);
  border-left: 1px solid var(--line);
}

.sidenav__brand { display: block; padding-bottom: 2rem; border-bottom: 1px solid var(--line-soft); }
.sidenav__brand-name {
  font-family: var(--serif); font-weight: 700; font-size: 1.9rem;
  line-height: 1.05; letter-spacing: 0.01em; color: var(--text);
}
.sidenav__brand-role {
  display: block; margin-top: 0.6rem;
  font-size: 0.68rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold);
}

.sidenav__menu { list-style: none; margin: 2.2rem 0; flex: 1; }
.sidenav__menu li { margin: 0.15rem 0; }
.sidenav__menu a {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.75rem 0.4rem;
  font-size: 1.02rem; color: var(--muted);
  border-left: 2px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease), padding-left .3s var(--ease);
}
.sidenav__menu a em {
  font-style: normal; font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--gold); opacity: 0.55; min-width: 1.4em;
}
.sidenav__menu a:hover,
.sidenav__menu a.is-active {
  color: var(--text); border-color: var(--gold); padding-left: 0.9rem;
}
.sidenav__menu a.is-active em { opacity: 1; }

.lang-label {
  display: block; margin-bottom: 0.55rem;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); opacity: 0.75;
}
.sidenav__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.75rem; border-top: 1px solid var(--line-soft);
}
.lang-switch {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.15em;
  padding: 0.3rem 0;
}
.lang-switch .sep { margin: 0 0.4rem; opacity: 0.4; }
.lang-switch [data-lang].active { color: var(--gold); }
.sidenav__social { display: flex; gap: 0.9rem; }
.sidenav__social a {
  font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted);
  transition: color .3s;
}
.sidenav__social a:hover { color: var(--gold); }

/* Botón menú móvil ------------------------------------------ */
.nav-toggle {
  position: fixed; top: 1.2rem; right: 1.2rem; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
}
.nav-toggle span {
  width: 20px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 0.85fr 1fr;
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: 6rem 0 4rem;
  position: relative;
  max-width: 1040px; margin: 0 auto;   /* portada a tamaño contenido, centrada */
}
.hero__photo { position: relative; }
.hero__photo img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  filter: grayscale(0.15) contrast(1.02);
  position: relative; z-index: 1;
}
.hero__photo-frame {
  position: absolute; inset: 0;
  transform: translate(18px, 18px);
  border: 1px solid var(--gold); z-index: 0;
}

.hero__name {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(3.2rem, 9vw, 7rem); line-height: 0.92;
  letter-spacing: -0.01em;
}
.hero__name span { display: block; }
.hero__name .accent {
  color: var(--gold); font-style: italic; font-weight: 600;
}
.hero__tagline {
  margin-top: 1.6rem; max-width: 30ch;
  font-size: 1.05rem; color: var(--muted);
}
.hero__cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 0;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint svg { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(5px);} }

/* Overline reutilizable ------------------------------------- */
.overline {
  font-size: 0.72rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold);
}

/* Botones ---------------------------------------------------- */
.btn {
  display: inline-block; cursor: pointer;
  padding: 0.85rem 1.7rem;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid transparent; transition: all .3s var(--ease);
}
.btn--gold { background: var(--gold); color: #17130b; border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: translateY(-2px); }
.btn--ghost { color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   SECCIONES genéricas
   ============================================================ */
.section { padding: clamp(4rem, 10vw, 8rem) 0; border-top: 1px solid var(--line-soft); }
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.section__num {
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--gold);
}
.section__title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1;
}
.section__intro { max-width: 46ch; color: var(--muted); margin-bottom: 2.5rem; }

/* Sobre mí --------------------------------------------------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about__body p { margin-bottom: 1.2rem; color: #cfc7bc; }
.about__body .lead {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.5; color: var(--text); font-weight: 400;
}
.about__facts { list-style: none; border-top: 1px solid var(--line); }
.about__facts li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
}
.fact__k { color: var(--muted); letter-spacing: 0.04em; }
.fact__v { color: var(--text); }

/* Videobook -------------------------------------------------- */
.video-frame {
  position: relative; width: 100%; max-width: 1040px; margin: 0 auto; aspect-ratio: 16/9;
  background: var(--bg-2); border: 1px solid var(--line);
  overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; color: var(--muted);
  background:
    radial-gradient(circle at center, rgba(201,162,75,0.06), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,0.012) 14px 28px);
}
.video-placeholder svg { color: var(--gold); }
.video-placeholder p { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* Sección Fotos: menos espacio arriba/abajo para que quepan todas */
#fotos { padding-top: clamp(2rem, 5vh, 3.5rem); padding-bottom: clamp(3rem, 6vh, 5rem); }

/* Galería (composición según boceto: alta a la izq. + 2 arriba + ancha abajo) */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.85fr;
  grid-template-rows: 1.35fr 1fr;
  gap: 0.7rem;
  width: 100%;
  height: clamp(380px, 66vh, 660px);       /* grande, adaptada a la pantalla */
}
.gallery__item {
  position: relative; padding: 0; border: none; cursor: pointer;
  background: var(--bg-2); overflow: hidden;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  display: block;
  transition: transform .6s var(--ease);
}
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid transparent; transition: border-color .3s;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item:hover::after { border-color: var(--gold); }

/* La foto "principal" es horizontal y al recortarla queda algo descentrada:
   desplazamos el encuadre a la izquierda para centrar el cuerpo. */
img[src*="Perfil2"] { object-position: 43% 22%; }

/* Colocación según el boceto */
.g-big   { grid-column: 1; grid-row: 1 / span 2; }   /* Frente2 — alta a la izquierda */
.g-strip { grid-column: 2; grid-row: 1 / span 2; }   /* Principal — grande en el centro */
.g-tr    { grid-column: 3; grid-row: 1; }            /* Frente — arriba derecha */
.g-br    { grid-column: 3; grid-row: 2; }            /* Perfil — abajo derecha */

/* CV --------------------------------------------------------- */
.cv { max-width: 1300px; }
.cv__block { margin-bottom: 2.6rem; break-inside: avoid; }
/* En pantallas grandes, las categorías del CV se reparten en 2 columnas */
@media (min-width: 1100px) {
  #cvBlocks { column-count: 2; column-gap: 4rem; }
}
.cv__cat {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
}
.cv__list { list-style: none; }
.cv__list li {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.cv__year { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 0.95rem; }
.cv__role { color: #cfc7bc; font-size: 0.98rem; }
.cv__role b { color: var(--text); font-weight: 500; }
.cv__dir { color: var(--muted); }
.cv__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cv__tags li {
  padding: 0.5rem 1rem; font-size: 0.85rem; color: #d8d0c5;
  border: 1px solid var(--line); border-radius: 100px;
}
.cv__download { margin-top: 1rem; }

/* Contacto --------------------------------------------------- */
.contact { display: block; }
.contact__lead {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.5; margin-bottom: 2rem;
}
.contact__list { list-style: none; margin-bottom: 2rem; }
.contact__list li {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft);
}
.contact__k { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.contact__list a:hover { color: var(--gold); }
.contact__social { display: flex; gap: 1.5rem; }
.contact__social a {
  font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted);
  padding-bottom: 3px; border-bottom: 1px solid transparent; transition: all .3s;
}
.contact__social a:hover { color: var(--gold); border-color: var(--gold); }

.contact__form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact__form label { display: flex; flex-direction: column; gap: 0.45rem; }
.contact__form span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.contact__form input,
.contact__form textarea {
  background: var(--bg-2); border: 1px solid var(--line-soft);
  color: var(--text); font-family: var(--sans); font-size: 0.95rem;
  padding: 0.85rem 1rem; resize: vertical; transition: border-color .3s;
}
.contact__form input:focus,
.contact__form textarea:focus { outline: none; border-color: var(--gold); }
.contact__form .btn { align-self: flex-start; margin-top: 0.3rem; }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: 4rem; padding-top: 1.8rem;
  font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted);
}

/* ============================================================
   Animación de entrada (reveal)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(10, 8, 6, 0.94); padding: 4vw;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--line); }
.lightbox__actions {
  position: absolute; top: 2.2vw; right: 2.5vw; z-index: 2;
  display: flex; align-items: center; gap: 0.4rem;
}
.lightbox__btn {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(243, 238, 230, 0.06); border: 1px solid var(--line-soft);
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: color .3s, background .3s, border-color .3s;
}
.lightbox__btn:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,162,75,0.10); }
.lightbox__close { font-size: 2rem; line-height: 1; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text);
  cursor: pointer; font-size: 3.5rem; padding: 0 1.5rem; transition: color .3s;
}
.lightbox__prev { left: 1vw; } .lightbox__next { right: 1vw; }
.lightbox__nav:hover { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --nav-w: 0px; }
  .content { margin-right: 0; }
  .nav-toggle { display: flex; }

  .sidenav {
    transform: translateX(100%); width: min(320px, 82vw);
    transition: transform .45s var(--ease); box-shadow: -30px 0 60px rgba(0,0,0,0.5);
  }
  .sidenav.is-open { transform: translateX(0); }

  .hero { grid-template-columns: 1fr; gap: 2.5rem; text-align: left; }
  .hero__photo { max-width: 340px; }
  .about, .contact { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; }
  .gallery__item { grid-column: auto; grid-row: auto; height: auto; aspect-ratio: 3/4; }
  .g-big   { grid-column: 1 / span 2; aspect-ratio: 4/3; }
  .g-strip { grid-column: 1 / span 2; aspect-ratio: 16/8; }
  .cv__list li { grid-template-columns: 4rem 1fr; gap: 0.7rem; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { text-align: center; }
}

/* Accesibilidad: menos movimiento --------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
