:root {
  --ink: #111411;
  --muted: #667066;
  --paper: #f7f5ef;
  --soft: #e8e3d8;
  --moss: #4b5f45;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(17, 20, 17, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-lightbox-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  color: var(--white);
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(0, 0, 0, 0.94);
  color: var(--white);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.language-switch button {
  min-width: 34px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.language-switch button.is-active {
  background: var(--white);
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a {
  opacity: 0.82;
  transition: opacity 160ms ease;
}

.site-nav a:hover {
  opacity: 1;
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 20, 17, 0.76), rgba(17, 20, 17, 0.24) 56%, rgba(17, 20, 17, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  max-width: 760px;
  align-content: center;
  padding: 120px clamp(22px, 7vw, 86px) 78px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--moss);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.98;
}

h1 {
  max-width: 680px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 10vw, 7.8rem);
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
}

h3 {
  margin: 5px 0 0;
  font-size: 1.18rem;
}

.hero-content p:not(.eyebrow),
.intro p,
.about-copy p,
.contact p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.intro p,
.about-copy p,
.contact p {
  color: var(--muted);
}

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  color: var(--white);
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--white);
  color: var(--ink);
  transform: translateY(-1px);
}

.button-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.button-dark:hover {
  background: transparent;
  color: var(--ink);
}

.section {
  padding: clamp(78px, 10vw, 132px) clamp(20px, 5vw, 64px);
}

.portfolio,
.project-detail,
.about {
  background: var(--ink);
  color: var(--white);
}

.portfolio .eyebrow,
.project-detail .eyebrow,
.about .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.intro {
  display: flex;
  justify-content: flex-end;
}

.intro p {
  max-width: 900px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 4rem);
  line-height: 1.12;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.projects {
  display: grid;
  gap: clamp(50px, 8vw, 92px);
}

.project {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
}

.project-copy {
  position: sticky;
  top: 110px;
}

.project-copy span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 10px 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 0.98;
}

.project-copy h3 a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.project-copy h3 a::after {
  content: var(--series-link-label, "Ver serie");
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-copy p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.project-meta {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
}

.project-meta div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.project-meta dt {
  margin-bottom: 5px;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-meta dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  line-height: 1.55;
}

.map-link {
  display: inline-flex;
  align-items: center;
  margin-top: 22px;
  color: var(--white);
  font-weight: 800;
}

.map-link::after {
  margin-left: 8px;
  content: "->";
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-grid img {
  cursor: zoom-in;
  height: clamp(260px, 23vw, 360px);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.project-detail {
  padding-top: clamp(64px, 9vw, 116px);
}

.project-detail + .project-detail {
  padding-top: 0;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.detail-gallery img {
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.about {
  display: grid;
  grid-template-columns: minmax(240px, 0.74fr) minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(34px, 7vw, 100px);
  align-items: start;
}

.about-image {
  position: relative;
  margin: 0;
}

.about-image img {
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.stats div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.stats dt {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3rem;
  line-height: 1;
}

.stats dd {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.64);
}

.about-copy p {
  color: rgba(255, 255, 255, 0.68);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 560px);
  gap: clamp(34px, 7vw, 96px);
  background: var(--ink);
  color: var(--white);
}

.contact .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.contact p {
  color: rgba(255, 255, 255, 0.68);
}

.instagram-card {
  display: grid;
  align-content: center;
  min-height: 260px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, background 160ms ease;
}

.instagram-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.instagram-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.instagram-card strong {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  margin-top: 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.instagram-icon {
  flex: 0 0 auto;
  width: clamp(32px, 4vw, 48px);
  height: clamp(32px, 4vw, 48px);
  object-fit: contain;
}

.instagram-card small {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.95rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 64px);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  color: var(--white);
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  display: grid;
  width: min(1120px, 100%);
  max-height: calc(100svh - 48px);
  gap: 18px;
  margin: 0;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: calc(100svh - 180px);
  justify-self: center;
  object-fit: contain;
}

.lightbox figcaption {
  display: grid;
  gap: 12px;
}

.lightbox figcaption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.lightbox dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.lightbox dl div {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.lightbox dt {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 16px;
}

@media (max-width: 800px) {
  .site-header {
    padding: 18px 20px;
  }

  .header-actions {
    gap: 10px;
  }

  .language-switch {
    padding: 3px;
  }

  .language-switch button {
    min-width: 31px;
    min-height: 26px;
    font-size: 0.72rem;
  }

  .menu-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
  }

  .menu-toggle span {
    width: 17px;
    height: 2px;
    background: currentColor;
    transition: transform 160ms ease;
  }

  .site-header.is-open .menu-toggle span:first-child {
    transform: translateY(5px) rotate(45deg);
  }

  .site-header.is-open .menu-toggle span:last-child {
    transform: translateY(-5px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: 78px;
    right: 20px;
    left: 20px;
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.94);
    box-shadow: var(--shadow);
    color: var(--white);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 13px 10px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(17, 20, 17, 0.52), rgba(17, 20, 17, 0.74));
  }

  .hero-content {
    padding-top: 110px;
  }

  .project,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .project-copy {
    position: static;
  }

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

  .detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid img {
    height: 360px;
  }

  .site-footer {
    display: grid;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox img {
    max-height: calc(100svh - 230px);
  }

  .lightbox dl {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 3.25rem;
  }

  .section {
    padding: 68px 18px;
  }

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

  .instagram-card strong {
    gap: 12px;
    font-size: 1.55rem;
  }

  .instagram-icon {
    width: 28px;
    height: 28px;
  }

  .project-grid img {
    height: 320px;
  }
}
