/* ===== Variables ===== */
:root {
  --bg: #f6f4ef;
  --bg-alt: #efece4;
  --ink: #1d1b18;
  --ink-soft: #5a564f;
  --line: #d9d4c8;
  --accent: #8a5a3c;
  --white: #fffdf9;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, sans-serif;
  --max: 1240px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

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

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  padding-top: 1rem; padding-bottom: 1rem;
  box-shadow: 0 1px 0 var(--line);
}
/* Sobre la foto del hero: texto claro */
.nav:not(.is-scrolled) {
  background: linear-gradient(to bottom, rgba(0,0,0,.36), rgba(0,0,0,0));
}
.nav:not(.is-scrolled) .nav__brand { color: #fff; }
.nav:not(.is-scrolled) .nav__toggle span { background: #fff; }
@media (min-width: 761px) {
  .nav:not(.is-scrolled) .nav__links a { color: rgba(255,255,255,.9); }
  .nav:not(.is-scrolled) .nav__links a:hover { color: #fff; }
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
}
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: relative;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--accent);
  transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav__toggle span { width: 24px; height: 1.5px; background: var(--ink); transition: .3s var(--ease); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  padding: 6rem clamp(1.2rem, 5vw, 4.5rem) clamp(3rem, 8vh, 5.5rem);
  background: #16120f;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 40% 32%;
  z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(16,12,9,.88) 0%, rgba(16,12,9,.45) 38%, rgba(16,12,9,.12) 70%, rgba(16,12,9,.28) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 760px; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .72rem;
  color: #e0b48a;
  margin-bottom: 1.6rem;
  opacity: 0; animation: fadeUp 1s var(--ease) .1s forwards;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 11vw, 8rem);
  line-height: .96;
  letter-spacing: -.01em;
  opacity: 0; animation: fadeUp 1.1s var(--ease) .25s forwards;
}
.hero__title { color: #fefdfb; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(255,253,250,.86);
  max-width: 32em;
  margin: 1.6rem 0 2.4rem;
  opacity: 0; animation: fadeUp 1.1s var(--ease) .45s forwards;
}
.hero__cta {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.7);
  padding: 1rem 2.4rem;
  border-radius: 40px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  opacity: 0; animation: fadeUp 1.1s var(--ease) .6s forwards;
}
.hero__cta:hover { background: #fff; color: var(--ink); border-color: #fff; }
.hero__scroll {
  position: absolute; bottom: 1.6rem; right: clamp(1.2rem, 5vw, 4.5rem); z-index: 2;
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.hero__scroll::after {
  content: ""; display: block; width: 1px; height: 34px; margin: .8rem auto 0;
  background: rgba(255,255,255,.7); animation: scrollPulse 1.8s var(--ease) infinite;
}

/* ===== Sections ===== */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.2rem, 4vw, 3rem);
}
.section__head { margin-bottom: 3rem; }
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.section__lead { color: var(--ink-soft); margin-top: .8rem; max-width: 40em; }

/* ===== Filtros ===== */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.4rem; }
.filters button {
  font-family: var(--sans);
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  padding: .55rem 1.2rem; border-radius: 30px;
  cursor: pointer; transition: .3s var(--ease);
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ===== Galería ===== */
.gallery {
  columns: 3;
  column-gap: 1.4rem;
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }

.work {
  break-inside: avoid;
  margin-bottom: 1.4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.work.is-visible { opacity: 1; transform: none; }
.work img { width: 100%; transition: transform .6s var(--ease), filter .6s var(--ease); }
.work:hover img { transform: scale(1.04); }
.work__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem;
  background: linear-gradient(to top, rgba(20,18,15,.7) 0%, rgba(20,18,15,0) 55%);
  opacity: 0; transition: opacity .4s var(--ease);
  color: var(--white);
}
.work:hover .work__overlay { opacity: 1; }
.work__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.work__meta { font-size: .78rem; letter-spacing: .08em; opacity: .85; margin-top: .2rem; }

/* placeholder cuando no hay imagen */
.work--placeholder {
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line);
  color: var(--ink-soft); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
}

/* ===== Sobre la artista ===== */
.about { background: var(--bg-alt); max-width: none; }
.about__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about__portrait { position: relative; background: var(--ink); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.about__portrait img { width: 100%; height: auto; display: block; }
.about__portrait figcaption {
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
  font-size: .95rem; padding: .9rem .2rem 0; text-align: center;
  background: var(--bg-alt);
}
.about__text p { margin-bottom: 1.2rem; color: var(--ink-soft); font-size: 1.05rem; }
.text-link {
  display: inline-block; margin-top: .6rem; text-decoration: none; color: var(--ink);
  letter-spacing: .12em; text-transform: uppercase; font-size: .8rem;
  border-bottom: 1px solid var(--accent); padding-bottom: 3px;
}

/* ===== CV / Exposiciones ===== */
.cv { list-style: none; border-top: 1px solid var(--line); }
.cv li {
  display: flex; gap: 1.6rem; padding: 1.2rem 0;
  border-bottom: 1px solid var(--line); align-items: baseline;
}
.cv__year { font-family: var(--serif); font-size: 1.3rem; min-width: 4rem; color: var(--accent); }
.cv__desc { color: var(--ink-soft); }
.cv__note { margin-top: 1.4rem; font-size: .85rem; color: var(--ink-soft); }
code { background: var(--bg-alt); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* ===== Contacto ===== */
.contact { text-align: center; }
.contact__lead { color: var(--ink-soft); margin: 1rem auto 2.4rem; max-width: 36em; }
.contact__links { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.contact__links a {
  font-family: var(--serif); font-size: clamp(1.4rem, 4vw, 2rem);
  text-decoration: none; color: var(--ink); transition: color .3s var(--ease);
}
.contact__links a:hover { color: var(--accent); }

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 2.4rem 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .8rem; letter-spacing: .08em; color: var(--ink-soft);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(18, 16, 13, 0.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
  padding: 2rem;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__fig { max-width: 90vw; max-height: 86vh; text-align: center; }
.lightbox__fig img { max-width: 100%; max-height: 78vh; margin: 0 auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox__fig figcaption { color: #e8e3d8; margin-top: 1.2rem; font-family: var(--serif); font-size: 1.2rem; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: none; color: #e8e3d8; cursor: pointer;
  transition: color .3s var(--ease);
}
.lightbox__close { top: 1.6rem; right: 2rem; font-size: 2.4rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 1rem; }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }
.lightbox__close:hover, .lightbox__nav:hover { color: #fff; }

/* ===== Animaciones ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes scrollPulse { 0%, 100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ===== Responsive nav ===== */
@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--bg); flex-direction: column; justify-content: center;
    gap: 2.4rem; padding: 3rem; transform: translateX(100%);
    transition: transform .4s var(--ease); box-shadow: -10px 0 40px rgba(0,0,0,.08);
  }
  .nav__links.is-open { transform: none; }
  .nav__links a { font-size: 1rem; }
  .nav__toggle { display: flex; z-index: 101; }
  .nav:not(.is-scrolled) .nav__toggle.is-open span,
  .nav__toggle.is-open span { background: var(--ink); }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .about__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .work { opacity: 1; transform: none; }
}
