@font-face { font-family: "Inter Tight"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 100 900; font-style: italic; font-display: swap; src: url("../fonts/inter-tight-latin-wght-italic.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --bg-2: #f2f2f0;
  --ink: #0b0b0b;
  --muted: #5c5c5c;
  --rule: #0b0b0b;
  --hair: #d6d6d3;
  --accent: #d62b11;
  --inv-bg: #0b0b0b;
  --inv-ink: #ffffff;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1280px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b; --bg-2: #161616; --ink: #f4f4f2; --muted: #a3a3a3; --rule: #f4f4f2; --hair: #333;
  --accent: #ff6a45; --inv-bg: #f4f4f2; --inv-ink: #0b0b0b; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b; --bg-2: #161616; --ink: #f4f4f2; --muted: #a3a3a3; --rule: #f4f4f2; --hair: #333;
    --accent: #ff6a45; --inv-bg: #f4f4f2; --inv-ink: #0b0b0b; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 30; }
.skip:focus { left: 0; }

/* Cabecera negra */
.top { position: sticky; top: 0; z-index: 20; background: var(--inv-bg); color: var(--inv-ink); }
.top__in { display: flex; align-items: center; gap: 2rem; height: 3.5rem; }
.top__name { margin-right: auto; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.top__name:hover { color: inherit; }
.top__nav { display: flex; gap: 1.8rem; font-size: .95rem; font-weight: 600; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.tools { display: flex; align-items: center; gap: 1rem; }
.lang { display: flex; gap: .5rem; font-size: .85rem; font-weight: 700; }
.lang button { opacity: .5; }
.lang button[aria-pressed="true"] { opacity: 1; }
.theme { font-size: 1.05rem; line-height: 1; }
.lang button:hover, .theme:hover { opacity: 1; color: inherit; }

.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Portada */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.hero__in { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0 clamp(2rem, 4vw, 3.5rem); align-items: end; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 3px solid var(--rule); }
.hero h1 { margin-top: 1rem; font-size: clamp(3.4rem, 10.5vw, 9.6rem); font-weight: 850; line-height: .86; letter-spacing: -.045em; }
.hero__bio { margin-top: 2.2rem; max-width: 34rem; font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.35; font-weight: 450; letter-spacing: -.01em; }
.hero__links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__links a { display: inline-block; padding: .8rem 1.3rem; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid var(--ink); }
.hero__links a:first-child { background: var(--ink); color: var(--bg); }
.hero__links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; background: var(--bg-2); filter: grayscale(1) contrast(1.08); }
.portrait figcaption { margin-top: .5rem; font-size: .8rem; font-weight: 600; font-style: italic; }
.hero.no-photo .hero__in { grid-template-columns: 1fr; }
.hero.no-photo .portrait { display: none; }

/* Secciones */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section > .wrap > .sh, #obra .sh { border-top: 3px solid var(--rule); }
.section--alt { background: var(--bg-2); }
.sh { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; align-items: end; padding-top: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sh h2 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.sh p { color: var(--muted); max-width: 30rem; justify-self: end; font-size: 1.05rem; }
#obra { padding-top: clamp(2.5rem, 6vw, 4rem); }
#obra .sh { border-top: 0; padding-top: 0; }

/* Obras */
.shelf.shelf--single { grid-template-columns: 1fr; }
.shelf.shelf--single .work { display: grid; grid-template-columns: clamp(14rem, 30vw, 24rem) 1fr; gap: 0 clamp(2rem, 5vw, 4rem); align-items: end; }
.shelf.shelf--single .work__cap { margin-top: 0; padding-top: 1rem; border-top: 3px solid var(--rule); }
.shelf.shelf--single .work__cap b { font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.shelf.shelf--single .work__cap .meta { margin-top: .8rem; font-size: 1.05rem; }
.shelf.shelf--single .work__cap p { display: block; margin-top: 1rem; font-size: 1.15rem; max-width: 32rem; }
.shelf.shelf--single .tc__title { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.work__cover { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; }
.work__cover img { width: 100%; height: 100%; object-fit: cover; }
.work__cover.has-img { aspect-ratio: auto; box-shadow: 0 24px 40px -26px rgba(0,0,0,.55); }
.work__cover.has-img img { height: auto; }
.tc { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 1.3rem; transition: transform .3s; }
a.work__cover:hover .tc { transform: scale(1.015); }
.tc__top { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tc__title { margin-top: auto; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.tc__author { margin-top: 1rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tc--oxblood { background: var(--accent); color: #fff; }
.tc--green { background: #0b0b0b; color: #fff; }
.tc--paper { background: #e6e6e3; color: #0b0b0b; }
:root[data-theme="dark"] .tc--green { background: #262626; }
.tc--green .tc__title { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
.work__cap { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--rule); font-size: .95rem; }
.work__cap b { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.work__cap .meta { display: block; margin-top: .2rem; font-style: italic; color: var(--muted); }
.work__cap p { margin-top: .4rem; color: var(--muted); }

.work__buy { display: inline-block; margin-top: 1.3rem; padding: .8rem 1.3rem; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem; text-decoration: none; }
.work__buy:hover { background: var(--accent); color: #fff; }

.ventures { margin-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 3px solid var(--rule); }
.ventures li { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--hair); color: var(--muted); }
.ventures li > a, .ventures__k { color: var(--ink); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.ventures li > a:hover { color: var(--accent); }

/* Publicaciones */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-bottom: 1.2rem; margin-bottom: .5rem; border-bottom: 1px solid var(--rule); }
.search input { width: min(24rem, 100%); padding: .65rem .9rem; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); font-size: 1rem; font-weight: 500; outline: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button { padding: .4rem .8rem; border: 1px solid var(--ink); font-size: .85rem; font-weight: 600; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filters button:hover { border-color: var(--accent); color: var(--accent); }
.filters button[aria-pressed="true"]:hover { color: var(--bg); background: var(--accent); }
.filters sup { font-size: .7em; margin-left: .2em; opacity: .7; }
.year { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--hair); }
.year__n { font-size: 2.6rem; font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.year li { line-height: 1.35; }
.year li + li { margin-top: .7rem; }
.pub a { font-weight: 600; text-decoration: none; }
.pub a:hover { text-decoration: underline; }
.pub em, .pub .m { color: var(--muted); }
.empty { color: var(--muted); padding: 1rem 0; }

/* Servicios */
.svc { counter-reset: s; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; border-top: 1px solid var(--rule); }
.svc li { counter-increment: s; padding: 1.6rem 0 1.8rem; border-bottom: 1px solid var(--hair); }
.svc li::before { content: counter(s, decimal-leading-zero); display: block; margin-bottom: .8rem; font-size: .85rem; font-weight: 700; color: var(--accent); }
.svc h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.svc p { margin-top: .6rem; color: var(--muted); max-width: 34rem; }
.svc__note { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.svc__note a { display: inline-block; padding: .8rem 1.3rem; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.svc__note a:hover { background: var(--accent); color: #fff; }

/* Contacto en bloque negro */
.contact { background: var(--inv-bg); color: var(--inv-ink); }
.contact .kicker { opacity: .7; }
.contact__mail { display: inline-block; margin-top: 1.2rem; font-size: clamp(2rem, 6.4vw, 5.6rem); font-weight: 800; line-height: .95; letter-spacing: -.04em; word-break: break-word; text-decoration-thickness: 3px; text-underline-offset: .12em; }
.contact__mail:hover { color: var(--accent); }
.contact__links { margin-top: 2rem; display: flex; gap: 1.6rem; font-weight: 700; }

.foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0 2rem; font-size: .85rem; font-weight: 600; }

@media (max-width: 900px) {
  .shelf { grid-template-columns: 1fr 1fr; }
  .svc { grid-template-columns: 1fr; }
  .sh { grid-template-columns: 1fr; }
  .sh p { justify-self: start; }
}
@media (max-width: 760px) {
  .top__in { flex-wrap: wrap; height: auto; padding: .8rem 0 .7rem; gap: .5rem 1rem; }
  .top__nav { order: 3; width: 100%; gap: 1.1rem; overflow-x: auto; font-size: .9rem; }
  .hero__in { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 55%; max-width: 14rem; margin-bottom: 1.5rem; }
  .shelf { gap: .8rem; }
  .tc { padding: .9rem; }
  .tc__title { font-size: 1.15rem; }
  .tc--green .tc__title { font-size: 1.8rem; }
  .tc__top, .tc__author { font-size: .6rem; }
  .work__cap p { display: none; }
  .shelf.shelf--single .work { grid-template-columns: 1fr; }
  .shelf.shelf--single .work__cover { width: 70%; max-width: 16rem; margin-bottom: 1.2rem; }
  .shelf.shelf--single .tc__title { font-size: 1.5rem; }
  .ventures li { grid-template-columns: 1fr; gap: .2rem; }
  .year { grid-template-columns: 1fr; gap: .5rem; }
  .year__n { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
