/* ============================================================
   PARTE 1 — MODIFICABLE
   Cambia aquí colores, tamaños principales y fuentes.
   El resto del archivo es TÉCNICO y normalmente no necesitas tocarlo.
   ============================================================ */
:root {
  --bg: #0b0c0e;
  --panel: #111317;
  --text: #c9c3a6;
  --muted: #77766c;
  --accent: #d7ef20;
  --line: #655e22;

  --card-gap: 22px;
  --sidebar-width: 292px;

  --font-title: "Playfair Display", Georgia, serif;
  --font-body: "JetBrains Mono", monospace;

  --title-size: 32px;
  --body-size: 15px;
  --ui-size: 14px;
}

/* ============================================================
   PARTE 2 — TÉCNICA
   NO NECESITAS EDITAR ESTA PARTE PARA CAMBIAR TUS OBRAS.
   ============================================================ */
* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body-size);
}

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

img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Página principal ---------- */
.site {
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  min-height: 100svh;
  padding: 42px 38px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
}

.sidebar-top { display: block; }

.brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.brand-logo {
  display: block;
  width: 190px;
  height: 190px;
  padding: 7px;
  box-sizing: border-box;
  object-fit: cover;
  border: 1px solid var(--accent);
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.brand-name,
.work-title,
.simple-page h1 {
  font-family: var(--font-title);
  font-weight: 500;
}

.brand-name {
  margin-top: 3px;
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  text-align: center;
}

.brand-role {
  font-size: 14px;
  color: var(--text);
  letter-spacing: .2px;
  text-align: center;
}

.nav {
  display: grid;
  gap: 30px;
  margin-top: 58px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: .2px;
  color: var(--text);
  transition: color .2s ease, transform .2s ease;
}

.nav a:hover,
.nav a.active { color: var(--accent); }
.nav a:hover { transform: translateX(3px); }

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 25px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

/* Solo iconos grandes en la página principal. */
.site-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  font-size: 22px;
  transition: opacity .2s ease, transform .2s ease;
}

.site-social:hover {
  opacity: .65;
  transform: translateY(-2px);
}

.site-social span { display: none; }

.sidebar-bottom small {
  display: block;
  margin-top: 39px;
  color: var(--muted);
  font-family: var(--font-title);
  font-size: 13px;
}

.content {
  min-width: 0;
  min-height: 100svh;
  padding: 50px 42px 26px;
  display: flex;
  flex-direction: column;
}

.gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
}

.card { min-width: 0; }

.card-image {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  background: var(--panel);
}

.card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform .25s ease;
}

.card:hover .card-image img { transform: scale(.965); }

.card-category {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid var(--accent);
  background: rgba(11, 12, 14, .88);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .7px;
  pointer-events: none;
}

.card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 7px 9px;
}

.card-title {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--accent);
}

.card-arrow {
  flex: 0 0 auto;
  font-size: 19px;
  color: var(--accent);
  line-height: 1;
}

.gallery-bottom {
  margin-top: auto;
  padding: 24px 0 3px;
  display: grid;
  justify-items: center;
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: linear-gradient(to bottom, transparent 0, rgba(11,12,14,.94) 28%, var(--bg) 68%);
}

.pager {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
}

.page-button:hover:not(:disabled),
.page-button.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.page-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.page-arrow { font-size: 12px; }

/* ---------- Página individual ---------- */
.work-page {
  min-height: 100svh;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 38px 38px 30px;
  display: flex;
  flex-direction: column;
}

.work-header { margin-bottom: 28px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 14px;
}

.work-detail {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr);
  gap: 52px;
  align-items: center;
}

.work-image-wrap {
  min-width: 0;
  display: grid;
  place-items: center;
}

.work-image {
  display: block;
  width: 100%;
  max-height: 72svh;
  object-fit: contain;
  pointer-events: none;
}

.work-copy { min-width: 0; }

.work-category {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.work-title {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: clamp(36px, 5vw, 64px);
  line-height: .96;
}

.work-description {
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
}

.work-meta {
  margin: 27px 0 0;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
}

.work-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 24px;
}

.work-social-button,
.support-button,
.work-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  color: var(--accent);
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  transition: color .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}

.work-social-button {
  padding: 11px 15px;
  min-height: 43px;
}

.work-social-button:hover,
.work-nav-button:hover:not(.disabled) {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.support-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

/* Botón largo y centrado. */
.support-button {
  width: min(100%, 420px);
  min-height: 49px;
  padding: 12px 20px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.support-button:hover { opacity: .75; }

/* Tamaño de los iconos de los botones. */
.work-social-button i,
.support-button i {
  font-size: 18px;
}

.work-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.work-nav-button {
  padding: 11px 15px;
  min-height: 43px;
}

.work-nav-button:first-child { justify-self: start; }
.work-nav-button:nth-child(2) { justify-self: center; }
.work-nav-button:last-child { justify-self: end; }

/* "all artworks" es texto, no botón. */
.work-nav-all {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  transition: color .2s ease;
}

.work-nav-all:hover { color: var(--accent); }

.work-nav-button.disabled {
  opacity: .28;
  cursor: default;
  pointer-events: none;
}

.simple-page {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0;
}

.simple-page h1 {
  color: var(--accent);
  font-size: 56px;
  font-weight: 500;
}

.simple-page p {
  line-height: 1.75;
  max-width: 620px;
}

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .site { display: block; }

  .sidebar {
    min-height: auto;
    height: auto;
    padding: 19px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .sidebar-top { display: contents; }

  .brand {
    grid-column: 1;
    justify-items: start;
    width: auto;
    grid-template-columns: 62px auto;
    grid-template-rows: auto auto;
    column-gap: 13px;
    align-items: center;
  }

  .brand-logo {
    width: 62px;
    height: 62px;
    padding: 4px;
    grid-row: 1 / 3;
  }

  .brand-name { margin-top: 0; font-size: 27px; text-align: left; }
  .brand-role { font-size: 12px; text-align: left; }

  .menu-toggle {
    grid-column: 2;
    display: block;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    margin-top: 22px;
    gap: 15px;
  }

  .nav.open { display: grid; }

  .sidebar-bottom {
    grid-column: 1 / -1;
    margin-top: 19px;
    padding-top: 0;
  }

  .socials {
    padding-top: 16px;
    gap: 18px;
  }

  .site-social {
    width: 34px;
    height: 34px;
    font-size: 25px;
  }

  .sidebar-bottom small { margin-top: 17px; }

  .content {
    min-height: calc(100svh - 105px);
    padding: 30px 28px 26px;
  }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-title { font-size: 18px; }

  .work-page { padding: 29px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 600px) {
  .sidebar { padding: 15px 18px; }

  .brand {
    grid-template-columns: 52px auto;
    column-gap: 11px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
    padding: 3px;
  }

  .brand-name { font-size: 23px; text-align: left; }
  .brand-role { font-size: 11px; text-align: left; }

  .socials { gap: 16px; }

  .site-social {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .sidebar-bottom small { font-size: 12px; }

  .content { padding: 20px 18px 24px; }
  .gallery { gap: 15px; }

  .card-image { aspect-ratio: 1.2 / 1; }
  .card-info { padding: 8px 3px 5px; }
  .card-title { font-size: 15px; }
  .card-category {
    right: 7px;
    bottom: 7px;
    padding: 5px 7px;
    font-size: 9px;
  }
  .card-arrow { font-size: 17px; }

  .gallery-bottom { padding-top: 19px; }

  .page-button {
    min-width: 36px;
    height: 36px;
  }

  .work-page { padding: 22px 18px; }

  .work-detail {
    grid-template-columns: 1fr;
    gap: 29px;
    align-content: start;
  }

  .work-image { max-height: 58svh; }
  .work-title { font-size: 42px; }
  .work-description { font-size: 14px; }

  .work-social-button,
  .support-button,
  .work-nav-button {
    font-size: 12px;
  }

  .work-social-button { min-height: 45px; }
  .support-button { min-height: 51px; }

  .work-nav {
    grid-template-columns: 1fr 1fr;
  }

  .work-nav-all {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    order: -1;
  }

  .work-nav-button:first-child { grid-column: 1; grid-row: 2; }
  .work-nav-button:last-child { grid-column: 2; grid-row: 2; }
}

/* ---------- Móviles muy pequeños ---------- */
@media (max-width: 390px) {
  .gallery { grid-template-columns: 1fr; }
  .card-image { aspect-ratio: 1.45 / 1; }
  .socials { gap: 13px; }
}
