:root {
  --ink: #111111;
  --muted: #6f6f6f;
  --line: #dedede;
  --soft-line: #eeeeee;
  --paper: #ffffff;
  --sidebar-width: 238px;
  --content-width: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0.01em;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 28px 30px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  z-index: 5;
}

.brand {
  display: inline-block;
  max-width: 150px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 76px;
}

.nav a {
  position: relative;
  width: fit-content;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 180ms ease;
}

.nav a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -28px;
  width: 14px;
  height: 1px;
  background: var(--ink);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  opacity: 0.55;
}

.nav a[aria-current="page"]::before {
  opacity: 1;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.language-active {
  color: var(--ink);
}

.main {
  width: 100%;
  min-width: 0;
  max-width: var(--content-width);
  padding: 42px clamp(28px, 5vw, 82px) 88px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.maintenance-page {
  min-height: 360px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.maintenance-page h2 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.eyebrow,
.meta,
.caption,
.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 74px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

h3 {
  margin-bottom: 9px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.lede {
  max-width: 520px;
  margin-bottom: 48px;
  color: #343434;
  font-size: 16px;
  line-height: 1.55;
}

.selected-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1.72 / 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-color: #d7d7d7;
  background-image: url("assets/reference-works.png");
  background-repeat: no-repeat;
  background-size: 300% 210%;
  background-position: 0 0;
  isolation: isolate;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.46), transparent 42%, rgba(0, 0, 0, 0.5));
  opacity: 0.82;
  transition: opacity 220ms ease;
}

.work-card:hover::before,
.work-card:focus-visible::before {
  opacity: 0.98;
}

.work-card:nth-child(1) { background-position: 0 0; }
.work-card:nth-child(2) { background-position: 50% 0; }
.work-card:nth-child(3) { background-position: 100% 0; }
.work-card:nth-child(4) { background-position: 0 100%; }
.work-card:nth-child(5) { background-position: 50% 100%; }
.work-card:nth-child(6) { background-position: 100% 100%; }

.work-card--scrolling {
  background-image: url("assets/scrolling-life.png");
  background-size: cover;
  background-position: center;
}

.work-card.work-card--scrolling:nth-child(1) {
  background-position: center;
}

.work-card--sedimento {
  background-image: url("assets/sedimento-visual-01.jpg");
  background-size: 120% auto;
  background-position: center;
}

.work-card.work-card--sedimento:nth-child(2) {
  background-position: center;
}

.work-card--face {
  background-image: url("assets/the-face-of-everyone.png");
  background-size: 120% auto;
  background-position: center;
}

.work-card.work-card--face:nth-child(5) {
  background-position: center;
}

.work-card--beyond {
  background-image: url("assets/beyond-the-moon.png");
  background-size: cover;
  background-position: center;
}

.work-card.work-card--beyond:nth-child(4) {
  background-position: center;
}

.work-card--scrolling-web {
  background-image: url("assets/scrolling-life-web-art-hero.png");
  background-size: cover;
  background-position: center;
}

.work-card.work-card--scrolling-web:nth-child(3) {
  background-position: center;
}

.work-card--limbo {
  background-image: url("assets/limbo-hero.png");
  background-size: cover;
  background-position: center;
}

.work-card.work-card--limbo:nth-child(6) {
  background-position: center;
}

.work-card--masterpiece {
  background-image: url("assets/el-reflejo-de-la-obra-maestra.png");
  background-size: cover;
  background-position: center;
}

.work-card--color-notes {
  background-image: url("assets/apuntes-de-color.png");
  background-size: cover;
  background-position: center;
}

.work-card--copiloto-bot {
  background-image: url("assets/copiloto-bot.png");
  background-size: cover;
  background-position: center;
}

.work-card--extracciones {
  background-image: url("assets/extracciones.jpg");
  background-size: cover;
  background-position: center;
}

.work-card--linea-continua {
  background-image: url("assets/linea-continua-hero.png");
  background-size: cover;
  background-position: center;
}

.work-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 18px;
  color: white;
  text-align: center;
}

.work-title {
  max-width: 90%;
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.reference-sheet .work-title {
  display: block;
}

.reference-sheet .work-card-content {
  justify-content: center;
}

.reference-sheet .work-detail {
  display: none;
}

.work-detail {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.intro-layout,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.75fr);
  gap: clamp(36px, 7vw, 108px);
  align-items: start;
}

.feature-image,
.gallery-image,
.portrait-image {
  background-image: url("assets/reference-works.png");
  background-repeat: no-repeat;
  background-size: 300% 210%;
  background-position: 50% 0;
  background-color: #ddd;
}

.feature-image {
  aspect-ratio: 1.45 / 1;
}

.gallery-image {
  aspect-ratio: 1.4 / 1;
}

.portrait-image {
  aspect-ratio: 0.82 / 1;
  background-position: 100% 100%;
}

.image-note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.copy p {
  color: #2d2d2d;
  font-size: 15px;
  line-height: 1.62;
}

.copy p + p {
  margin-top: 20px;
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 180px;
  gap: 24px;
  padding: 21px 0;
  border-bottom: 1px solid var(--soft-line);
}

.archive-row strong {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.archive-row p,
.archive-row span {
  margin: 0;
  line-height: 1.5;
}

.archive-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.theme-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.theme-card {
  min-height: 210px;
  padding: 22px 20px;
  border: 1px solid var(--line);
}

.theme-card p {
  max-width: 240px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.theme-card .number {
  display: block;
  margin-bottom: 70px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 92px);
}

.cv-block {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.cv-block + .cv-block {
  margin-top: 36px;
}

.cv-block dl {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px 24px;
  margin: 0;
}

.cv-block dt,
.cv-block dd {
  margin: 0;
  line-height: 1.5;
}

.cv-block dt {
  color: var(--muted);
}

.cv-intro {
  display: grid;
  grid-template-columns: minmax(230px, 0.55fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 112px);
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.cv-name {
  max-width: 520px;
  margin: 13px 0 0;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.cv-contact {
  display: grid;
  gap: 7px;
  margin-top: 28px;
}

.cv-contact a {
  width: fit-content;
  border-bottom: 1px solid var(--line);
}

.cv-section {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cv-section h2 {
  margin: 8px 0 22px;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.cv-list {
  margin: 0;
  border-top: 1px solid var(--soft-line);
}

.cv-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--soft-line);
}

.cv-row dt,
.cv-row dd {
  margin: 0;
  line-height: 1.55;
}

.cv-row dt {
  color: var(--muted);
}

.cv-row dd ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: clamp(42px, 8vw, 130px);
}

.contact-grid.contact-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
}

.contact-list {
  margin-top: 42px;
}

.contact-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--soft-line);
}

.contact-line span:first-child {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.exhibition-item {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background-image: url("assets/reference-works.png");
  background-repeat: no-repeat;
  background-size: 300% 210%;
  background-position: 0 0;
}

.exhibition-item:nth-child(2) { background-position: 50% 0; }
.exhibition-item:nth-child(3) { background-position: 100% 0; }
.exhibition-item:nth-child(4) { background-position: 0 100%; }
.exhibition-item:nth-child(5) { background-position: 50% 100%; }
.exhibition-item:nth-child(6) { background-position: 100% 100%; }

.exhibition-item::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}

.exhibition-caption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  color: white;
}

.exhibition-caption h3 {
  margin-bottom: 3px;
  font-size: 20px;
}

.exhibition-caption p {
  margin-bottom: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-note {
  margin-top: 90px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.back-link::before {
  content: "←";
  color: var(--ink);
  font-size: 16px;
}

.project-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.project-header h1 {
  max-width: none;
}

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

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

.project-meta div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--soft-line);
}

.project-meta dt,
.project-meta dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.project-meta dt {
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-meta dd {
  text-align: right;
}

.project-hero {
  width: 100%;
  aspect-ratio: 1.62 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #e7e4de;
}

.project-hero--art {
  width: min(100%, 760px);
  margin-inline: auto;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.project-gallery {
  columns: 2 420px;
  column-gap: 12px;
  margin-top: 64px;
}

.project-gallery figure {
  break-inside: avoid;
  margin: 0 0 12px;
}

.project-gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: #e7e4de;
}

.project-carousel {
  max-width: 920px;
  margin: 64px auto 0;
}

.carousel-viewport {
  overflow: hidden;
  background: #f2f2f2;
}

.carousel-track {
  display: flex;
  transition: transform 320ms ease;
  will-change: transform;
}

.carousel-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  height: auto;
  margin: 0;
  padding: 16px;
  background: #f2f2f2;
}

.carousel-slide img {
  display: block;
  width: min(100%, 760px);
  height: auto;
  max-height: none;
  margin-inline: auto;
  object-fit: contain;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.carousel-buttons {
  display: flex;
  gap: 8px;
}

.carousel-button,
.carousel-dot {
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  cursor: pointer;
}

.carousel-button {
  width: 36px;
  height: 30px;
  font-size: 16px;
}

.carousel-button:hover,
.carousel-button:focus-visible,
.carousel-dot:hover,
.carousel-dot:focus-visible,
.carousel-dot.is-active {
  border-color: var(--ink);
}

.carousel-counter {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
}

.project-video {
  max-width: 920px;
  margin: 64px auto 0;
}

.project-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #f2f2f2;
}

.project-external-link {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.project-external-link a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.project-external-link a:hover,
.project-external-link a:focus-visible {
  background: #fff;
  color: var(--ink);
  outline: 1px solid var(--ink);
}

.project-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.project-content {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 112px);
  margin-top: 62px;
}

.project-content .copy {
  max-width: 720px;
}

.project-content .copy p {
  font-size: 16px;
  line-height: 1.68;
}

.project-index {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  visibility: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 20;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid var(--ink);
  background: white;
}

.modal-card h2 {
  margin-bottom: 10px;
}

.modal-card p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-close {
  float: right;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 190px;
  }

  .selected-grid,
  .theme-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .archive-row span {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 22px 20px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 13px 18px;
    margin-top: 34px;
  }

  .nav a::before {
    display: none;
  }

  .sidebar-bottom {
    position: absolute;
    top: 24px;
    right: 20px;
  }

  .main {
    padding: 30px 20px 58px;
  }

  .page-header {
    display: block;
    margin-bottom: 28px;
  }

  .page-header .eyebrow {
    margin-top: 14px;
  }

  .selected-grid,
  .theme-list,
  .intro-layout,
  .split-layout,
  .bio-grid,
  .cv-intro,
  .contact-grid,
  .exhibition-grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    min-height: 0;
  }

  .archive-row {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
  }

  .archive-row strong {
    font-size: 18px;
  }

  .archive-row span {
    grid-column: 2;
  }

  .cv-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exhibition-item {
    min-height: 280px;
  }

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

  .project-gallery {
    columns: 1;
  }

  .carousel-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-dots {
    justify-content: flex-start;
  }

  .project-meta {
    max-width: 360px;
  }
}
