/* =========================================================================
   Macarena Pastor — static site
   Local, dependency-free rebuild of macarenapastor.com (originally Wix).
   Fonts: Barlow (Google Fonts, self-hosted) + a custom uploaded display
   font used on the live site for the wordmark/footer branding.
   ========================================================================= */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/barlow-200.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-700.woff2") format("woff2");
}
@font-face {
  font-family: "MetaProNormal";
  font-display: swap;
  src: url("../fonts/metapronormal.woff2") format("woff2"),
       url("../fonts/metapronormal.woff") format("woff");
}

:root {
  --c-black: #0b0b0b;
  --c-white: #ffffff;
  --c-panel-grey: #6f6f6d;
  --c-footer-grey: #8f8f8d;
  --c-pill: #9b9b99;
  --c-text-muted: #d9d9d7;
  --c-text-dark: #181818;
  --c-border: #e3e3e1;

  --font-heading: "Barlow", Arial, sans-serif;
  --font-nav: "Barlow", Arial, sans-serif;
  --font-body: "Barlow", Arial, sans-serif;
  --font-brand: "MetaProNormal", "Barlow", serif;

  --nav-height: 74px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--c-text-dark);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }

main { flex: 1 0 auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  height: var(--nav-height);
  background: var(--c-black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: relative;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-brand);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--c-white);
  background: var(--c-pill);
  padding: 10px 16px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--c-white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--c-text-muted);
  padding: 10px 12px;
  transition: color .2s ease, background-color .2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--c-white);
  background: var(--c-pill);
}

.nav-submenu-wrap { position: relative; }

.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--c-black);
  display: none;
  flex-direction: column;
  gap: 0;
}

.nav-submenu-wrap:hover .nav-submenu,
.nav-submenu-wrap:focus-within .nav-submenu {
  display: flex;
}

.nav-submenu a {
  letter-spacing: 0.1em;
  line-height: 1.4;
  padding: 10px 20px;
  display: block;
  white-space: normal;
}

/* ------------------------------------------------------------ home hero */

.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  min-height: 380px;
  background: #000;
  overflow: hidden;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* --------------------------------------------------------- portafolio */

.portfolio-grid {
  display: flex;
  width: 100%;
  min-height: calc(100vh - var(--nav-height));
}

.portfolio-panel {
  position: relative;
  flex: 1 1 0;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
  overflow: hidden;
}

.portfolio-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  transition: background-color .25s ease;
}

.portfolio-panel:hover { filter: grayscale(0.3); }
.portfolio-panel:hover::after { background: rgba(0,0,0,.5); }

.portfolio-panel span {
  position: relative;
  z-index: 1;
  color: var(--c-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  text-align: center;
  padding: 0 24px;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------- category page */

.category-page {
  display: flex;
  gap: 40px;
  padding: 56px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.category-sidebar { flex: 0 0 300px; }

.category-title {
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 2.2rem;
  line-height: 1.05;
  margin: 0 0 40px;
}

.work-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.work-list li { margin-bottom: 6px; }

.work-list a {
  display: block;
  font-family: var(--font-nav);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  padding: 8px 14px;
  color: var(--c-text-dark);
}

.work-list a:hover,
.work-list a.active {
  background: var(--c-pill);
  color: var(--c-white);
}

.work-list-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin: 28px 0 12px;
}

.category-body {
  flex: 1 1 auto;
  column-width: 340px;
  column-gap: 40px;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: justify;
}

.category-body p { margin: 0 0 1.3em; }

/* ------------------------------------------------------------- gallery */

.gallery-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 6px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  position: relative;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid figure.tall { grid-row: span 2; }
.gallery-grid figure.wide { grid-column: span 2; }
.gallery-grid figure.big { grid-row: span 2; grid-column: span 2; }

/* ---------------------------------------------------------- work info */

.category-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 44px;
  min-width: 0;
}

.work-info { max-width: 1200px; }

.work-description {
  column-count: 2;
  column-gap: 40px;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: justify;
}

.work-description p {
  margin: 0 0 1.2em;
  break-inside: avoid;
}

.work-credits {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}

.work-credits dt {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.work-credits dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .work-credits { grid-template-columns: 1fr; gap: 2px 0; }
  .work-credits dd { margin-bottom: 10px; }
}

/* ------------------------------------------------------------ video work */

.video-work-list { display: flex; flex-direction: column; gap: 48px; }

.video-work-item h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.video-content {
  width: 100%;
  max-height: 80vh;
  background: #000;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  margin-bottom: 8px;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stub-note {
  font-style: italic;
  color: #777;
  border: 1px dashed var(--c-border);
  padding: 24px;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------- bio */

.bio-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

.bio-text {
  flex: 1 1 55%;
  background: var(--c-panel-grey);
  color: var(--c-white);
  padding: 64px 60px;
}

.bio-image {
  flex: 1 1 45%;
  background-size: cover;
  background-position: center;
  min-height: 320px;
  filter: blur(4px);
  transform: scale(1.02);
}

.bio-text h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 1.6rem;
  margin: 0 0 30px;
}

.bio-text h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 20px;
}

.bio-text h2 em {
  font-style: normal;
  opacity: .75;
  font-weight: 500;
  margin-right: .4em;
}

.bio-text p {
  font-size: 0.9rem;
  line-height: 1.65;
  text-align: justify;
  margin: 0 0 1.1em;
}

.bio-block { margin-bottom: 46px; }

/* --------------------------------------------------------- publicaciones */

.publication {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 40px;
}

.publication h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.publication h2 {
  font-family: var(--font-nav);
  font-weight: 400;
  font-size: 1rem;
  color: #555;
  margin: 0 0 20px;
}

.publication .download-btn {
  display: inline-block;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-nav);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  padding: 12px 26px;
  margin-bottom: 28px;
}

.publication p {
  font-size: 0.95rem;
  line-height: 1.75;
  text-align: justify;
}

/* -------------------------------------------------------------- contact */

.contact-hero {
  background: var(--c-black);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 90px 40px;
  text-align: center;
  color: var(--c-white);
}

.contact-page h1 {
  font-family: var(--font-brand);
  letter-spacing: 0.2em;
  font-size: 1.4rem;
  margin: 0 0 34px;
}

.contact-page .contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-nav);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.contact-page .contact-line a {
  display: contents;
  color: var(--c-white);
}

.contact-page .contact-line a:hover .contact-icon,
.contact-page .contact-line a:hover {
  color: var(--c-footer-grey);
}

.contact-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

/* -------------------------------------------------------------- footer */

.site-footer {
  background: var(--c-footer-grey);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 40px;
}

.footer-brand {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.footer-copy {
  font-family: var(--font-nav);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  opacity: .9;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .site-header { padding: 0 20px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-black);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 20px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-submenu { position: static; background: transparent; padding-left: 14px; display: flex; }
  .nav-submenu-wrap { width: 100%; }

  .portfolio-grid { flex-direction: column; }
  .portfolio-panel { min-height: 240px; }

  .category-page { flex-direction: column; padding: 36px 20px; }
  .category-sidebar { flex: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .work-description { column-count: 1; }

  .bio-layout { flex-direction: column; }
  .bio-text { padding: 40px 24px; }
  .bio-image { min-height: 260px; }

  .site-footer { flex-direction: column; text-align: center; padding: 20px; }
}
