/*
Theme Name: Jennifer Portfolio
Theme URI: https://jennifer-portfolio.com
Author: Jennifer
Description: Tema personalizado para el portfolio de Jennifer (Creative Director & Photographer), convertido desde el diseño de Figma. Páginas fijas: Home, About y 6 plantillas de proyecto.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jennifer-portfolio
*/

/*
 * "Helvetica Neue" is a system/desktop-licensed font, not a redistributable
 * web font. These rules use local() to pick up the real font ONLY on
 * systems that already have it installed (mac/iOS) for every weight; the
 * lone weight we have written permission to embed (Light) also carries a
 * woff2 fallback so non-Apple systems get the real Light face too. Any
 * other weight on a system without Helvetica Neue installed falls through
 * to Helvetica/Arial in --font-sans, which is metrically near-identical.
 */
@font-face {
  font-family: 'Helvetica Neue';
  src: local('Helvetica Neue'), local('HelveticaNeue');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: local('Helvetica Neue Medium'), local('HelveticaNeue-Medium');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: local('Helvetica Neue Bold'), local('HelveticaNeue-Bold');
  font-weight: 600 700;
  font-style: normal;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: local('Helvetica Neue Light'), local('HelveticaNeue-Light'),
       url('assets/fonts/HelveticaNeueLTPro-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --line: #e9e9e9;
  --accent: #c1e6ef;
  --accent-ink: #12363c;

  --font-sans: 'Helvetica Neue', 'Inter', Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(18px, 5vw, 24px);
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body.nav-open { overflow: hidden; }

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

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

a, button { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 2px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

#work,
#contact {
  scroll-margin-top: var(--header-h);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  font-weight: 700;
  font-size: clamp(16px, 4vw, 20px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo img {
  max-height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a.active,
.nav-links li.current-menu-item a {
  color: var(--fg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  padding-bottom: clamp(24px, 5vw, 40px);
}

.hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
  margin-bottom: clamp(32px, 7vw, 56px);
}

@media (min-width: 761px) {
  .hero-media {
    aspect-ratio: 16 / 9;
    max-height: 80vh;
  }
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media.has-parallax img {
  will-change: transform;
}

/* ---------- Hero carousel (Swiper) ---------- */

.hero-swiper {
  position: relative;
  --swiper-theme-color: #ffffff;
  --swiper-navigation-size: 18px;
  --swiper-pagination-bullet-inactive-color: #ffffff;
  --swiper-pagination-bullet-inactive-opacity: 0.55;
}

.hero-swiper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
  z-index: 1;
}

.hero-swiper .swiper-pagination {
  bottom: 16px !important;
  z-index: 2;
}

.hero-swiper .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
  transform: scale(1.3);
}

.hero-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero-bio {
  max-width: 940px;
  font-size: clamp(24px, 4.6vw, 66px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.hero-bio p { margin: 0 0 16px; }
.hero-bio p:last-child { margin-bottom: 0; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
}

.text-link .arrow { transition: transform 0.2s ease; }

/* ---------- Services / Experience ---------- */

.services-experience {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter);
  padding-top: clamp(24px, 5vw, 40px);
  padding-bottom: clamp(24px, 5vw, 40px);
}

.services-experience h3 {
  font-size: clamp(20px, 2.8vw, 27px);
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 12px;
}

.services-experience ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.services-experience li {
  font-size: clamp(20px, 2.8vw, 27px);
  font-weight: 400;
  color: var(--fg);
  line-height: 1.3;
}

@media (max-width: 560px) {
  .services-experience {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---------- Work grid ---------- */

.work {
  padding-top: clamp(48px, 8vw, 72px);
  padding-bottom: clamp(56px, 10vw, 96px);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(22px, 4vw, 28px);
  margin: 0;
  letter-spacing: -0.01em;
}

.work-subtitle {
  max-width: 940px;
  color: var(--fg);
  font-size: clamp(24px, 4.6vw, 66px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.project-card {
  display: block;
  position: relative;
}

.project-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card .meta {
  margin-top: 14px;
}

.project-card .title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-card .category {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Projects grid (overlay caption, matches Figma's "Proyects" page) ---------- */

.project-card--overlay .thumb {
  position: relative;
}

.project-card--overlay .category {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 16px 16px;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
}

.btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: clamp(32px, 6vw, 48px) auto 0;
  padding: clamp(16px, 2vw, 24px) clamp(32px, 5vw, 56px);
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: clamp(18px, 3vw, 44px);
  font-weight: 500;
  color: var(--fg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background: var(--fg);
    color: var(--bg);
  }
}

/* ---------- Footer CTA ---------- */

.cta-band {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(48px, 10vw, 88px) 0 clamp(40px, 8vw, 64px);
  text-align: center;
}

.cta-band .script {
  width: 100%;
  height: auto;
  max-width: 900px;
  margin: 0 auto 24px;
}

.cta-band .email {
  font-size: 16px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--accent-ink);
  padding-bottom: 2px;
  word-break: break-word;
}

.cta-band .socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.cta-band .socials a {
  display: inline-flex;
  align-items: center;
  padding: 10px 26px;
  border: 1px solid var(--accent-ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .cta-band .socials a:hover {
    background: var(--accent-ink);
    color: var(--accent);
  }
}

.site-footer {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(20px, 4vw, 28px) 0 clamp(28px, 6vw, 40px);
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.03em;
  gap: 12px;
}

/* ---------- About page ---------- */

.about-page {
  background: var(--accent);
  color: var(--accent-ink);
  padding-top: clamp(32px, 7vw, 56px);
  padding-bottom: clamp(48px, 9vw, 80px);
}

.about-badge {
  display: inline-block;
  padding: 8px 22px;
  margin-bottom: clamp(24px, 5vw, 40px);
  border: 1px solid var(--accent-ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.about-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.about-hero .portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.about-hero .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.about-hero p {
  color: var(--accent-ink);
  font-size: 19px;
  max-width: 46ch;
  margin: 0 0 16px;
}

.about-page .btn-outline {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

@media (hover: hover) and (pointer: fine) {
  .about-page .btn-outline:hover {
    background: var(--accent-ink);
    color: var(--accent);
  }
}

.about-role {
  font-weight: 600;
  color: var(--accent-ink);
  margin: 0 0 20px;
}

.clients {
  padding-top: clamp(48px, 9vw, 80px);
  padding-bottom: clamp(56px, 10vw, 96px);
}

.clients h2 {
  font-size: clamp(20px, 4vw, 24px);
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.clients-list {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Project detail page ---------- */

.project-intro,
.project-gallery,
.project-nav {
  max-width: 1400px;
}

.project-intro {
  padding-top: clamp(20px, 4vw, 32px);
  padding-bottom: clamp(16px, 3vw, 24px);
}

.project-intro .eyebrow {
  display: none;
}

.project-intro h1 {
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  max-width: 16ch;
}

.project-meta {
  display: none;
}

.project-description {
  max-width: 48ch;
  color: var(--muted);
  font-size: 19px;
  margin-top: 24px;
  margin-left: 50%;
}

.project-description p { margin: 0 0 14px; }
.project-description p:last-child { margin-bottom: 0; }

.project-gallery {
  padding-top: clamp(12px, 2vw, 20px);
  padding-bottom: clamp(16px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 16px);
}

.project-gallery .full { width: 100%; overflow: hidden; border-radius: 4px; background: #eee; }
.project-gallery .full img { width: 100%; height: auto; object-fit: cover; }

.project-gallery .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.project-gallery .split img,
.project-gallery .split .thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.project-nav {
  padding-top: clamp(24px, 5vw, 40px);
  padding-bottom: clamp(48px, 10vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  gap: 16px;
}

.project-nav a {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: opacity 0.15s ease;
}

.project-nav a:active {
  opacity: 0.6;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.btn-outline.reveal {
  transition: opacity 0.7s ease, transform 0.7s ease, background-color 0.2s ease, color 0.2s ease;
}

/* ---------- Hover-only affordances (skip touch devices to avoid stuck states) ---------- */

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--fg); }
  .text-link:hover .arrow { transform: translateX(4px); }
  .project-card:hover img { transform: scale(1.04); }
  .project-nav a:hover { color: var(--fg); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }

  .about-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-description {
    margin-left: 0;
    max-width: none;
  }

  .project-gallery .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .wrap {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .project-nav {
    flex-wrap: wrap;
    row-gap: 18px;
    column-gap: 12px;
  }

  .project-nav a:first-child,
  .project-nav a:last-child {
    flex: 1 1 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--fg);
    padding: 10px 0;
  }

  .project-nav a:first-child {
    text-align: left;
  }

  .project-nav a:last-child {
    text-align: right;
  }

  .project-nav a:nth-child(2) {
    order: 3;
    flex-basis: 100%;
    text-align: center;
    font-size: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
}

/* ---------- Mobile nav open state ---------- */

body.nav-open .nav-links {
  display: flex;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 20px var(--gutter) max(28px, env(safe-area-inset-bottom));
  gap: 18px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
